diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/aclocal.m4 sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/aclocal.m4 --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/aclocal.m4 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/aclocal.m4 2015-04-17 00:20:29.000000000 +0000 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.13.4 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,19 +11,20 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -32,8 +33,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -167,6 +168,8 @@ AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -652,7 +655,7 @@ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -816,6 +819,7 @@ m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -837,6 +841,29 @@ ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -867,6 +894,10 @@ m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -969,7 +1000,13 @@ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -977,6 +1014,7 @@ rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -988,6 +1026,7 @@ [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF @@ -1005,7 +1044,9 @@ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1050,8 +1091,8 @@ ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -1062,6 +1103,8 @@ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi @@ -1345,14 +1388,27 @@ CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1429,13 +1485,13 @@ if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1615,6 +1671,11 @@ lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -1654,7 +1715,7 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -2200,7 +2261,7 @@ case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -2209,7 +2270,7 @@ ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -2274,7 +2335,7 @@ ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -2413,7 +2474,7 @@ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -2421,10 +2482,6 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2432,7 +2489,7 @@ objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -2450,7 +2507,7 @@ esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2470,17 +2527,18 @@ ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -2541,7 +2599,7 @@ ;; interix[[3-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -2557,7 +2615,7 @@ nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -2594,9 +2652,9 @@ dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2659,7 +2717,7 @@ ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -2728,7 +2786,7 @@ ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2753,7 +2811,7 @@ ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -2777,7 +2835,7 @@ sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -2808,7 +2866,7 @@ tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2818,7 +2876,7 @@ ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -3240,7 +3298,7 @@ lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -3660,6 +3718,7 @@ # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -4244,7 +4303,9 @@ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi ;; esac else @@ -4336,18 +4397,33 @@ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; esac ;; esac @@ -4507,7 +4583,9 @@ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] @@ -4532,7 +4610,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4783,8 +4860,7 @@ xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ @@ -5079,6 +5155,7 @@ # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' @@ -5125,10 +5202,6 @@ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -5141,7 +5214,7 @@ ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5180,7 +5253,6 @@ fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes @@ -5622,9 +5694,6 @@ _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], @@ -5778,7 +5847,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -6148,7 +6216,7 @@ esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -6909,12 +6977,18 @@ } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary @@ -7111,7 +7185,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7244,7 +7317,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7427,6 +7499,73 @@ ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler @@ -7496,6 +7635,13 @@ dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], @@ -8160,9 +8306,24 @@ # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) @@ -8334,15 +8495,15 @@ # @configure_input@ -# serial 3293 ltversion.m4 +# serial 3337 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4]) -m4_define([LT_PACKAGE_REVISION], [1.3293]) +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4' -macro_revision='1.3293' +[macro_version='2.4.2' +macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) @@ -8474,7 +8635,8 @@ # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) @@ -8520,7 +8682,8 @@ pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried @@ -8568,9 +8731,9 @@ AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD @@ -8604,7 +8767,62 @@ fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +# PKG_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable pkgconfigdir as the location where a module +# should install pkg-config .pc files. By default the directory is +# $libdir/pkgconfig, but the default can be changed by passing +# DIRECTORY. The user can override through the --with-pkgconfigdir +# parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_INSTALLDIR + + +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_NOARCH_INSTALLDIR + + +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])# PKG_CHECK_VAR + +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8616,10 +8834,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' +[am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.13.4], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -8635,22 +8853,22 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.13.4])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -8669,7 +8887,7 @@ # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -8695,22 +8913,19 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -8729,16 +8944,14 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -8748,7 +8961,7 @@ # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -8761,12 +8974,13 @@ AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -8774,8 +8988,9 @@ # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -8814,16 +9029,16 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -8832,16 +9047,16 @@ test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -8889,7 +9104,7 @@ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -8899,34 +9114,39 @@ # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -8939,7 +9159,7 @@ # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -8951,21 +9171,19 @@ continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -8983,7 +9201,7 @@ # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -8993,15 +9211,12 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 16 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -9017,7 +9232,7 @@ # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -9046,31 +9261,40 @@ # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl @@ -9081,28 +9305,32 @@ [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], @@ -9130,7 +9358,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9149,16 +9377,14 @@ install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -9174,14 +9400,12 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -9199,7 +9423,7 @@ _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -9226,15 +9450,12 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -9242,11 +9463,10 @@ $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -9259,63 +9479,35 @@ esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -9326,7 +9518,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9345,22 +9537,16 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -9371,32 +9557,40 @@ esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -9406,9 +9600,85 @@ AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9416,34 +9686,32 @@ # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -9451,24 +9719,22 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -9478,75 +9744,114 @@ # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/AUTHORS sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/AUTHORS --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/AUTHORS 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/AUTHORS 2015-04-17 00:20:29.000000000 +0000 @@ -26,9 +26,27 @@ Piotr Woznica piwoz Tobias Mayer Laura Bieker bieker -Jakob Erdmann namdre Matthias Roeckl mroeckl +Jakob Erdmann namdre Jerome Haerri haerri Karol Stosiek kstosiek Maximilian Wittmann wittmax - +Marek Heinrich mahei +Melanie Weber mknocke +Mario Krumnow mkrumnow +Riccardo Belletti rickybo89 +Anna Chiara Bellini acbellini +Alessio Bonfietti bonfioale +Robbin Blokpoel rblokpoel +Nikolaus Furian nikolausfurian +Gianfilippo Slager +Sandesh Uppoor suppoor +Matthias Wagner mwagner +Mathew Robertson +Bill Baxter +Lyle Johnson +Peter Wagner <> piwagner +Eric Melde <> melde +Evamarie Wiessner +Andreas Kendziorra <> kend-an +Robert Hilbrich <> rhilbrich diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/bin/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/bin/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/bin/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/bin/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -5,10 +5,6 @@ endif endif -if INTERNAL -MAROUTER_APP = marouter -endif - if TRACI TRACI_TESTCLIENT_APP = TraCITestClient endif @@ -18,6 +14,7 @@ dfrouter dfrouterD dfrouterInt dfrouterIntD \ duarouter duarouterD duarouterInt duarouterIntD \ jtrrouter jtrrouterD jtrrouterInt jtrrouterIntD \ +marouter marouterD marouterInt marouterIntD \ netconvert netconvertD netconvertInt netconvertIntD \ netgenerate netgenerateD netgenerateInt netgenerateIntD \ od2trips od2tripsD od2tripsInt od2tripsIntD \ @@ -25,55 +22,84 @@ activitygen activitygenD activitygenInt activitygenIntD \ TraCITestClient TraCITestClientD TraCITestClientInt TraCITestClientIntD \ sumo-unittest sumo-unittestD \ -netedit neteditD marouter marouterD +netedit neteditD \ +emissionsDrivingCycle emissionsDrivingCycleD emissionsDrivingCycleInt emissionsDrivingCycleIntD \ +emissionsMap emissionsMapD emissionsMapInt emissionsMapIntD install: all -all: sumo dfrouter duarouter jtrrouter netconvert netgenerate od2trips polyconvert activitygen $(GUI_APP) $(NETEDIT_APP) $(MAROUTER_APP) $(TRACI_TESTCLIENT_APP) +all: sumo dfrouter duarouter jtrrouter netconvert netgenerate od2trips polyconvert activitygen emissionsDrivingCycle emissionsMap marouter $(GUI_APP) $(NETEDIT_APP) $(MAROUTER_APP) $(TRACI_TESTCLIENT_APP) sumo: ../src/sumo cp ../src/sumo ./`echo sumo | sed '$(transform)'` if [ ! -e sumo -a -e meso ]; then ln -s meso sumo; fi if [ ! -e sumoD -a -e mesoD ]; then ln -s mesoD sumoD; fi if [ ! -e sumo -a -e sumoD ]; then ln -s sumoD sumo; fi + if [ ! -e meso -a -e mesoD ]; then ln -s mesoD meso; fi dfrouter: ../src/dfrouter/dfrouter cp ../src/dfrouter/dfrouter ./`echo dfrouter | sed '$(transform)'` if [ ! -e dfrouter -a -e dfrouterInt ]; then ln -s dfrouterInt dfrouter; fi if [ ! -e dfrouterD -a -e dfrouterIntD ]; then ln -s dfrouterIntD dfrouterD; fi if [ ! -e dfrouter -a -e dfrouterD ]; then ln -s dfrouterD dfrouter; fi + if [ ! -e dfrouterInt -a -e dfrouterIntD ]; then ln -s dfrouterIntD dfrouterInt; fi duarouter: ../src/duarouter/duarouter cp ../src/duarouter/duarouter ./`echo duarouter | sed '$(transform)'` if [ ! -e duarouter -a -e duarouterInt ]; then ln -s duarouterInt duarouter; fi if [ ! -e duarouterD -a -e duarouterIntD ]; then ln -s duarouterIntD duarouterD; fi if [ ! -e duarouter -a -e duarouterD ]; then ln -s duarouterD duarouter; fi + if [ ! -e duarouterInt -a -e duarouterIntD ]; then ln -s duarouterIntD duarouterInt; fi jtrrouter: ../src/jtrrouter/jtrrouter cp ../src/jtrrouter/jtrrouter ./`echo jtrrouter | sed '$(transform)'` if [ ! -e jtrrouter -a -e jtrrouterInt ]; then ln -s jtrrouterInt jtrrouter; fi if [ ! -e jtrrouterD -a -e jtrrouterIntD ]; then ln -s jtrrouterIntD jtrrouterD; fi if [ ! -e jtrrouter -a -e jtrrouterD ]; then ln -s jtrrouterD jtrrouter; fi + if [ ! -e jtrrouterInt -a -e jtrrouterIntD ]; then ln -s jtrrouterIntD jtrrouterInt; fi netconvert: ../src/netconvert cp ../src/netconvert ./`echo netconvert | sed '$(transform)'` if [ ! -e netconvert -a -e netconvertInt ]; then ln -s netconvertInt netconvert; fi if [ ! -e netconvertD -a -e netconvertIntD ]; then ln -s netconvertIntD netconvertD; fi if [ ! -e netconvert -a -e netconvertD ]; then ln -s netconvertD netconvert; fi + if [ ! -e netconvertInt -a -e netconvertIntD ]; then ln -s netconvertIntD netconvertInt; fi netgenerate: ../src/netgen/netgenerate cp ../src/netgen/netgenerate ./`echo netgenerate | sed '$(transform)'` if [ ! -e netgenerate -a -e netgenerateInt ]; then ln -s netgenerateInt netgenerate; fi if [ ! -e netgenerateD -a -e netgenerateIntD ]; then ln -s netgenerateIntD netgenerateD; fi if [ ! -e netgenerate -a -e netgenerateD ]; then ln -s netgenerateD netgenerate; fi -od2trips: ../src/od2trips/od2trips - cp ../src/od2trips/od2trips ./`echo od2trips | sed '$(transform)'` + if [ ! -e netgenerateInt -a -e netgenerateIntD ]; then ln -s netgenerateIntD netgenerateInt; fi +od2trips: ../src/od2trips + cp ../src/od2trips ./`echo od2trips | sed '$(transform)'` if [ ! -e od2trips -a -e od2tripsInt ]; then ln -s od2tripsInt od2trips; fi if [ ! -e od2tripsD -a -e od2tripsIntD ]; then ln -s od2tripsIntD od2tripsD; fi if [ ! -e od2trips -a -e od2tripsD ]; then ln -s od2tripsD od2trips; fi + if [ ! -e od2tripsInt -a -e od2tripsIntD ]; then ln -s od2tripsIntD od2tripsInt; fi polyconvert: ../src/polyconvert/polyconvert cp ../src/polyconvert/polyconvert ./`echo polyconvert | sed '$(transform)'` if [ ! -e polyconvert -a -e polyconvertInt ]; then ln -s polyconvertInt polyconvert; fi if [ ! -e polyconvertD -a -e polyconvertIntD ]; then ln -s polyconvertIntD polyconvertD; fi if [ ! -e polyconvert -a -e polyconvertD ]; then ln -s polyconvertD polyconvert; fi + if [ ! -e polyconvertInt -a -e polyconvertIntD ]; then ln -s polyconvertIntD polyconvertInt; fi activitygen: ../src/activitygen/activitygen cp ../src/activitygen/activitygen ./`echo activitygen | sed '$(transform)'` if [ ! -e activitygen -a -e activitygenInt ]; then ln -s activitygenInt activitygen; fi if [ ! -e activitygenD -a -e activitygenIntD ]; then ln -s activitygenIntD activitygenD; fi if [ ! -e activitygen -a -e activitygenD ]; then ln -s activitygenD activitygen; fi + if [ ! -e activitygenInt -a -e activitygenIntD ]; then ln -s activitygenIntD activitygenInt; fi +emissionsDrivingCycle: ../src/tools/emissionsDrivingCycle + cp ../src/tools/emissionsDrivingCycle ./`echo emissionsDrivingCycle | sed '$(transform)'` + if [ ! -e emissionsDrivingCycle -a -e emissionsDrivingCycleInt ]; then ln -s emissionsDrivingCycleInt emissionsDrivingCycle; fi + if [ ! -e emissionsDrivingCycleD -a -e emissionsDrivingCycleIntD ]; then ln -s emissionsDrivingCycleIntD emissionsDrivingCycleD; fi + if [ ! -e emissionsDrivingCycle -a -e emissionsDrivingCycleD ]; then ln -s emissionsDrivingCycleD emissionsDrivingCycle; fi + if [ ! -e emissionsDrivingCycleInt -a -e emissionsDrivingCycleIntD ]; then ln -s emissionsDrivingCycleIntD emissionsDrivingCycleInt; fi +emissionsMap: ../src/tools/emissionsMap + cp ../src/tools/emissionsMap ./`echo emissionsMap | sed '$(transform)'` + if [ ! -e emissionsMap -a -e emissionsMapInt ]; then ln -s emissionsMapInt emissionsMap; fi + if [ ! -e emissionsMapD -a -e emissionsMapIntD ]; then ln -s emissionsMapIntD emissionsMapD; fi + if [ ! -e emissionsMap -a -e emissionsMapD ]; then ln -s emissionsMapD emissionsMap; fi + if [ ! -e emissionsMapInt -a -e emissionsMapIntD ]; then ln -s emissionsMapIntD emissionsMapInt; fi +marouter: ../src/marouter/marouter + cp ../src/marouter/marouter ./`echo marouter | sed '$(transform)'` + if [ ! -e marouter -a -e marouterInt ]; then ln -s marouterInt marouter; fi + if [ ! -e marouterD -a -e marouterIntD ]; then ln -s marouterIntD marouterD; fi + if [ ! -e marouter -a -e marouterD ]; then ln -s marouterD marouter; fi + if [ ! -e marouter -a -e marouterIntD ]; then ln -s marouterIntD marouterInt; fi $(GUI_APP): ../src/$(GUI_APP) cp ../src/$(GUI_APP) ./`echo $(GUI_APP) | sed '$(transform)'` if [ ! -e $(GUI_APP) -a -e meso-gui ]; then ln -s meso-gui $(GUI_APP); fi @@ -82,9 +108,6 @@ $(NETEDIT_APP): ../src/netedit/$(NETEDIT_APP) cp ../src/netedit/$(NETEDIT_APP) ./`echo $(NETEDIT_APP) | sed '$(transform)'` if [ ! -e $(NETEDIT_APP) -a -e $(NETEDIT_APP)D ]; then ln -s $(NETEDIT_APP)D $(NETEDIT_APP); fi -$(MAROUTER_APP): ../src/marouter/$(MAROUTER_APP) - cp ../src/marouter/$(MAROUTER_APP) ./`echo $(MAROUTER_APP) | sed '$(transform)'` - if [ ! -e $(MAROUTER_APP) -a -e $(MAROUTER_APP)D ]; then ln -s $(MAROUTER_APP)D $(MAROUTER_APP); fi $(TRACI_TESTCLIENT_APP): ../src/traci_testclient/$(TRACI_TESTCLIENT_APP) cp ../src/traci_testclient/$(TRACI_TESTCLIENT_APP) ./`echo $(TRACI_TESTCLIENT_APP) | sed '$(transform)'` if [ ! -e $(TRACI_TESTCLIENT_APP) -a -e $(TRACI_TESTCLIENT_APP)Int ]; then ln -s $(TRACI_TESTCLIENT_APP)Int $(TRACI_TESTCLIENT_APP); fi diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/bin/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/bin/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/bin/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/bin/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,7 +79,7 @@ host_triplet = @host@ target_triplet = @target@ subdir = bin -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -44,14 +88,33 @@ CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -78,9 +141,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -91,10 +158,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -190,13 +253,13 @@ top_srcdir = @top_srcdir@ @WITH_GUI_TRUE@GUI_APP = sumo-gui @INTERNAL_TRUE@@WITH_GUI_TRUE@NETEDIT_APP = netedit -@INTERNAL_TRUE@MAROUTER_APP = marouter @TRACI_TRUE@TRACI_TESTCLIENT_APP = TraCITestClient CLEANFILES = sumo sumoD meso mesoD \ sumo-gui sumo-guiD meso-gui meso-guiD \ dfrouter dfrouterD dfrouterInt dfrouterIntD \ duarouter duarouterD duarouterInt duarouterIntD \ jtrrouter jtrrouterD jtrrouterInt jtrrouterIntD \ +marouter marouterD marouterInt marouterIntD \ netconvert netconvertD netconvertInt netconvertIntD \ netgenerate netgenerateD netgenerateInt netgenerateIntD \ od2trips od2tripsD od2tripsInt od2tripsIntD \ @@ -204,7 +267,9 @@ activitygen activitygenD activitygenInt activitygenIntD \ TraCITestClient TraCITestClientD TraCITestClientInt TraCITestClientIntD \ sumo-unittest sumo-unittestD \ -netedit neteditD marouter marouterD +netedit neteditD \ +emissionsDrivingCycle emissionsDrivingCycleD emissionsDrivingCycleInt emissionsDrivingCycleIntD \ +emissionsMap emissionsMapD emissionsMapInt emissionsMapIntD all: all-am @@ -245,11 +310,11 @@ clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: + +ctags CTAGS: -ctags: CTAGS -CTAGS: +cscope cscopelist: distdir: $(DISTFILES) @@ -295,10 +360,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -380,64 +450,92 @@ .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am install: all -all: sumo dfrouter duarouter jtrrouter netconvert netgenerate od2trips polyconvert activitygen $(GUI_APP) $(NETEDIT_APP) $(MAROUTER_APP) $(TRACI_TESTCLIENT_APP) +all: sumo dfrouter duarouter jtrrouter netconvert netgenerate od2trips polyconvert activitygen emissionsDrivingCycle emissionsMap marouter $(GUI_APP) $(NETEDIT_APP) $(MAROUTER_APP) $(TRACI_TESTCLIENT_APP) sumo: ../src/sumo cp ../src/sumo ./`echo sumo | sed '$(transform)'` if [ ! -e sumo -a -e meso ]; then ln -s meso sumo; fi if [ ! -e sumoD -a -e mesoD ]; then ln -s mesoD sumoD; fi if [ ! -e sumo -a -e sumoD ]; then ln -s sumoD sumo; fi + if [ ! -e meso -a -e mesoD ]; then ln -s mesoD meso; fi dfrouter: ../src/dfrouter/dfrouter cp ../src/dfrouter/dfrouter ./`echo dfrouter | sed '$(transform)'` if [ ! -e dfrouter -a -e dfrouterInt ]; then ln -s dfrouterInt dfrouter; fi if [ ! -e dfrouterD -a -e dfrouterIntD ]; then ln -s dfrouterIntD dfrouterD; fi if [ ! -e dfrouter -a -e dfrouterD ]; then ln -s dfrouterD dfrouter; fi + if [ ! -e dfrouterInt -a -e dfrouterIntD ]; then ln -s dfrouterIntD dfrouterInt; fi duarouter: ../src/duarouter/duarouter cp ../src/duarouter/duarouter ./`echo duarouter | sed '$(transform)'` if [ ! -e duarouter -a -e duarouterInt ]; then ln -s duarouterInt duarouter; fi if [ ! -e duarouterD -a -e duarouterIntD ]; then ln -s duarouterIntD duarouterD; fi if [ ! -e duarouter -a -e duarouterD ]; then ln -s duarouterD duarouter; fi + if [ ! -e duarouterInt -a -e duarouterIntD ]; then ln -s duarouterIntD duarouterInt; fi jtrrouter: ../src/jtrrouter/jtrrouter cp ../src/jtrrouter/jtrrouter ./`echo jtrrouter | sed '$(transform)'` if [ ! -e jtrrouter -a -e jtrrouterInt ]; then ln -s jtrrouterInt jtrrouter; fi if [ ! -e jtrrouterD -a -e jtrrouterIntD ]; then ln -s jtrrouterIntD jtrrouterD; fi if [ ! -e jtrrouter -a -e jtrrouterD ]; then ln -s jtrrouterD jtrrouter; fi + if [ ! -e jtrrouterInt -a -e jtrrouterIntD ]; then ln -s jtrrouterIntD jtrrouterInt; fi netconvert: ../src/netconvert cp ../src/netconvert ./`echo netconvert | sed '$(transform)'` if [ ! -e netconvert -a -e netconvertInt ]; then ln -s netconvertInt netconvert; fi if [ ! -e netconvertD -a -e netconvertIntD ]; then ln -s netconvertIntD netconvertD; fi if [ ! -e netconvert -a -e netconvertD ]; then ln -s netconvertD netconvert; fi + if [ ! -e netconvertInt -a -e netconvertIntD ]; then ln -s netconvertIntD netconvertInt; fi netgenerate: ../src/netgen/netgenerate cp ../src/netgen/netgenerate ./`echo netgenerate | sed '$(transform)'` if [ ! -e netgenerate -a -e netgenerateInt ]; then ln -s netgenerateInt netgenerate; fi if [ ! -e netgenerateD -a -e netgenerateIntD ]; then ln -s netgenerateIntD netgenerateD; fi if [ ! -e netgenerate -a -e netgenerateD ]; then ln -s netgenerateD netgenerate; fi -od2trips: ../src/od2trips/od2trips - cp ../src/od2trips/od2trips ./`echo od2trips | sed '$(transform)'` + if [ ! -e netgenerateInt -a -e netgenerateIntD ]; then ln -s netgenerateIntD netgenerateInt; fi +od2trips: ../src/od2trips + cp ../src/od2trips ./`echo od2trips | sed '$(transform)'` if [ ! -e od2trips -a -e od2tripsInt ]; then ln -s od2tripsInt od2trips; fi if [ ! -e od2tripsD -a -e od2tripsIntD ]; then ln -s od2tripsIntD od2tripsD; fi if [ ! -e od2trips -a -e od2tripsD ]; then ln -s od2tripsD od2trips; fi + if [ ! -e od2tripsInt -a -e od2tripsIntD ]; then ln -s od2tripsIntD od2tripsInt; fi polyconvert: ../src/polyconvert/polyconvert cp ../src/polyconvert/polyconvert ./`echo polyconvert | sed '$(transform)'` if [ ! -e polyconvert -a -e polyconvertInt ]; then ln -s polyconvertInt polyconvert; fi if [ ! -e polyconvertD -a -e polyconvertIntD ]; then ln -s polyconvertIntD polyconvertD; fi if [ ! -e polyconvert -a -e polyconvertD ]; then ln -s polyconvertD polyconvert; fi + if [ ! -e polyconvertInt -a -e polyconvertIntD ]; then ln -s polyconvertIntD polyconvertInt; fi activitygen: ../src/activitygen/activitygen cp ../src/activitygen/activitygen ./`echo activitygen | sed '$(transform)'` if [ ! -e activitygen -a -e activitygenInt ]; then ln -s activitygenInt activitygen; fi if [ ! -e activitygenD -a -e activitygenIntD ]; then ln -s activitygenIntD activitygenD; fi if [ ! -e activitygen -a -e activitygenD ]; then ln -s activitygenD activitygen; fi + if [ ! -e activitygenInt -a -e activitygenIntD ]; then ln -s activitygenIntD activitygenInt; fi +emissionsDrivingCycle: ../src/tools/emissionsDrivingCycle + cp ../src/tools/emissionsDrivingCycle ./`echo emissionsDrivingCycle | sed '$(transform)'` + if [ ! -e emissionsDrivingCycle -a -e emissionsDrivingCycleInt ]; then ln -s emissionsDrivingCycleInt emissionsDrivingCycle; fi + if [ ! -e emissionsDrivingCycleD -a -e emissionsDrivingCycleIntD ]; then ln -s emissionsDrivingCycleIntD emissionsDrivingCycleD; fi + if [ ! -e emissionsDrivingCycle -a -e emissionsDrivingCycleD ]; then ln -s emissionsDrivingCycleD emissionsDrivingCycle; fi + if [ ! -e emissionsDrivingCycleInt -a -e emissionsDrivingCycleIntD ]; then ln -s emissionsDrivingCycleIntD emissionsDrivingCycleInt; fi +emissionsMap: ../src/tools/emissionsMap + cp ../src/tools/emissionsMap ./`echo emissionsMap | sed '$(transform)'` + if [ ! -e emissionsMap -a -e emissionsMapInt ]; then ln -s emissionsMapInt emissionsMap; fi + if [ ! -e emissionsMapD -a -e emissionsMapIntD ]; then ln -s emissionsMapIntD emissionsMapD; fi + if [ ! -e emissionsMap -a -e emissionsMapD ]; then ln -s emissionsMapD emissionsMap; fi + if [ ! -e emissionsMapInt -a -e emissionsMapIntD ]; then ln -s emissionsMapIntD emissionsMapInt; fi +marouter: ../src/marouter/marouter + cp ../src/marouter/marouter ./`echo marouter | sed '$(transform)'` + if [ ! -e marouter -a -e marouterInt ]; then ln -s marouterInt marouter; fi + if [ ! -e marouterD -a -e marouterIntD ]; then ln -s marouterIntD marouterD; fi + if [ ! -e marouter -a -e marouterD ]; then ln -s marouterD marouter; fi + if [ ! -e marouter -a -e marouterIntD ]; then ln -s marouterIntD marouterInt; fi $(GUI_APP): ../src/$(GUI_APP) cp ../src/$(GUI_APP) ./`echo $(GUI_APP) | sed '$(transform)'` if [ ! -e $(GUI_APP) -a -e meso-gui ]; then ln -s meso-gui $(GUI_APP); fi @@ -446,9 +544,6 @@ $(NETEDIT_APP): ../src/netedit/$(NETEDIT_APP) cp ../src/netedit/$(NETEDIT_APP) ./`echo $(NETEDIT_APP) | sed '$(transform)'` if [ ! -e $(NETEDIT_APP) -a -e $(NETEDIT_APP)D ]; then ln -s $(NETEDIT_APP)D $(NETEDIT_APP); fi -$(MAROUTER_APP): ../src/marouter/$(MAROUTER_APP) - cp ../src/marouter/$(MAROUTER_APP) ./`echo $(MAROUTER_APP) | sed '$(transform)'` - if [ ! -e $(MAROUTER_APP) -a -e $(MAROUTER_APP)D ]; then ln -s $(MAROUTER_APP)D $(MAROUTER_APP); fi $(TRACI_TESTCLIENT_APP): ../src/traci_testclient/$(TRACI_TESTCLIENT_APP) cp ../src/traci_testclient/$(TRACI_TESTCLIENT_APP) ./`echo $(TRACI_TESTCLIENT_APP) | sed '$(transform)'` if [ ! -e $(TRACI_TESTCLIENT_APP) -a -e $(TRACI_TESTCLIENT_APP)Int ]; then ln -s $(TRACI_TESTCLIENT_APP)Int $(TRACI_TESTCLIENT_APP); fi diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/activitygen/activitygen.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/activitygen/activitygen.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/activitygen/activitygen.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/activitygen/activitygen.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,223 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {3DAC2EC1-D265-4F66-8442-A006E50DC95F} - MFCProj - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {a003a0ed-38c6-4e03-84d1-ba42d25abc4d} - false - - - {492b0b5a-0bbe-49ba-82e6-70a82dbc242f} - - - {72cdb11a-ec19-4be2-bbe9-1fa33deccb20} - false - - - {334df447-d0b3-4cea-9693-f755eb11c18f} - - - {fc588f88-ffc4-4ebd-a790-1b1fe06e1fc8} - false - - - {ee29af87-7317-488d-bf6d-ec422d1dbad6} - false - - - {508f0bff-83fe-444c-9509-a359bca83bc4} - false - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/activitygen/activitygen.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/activitygen/activitygen.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/activitygen/activitygen.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/activitygen/activitygen.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,164 +0,0 @@ - - - - - {4dbcbada-ef1a-4d46-9f59-0da50cca8cb3} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {e09bcb49-dcda-4114-bf2c-742996f0a966} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/defaults.props sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/defaults.props --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/defaults.props 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/defaults.props 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ - - - - <_ProjectFileVersion>10.0.30319.1 - - - - Disabled - EnableFastChecks - MultiThreadedDebugDLL - true - true - Level4 - EditAndContinue - - - true - - - - - ..\..\..\tools\build\version.py - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/dfrouter/dfrouter.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/dfrouter/dfrouter.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/dfrouter/dfrouter.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/dfrouter/dfrouter.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,204 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C} - dfrouter - MFCProj - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - {a003a0ed-38c6-4e03-84d1-ba42d25abc4d} - false - - - {fc5b65e0-a0b1-40d7-8687-c2fc79e3da47} - false - - - {492b0b5a-0bbe-49ba-82e6-70a82dbc242f} - - - {72cdb11a-ec19-4be2-bbe9-1fa33deccb20} - false - - - {334df447-d0b3-4cea-9693-f755eb11c18f} - false - - - {9fcf1caf-0189-4242-88ba-47706e741119} - false - - - {fc588f88-ffc4-4ebd-a790-1b1fe06e1fc8} - false - - - {ee29af87-7317-488d-bf6d-ec422d1dbad6} - false - - - {508f0bff-83fe-444c-9509-a359bca83bc4} - false - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/dfrouter/dfrouter.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/dfrouter/dfrouter.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/dfrouter/dfrouter.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/dfrouter/dfrouter.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ - - - - - {6a131df9-c2cb-4cc3-9ddf-41c9062ebf80} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {48dc7c7f-40f7-4a15-8397-e820fa04459a} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/duarouter/duarouter.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/duarouter/duarouter.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/duarouter/duarouter.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/duarouter/duarouter.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,187 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9} - MFCProj - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - - - - {a003a0ed-38c6-4e03-84d1-ba42d25abc4d} - false - - - {fc5b65e0-a0b1-40d7-8687-c2fc79e3da47} - false - - - {492b0b5a-0bbe-49ba-82e6-70a82dbc242f} - - - {72cdb11a-ec19-4be2-bbe9-1fa33deccb20} - false - - - {334df447-d0b3-4cea-9693-f755eb11c18f} - - - {9fcf1caf-0189-4242-88ba-47706e741119} - false - - - {fc588f88-ffc4-4ebd-a790-1b1fe06e1fc8} - false - - - {ee29af87-7317-488d-bf6d-ec422d1dbad6} - false - - - {508f0bff-83fe-444c-9509-a359bca83bc4} - false - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/duarouter/duarouter.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/duarouter/duarouter.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/duarouter/duarouter.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/duarouter/duarouter.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - - {a470a529-363a-4777-9f01-9caeef8999b2} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {cc502a28-ac4e-4b73-ba76-c8ec38bc6648} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/exe.props sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/exe.props --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/exe.props 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/exe.props 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ - - - - <_ProjectFileVersion>10.0.30319.1 - Application - $(ProjectName)D - $(ProjectName)64D - $(ProjectName)F - $(ProjectName)64 - $(ProjectName)64F - $(ProjectName)Int - $(ProjectName)IntD - $(ProjectName)Int64 - $(ProjectName)Int64D - $(ProjectName)IntF - $(ProjectName)IntF64 - - - - $(XERCES_DEBUG_LIB);ws2_32.lib - - - - - $(XERCES_LIB);ws2_32.lib - - - - - $(XERCES_LIB);ws2_32.lib - - - - - $(XERCES_LIB);ws2_32.lib - - - - - $(XERCES_LIB);ws2_32.lib - - - - - $(XERCES_DEBUG_LIB);ws2_32.lib - - - - - xcopy /Y $(TargetPath) ..\..\..\bin\ - - - $(OutDir)$(TargetName).exe - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/Fastbuild.props sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/Fastbuild.props --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/Fastbuild.props 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/Fastbuild.props 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ - - - - <_ProjectFileVersion>10.0.30319.1 - - - - Speed - NDEBUG;%(PreprocessorDefinitions) - true - Default - MultiThreadedDLL - false - false - Level2 - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/guisim/guisim.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/guisim/guisim.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/guisim/guisim.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/guisim/guisim.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,341 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {F1904C42-F231-4B9D-AD80-E2971969AFA0} - MFCProj - sumo-gui - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - meso-gui - meso-guiD - meso-gui64 - meso-gui64D - meso-guiF - meso-gui64F - - - - $(PROJ_LIB);$(GDAL_LIB);$(PYTHON_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_DEBUG_LIB);$(FOX16_DEBUG_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib - - - - - $(PROJ_LIB);$(GDAL_LIB);$(PYTHON_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_DEBUG_LIB);$(FOX16_DEBUG_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib - - - - - $(PROJ_LIB);$(GDAL_LIB);$(PYTHON_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_LIB);$(FOX16_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib - Windows - mainCRTStartup - - - - - $(PROJ_LIB);$(GDAL_LIB);$(PYTHON_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_LIB);$(FOX16_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib - - - - - $(PROJ_LIB);$(GDAL_LIB);$(PYTHON_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_LIB);$(FOX16_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libmesogui\InternalRelease\y_libmesogui.lib;$(OSG_LIB);$(MSBuildProjectDirectory)\..\y_osgview\InternalRelease\y_osgview.lib;$(MSBuildProjectDirectory)\..\y_libmesosim\InternalRelease\y_libmesosim.lib - - - - - $(PROJ_LIB);$(GDAL_LIB);$(PYTHON_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_LIB);$(FOX16_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libmesogui\x64\InternalRelease\y_libmesogui.lib;$(OSG_LIB);$(MSBuildProjectDirectory)\..\y_osgview\x64\InternalRelease\y_osgview.lib;$(MSBuildProjectDirectory)\..\y_libmesosim\x64\InternalRelease\y_libmesosim.lib - - - - - $(PROJ_LIB);$(GDAL_LIB);$(PYTHON_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_DEBUG_LIB);$(FOX16_DEBUG_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libmesogui\InternalDebug\y_libmesogui.lib;$(OSG_DEBUG_LIB);$(MSBuildProjectDirectory)\..\y_osgview\InternalDebug\y_osgview.lib;$(MSBuildProjectDirectory)\..\y_libmesosim\InternalDebug\y_libmesosim.lib - - - - - $(PROJ_LIB);$(GDAL_LIB);$(PYTHON_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_DEBUG_LIB);$(FOX16_DEBUG_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libmesogui\x64\InternalDebug\y_libmesogui.lib;$(OSG_DEBUG_LIB);$(MSBuildProjectDirectory)\..\y_osgview\x64\InternalDebug\y_osgview.lib;$(MSBuildProjectDirectory)\..\y_libmesosim\x64\InternalDebug\y_libmesosim.lib - - - - - $(PROJ_LIB);$(GDAL_LIB);$(PYTHON_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_LIB);$(FOX16_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib - - - - - $(PROJ_LIB);$(GDAL_LIB);$(PYTHON_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_LIB);$(FOX16_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib - - - - - $(PROJ_LIB);$(GDAL_LIB);$(PYTHON_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_LIB);$(FOX16_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libmesogui\InternalRelease\y_libmesogui.lib;$(OSG_LIB);$(MSBuildProjectDirectory)\..\y_osgview\InternalFastbuild\y_osgview.lib;$(MSBuildProjectDirectory)\..\y_libmesosim\InternalFastbuild\y_libmesosim.lib - - - - - $(PROJ_LIB);$(GDAL_LIB);$(PYTHON_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_LIB);$(FOX16_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libmesogui\InternalRelease\y_libmesogui.lib;$(OSG_LIB);$(MSBuildProjectDirectory)\..\y_osgview\x64\InternalFastbuild\y_osgview.lib;$(MSBuildProjectDirectory)\..\y_libmesosim\x64\InternalFastbuild\y_libmesosim.lib - - - - - - - - - - - {b2ad8eb4-16b1-4bdc-9cf5-f7adadbd316d} - false - - - {9046260e-78aa-4458-be80-0747860a0f70} - false - - - {c9cc8a55-bcf5-44d8-9e22-55ea09757c60} - false - - - {2a069662-6b6f-40d7-a808-211f9c9a4aae} - false - - - {5ea5cb8f-2b57-4fab-a769-e9a64b3b9c36} - false - - - {fc5b65e0-a0b1-40d7-8687-c2fc79e3da47} - false - - - {306768a4-b73e-4b81-9ec0-b4836efe0504} - false - - - {272D2367-13FE-45C2-84AD-8480861DB43E} - false - - - {492b0b5a-0bbe-49ba-82e6-70a82dbc242f} - false - - - {80ac8a07-6702-4d2e-af75-f8db7fda169a} - false - - - {a54d4a8b-9520-40f0-b8cb-152bf506cb47} - false - - - {014f0919-66a3-4aed-8901-b6e02f56dc7c} - - - {9f9f769c-e533-4359-b4d2-09f9e20b0b2e} - - - {cc278de5-d3d8-4bd8-b8a4-bd76cb8fb4f1} - false - - - {af2015d2-2412-4355-87fb-e0d88b0a5fba} - false - - - {26f88652-2664-4ce7-8292-6bd37ee6c3ad} - false - - - {72cdb11a-ec19-4be2-bbe9-1fa33deccb20} - false - - - {ecaebbbd-18b0-4e40-9507-4ad2b018c1cd} - false - - - {334df447-d0b3-4cea-9693-f755eb11c18f} - false - - - {e3ab9c37-6b5a-4d8c-88f3-df750a493511} - false - - - {39f2dfde-76c6-46fd-a20a-6c8fd52c9db1} - false - - - {5f818af6-963e-40b3-93f3-35e145fde30b} - false - - - {8c2f733c-1c8e-45c9-a546-17ef0146718d} - false - - - {67e76d22-3c3e-44fc-9253-3fe583db7848} - false - - - {25af2c06-8b08-4b33-8775-657e27c304d9} - false - - - {9fcf1caf-0189-4242-88ba-47706e741119} - false - - - {fc588f88-ffc4-4ebd-a790-1b1fe06e1fc8} - false - - - {ee29af87-7317-488d-bf6d-ec422d1dbad6} - false - - - {508f0bff-83fe-444c-9509-a359bca83bc4} - false - - - {00a244e4-0f0d-49b9-a557-5ef1f8b98d7c} - true - false - false - true - false - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/guisim/guisim.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/guisim/guisim.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/guisim/guisim.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/guisim/guisim.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - - {f316fe2a-0aff-4142-bd4d-2c998f9a9bea} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {ba3cb8e7-edf2-49bd-95c1-51459ac14bbc} - h;hpp;hxx;hm;inl - - - {f467b499-f05c-4284-b92e-b1bd9f8b701a} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Quellcodedateien - - - - - Ressourcendateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/internal.props sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/internal.props --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/internal.props 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/internal.props 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ - - - - <_ProjectFileVersion>10.0.30319.1 - - - - HAVE_OSG;HAVE_INTERNAL;%(PreprocessorDefinitions) - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/internal.sln sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/internal.sln --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/internal.sln 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/internal.sln 1970-01-01 00:00:00.000000000 +0000 @@ -1,1516 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sumo-gui", "guisim\guisim.vcxproj", "{F1904C42-F231-4B9D-AD80-E2971969AFA0}" - ProjectSection(ProjectDependencies) = postProject - {308BEB29-142B-4088-BD41-80E273E20D3A} = {308BEB29-142B-4088-BD41-80E273E20D3A} - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0} = {F5218B3F-4CE3-47F7-8A3D-41683281EAA0} - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684} = {3CD3D44A-7809-485C-B7A9-D5FDE0C31684} - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C} = {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sumo", "sumo\sumo.vcxproj", "{08C90F3F-95F3-46C7-8D87-63AF6DF5558C}" - ProjectSection(ProjectDependencies) = postProject - {308BEB29-142B-4088-BD41-80E273E20D3A} = {308BEB29-142B-4088-BD41-80E273E20D3A} - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C} = {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libgui", "y_libgui\y_libgui.vcxproj", "{C9CC8A55-BCF5-44D8-9E22-55EA09757C60}" - ProjectSection(ProjectDependencies) = postProject - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} = {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C} = {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libguinetload", "y_libguinetload\y_libguinetload.vcxproj", "{B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libguisim", "y_libguisim\y_libguisim.vcxproj", "{9046260E-78AA-4458-BE80-0747860A0F70}" - ProjectSection(ProjectDependencies) = postProject - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} = {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C} = {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libmesogui", "y_libmesogui\y_libmesogui.vcxproj", "{3CD3D44A-7809-485C-B7A9-D5FDE0C31684}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libmesosim", "y_libmesosim\y_libmesosim.vcxproj", "{308BEB29-142B-4088-BD41-80E273E20D3A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libmicrosim", "y_libmicrosim\y_libmicrosim.vcxproj", "{2A069662-6B6F-40D7-A808-211F9C9A4AAE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libnetload", "y_libnetload\y_libnetload.vcxproj", "{5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_output", "z_libmicrosim_output\z_libmicrosim_output.vcxproj", "{CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_traffic_lights", "z_libmicrosim_traffic_lights\z_libmicrosim_traffic_lights.vcxproj", "{AF2015D2-2412-4355-87FB-E0D88B0A5FBA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_common", "z_libutils_common\z_libutils_common.vcxproj", "{72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_foxtools", "z_libutils_foxtools\z_libutils_foxtools.vcxproj", "{ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_geom", "z_libutils_geom\z_libutils_geom.vcxproj", "{334DF447-D0B3-4CEA-9693-F755EB11C18F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_iodevices", "z_libutils_iodevices\z_libutils_iodevices.vcxproj", "{FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_options", "z_libutils_options\z_libutils_options.vcxproj", "{EE29AF87-7317-488D-BF6D-EC422D1DBAD6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_xml", "z_libutils_xml\z_libutils_xml.vcxproj", "{508F0BFF-83FE-444C-9509-A359BCA83BC4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_importio", "z_libutils_importio\z_libutils_importio.vcxproj", "{9FCF1CAF-0189-4242-88BA-47706E741119}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_actions", "z_libmicrosim_actions\z_libmicrosim_actions.vcxproj", "{A54D4A8B-9520-40F0-B8CB-152BF506CB47}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_logging", "z_libmicrosim_logging\z_libmicrosim_logging.vcxproj", "{0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_trigger", "z_libmicrosim_trigger\z_libmicrosim_trigger.vcxproj", "{26F88652-2664-4CE7-8292-6BD37EE6C3AD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_div", "z_libutils_gui_div\z_libutils_gui_div.vcxproj", "{E3AB9C37-6B5A-4D8C-88F3-DF750A493511}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_settings", "z_libutils_gui_settings\z_libutils_gui_settings.vcxproj", "{8C2F733C-1C8E-45C9-A546-17EF0146718D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_images", "z_libutils_gui_images\z_libutils_gui_images.vcxproj", "{5F818AF6-963E-40B3-93F3-35E145FDE30B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_nvwa", "zz_foreign_nvwa\zz_foreign_nvwa.vcxproj", "{FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_tcpip", "zz_foreign_tcpip\zz_foreign_tcpip.vcxproj", "{492B0B5A-0BBE-49BA-82E6-70A82DBC242F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_polyfonts", "zz_foreign_polyfonts\zz_foreign_polyfonts.vcxproj", "{306768A4-B73E-4B81-9EC0-B4836EFE0504}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_gl2ps", "zz_foreign_gl2ps\zz_foreign_gl2ps.vcxproj", "{272D2367-13FE-45C2-84AD-8480861DB43E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_windows", "z_libutils_gui_windows\z_libutils_gui_windows.vcxproj", "{25AF2C06-8B08-4B33-8775-657E27C304D9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_tracker", "z_libutils_gui_tracker\z_libutils_gui_tracker.vcxproj", "{67E76D22-3C3E-44FC-9253-3FE583DB7848}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_globjects", "z_libutils_gui_globjects\z_libutils_gui_globjects.vcxproj", "{39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_events", "z_libutils_gui_events\z_libutils_gui_events.vcxproj", "{F574684D-2052-46AB-99B9-AFD5DA2174A6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libgui_dialogs", "z_libgui_dialogs\z_libgui_dialogs.vcxproj", "{80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_optional_libtraciserver", "z_optional_libtraciserver\z_optional_libtraciserver.vcxproj", "{00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netedit", "netedit\netedit.vcxproj", "{813B2D7E-CC23-4650-892F-553B1AFD912C}" - ProjectSection(ProjectDependencies) = postProject - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6} = {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6} - {25AF2C06-8B08-4B33-8775-657E27C304D9} = {25AF2C06-8B08-4B33-8775-657E27C304D9} - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} = {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - {F7F13336-3E29-4219-8580-A17C71E69718} = {F7F13336-3E29-4219-8580-A17C71E69718} - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511} = {E3AB9C37-6B5A-4D8C-88F3-DF750A493511} - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6} = {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6} - {8C2F733C-1C8E-45C9-A546-17EF0146718D} = {8C2F733C-1C8E-45C9-A546-17EF0146718D} - {334DF447-D0B3-4CEA-9693-F755EB11C18F} = {334DF447-D0B3-4CEA-9693-F755EB11C18F} - {F574684D-2052-46AB-99B9-AFD5DA2174A6} = {F574684D-2052-46AB-99B9-AFD5DA2174A6} - {272D2367-13FE-45C2-84AD-8480861DB43E} = {272D2367-13FE-45C2-84AD-8480861DB43E} - {50B2C273-2B6A-4A3A-BE24-83E3202DE180} = {50B2C273-2B6A-4A3A-BE24-83E3202DE180} - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} = {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} = {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} - {306768A4-B73E-4B81-9EC0-B4836EFE0504} = {306768A4-B73E-4B81-9EC0-B4836EFE0504} - {9FCF1CAF-0189-4242-88BA-47706E741119} = {9FCF1CAF-0189-4242-88BA-47706E741119} - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD} = {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD} - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3} = {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3} - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1} = {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - {91422FEF-2369-45E6-87AA-8B38709AD823} = {91422FEF-2369-45E6-87AA-8B38709AD823} - {91422FEF-2369-45E6-87AA-8B38709AD824} = {91422FEF-2369-45E6-87AA-8B38709AD824} - {5F818AF6-963E-40B3-93F3-35E145FDE30B} = {5F818AF6-963E-40B3-93F3-35E145FDE30B} - {508F0BFF-83FE-444C-9509-A359BCA83BC4} = {508F0BFF-83FE-444C-9509-A359BCA83BC4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libnetbuild", "y_libnetbuild\y_libnetbuild.vcxproj", "{BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libnetimport", "y_libnetimport\y_libnetimport.vcxproj", "{91422FEF-2369-45E6-87AA-8B38709AD823}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libnetimport_vissim", "z_libnetimport_vissim\z_libnetimport_vissim.vcxproj", "{F7F13336-3E29-4219-8580-A17C71E69718}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_distribution", "z_libutils_distribution\z_libutils_distribution.vcxproj", "{F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_eulerspiral", "zz_foreign_eulerspiral\zz_foreign_eulerspiral.vcxproj", "{50B2C273-2B6A-4A3A-BE24-83E3202DE180}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libnetwrite", "y_libnetwrite\y_libnetwrite.vcxproj", "{91422FEF-2369-45E6-87AA-8B38709AD824}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_osgview", "y_osgview\y_osgview.vcxproj", "{F5218B3F-4CE3-47F7-8A3D-41683281EAA0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "marouter", "marouter\marouter.vcxproj", "{90205628-51D7-4194-9FC0-7D74C35A3471}" - ProjectSection(ProjectDependencies) = postProject - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6} = {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6} - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D} = {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_librouter", "y_librouter\y_librouter.vcxproj", "{A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "activitygen", "activitygen\activitygen.vcxproj", "{3DAC2EC1-D265-4F66-8442-A006E50DC95F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dfrouter", "dfrouter\dfrouter.vcxproj", "{171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "duarouter", "duarouter\duarouter.vcxproj", "{8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jtrrouter", "jtrrouter\jtrrouter.vcxproj", "{43569450-FB3D-46EA-B9AB-CE92295C5570}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netconvert", "netconvert\netconvert.vcxproj", "{4589198B-EBD4-4811-B778-8AE270AEE0CD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netgenerate", "netgenerate\netgenerate.vcxproj", "{F241CA03-4AB1-4BB0-8151-7AF078E2BC06}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "od2trips", "od2trips\od2trips.vcxproj", "{39392259-4561-44C0-98F1-64CA4396C025}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "polyconvert", "polyconvert\polyconvert.vcxproj", "{CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TraciTestClient", "traci-testclient\Traci_TestClient.vcxproj", "{46274B55-07FE-4911-B4C0-D8B43A203B4A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_rtree", "zz_foreign_rtree\zz_foreign_rtree.vcxproj", "{25FDF327-EB7A-484A-96BC-AF2DB089D6F4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libinternal", "y_libinternal\y_libinternal.vcxproj", "{09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_cfmodels", "z_libmicrosim_cfmodels\z_libmicrosim_cfmodels.vcxproj", "{014F0919-66A3-4AED-8901-B6E02F56DC7C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_devices", "z_libmicrosim_devices\z_libmicrosim_devices.vcxproj", "{9F9F769C-E533-4359-B4D2-09F9E20B0B2E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Fastbuild|Win32 = Fastbuild|Win32 - Fastbuild|x64 = Fastbuild|x64 - InternalDebug|Win32 = InternalDebug|Win32 - InternalDebug|x64 = InternalDebug|x64 - InternalFastbuild|Win32 = InternalFastbuild|Win32 - InternalFastbuild|x64 = InternalFastbuild|x64 - InternalRelease|Win32 = InternalRelease|Win32 - InternalRelease|x64 = InternalRelease|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|Win32.ActiveCfg = Debug|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|Win32.Build.0 = Debug|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|x64.ActiveCfg = Debug|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|x64.Build.0 = Debug|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|Win32.ActiveCfg = Release|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|Win32.Build.0 = Release|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|x64.ActiveCfg = Release|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|x64.Build.0 = Release|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|Win32.ActiveCfg = Debug|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|Win32.Build.0 = Debug|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|x64.ActiveCfg = Debug|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|x64.Build.0 = Debug|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|Win32.ActiveCfg = Release|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|Win32.Build.0 = Release|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|x64.ActiveCfg = Release|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|x64.Build.0 = Release|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|Win32.ActiveCfg = Debug|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|Win32.Build.0 = Debug|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|x64.ActiveCfg = Debug|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|x64.Build.0 = Debug|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalFastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalFastbuild|Win32.Build.0 = InternalRelease|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalFastbuild|x64.ActiveCfg = InternalRelease|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalFastbuild|x64.Build.0 = InternalRelease|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|Win32.ActiveCfg = Release|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|Win32.Build.0 = Release|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|x64.ActiveCfg = Release|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|x64.Build.0 = Release|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|Win32.ActiveCfg = Debug|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|Win32.Build.0 = Debug|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|x64.ActiveCfg = Debug|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|x64.Build.0 = Debug|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalFastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalFastbuild|Win32.Build.0 = InternalRelease|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalFastbuild|x64.ActiveCfg = InternalRelease|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalFastbuild|x64.Build.0 = InternalRelease|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|Win32.ActiveCfg = Release|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|Win32.Build.0 = Release|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|x64.ActiveCfg = Release|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|x64.Build.0 = Release|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|Win32.ActiveCfg = Debug|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|Win32.Build.0 = Debug|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|x64.ActiveCfg = Debug|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|x64.Build.0 = Debug|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalFastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalFastbuild|Win32.Build.0 = InternalRelease|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalFastbuild|x64.ActiveCfg = InternalRelease|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalFastbuild|x64.Build.0 = InternalRelease|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|Win32.ActiveCfg = Release|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|Win32.Build.0 = Release|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|x64.ActiveCfg = Release|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|x64.Build.0 = Release|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Debug|Win32.ActiveCfg = InternalDebug|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Debug|x64.ActiveCfg = InternalDebug|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Fastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Fastbuild|x64.ActiveCfg = InternalRelease|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Release|Win32.ActiveCfg = InternalRelease|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Release|x64.ActiveCfg = InternalRelease|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Debug|Win32.ActiveCfg = InternalDebug|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Debug|x64.ActiveCfg = InternalDebug|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Fastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Fastbuild|x64.ActiveCfg = InternalRelease|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Release|Win32.ActiveCfg = InternalRelease|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Release|x64.ActiveCfg = InternalRelease|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|Win32.ActiveCfg = Debug|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|Win32.Build.0 = Debug|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|x64.ActiveCfg = Debug|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|x64.Build.0 = Debug|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalFastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalFastbuild|Win32.Build.0 = InternalRelease|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalFastbuild|x64.ActiveCfg = InternalRelease|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalFastbuild|x64.Build.0 = InternalRelease|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|Win32.ActiveCfg = Release|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|Win32.Build.0 = Release|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|x64.ActiveCfg = Release|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|x64.Build.0 = Release|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|Win32.ActiveCfg = Debug|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|Win32.Build.0 = Debug|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|x64.ActiveCfg = Debug|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|x64.Build.0 = Debug|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalFastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalFastbuild|Win32.Build.0 = InternalRelease|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalFastbuild|x64.ActiveCfg = InternalRelease|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalFastbuild|x64.Build.0 = InternalRelease|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|Win32.ActiveCfg = Release|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|Win32.Build.0 = Release|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|x64.ActiveCfg = Release|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|x64.Build.0 = Release|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|Win32.ActiveCfg = Debug|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|Win32.Build.0 = Debug|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|x64.ActiveCfg = Debug|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|x64.Build.0 = Debug|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalFastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalFastbuild|Win32.Build.0 = InternalRelease|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalFastbuild|x64.ActiveCfg = InternalRelease|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalFastbuild|x64.Build.0 = InternalRelease|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|Win32.ActiveCfg = Release|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|Win32.Build.0 = Release|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|x64.ActiveCfg = Release|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|x64.Build.0 = Release|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|Win32.ActiveCfg = Debug|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|Win32.Build.0 = Debug|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|x64.ActiveCfg = Debug|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|x64.Build.0 = Debug|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalDebug|Win32.Build.0 = Debug|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalDebug|x64.ActiveCfg = Debug|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalDebug|x64.Build.0 = Debug|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalRelease|Win32.Build.0 = Release|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalRelease|x64.ActiveCfg = Release|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalRelease|x64.Build.0 = Release|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|Win32.ActiveCfg = Release|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|Win32.Build.0 = Release|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|x64.ActiveCfg = Release|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|x64.Build.0 = Release|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|Win32.ActiveCfg = Debug|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|Win32.Build.0 = Debug|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|x64.ActiveCfg = Debug|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|x64.Build.0 = Debug|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalDebug|Win32.Build.0 = Debug|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalDebug|x64.ActiveCfg = Debug|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalDebug|x64.Build.0 = Debug|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalRelease|Win32.Build.0 = Release|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalRelease|x64.ActiveCfg = Release|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalRelease|x64.Build.0 = Release|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|Win32.ActiveCfg = Release|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|Win32.Build.0 = Release|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|x64.ActiveCfg = Release|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|x64.Build.0 = Release|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|Win32.ActiveCfg = Debug|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|Win32.Build.0 = Debug|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|x64.ActiveCfg = Debug|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|x64.Build.0 = Debug|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalDebug|Win32.Build.0 = Debug|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalDebug|x64.ActiveCfg = Debug|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalDebug|x64.Build.0 = Debug|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalRelease|Win32.Build.0 = Release|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalRelease|x64.ActiveCfg = Release|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalRelease|x64.Build.0 = Release|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|Win32.ActiveCfg = Release|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|Win32.Build.0 = Release|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|x64.ActiveCfg = Release|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|x64.Build.0 = Release|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|Win32.ActiveCfg = Debug|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|Win32.Build.0 = Debug|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|x64.ActiveCfg = Debug|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|x64.Build.0 = Debug|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalDebug|Win32.Build.0 = Debug|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalDebug|x64.ActiveCfg = Debug|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalDebug|x64.Build.0 = Debug|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalRelease|Win32.Build.0 = Release|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalRelease|x64.ActiveCfg = Release|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalRelease|x64.Build.0 = Release|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|Win32.ActiveCfg = Release|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|Win32.Build.0 = Release|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|x64.ActiveCfg = Release|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|x64.Build.0 = Release|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|Win32.ActiveCfg = Debug|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|Win32.Build.0 = Debug|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|x64.ActiveCfg = Debug|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|x64.Build.0 = Debug|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalDebug|Win32.Build.0 = Debug|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalDebug|x64.ActiveCfg = Debug|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalDebug|x64.Build.0 = Debug|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalRelease|Win32.Build.0 = Release|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalRelease|x64.ActiveCfg = Release|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalRelease|x64.Build.0 = Release|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|Win32.ActiveCfg = Release|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|Win32.Build.0 = Release|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|x64.ActiveCfg = Release|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|x64.Build.0 = Release|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|Win32.ActiveCfg = Debug|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|Win32.Build.0 = Debug|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|x64.ActiveCfg = Debug|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|x64.Build.0 = Debug|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalDebug|Win32.Build.0 = Debug|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalDebug|x64.ActiveCfg = Debug|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalDebug|x64.Build.0 = Debug|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalRelease|Win32.Build.0 = Release|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalRelease|x64.ActiveCfg = Release|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalRelease|x64.Build.0 = Release|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|Win32.ActiveCfg = Release|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|Win32.Build.0 = Release|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|x64.ActiveCfg = Release|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|x64.Build.0 = Release|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|Win32.ActiveCfg = Debug|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|Win32.Build.0 = Debug|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|x64.ActiveCfg = Debug|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|x64.Build.0 = Debug|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalDebug|Win32.Build.0 = Debug|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalDebug|x64.ActiveCfg = Debug|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalDebug|x64.Build.0 = Debug|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalRelease|Win32.Build.0 = Release|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalRelease|x64.ActiveCfg = Release|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalRelease|x64.Build.0 = Release|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|Win32.ActiveCfg = Release|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|Win32.Build.0 = Release|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|x64.ActiveCfg = Release|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|x64.Build.0 = Release|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|Win32.ActiveCfg = Debug|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|Win32.Build.0 = Debug|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|x64.ActiveCfg = Debug|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|x64.Build.0 = Debug|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalDebug|Win32.Build.0 = Debug|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalDebug|x64.ActiveCfg = Debug|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalDebug|x64.Build.0 = Debug|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalRelease|Win32.Build.0 = Release|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalRelease|x64.ActiveCfg = Release|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalRelease|x64.Build.0 = Release|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|Win32.ActiveCfg = Release|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|Win32.Build.0 = Release|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|x64.ActiveCfg = Release|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|x64.Build.0 = Release|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|Win32.ActiveCfg = Debug|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|Win32.Build.0 = Debug|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|x64.ActiveCfg = Debug|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|x64.Build.0 = Debug|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalDebug|Win32.Build.0 = Debug|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalDebug|x64.ActiveCfg = Debug|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalDebug|x64.Build.0 = Debug|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalRelease|Win32.Build.0 = Release|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalRelease|x64.ActiveCfg = Release|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalRelease|x64.Build.0 = Release|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|Win32.ActiveCfg = Release|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|Win32.Build.0 = Release|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|x64.ActiveCfg = Release|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|x64.Build.0 = Release|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|Win32.ActiveCfg = Debug|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|Win32.Build.0 = Debug|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|x64.ActiveCfg = Debug|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|x64.Build.0 = Debug|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalDebug|Win32.Build.0 = Debug|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalDebug|x64.ActiveCfg = Debug|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalDebug|x64.Build.0 = Debug|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalRelease|Win32.Build.0 = Release|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalRelease|x64.ActiveCfg = Release|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalRelease|x64.Build.0 = Release|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|Win32.ActiveCfg = Release|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|Win32.Build.0 = Release|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|x64.ActiveCfg = Release|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|x64.Build.0 = Release|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|Win32.ActiveCfg = Debug|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|Win32.Build.0 = Debug|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|x64.ActiveCfg = Debug|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|x64.Build.0 = Debug|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalFastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalFastbuild|Win32.Build.0 = InternalRelease|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalFastbuild|x64.ActiveCfg = InternalRelease|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalFastbuild|x64.Build.0 = InternalRelease|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|Win32.ActiveCfg = Release|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|Win32.Build.0 = Release|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|x64.ActiveCfg = Release|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|x64.Build.0 = Release|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|Win32.ActiveCfg = Debug|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|Win32.Build.0 = Debug|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|x64.ActiveCfg = Debug|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|x64.Build.0 = Debug|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalDebug|Win32.Build.0 = Debug|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalDebug|x64.ActiveCfg = Debug|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalDebug|x64.Build.0 = Debug|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalRelease|Win32.Build.0 = Release|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalRelease|x64.ActiveCfg = Release|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalRelease|x64.Build.0 = Release|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|Win32.ActiveCfg = Release|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|Win32.Build.0 = Release|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|x64.ActiveCfg = Release|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|x64.Build.0 = Release|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|Win32.Build.0 = Debug|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|x64.ActiveCfg = Debug|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|x64.Build.0 = Debug|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalFastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalFastbuild|Win32.Build.0 = InternalRelease|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalFastbuild|x64.ActiveCfg = InternalRelease|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalFastbuild|x64.Build.0 = InternalRelease|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|Win32.ActiveCfg = Release|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|Win32.Build.0 = Release|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|x64.ActiveCfg = Release|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|x64.Build.0 = Release|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|Win32.ActiveCfg = Debug|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|Win32.Build.0 = Debug|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|x64.ActiveCfg = Debug|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|x64.Build.0 = Debug|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalDebug|Win32.Build.0 = Debug|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalDebug|x64.ActiveCfg = Debug|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalDebug|x64.Build.0 = Debug|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalRelease|Win32.Build.0 = Release|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalRelease|x64.ActiveCfg = Release|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalRelease|x64.Build.0 = Release|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|Win32.ActiveCfg = Release|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|Win32.Build.0 = Release|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|x64.ActiveCfg = Release|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|x64.Build.0 = Release|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|Win32.ActiveCfg = Debug|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|Win32.Build.0 = Debug|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|x64.ActiveCfg = Debug|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|x64.Build.0 = Debug|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalDebug|Win32.Build.0 = Debug|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalDebug|x64.ActiveCfg = Debug|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalDebug|x64.Build.0 = Debug|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalRelease|Win32.Build.0 = Release|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalRelease|x64.ActiveCfg = Release|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalRelease|x64.Build.0 = Release|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|Win32.ActiveCfg = Release|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|Win32.Build.0 = Release|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|x64.ActiveCfg = Release|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|x64.Build.0 = Release|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|Win32.ActiveCfg = Debug|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|Win32.Build.0 = Debug|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|x64.ActiveCfg = Debug|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|x64.Build.0 = Debug|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalDebug|Win32.Build.0 = Debug|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalDebug|x64.ActiveCfg = Debug|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalDebug|x64.Build.0 = Debug|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalRelease|Win32.Build.0 = Release|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalRelease|x64.ActiveCfg = Release|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalRelease|x64.Build.0 = Release|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|Win32.ActiveCfg = Release|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|Win32.Build.0 = Release|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|x64.ActiveCfg = Release|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|x64.Build.0 = Release|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|Win32.ActiveCfg = Debug|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|Win32.Build.0 = Debug|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|x64.ActiveCfg = Debug|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|x64.Build.0 = Debug|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalDebug|Win32.Build.0 = Debug|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalDebug|x64.ActiveCfg = Debug|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalDebug|x64.Build.0 = Debug|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalRelease|Win32.Build.0 = Release|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalRelease|x64.ActiveCfg = Release|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalRelease|x64.Build.0 = Release|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|Win32.ActiveCfg = Release|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|Win32.Build.0 = Release|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|x64.ActiveCfg = Release|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|x64.Build.0 = Release|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|Win32.ActiveCfg = Debug|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|Win32.Build.0 = Debug|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|x64.ActiveCfg = Debug|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|x64.Build.0 = Debug|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalDebug|Win32.Build.0 = Debug|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalDebug|x64.ActiveCfg = Debug|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalDebug|x64.Build.0 = Debug|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalRelease|Win32.Build.0 = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalRelease|x64.ActiveCfg = Release|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalRelease|x64.Build.0 = Release|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|Win32.ActiveCfg = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|Win32.Build.0 = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|x64.ActiveCfg = Release|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|x64.Build.0 = Release|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|Win32.Build.0 = Debug|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|x64.ActiveCfg = Debug|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|x64.Build.0 = Debug|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalFastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalFastbuild|Win32.Build.0 = InternalRelease|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalFastbuild|x64.ActiveCfg = InternalRelease|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalFastbuild|x64.Build.0 = InternalRelease|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|Win32.ActiveCfg = Release|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|Win32.Build.0 = Release|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|x64.ActiveCfg = Release|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|x64.Build.0 = Release|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|Win32.ActiveCfg = Debug|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|Win32.Build.0 = Debug|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|x64.ActiveCfg = Debug|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|x64.Build.0 = Debug|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalDebug|Win32.Build.0 = Debug|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalDebug|x64.ActiveCfg = Debug|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalDebug|x64.Build.0 = Debug|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalRelease|Win32.Build.0 = Release|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalRelease|x64.ActiveCfg = Release|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalRelease|x64.Build.0 = Release|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|Win32.ActiveCfg = Release|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|Win32.Build.0 = Release|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|x64.ActiveCfg = Release|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|x64.Build.0 = Release|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|Win32.ActiveCfg = Debug|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|Win32.Build.0 = Debug|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|x64.ActiveCfg = Debug|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|x64.Build.0 = Debug|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalDebug|Win32.Build.0 = Debug|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalDebug|x64.ActiveCfg = Debug|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalDebug|x64.Build.0 = Debug|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalRelease|Win32.Build.0 = Release|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalRelease|x64.ActiveCfg = Release|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalRelease|x64.Build.0 = Release|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|Win32.ActiveCfg = Release|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|Win32.Build.0 = Release|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|x64.ActiveCfg = Release|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|x64.Build.0 = Release|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|Win32.ActiveCfg = Debug|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|Win32.Build.0 = Debug|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|x64.ActiveCfg = Debug|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|x64.Build.0 = Debug|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalDebug|Win32.Build.0 = Debug|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalDebug|x64.ActiveCfg = Debug|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalDebug|x64.Build.0 = Debug|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalRelease|Win32.Build.0 = Release|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalRelease|x64.ActiveCfg = Release|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalRelease|x64.Build.0 = Release|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|Win32.ActiveCfg = Release|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|Win32.Build.0 = Release|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|x64.ActiveCfg = Release|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|x64.Build.0 = Release|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|Win32.ActiveCfg = Debug|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|Win32.Build.0 = Debug|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|x64.ActiveCfg = Debug|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|x64.Build.0 = Debug|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalFastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalFastbuild|Win32.Build.0 = InternalRelease|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalFastbuild|x64.ActiveCfg = InternalRelease|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalFastbuild|x64.Build.0 = InternalRelease|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|Win32.ActiveCfg = Release|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|Win32.Build.0 = Release|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|x64.ActiveCfg = Release|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|x64.Build.0 = Release|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Debug|Win32.ActiveCfg = Debug|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Debug|Win32.Build.0 = Debug|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Debug|x64.ActiveCfg = Debug|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Debug|x64.Build.0 = Debug|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalFastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalFastbuild|Win32.Build.0 = InternalRelease|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalFastbuild|x64.ActiveCfg = InternalRelease|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalFastbuild|x64.Build.0 = InternalRelease|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Release|Win32.ActiveCfg = Release|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Release|Win32.Build.0 = Release|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Release|x64.ActiveCfg = Release|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Release|x64.Build.0 = Release|x64 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.Debug|Win32.ActiveCfg = InternalDebug|Win32 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.Debug|x64.ActiveCfg = InternalDebug|x64 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.Release|Win32.ActiveCfg = InternalRelease|Win32 - {813B2D7E-CC23-4650-892F-553B1AFD912C}.Release|x64.ActiveCfg = InternalRelease|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Debug|Win32.ActiveCfg = Debug|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Debug|Win32.Build.0 = Debug|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Debug|x64.ActiveCfg = Debug|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Debug|x64.Build.0 = Debug|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalDebug|Win32.Build.0 = Debug|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalDebug|x64.ActiveCfg = Debug|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalDebug|x64.Build.0 = Debug|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalRelease|Win32.Build.0 = Release|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalRelease|x64.ActiveCfg = Release|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalRelease|x64.Build.0 = Release|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Release|Win32.ActiveCfg = Release|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Release|Win32.Build.0 = Release|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Release|x64.ActiveCfg = Release|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Release|x64.Build.0 = Release|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Debug|Win32.ActiveCfg = Debug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Debug|Win32.Build.0 = Debug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Debug|x64.ActiveCfg = Debug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Debug|x64.Build.0 = Debug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalFastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalFastbuild|Win32.Build.0 = InternalRelease|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalFastbuild|x64.ActiveCfg = InternalRelease|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalFastbuild|x64.Build.0 = InternalRelease|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Release|Win32.ActiveCfg = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Release|Win32.Build.0 = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Release|x64.ActiveCfg = Release|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Release|x64.Build.0 = Release|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Debug|Win32.ActiveCfg = Debug|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Debug|Win32.Build.0 = Debug|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Debug|x64.ActiveCfg = Debug|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Debug|x64.Build.0 = Debug|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalDebug|Win32.Build.0 = Debug|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalDebug|x64.ActiveCfg = Debug|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalDebug|x64.Build.0 = Debug|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalRelease|Win32.Build.0 = Release|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalRelease|x64.ActiveCfg = Release|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalRelease|x64.Build.0 = Release|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Release|Win32.ActiveCfg = Release|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Release|Win32.Build.0 = Release|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Release|x64.ActiveCfg = Release|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Release|x64.Build.0 = Release|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Debug|Win32.ActiveCfg = Debug|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Debug|Win32.Build.0 = Debug|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Debug|x64.ActiveCfg = Debug|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Debug|x64.Build.0 = Debug|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalDebug|Win32.Build.0 = Debug|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalDebug|x64.ActiveCfg = Debug|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalDebug|x64.Build.0 = Debug|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalRelease|Win32.Build.0 = Release|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalRelease|x64.ActiveCfg = Release|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalRelease|x64.Build.0 = Release|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Release|Win32.ActiveCfg = Release|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Release|Win32.Build.0 = Release|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Release|x64.ActiveCfg = Release|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Release|x64.Build.0 = Release|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Debug|Win32.ActiveCfg = Debug|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Debug|Win32.Build.0 = Debug|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Debug|x64.ActiveCfg = Debug|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Debug|x64.Build.0 = Debug|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalDebug|Win32.Build.0 = Debug|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalDebug|x64.ActiveCfg = Debug|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalDebug|x64.Build.0 = Debug|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalRelease|Win32.Build.0 = Release|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalRelease|x64.ActiveCfg = Release|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalRelease|x64.Build.0 = Release|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Release|Win32.ActiveCfg = Release|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Release|Win32.Build.0 = Release|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Release|x64.ActiveCfg = Release|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Release|x64.Build.0 = Release|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Debug|Win32.ActiveCfg = Debug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Debug|Win32.Build.0 = Debug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Debug|x64.ActiveCfg = Debug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Debug|x64.Build.0 = Debug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalDebug|Win32.Build.0 = Debug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalDebug|x64.ActiveCfg = Debug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalDebug|x64.Build.0 = Debug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalRelease|Win32.Build.0 = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalRelease|x64.ActiveCfg = Release|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalRelease|x64.Build.0 = Release|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Release|Win32.ActiveCfg = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Release|Win32.Build.0 = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Release|x64.ActiveCfg = Release|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Release|x64.Build.0 = Release|x64 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.Debug|Win32.ActiveCfg = InternalDebug|Win32 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.Debug|x64.ActiveCfg = InternalDebug|x64 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.Fastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.Fastbuild|x64.ActiveCfg = InternalRelease|x64 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.Release|Win32.ActiveCfg = InternalRelease|Win32 - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0}.Release|x64.ActiveCfg = InternalRelease|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Debug|Win32.ActiveCfg = InternalDebug|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Debug|x64.ActiveCfg = InternalDebug|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Fastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Fastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Fastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Fastbuild|x64.Build.0 = InternalFastbuild|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Release|Win32.ActiveCfg = InternalRelease|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Release|x64.ActiveCfg = InternalRelease|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Debug|Win32.ActiveCfg = Debug|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Debug|Win32.Build.0 = Debug|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Debug|x64.ActiveCfg = Debug|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Debug|x64.Build.0 = Debug|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalFastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalFastbuild|Win32.Build.0 = InternalRelease|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalFastbuild|x64.ActiveCfg = InternalRelease|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalFastbuild|x64.Build.0 = InternalRelease|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Release|Win32.ActiveCfg = Release|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Release|Win32.Build.0 = Release|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Release|x64.ActiveCfg = Release|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Release|x64.Build.0 = Release|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Debug|Win32.ActiveCfg = Debug|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Debug|Win32.Build.0 = Debug|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Debug|x64.ActiveCfg = Debug|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Debug|x64.Build.0 = Debug|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Release|Win32.ActiveCfg = Release|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Release|Win32.Build.0 = Release|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Release|x64.ActiveCfg = Release|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Release|x64.Build.0 = Release|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Debug|Win32.ActiveCfg = Debug|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Debug|Win32.Build.0 = Debug|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Debug|x64.ActiveCfg = Debug|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Debug|x64.Build.0 = Debug|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Release|Win32.ActiveCfg = Release|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Release|Win32.Build.0 = Release|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Release|x64.ActiveCfg = Release|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Release|x64.Build.0 = Release|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Debug|Win32.Build.0 = Debug|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Debug|x64.ActiveCfg = Debug|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Debug|x64.Build.0 = Debug|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Release|Win32.ActiveCfg = Release|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Release|Win32.Build.0 = Release|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Release|x64.ActiveCfg = Release|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Release|x64.Build.0 = Release|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Debug|Win32.ActiveCfg = Debug|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Debug|Win32.Build.0 = Debug|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Debug|x64.ActiveCfg = Debug|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Debug|x64.Build.0 = Debug|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Release|Win32.ActiveCfg = Release|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Release|Win32.Build.0 = Release|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Release|x64.ActiveCfg = Release|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Release|x64.Build.0 = Release|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Debug|Win32.ActiveCfg = Debug|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Debug|Win32.Build.0 = Debug|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Debug|x64.ActiveCfg = Debug|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Debug|x64.Build.0 = Debug|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Release|Win32.ActiveCfg = Release|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Release|Win32.Build.0 = Release|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Release|x64.ActiveCfg = Release|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Release|x64.Build.0 = Release|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Debug|Win32.ActiveCfg = Debug|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Debug|Win32.Build.0 = Debug|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Debug|x64.ActiveCfg = Debug|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Debug|x64.Build.0 = Debug|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Release|Win32.ActiveCfg = Release|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Release|Win32.Build.0 = Release|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Release|x64.ActiveCfg = Release|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Release|x64.Build.0 = Release|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Debug|Win32.ActiveCfg = Debug|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Debug|Win32.Build.0 = Debug|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Debug|x64.ActiveCfg = Debug|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Debug|x64.Build.0 = Debug|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Release|Win32.ActiveCfg = Release|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Release|Win32.Build.0 = Release|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Release|x64.ActiveCfg = Release|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Release|x64.Build.0 = Release|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Debug|Win32.ActiveCfg = Debug|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Debug|Win32.Build.0 = Debug|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Debug|x64.ActiveCfg = Debug|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Debug|x64.Build.0 = Debug|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Release|Win32.ActiveCfg = Release|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Release|Win32.Build.0 = Release|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Release|x64.ActiveCfg = Release|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Release|x64.Build.0 = Release|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Debug|Win32.ActiveCfg = Debug|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Debug|Win32.Build.0 = Debug|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Debug|x64.ActiveCfg = Debug|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Debug|x64.Build.0 = Debug|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Fastbuild|x64.ActiveCfg = Release|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Release|Win32.ActiveCfg = Release|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Release|Win32.Build.0 = Release|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Release|x64.ActiveCfg = Release|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Release|x64.Build.0 = Release|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Debug|Win32.ActiveCfg = Debug|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Debug|Win32.Build.0 = Debug|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Debug|x64.ActiveCfg = Debug|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Debug|x64.Build.0 = Debug|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalDebug|Win32.Build.0 = Debug|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalDebug|x64.ActiveCfg = Debug|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalDebug|x64.Build.0 = Debug|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalFastbuild|Win32.ActiveCfg = Release|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalFastbuild|Win32.Build.0 = Release|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalRelease|Win32.Build.0 = Release|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalRelease|x64.ActiveCfg = Release|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalRelease|x64.Build.0 = Release|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Release|Win32.ActiveCfg = Release|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Release|Win32.Build.0 = Release|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Release|x64.ActiveCfg = Release|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Release|x64.Build.0 = Release|x64 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.Debug|Win32.ActiveCfg = InternalDebug|Win32 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.Debug|x64.ActiveCfg = InternalDebug|x64 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.Fastbuild|Win32.ActiveCfg = InternalRelease|Win32 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.Fastbuild|x64.ActiveCfg = InternalRelease|x64 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.InternalFastbuild|Win32.ActiveCfg = InternalFastbuild|Win32 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.InternalFastbuild|Win32.Build.0 = InternalFastbuild|Win32 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.InternalFastbuild|x64.ActiveCfg = InternalFastbuild|x64 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.InternalFastbuild|x64.Build.0 = InternalFastbuild|x64 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.Release|Win32.ActiveCfg = InternalRelease|Win32 - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3}.Release|x64.ActiveCfg = InternalRelease|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Debug|Win32.ActiveCfg = Debug|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Debug|Win32.Build.0 = Debug|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Debug|x64.ActiveCfg = Debug|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Debug|x64.Build.0 = Debug|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalFastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalFastbuild|Win32.Build.0 = Fastbuild|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Release|Win32.ActiveCfg = Release|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Release|Win32.Build.0 = Release|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Release|x64.ActiveCfg = Release|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Release|x64.Build.0 = Release|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Debug|Win32.ActiveCfg = Debug|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Debug|Win32.Build.0 = Debug|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Debug|x64.ActiveCfg = Debug|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Debug|x64.Build.0 = Debug|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalFastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalFastbuild|Win32.Build.0 = Fastbuild|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalFastbuild|x64.ActiveCfg = Fastbuild|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalFastbuild|x64.Build.0 = Fastbuild|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Release|Win32.ActiveCfg = Release|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Release|Win32.Build.0 = Release|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Release|x64.ActiveCfg = Release|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/jtrrouter/jtrrouter.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/jtrrouter/jtrrouter.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/jtrrouter/jtrrouter.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/jtrrouter/jtrrouter.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,192 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {43569450-FB3D-46EA-B9AB-CE92295C5570} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - - - - - - - - - - {a003a0ed-38c6-4e03-84d1-ba42d25abc4d} - false - - - {fc5b65e0-a0b1-40d7-8687-c2fc79e3da47} - false - - - {492b0b5a-0bbe-49ba-82e6-70a82dbc242f} - - - {72cdb11a-ec19-4be2-bbe9-1fa33deccb20} - false - - - {334df447-d0b3-4cea-9693-f755eb11c18f} - - - {9fcf1caf-0189-4242-88ba-47706e741119} - false - - - {fc588f88-ffc4-4ebd-a790-1b1fe06e1fc8} - false - - - {ee29af87-7317-488d-bf6d-ec422d1dbad6} - false - - - {508f0bff-83fe-444c-9509-a359bca83bc4} - false - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/jtrrouter/jtrrouter.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/jtrrouter/jtrrouter.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/jtrrouter/jtrrouter.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/jtrrouter/jtrrouter.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ - - - - - {4d21eaf9-515f-4720-8ef1-1e55ca72028f} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {5369b938-d07a-40f7-a7cc-29a9ca95811b} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/marouter/marouter.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/marouter/marouter.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/marouter/marouter.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/marouter/marouter.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,149 +0,0 @@ - - - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - - {90205628-51D7-4194-9FC0-7D74C35A3471} - MFCProj - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(ProjectName)D - $(ProjectName)64D - $(ProjectName) - $(ProjectName)64 - $(ProjectName)F - $(ProjectName)64F - - - - - - - - - - - - - - - - - - - - - - - - - - {a003a0ed-38c6-4e03-84d1-ba42d25abc4d} - false - - - {fc5b65e0-a0b1-40d7-8687-c2fc79e3da47} - false - - - {492b0b5a-0bbe-49ba-82e6-70a82dbc242f} - - - {72cdb11a-ec19-4be2-bbe9-1fa33deccb20} - false - - - {f5d8313c-621d-4cce-a6da-83effbde7ce6} - - - {334df447-d0b3-4cea-9693-f755eb11c18f} - - - {9fcf1caf-0189-4242-88ba-47706e741119} - false - - - {fc588f88-ffc4-4ebd-a790-1b1fe06e1fc8} - false - - - {ee29af87-7317-488d-bf6d-ec422d1dbad6} - false - - - {508f0bff-83fe-444c-9509-a359bca83bc4} - false - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/marouter/marouter.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/marouter/marouter.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/marouter/marouter.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/marouter/marouter.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ - - - - - {a470a529-363a-4777-9f01-9caeef8999b2} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {cc502a28-ac4e-4b73-ba76-c8ec38bc6648} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/netconvert/netconvert.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/netconvert/netconvert.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/netconvert/netconvert.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/netconvert/netconvert.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,264 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {4589198B-EBD4-4811-B778-8AE270AEE0CD} - netconvert - MFCProj - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - $(PROJ_LIB);$(XERCES_DEBUG_LIB);$(GDAL_LIB);ws2_32.lib - - - - - $(PROJ_LIB);$(XERCES_DEBUG_LIB);$(GDAL_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\InternalDebug\y_libinternal.lib - - - - - $(PROJ_LIB);$(XERCES_DEBUG_LIB);$(GDAL_LIB);ws2_32.lib - - - - - $(PROJ_LIB);$(XERCES_DEBUG_LIB);$(GDAL_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\x64\InternalDebug\y_libinternal.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\InternalRelease\y_libinternal.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\x64\InternalRelease\y_libinternal.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\InternalFastbuild\y_libinternal.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\x64\InternalFastbuild\y_libinternal.lib - - - - - - - - {bd855404-fa32-48ae-9ab3-fb8b3d71c8c6} - false - - - {91422fef-2369-45e6-87aa-8b38709ad823} - false - - - {b0c268f3-2153-8ddc-fac6-bb599e20126d} - false - - - {50b2c273-2b6a-4a3a-be24-83e3202de180} - false - - - {fc5b65e0-a0b1-40d7-8687-c2fc79e3da47} - false - - - {492b0b5a-0bbe-49ba-82e6-70a82dbc242f} - false - - - {f7f13336-3e29-4219-8580-a17c71e69718} - false - - - {72cdb11a-ec19-4be2-bbe9-1fa33deccb20} - false - - - {f5d8313c-621d-4cce-a6da-83effbde7ce6} - false - - - {334df447-d0b3-4cea-9693-f755eb11c18f} - false - - - {9fcf1caf-0189-4242-88ba-47706e741119} - false - - - {fc588f88-ffc4-4ebd-a790-1b1fe06e1fc8} - false - - - {ee29af87-7317-488d-bf6d-ec422d1dbad6} - false - - - {508f0bff-83fe-444c-9509-a359bca83bc4} - false - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/netconvert/netconvert.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/netconvert/netconvert.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/netconvert/netconvert.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/netconvert/netconvert.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ - - - - - {ec29ea8e-1e84-4235-8ebb-1d7e24adbe0b} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {f1617345-53c3-4143-816c-19374dc9a89a} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/netedit/netedit.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/netedit/netedit.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/netedit/netedit.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/netedit/netedit.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,253 +0,0 @@ - - - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - - {813B2D7E-CC23-4650-892F-553B1AFD912C} - MFCProj - netedit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(ProjectName)D - $(ProjectName)64D - $(ProjectName) - $(ProjectName)64 - $(ProjectName)F - $(ProjectName)64F - - - - $(PROJ_LIB);$(GDAL_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_DEBUG_LIB);$(FOX16_DEBUG_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\InternalDebug\y_libinternal.lib - - - - - $(PROJ_LIB);$(GDAL_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_DEBUG_LIB);$(FOX16_DEBUG_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\x64\InternalDebug\y_libinternal.lib - - - - - $(PROJ_LIB);$(GDAL_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_LIB);$(FOX16_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\InternalRelease\y_libinternal.lib - - - - - $(PROJ_LIB);$(GDAL_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_LIB);$(FOX16_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\x64\InternalRelease\y_libinternal.lib - - - - - $(PROJ_LIB);$(GDAL_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_LIB);$(FOX16_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib - - - - - $(PROJ_LIB);shell32.lib;opengl32.lib;glu32.lib;$(XERCES_LIB);$(FOX16_LIB);user32.lib;winmm.lib;vfw32.lib;gdi32.lib;ws2_32.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {bd855404-fa32-48ae-9ab3-fb8b3d71c8c6} - - - {91422fef-2369-45e6-87aa-8b38709ad823} - - - {91422fef-2369-45e6-87aa-8b38709ad824} - - - {50b2c273-2b6a-4a3a-be24-83e3202de180} - - - {272d2367-13fe-45c2-84ad-8480861db43e} - - - {fc5b65e0-a0b1-40d7-8687-c2fc79e3da47} - - - {306768a4-b73e-4b81-9ec0-b4836efe0504} - - - {492b0b5a-0bbe-49ba-82e6-70a82dbc242f} - - - {f7f13336-3e29-4219-8580-a17c71e69718} - - - {72cdb11a-ec19-4be2-bbe9-1fa33deccb20} - - - {f5d8313c-621d-4cce-a6da-83effbde7ce6} - - - {ecaebbbd-18b0-4e40-9507-4ad2b018c1cd} - - - {334df447-d0b3-4cea-9693-f755eb11c18f} - - - {e3ab9c37-6b5a-4d8c-88f3-df750a493511} - - - {39f2dfde-76c6-46fd-a20a-6c8fd52c9db1} - - - {5f818af6-963e-40b3-93f3-35e145fde30b} - - - {8c2f733c-1c8e-45c9-a546-17ef0146718d} - - - {67e76d22-3c3e-44fc-9253-3fe583db7848} - - - {25af2c06-8b08-4b33-8775-657e27c304d9} - - - {9fcf1caf-0189-4242-88ba-47706e741119} - - - {fc588f88-ffc4-4ebd-a790-1b1fe06e1fc8} - - - {ee29af87-7317-488d-bf6d-ec422d1dbad6} - - - {508f0bff-83fe-444c-9509-a359bca83bc4} - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/netedit/netedit.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/netedit/netedit.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/netedit/netedit.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/netedit/netedit.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,188 +0,0 @@ - - - - - {f316fe2a-0aff-4142-bd4d-2c998f9a9bea} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {ba3cb8e7-edf2-49bd-95c1-51459ac14bbc} - h;hpp;hxx;hm;inl - - - {f467b499-f05c-4284-b92e-b1bd9f8b701a} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Ressourcendateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/netgenerate/netgenerate.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/netgenerate/netgenerate.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/netgenerate/netgenerate.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/netgenerate/netgenerate.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,195 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06} - MFCProj - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - - - - - - - - - - {bd855404-fa32-48ae-9ab3-fb8b3d71c8c6} - false - - - {b0c268f3-2153-8ddc-fac6-bb599e20126d} - false - - - {fc5b65e0-a0b1-40d7-8687-c2fc79e3da47} - false - - - {492b0b5a-0bbe-49ba-82e6-70a82dbc242f} - false - - - {72cdb11a-ec19-4be2-bbe9-1fa33deccb20} - false - - - {334df447-d0b3-4cea-9693-f755eb11c18f} - false - - - {fc588f88-ffc4-4ebd-a790-1b1fe06e1fc8} - false - - - {ee29af87-7317-488d-bf6d-ec422d1dbad6} - false - - - {508f0bff-83fe-444c-9509-a359bca83bc4} - false - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/netgenerate/netgenerate.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/netgenerate/netgenerate.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/netgenerate/netgenerate.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/netgenerate/netgenerate.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ - - - - - {acc9d0d9-a841-48ac-9e02-306777cbdf5a} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {c2ddfde9-d1c3-4f53-8589-9cc1a6f2e07c} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/od2trips/od2trips.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/od2trips/od2trips.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/od2trips/od2trips.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/od2trips/od2trips.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,197 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {39392259-4561-44C0-98F1-64CA4396C025} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - $(XERCES_LIB);ws2_32.lib - - - - - - - - - - - - - - - - - - - {fc5b65e0-a0b1-40d7-8687-c2fc79e3da47} - false - - - {492b0b5a-0bbe-49ba-82e6-70a82dbc242f} - - - {72cdb11a-ec19-4be2-bbe9-1fa33deccb20} - false - - - {f5d8313c-621d-4cce-a6da-83effbde7ce6} - false - - - {334df447-d0b3-4cea-9693-f755eb11c18f} - false - - - {9fcf1caf-0189-4242-88ba-47706e741119} - false - - - {fc588f88-ffc4-4ebd-a790-1b1fe06e1fc8} - false - - - {ee29af87-7317-488d-bf6d-ec422d1dbad6} - false - - - {508f0bff-83fe-444c-9509-a359bca83bc4} - false - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/od2trips/od2trips.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/od2trips/od2trips.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/od2trips/od2trips.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/od2trips/od2trips.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ - - - - - {22d97f4f-d826-4d04-b2a1-15792774298b} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {97b402b3-44c8-4b37-89f7-863d1e89482d} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/polyconvert/polyconvert.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/polyconvert/polyconvert.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/polyconvert/polyconvert.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/polyconvert/polyconvert.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,257 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - $(PROJ_LIB);$(XERCES_DEBUG_LIB);$(GDAL_LIB);ws2_32.lib - - - - - $(PROJ_LIB);$(XERCES_DEBUG_LIB);$(GDAL_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\InternalDebug\y_libinternal.lib - - - - - $(PROJ_LIB);$(XERCES_DEBUG_LIB);$(GDAL_LIB);ws2_32.lib - - - - - $(PROJ_LIB);$(XERCES_DEBUG_LIB);$(GDAL_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\x64\InternalDebug\y_libinternal.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\InternalRelease\y_libinternal.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\x64\InternalRelease\y_libinternal.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\InternalFastbuild\y_libinternal.lib - - - - - $(PROJ_LIB);$(XERCES_LIB);$(GDAL_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libinternal\x64\InternalFastbuild\y_libinternal.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - {fc5b65e0-a0b1-40d7-8687-c2fc79e3da47} - false - - - {492b0b5a-0bbe-49ba-82e6-70a82dbc242f} - - - {72cdb11a-ec19-4be2-bbe9-1fa33deccb20} - false - - - {334df447-d0b3-4cea-9693-f755eb11c18f} - false - - - {9fcf1caf-0189-4242-88ba-47706e741119} - false - - - {fc588f88-ffc4-4ebd-a790-1b1fe06e1fc8} - false - - - {ee29af87-7317-488d-bf6d-ec422d1dbad6} - false - - - {508f0bff-83fe-444c-9509-a359bca83bc4} - false - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/polyconvert/polyconvert.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/polyconvert/polyconvert.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/polyconvert/polyconvert.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/polyconvert/polyconvert.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ - - - - - {0e742f6c-355f-45db-a880-5f56c1360ac8} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {7e30d201-688d-4e55-ad55-0191ffe09c74} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/prj.sln sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/prj.sln --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/prj.sln 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/prj.sln 1970-01-01 00:00:00.000000000 +0000 @@ -1,1161 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "duarouter", "duarouter\duarouter.vcxproj", "{8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sumo-gui", "guisim\guisim.vcxproj", "{F1904C42-F231-4B9D-AD80-E2971969AFA0}" - ProjectSection(ProjectDependencies) = postProject - {014F0919-66A3-4AED-8901-B6E02F56DC7C} = {014F0919-66A3-4AED-8901-B6E02F56DC7C} - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E} = {9F9F769C-E533-4359-B4D2-09F9E20B0B2E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jtrrouter", "jtrrouter\jtrrouter.vcxproj", "{43569450-FB3D-46EA-B9AB-CE92295C5570}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netconvert", "netconvert\netconvert.vcxproj", "{4589198B-EBD4-4811-B778-8AE270AEE0CD}" - ProjectSection(ProjectDependencies) = postProject - {91422FEF-2369-45E6-87AA-8B38709AD824} = {91422FEF-2369-45E6-87AA-8B38709AD824} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netgenerate", "netgenerate\netgenerate.vcxproj", "{F241CA03-4AB1-4BB0-8151-7AF078E2BC06}" - ProjectSection(ProjectDependencies) = postProject - {91422FEF-2369-45E6-87AA-8B38709AD824} = {91422FEF-2369-45E6-87AA-8B38709AD824} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "od2trips", "od2trips\od2trips.vcxproj", "{39392259-4561-44C0-98F1-64CA4396C025}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sumo", "sumo\sumo.vcxproj", "{08C90F3F-95F3-46C7-8D87-63AF6DF5558C}" - ProjectSection(ProjectDependencies) = postProject - {014F0919-66A3-4AED-8901-B6E02F56DC7C} = {014F0919-66A3-4AED-8901-B6E02F56DC7C} - {26F88652-2664-4CE7-8292-6BD37EE6C3AD} = {26F88652-2664-4CE7-8292-6BD37EE6C3AD} - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E} = {9F9F769C-E533-4359-B4D2-09F9E20B0B2E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libgui", "y_libgui\y_libgui.vcxproj", "{C9CC8A55-BCF5-44D8-9E22-55EA09757C60}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libguinetload", "y_libguinetload\y_libguinetload.vcxproj", "{B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libguisim", "y_libguisim\y_libguisim.vcxproj", "{9046260E-78AA-4458-BE80-0747860A0F70}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libmicrosim", "y_libmicrosim\y_libmicrosim.vcxproj", "{2A069662-6B6F-40D7-A808-211F9C9A4AAE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libnetbuild", "y_libnetbuild\y_libnetbuild.vcxproj", "{BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libnetimport", "y_libnetimport\y_libnetimport.vcxproj", "{91422FEF-2369-45E6-87AA-8B38709AD823}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libnetload", "y_libnetload\y_libnetload.vcxproj", "{5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_librouter", "y_librouter\y_librouter.vcxproj", "{A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_output", "z_libmicrosim_output\z_libmicrosim_output.vcxproj", "{CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_traffic_lights", "z_libmicrosim_traffic_lights\z_libmicrosim_traffic_lights.vcxproj", "{AF2015D2-2412-4355-87FB-E0D88B0A5FBA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_common", "z_libutils_common\z_libutils_common.vcxproj", "{72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_distribution", "z_libutils_distribution\z_libutils_distribution.vcxproj", "{F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_foxtools", "z_libutils_foxtools\z_libutils_foxtools.vcxproj", "{ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_geom", "z_libutils_geom\z_libutils_geom.vcxproj", "{334DF447-D0B3-4CEA-9693-F755EB11C18F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_importio", "z_libutils_importio\z_libutils_importio.vcxproj", "{9FCF1CAF-0189-4242-88BA-47706E741119}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_iodevices", "z_libutils_iodevices\z_libutils_iodevices.vcxproj", "{FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_options", "z_libutils_options\z_libutils_options.vcxproj", "{EE29AF87-7317-488D-BF6D-EC422D1DBAD6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_xml", "z_libutils_xml\z_libutils_xml.vcxproj", "{508F0BFF-83FE-444C-9509-A359BCA83BC4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dfrouter", "dfrouter\dfrouter.vcxproj", "{171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "polyconvert", "polyconvert\polyconvert.vcxproj", "{CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_nvwa", "zz_foreign_nvwa\zz_foreign_nvwa.vcxproj", "{FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_tcpip", "zz_foreign_tcpip\zz_foreign_tcpip.vcxproj", "{492B0B5A-0BBE-49BA-82E6-70A82DBC242F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_optional_libtraciserver", "z_optional_libtraciserver\z_optional_libtraciserver.vcxproj", "{00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_trigger", "z_libmicrosim_trigger\z_libmicrosim_trigger.vcxproj", "{26F88652-2664-4CE7-8292-6BD37EE6C3AD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_logging", "z_libmicrosim_logging\z_libmicrosim_logging.vcxproj", "{0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_actions", "z_libmicrosim_actions\z_libmicrosim_actions.vcxproj", "{A54D4A8B-9520-40F0-B8CB-152BF506CB47}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_images", "z_libutils_gui_images\z_libutils_gui_images.vcxproj", "{5F818AF6-963E-40B3-93F3-35E145FDE30B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_div", "z_libutils_gui_div\z_libutils_gui_div.vcxproj", "{E3AB9C37-6B5A-4D8C-88F3-DF750A493511}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_settings", "z_libutils_gui_settings\z_libutils_gui_settings.vcxproj", "{8C2F733C-1C8E-45C9-A546-17EF0146718D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_polyfonts", "zz_foreign_polyfonts\zz_foreign_polyfonts.vcxproj", "{306768A4-B73E-4B81-9EC0-B4836EFE0504}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_gl2ps", "zz_foreign_gl2ps\zz_foreign_gl2ps.vcxproj", "{272D2367-13FE-45C2-84AD-8480861DB43E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_windows", "z_libutils_gui_windows\z_libutils_gui_windows.vcxproj", "{25AF2C06-8B08-4B33-8775-657E27C304D9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_globjects", "z_libutils_gui_globjects\z_libutils_gui_globjects.vcxproj", "{39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_events", "z_libutils_gui_events\z_libutils_gui_events.vcxproj", "{F574684D-2052-46AB-99B9-AFD5DA2174A6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libgui_dialogs", "z_libgui_dialogs\z_libgui_dialogs.vcxproj", "{80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_tracker", "z_libutils_gui_tracker\z_libutils_gui_tracker.vcxproj", "{67E76D22-3C3E-44FC-9253-3FE583DB7848}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libnetimport_vissim", "z_libnetimport_vissim\z_libnetimport_vissim.vcxproj", "{F7F13336-3E29-4219-8580-A17C71E69718}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TraciTestClient", "traci-testclient\Traci_TestClient.vcxproj", "{46274B55-07FE-4911-B4C0-D8B43A203B4A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_rtree", "zz_foreign_rtree\zz_foreign_rtree.vcxproj", "{25FDF327-EB7A-484A-96BC-AF2DB089D6F4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_eulerspiral", "zz_foreign_eulerspiral\zz_foreign_eulerspiral.vcxproj", "{50B2C273-2B6A-4A3A-BE24-83E3202DE180}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "activitygen", "activitygen\activitygen.vcxproj", "{3DAC2EC1-D265-4F66-8442-A006E50DC95F}" - ProjectSection(ProjectDependencies) = postProject - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} = {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libnetwrite", "y_libnetwrite\y_libnetwrite.vcxproj", "{91422FEF-2369-45E6-87AA-8B38709AD824}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_cfmodels", "z_libmicrosim_cfmodels\z_libmicrosim_cfmodels.vcxproj", "{014F0919-66A3-4AED-8901-B6E02F56DC7C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_devices", "z_libmicrosim_devices\z_libmicrosim_devices.vcxproj", "{9F9F769C-E533-4359-B4D2-09F9E20B0B2E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Fastbuild|Win32 = Fastbuild|Win32 - Fastbuild|x64 = Fastbuild|x64 - InternalDebug|Win32 = InternalDebug|Win32 - InternalDebug|x64 = InternalDebug|x64 - InternalRelease|Win32 = InternalRelease|Win32 - InternalRelease|x64 = InternalRelease|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Debug|Win32.Build.0 = Debug|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Debug|x64.ActiveCfg = Debug|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Debug|x64.Build.0 = Debug|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Release|Win32.ActiveCfg = Release|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Release|Win32.Build.0 = Release|Win32 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Release|x64.ActiveCfg = Release|x64 - {8B23994C-79B7-4C1F-86F9-1EA2CBACE0F9}.Release|x64.Build.0 = Release|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|Win32.ActiveCfg = Debug|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|Win32.Build.0 = Debug|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|x64.ActiveCfg = Debug|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|x64.Build.0 = Debug|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|Win32.ActiveCfg = Release|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|Win32.Build.0 = Release|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|x64.ActiveCfg = Release|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|x64.Build.0 = Release|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Debug|Win32.ActiveCfg = Debug|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Debug|Win32.Build.0 = Debug|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Debug|x64.ActiveCfg = Debug|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Debug|x64.Build.0 = Debug|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Release|Win32.ActiveCfg = Release|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Release|Win32.Build.0 = Release|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Release|x64.ActiveCfg = Release|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Release|x64.Build.0 = Release|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Debug|Win32.ActiveCfg = Debug|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Debug|Win32.Build.0 = Debug|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Debug|x64.ActiveCfg = Debug|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Debug|x64.Build.0 = Debug|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Release|Win32.ActiveCfg = Release|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Release|Win32.Build.0 = Release|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Release|x64.ActiveCfg = Release|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Release|x64.Build.0 = Release|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Debug|Win32.ActiveCfg = Debug|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Debug|Win32.Build.0 = Debug|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Debug|x64.ActiveCfg = Debug|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Debug|x64.Build.0 = Debug|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Release|Win32.ActiveCfg = Release|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Release|Win32.Build.0 = Release|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Release|x64.ActiveCfg = Release|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Release|x64.Build.0 = Release|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Debug|Win32.ActiveCfg = Debug|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Debug|Win32.Build.0 = Debug|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Debug|x64.ActiveCfg = Debug|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Debug|x64.Build.0 = Debug|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Release|Win32.ActiveCfg = Release|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Release|Win32.Build.0 = Release|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Release|x64.ActiveCfg = Release|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Release|x64.Build.0 = Release|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|Win32.ActiveCfg = Debug|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|Win32.Build.0 = Debug|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|x64.ActiveCfg = Debug|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|x64.Build.0 = Debug|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|Win32.ActiveCfg = Release|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|Win32.Build.0 = Release|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|x64.ActiveCfg = Release|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|x64.Build.0 = Release|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|Win32.ActiveCfg = Debug|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|Win32.Build.0 = Debug|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|x64.ActiveCfg = Debug|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|x64.Build.0 = Debug|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|Win32.ActiveCfg = Release|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|Win32.Build.0 = Release|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|x64.ActiveCfg = Release|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|x64.Build.0 = Release|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|Win32.ActiveCfg = Debug|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|Win32.Build.0 = Debug|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|x64.ActiveCfg = Debug|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|x64.Build.0 = Debug|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|Win32.ActiveCfg = Release|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|Win32.Build.0 = Release|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|x64.ActiveCfg = Release|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|x64.Build.0 = Release|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|Win32.ActiveCfg = Debug|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|Win32.Build.0 = Debug|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|x64.ActiveCfg = Debug|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|x64.Build.0 = Debug|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|Win32.ActiveCfg = Release|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|Win32.Build.0 = Release|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|x64.ActiveCfg = Release|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|x64.Build.0 = Release|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|Win32.ActiveCfg = Debug|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|Win32.Build.0 = Debug|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|x64.ActiveCfg = Debug|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|x64.Build.0 = Debug|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|Win32.ActiveCfg = Release|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|Win32.Build.0 = Release|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|x64.ActiveCfg = Release|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|x64.Build.0 = Release|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Debug|Win32.ActiveCfg = Debug|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Debug|Win32.Build.0 = Debug|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Debug|x64.ActiveCfg = Debug|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Debug|x64.Build.0 = Debug|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalDebug|Win32.Build.0 = Debug|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalDebug|x64.ActiveCfg = Debug|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalDebug|x64.Build.0 = Debug|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalRelease|Win32.Build.0 = Release|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalRelease|x64.ActiveCfg = Release|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.InternalRelease|x64.Build.0 = Release|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Release|Win32.ActiveCfg = Release|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Release|Win32.Build.0 = Release|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Release|x64.ActiveCfg = Release|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Release|x64.Build.0 = Release|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Debug|Win32.ActiveCfg = Debug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Debug|Win32.Build.0 = Debug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Debug|x64.ActiveCfg = Debug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Debug|x64.Build.0 = Debug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Release|Win32.ActiveCfg = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Release|Win32.Build.0 = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Release|x64.ActiveCfg = Release|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Release|x64.Build.0 = Release|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|Win32.ActiveCfg = Debug|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|Win32.Build.0 = Debug|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|x64.ActiveCfg = Debug|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|x64.Build.0 = Debug|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|Win32.ActiveCfg = Release|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|Win32.Build.0 = Release|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|x64.ActiveCfg = Release|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|x64.Build.0 = Release|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Debug|Win32.ActiveCfg = Debug|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Debug|Win32.Build.0 = Debug|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Debug|x64.ActiveCfg = Debug|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Debug|x64.Build.0 = Debug|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Release|Win32.ActiveCfg = Release|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Release|Win32.Build.0 = Release|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Release|x64.ActiveCfg = Release|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Release|x64.Build.0 = Release|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|Win32.ActiveCfg = Debug|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|Win32.Build.0 = Debug|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|x64.ActiveCfg = Debug|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|x64.Build.0 = Debug|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|Win32.ActiveCfg = Release|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|Win32.Build.0 = Release|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|x64.ActiveCfg = Release|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|x64.Build.0 = Release|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|Win32.ActiveCfg = Debug|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|Win32.Build.0 = Debug|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|x64.ActiveCfg = Debug|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|x64.Build.0 = Debug|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalDebug|Win32.Build.0 = Debug|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalDebug|x64.ActiveCfg = Debug|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalDebug|x64.Build.0 = Debug|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalRelease|Win32.Build.0 = Release|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalRelease|x64.ActiveCfg = Release|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.InternalRelease|x64.Build.0 = Release|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|Win32.ActiveCfg = Release|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|Win32.Build.0 = Release|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|x64.ActiveCfg = Release|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|x64.Build.0 = Release|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|Win32.ActiveCfg = Debug|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|Win32.Build.0 = Debug|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|x64.ActiveCfg = Debug|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|x64.Build.0 = Debug|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalDebug|Win32.Build.0 = Debug|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalDebug|x64.ActiveCfg = Debug|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalDebug|x64.Build.0 = Debug|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalRelease|Win32.Build.0 = Release|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalRelease|x64.ActiveCfg = Release|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.InternalRelease|x64.Build.0 = Release|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|Win32.ActiveCfg = Release|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|Win32.Build.0 = Release|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|x64.ActiveCfg = Release|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|x64.Build.0 = Release|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Debug|Win32.ActiveCfg = Debug|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Debug|Win32.Build.0 = Debug|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Debug|x64.ActiveCfg = Debug|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Debug|x64.Build.0 = Debug|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalDebug|Win32.Build.0 = Debug|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalDebug|x64.ActiveCfg = Debug|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalDebug|x64.Build.0 = Debug|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalRelease|Win32.Build.0 = Release|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalRelease|x64.ActiveCfg = Release|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.InternalRelease|x64.Build.0 = Release|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Release|Win32.ActiveCfg = Release|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Release|Win32.Build.0 = Release|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Release|x64.ActiveCfg = Release|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Release|x64.Build.0 = Release|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|Win32.ActiveCfg = Debug|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|Win32.Build.0 = Debug|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|x64.ActiveCfg = Debug|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|x64.Build.0 = Debug|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalDebug|Win32.Build.0 = Debug|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalDebug|x64.ActiveCfg = Debug|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalDebug|x64.Build.0 = Debug|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalRelease|Win32.Build.0 = Release|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalRelease|x64.ActiveCfg = Release|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.InternalRelease|x64.Build.0 = Release|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|Win32.ActiveCfg = Release|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|Win32.Build.0 = Release|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|x64.ActiveCfg = Release|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|x64.Build.0 = Release|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|Win32.ActiveCfg = Debug|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|Win32.Build.0 = Debug|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|x64.ActiveCfg = Debug|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|x64.Build.0 = Debug|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalDebug|Win32.Build.0 = Debug|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalDebug|x64.ActiveCfg = Debug|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalDebug|x64.Build.0 = Debug|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalRelease|Win32.Build.0 = Release|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalRelease|x64.ActiveCfg = Release|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.InternalRelease|x64.Build.0 = Release|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|Win32.ActiveCfg = Release|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|Win32.Build.0 = Release|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|x64.ActiveCfg = Release|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|x64.Build.0 = Release|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|Win32.ActiveCfg = Debug|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|Win32.Build.0 = Debug|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|x64.ActiveCfg = Debug|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|x64.Build.0 = Debug|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalDebug|Win32.Build.0 = Debug|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalDebug|x64.ActiveCfg = Debug|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalDebug|x64.Build.0 = Debug|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalRelease|Win32.Build.0 = Release|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalRelease|x64.ActiveCfg = Release|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.InternalRelease|x64.Build.0 = Release|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|Win32.ActiveCfg = Release|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|Win32.Build.0 = Release|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|x64.ActiveCfg = Release|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|x64.Build.0 = Release|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|Win32.ActiveCfg = Debug|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|Win32.Build.0 = Debug|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|x64.ActiveCfg = Debug|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|x64.Build.0 = Debug|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalDebug|Win32.Build.0 = Debug|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalDebug|x64.ActiveCfg = Debug|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalDebug|x64.Build.0 = Debug|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalRelease|Win32.Build.0 = Release|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalRelease|x64.ActiveCfg = Release|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.InternalRelease|x64.Build.0 = Release|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|Win32.ActiveCfg = Release|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|Win32.Build.0 = Release|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|x64.ActiveCfg = Release|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|x64.Build.0 = Release|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|Win32.ActiveCfg = Debug|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|Win32.Build.0 = Debug|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|x64.ActiveCfg = Debug|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|x64.Build.0 = Debug|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalDebug|Win32.Build.0 = Debug|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalDebug|x64.ActiveCfg = Debug|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalDebug|x64.Build.0 = Debug|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalRelease|Win32.Build.0 = Release|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalRelease|x64.ActiveCfg = Release|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.InternalRelease|x64.Build.0 = Release|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|Win32.ActiveCfg = Release|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|Win32.Build.0 = Release|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|x64.ActiveCfg = Release|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|x64.Build.0 = Release|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|Win32.ActiveCfg = Debug|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|Win32.Build.0 = Debug|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|x64.ActiveCfg = Debug|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|x64.Build.0 = Debug|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalDebug|Win32.Build.0 = Debug|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalDebug|x64.ActiveCfg = Debug|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalDebug|x64.Build.0 = Debug|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalRelease|Win32.Build.0 = Release|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalRelease|x64.ActiveCfg = Release|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.InternalRelease|x64.Build.0 = Release|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|Win32.ActiveCfg = Release|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|Win32.Build.0 = Release|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|x64.ActiveCfg = Release|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|x64.Build.0 = Release|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Debug|Win32.ActiveCfg = Debug|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Debug|Win32.Build.0 = Debug|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Debug|x64.ActiveCfg = Debug|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Debug|x64.Build.0 = Debug|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Release|Win32.ActiveCfg = Release|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Release|Win32.Build.0 = Release|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Release|x64.ActiveCfg = Release|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Release|x64.Build.0 = Release|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Debug|Win32.ActiveCfg = Debug|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Debug|Win32.Build.0 = Debug|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Debug|x64.ActiveCfg = Debug|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Debug|x64.Build.0 = Debug|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Release|Win32.ActiveCfg = Release|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Release|Win32.Build.0 = Release|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Release|x64.ActiveCfg = Release|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Release|x64.Build.0 = Release|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|Win32.ActiveCfg = Debug|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|Win32.Build.0 = Debug|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|x64.ActiveCfg = Debug|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|x64.Build.0 = Debug|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalDebug|Win32.Build.0 = Debug|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalDebug|x64.ActiveCfg = Debug|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalDebug|x64.Build.0 = Debug|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalRelease|Win32.Build.0 = Release|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalRelease|x64.ActiveCfg = Release|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.InternalRelease|x64.Build.0 = Release|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|Win32.ActiveCfg = Release|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|Win32.Build.0 = Release|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|x64.ActiveCfg = Release|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|x64.Build.0 = Release|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|Win32.ActiveCfg = Debug|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|Win32.Build.0 = Debug|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|x64.ActiveCfg = Debug|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|x64.Build.0 = Debug|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalDebug|Win32.Build.0 = Debug|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalDebug|x64.ActiveCfg = Debug|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalDebug|x64.Build.0 = Debug|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalRelease|Win32.Build.0 = Release|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalRelease|x64.ActiveCfg = Release|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.InternalRelease|x64.Build.0 = Release|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|Win32.ActiveCfg = Release|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|Win32.Build.0 = Release|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|x64.ActiveCfg = Release|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|x64.Build.0 = Release|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Debug|Win32.ActiveCfg = Debug|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Debug|Win32.Build.0 = Debug|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Debug|x64.ActiveCfg = Debug|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Debug|x64.Build.0 = Debug|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Release|Win32.ActiveCfg = Release|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Release|Win32.Build.0 = Release|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Release|x64.ActiveCfg = Release|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Release|x64.Build.0 = Release|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|Win32.ActiveCfg = Debug|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|Win32.Build.0 = Debug|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|x64.ActiveCfg = Debug|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|x64.Build.0 = Debug|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|Win32.ActiveCfg = Release|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|Win32.Build.0 = Release|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|x64.ActiveCfg = Release|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|x64.Build.0 = Release|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|Win32.ActiveCfg = Debug|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|Win32.Build.0 = Debug|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|x64.ActiveCfg = Debug|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|x64.Build.0 = Debug|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalDebug|Win32.Build.0 = Debug|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalDebug|x64.ActiveCfg = Debug|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalDebug|x64.Build.0 = Debug|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalRelease|Win32.Build.0 = Release|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalRelease|x64.ActiveCfg = Release|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.InternalRelease|x64.Build.0 = Release|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|Win32.ActiveCfg = Release|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|Win32.Build.0 = Release|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|x64.ActiveCfg = Release|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|x64.Build.0 = Release|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|Win32.ActiveCfg = Debug|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|Win32.Build.0 = Debug|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|x64.ActiveCfg = Debug|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|x64.Build.0 = Debug|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalDebug|Win32.Build.0 = Debug|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalDebug|x64.ActiveCfg = Debug|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalDebug|x64.Build.0 = Debug|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalRelease|Win32.Build.0 = Release|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalRelease|x64.ActiveCfg = Release|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.InternalRelease|x64.Build.0 = Release|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|Win32.ActiveCfg = Release|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|Win32.Build.0 = Release|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|x64.ActiveCfg = Release|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|x64.Build.0 = Release|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|Win32.ActiveCfg = Debug|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|Win32.Build.0 = Debug|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|x64.ActiveCfg = Debug|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|x64.Build.0 = Debug|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalDebug|Win32.Build.0 = Debug|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalDebug|x64.ActiveCfg = Debug|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalDebug|x64.Build.0 = Debug|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalRelease|Win32.Build.0 = Release|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalRelease|x64.ActiveCfg = Release|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.InternalRelease|x64.Build.0 = Release|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|Win32.ActiveCfg = Release|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|Win32.Build.0 = Release|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|x64.ActiveCfg = Release|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|x64.Build.0 = Release|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|Win32.ActiveCfg = Debug|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|Win32.Build.0 = Debug|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|x64.ActiveCfg = Debug|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|x64.Build.0 = Debug|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalDebug|Win32.Build.0 = Debug|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalDebug|x64.ActiveCfg = Debug|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalDebug|x64.Build.0 = Debug|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalRelease|Win32.Build.0 = Release|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalRelease|x64.ActiveCfg = Release|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.InternalRelease|x64.Build.0 = Release|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|Win32.ActiveCfg = Release|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|Win32.Build.0 = Release|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|x64.ActiveCfg = Release|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|x64.Build.0 = Release|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|Win32.Build.0 = Debug|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|x64.ActiveCfg = Debug|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|x64.Build.0 = Debug|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|Win32.ActiveCfg = Release|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|Win32.Build.0 = Release|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|x64.ActiveCfg = Release|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|x64.Build.0 = Release|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|Win32.ActiveCfg = Debug|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|Win32.Build.0 = Debug|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|x64.ActiveCfg = Debug|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|x64.Build.0 = Debug|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalDebug|Win32.Build.0 = Debug|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalDebug|x64.ActiveCfg = Debug|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalDebug|x64.Build.0 = Debug|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalRelease|Win32.Build.0 = Release|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalRelease|x64.ActiveCfg = Release|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.InternalRelease|x64.Build.0 = Release|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|Win32.ActiveCfg = Release|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|Win32.Build.0 = Release|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|x64.ActiveCfg = Release|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|x64.Build.0 = Release|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|Win32.ActiveCfg = Debug|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|Win32.Build.0 = Debug|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|x64.ActiveCfg = Debug|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|x64.Build.0 = Debug|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalDebug|Win32.Build.0 = Debug|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalDebug|x64.ActiveCfg = Debug|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalDebug|x64.Build.0 = Debug|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalRelease|Win32.Build.0 = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalRelease|x64.ActiveCfg = Release|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.InternalRelease|x64.Build.0 = Release|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|Win32.ActiveCfg = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|Win32.Build.0 = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|x64.ActiveCfg = Release|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|x64.Build.0 = Release|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|Win32.Build.0 = Debug|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|x64.ActiveCfg = Debug|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|x64.Build.0 = Debug|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|Win32.ActiveCfg = Release|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|Win32.Build.0 = Release|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|x64.ActiveCfg = Release|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|x64.Build.0 = Release|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|Win32.ActiveCfg = Debug|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|Win32.Build.0 = Debug|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|x64.ActiveCfg = Debug|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|x64.Build.0 = Debug|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalDebug|Win32.Build.0 = Debug|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalDebug|x64.ActiveCfg = Debug|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalDebug|x64.Build.0 = Debug|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalRelease|Win32.Build.0 = Release|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalRelease|x64.ActiveCfg = Release|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.InternalRelease|x64.Build.0 = Release|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|Win32.ActiveCfg = Release|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|Win32.Build.0 = Release|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|x64.ActiveCfg = Release|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|x64.Build.0 = Release|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|Win32.ActiveCfg = Debug|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|Win32.Build.0 = Debug|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|x64.ActiveCfg = Debug|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|x64.Build.0 = Debug|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalDebug|Win32.Build.0 = Debug|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalDebug|x64.ActiveCfg = Debug|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalDebug|x64.Build.0 = Debug|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalRelease|Win32.Build.0 = Release|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalRelease|x64.ActiveCfg = Release|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.InternalRelease|x64.Build.0 = Release|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|Win32.ActiveCfg = Release|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|Win32.Build.0 = Release|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|x64.ActiveCfg = Release|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|x64.Build.0 = Release|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|Win32.ActiveCfg = Debug|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|Win32.Build.0 = Debug|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|x64.ActiveCfg = Debug|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|x64.Build.0 = Debug|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|Win32.ActiveCfg = Release|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|Win32.Build.0 = Release|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|x64.ActiveCfg = Release|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|x64.Build.0 = Release|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|Win32.ActiveCfg = Debug|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|Win32.Build.0 = Debug|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|x64.ActiveCfg = Debug|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|x64.Build.0 = Debug|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalDebug|Win32.Build.0 = Debug|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalDebug|x64.ActiveCfg = Debug|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalDebug|x64.Build.0 = Debug|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalRelease|Win32.Build.0 = Release|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalRelease|x64.ActiveCfg = Release|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.InternalRelease|x64.Build.0 = Release|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|Win32.ActiveCfg = Release|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|Win32.Build.0 = Release|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|x64.ActiveCfg = Release|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|x64.Build.0 = Release|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Debug|Win32.ActiveCfg = Debug|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Debug|Win32.Build.0 = Debug|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Debug|x64.ActiveCfg = Debug|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Debug|x64.Build.0 = Debug|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalDebug|Win32.Build.0 = Debug|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalDebug|x64.ActiveCfg = Debug|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalDebug|x64.Build.0 = Debug|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalRelease|Win32.Build.0 = Release|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalRelease|x64.ActiveCfg = Release|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.InternalRelease|x64.Build.0 = Release|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Release|Win32.ActiveCfg = Release|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Release|Win32.Build.0 = Release|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Release|x64.ActiveCfg = Release|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Release|x64.Build.0 = Release|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Debug|Win32.ActiveCfg = Debug|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Debug|Win32.Build.0 = Debug|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Debug|x64.ActiveCfg = Debug|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Debug|x64.Build.0 = Debug|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Fastbuild|Win32.ActiveCfg = Release|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Fastbuild|Win32.Build.0 = Release|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Fastbuild|x64.ActiveCfg = Release|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Fastbuild|x64.Build.0 = Release|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Release|Win32.ActiveCfg = Release|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Release|Win32.Build.0 = Release|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Release|x64.ActiveCfg = Release|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Release|x64.Build.0 = Release|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Debug|Win32.ActiveCfg = Debug|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Debug|Win32.Build.0 = Debug|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Debug|x64.ActiveCfg = Debug|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Debug|x64.Build.0 = Debug|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalDebug|Win32.Build.0 = Debug|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalDebug|x64.ActiveCfg = Debug|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalDebug|x64.Build.0 = Debug|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalRelease|Win32.Build.0 = Release|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalRelease|x64.ActiveCfg = Release|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.InternalRelease|x64.Build.0 = Release|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Release|Win32.ActiveCfg = Release|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Release|Win32.Build.0 = Release|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Release|x64.ActiveCfg = Release|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Release|x64.Build.0 = Release|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Debug|Win32.ActiveCfg = Debug|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Debug|Win32.Build.0 = Debug|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Debug|x64.ActiveCfg = Debug|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Debug|x64.Build.0 = Debug|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalDebug|Win32.Build.0 = Debug|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalDebug|x64.ActiveCfg = Debug|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalDebug|x64.Build.0 = Debug|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalRelease|Win32.Build.0 = Release|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalRelease|x64.ActiveCfg = Release|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.InternalRelease|x64.Build.0 = Release|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Release|Win32.ActiveCfg = Release|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Release|Win32.Build.0 = Release|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Release|x64.ActiveCfg = Release|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Release|x64.Build.0 = Release|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Debug|Win32.ActiveCfg = Debug|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Debug|Win32.Build.0 = Debug|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Debug|x64.ActiveCfg = Debug|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Debug|x64.Build.0 = Debug|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Release|Win32.ActiveCfg = Release|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Release|Win32.Build.0 = Release|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Release|x64.ActiveCfg = Release|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Release|x64.Build.0 = Release|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Debug|Win32.ActiveCfg = Debug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Debug|Win32.Build.0 = Debug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Debug|x64.ActiveCfg = Debug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Debug|x64.Build.0 = Debug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalDebug|Win32.ActiveCfg = Debug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalDebug|Win32.Build.0 = Debug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalDebug|x64.ActiveCfg = Debug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalDebug|x64.Build.0 = Debug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalRelease|Win32.ActiveCfg = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalRelease|Win32.Build.0 = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalRelease|x64.ActiveCfg = Release|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.InternalRelease|x64.Build.0 = Release|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Release|Win32.ActiveCfg = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Release|Win32.Build.0 = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Release|x64.ActiveCfg = Release|x64 - {91422FEF-2369-45E6-87AA-8B38709AD824}.Release|x64.Build.0 = Release|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Debug|Win32.ActiveCfg = Debug|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Debug|Win32.Build.0 = Debug|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Debug|x64.ActiveCfg = Debug|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Debug|x64.Build.0 = Debug|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Release|Win32.ActiveCfg = Release|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Release|Win32.Build.0 = Release|Win32 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Release|x64.ActiveCfg = Release|x64 - {014F0919-66A3-4AED-8901-B6E02F56DC7C}.Release|x64.Build.0 = Release|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Debug|Win32.ActiveCfg = Debug|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Debug|Win32.Build.0 = Debug|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Debug|x64.ActiveCfg = Debug|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Debug|x64.Build.0 = Debug|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalDebug|Win32.ActiveCfg = InternalDebug|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalDebug|Win32.Build.0 = InternalDebug|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalDebug|x64.ActiveCfg = InternalDebug|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalDebug|x64.Build.0 = InternalDebug|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalRelease|Win32.ActiveCfg = InternalRelease|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalRelease|Win32.Build.0 = InternalRelease|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalRelease|x64.ActiveCfg = InternalRelease|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.InternalRelease|x64.Build.0 = InternalRelease|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Release|Win32.ActiveCfg = Release|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Release|Win32.Build.0 = Release|Win32 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Release|x64.ActiveCfg = Release|x64 - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/Release.props sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/Release.props --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/Release.props 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/Release.props 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - <_ProjectFileVersion>10.0.30319.1 - false - - - - MaxSpeed - Default - AnySuitable - true - Speed - true - NDEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - Level3 - - - Fast - - - false - UseLinkTimeCodeGeneration - - - true - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/sumo/sumo.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/sumo/sumo.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/sumo/sumo.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/sumo/sumo.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,278 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C} - sumo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - meso - mesoD - meso64 - meso64D - mesoF - meso64F - - - - $(XERCES_DEBUG_LIB);$(PYTHON_LIB);ws2_32.lib - - - - - $(XERCES_DEBUG_LIB);$(PYTHON_LIB);ws2_32.lib - - - - - $(XERCES_LIB);$(PYTHON_LIB);ws2_32.lib - - - - - $(XERCES_LIB);$(PYTHON_LIB);ws2_32.lib - - - - - $(XERCES_LIB);$(PYTHON_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libmesosim\InternalRelease\y_libmesosim.lib - - - - - $(XERCES_LIB);$(PYTHON_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libmesosim\x64\InternalRelease\y_libmesosim.lib - - - - - $(XERCES_DEBUG_LIB);$(PYTHON_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libmesosim\InternalDebug\y_libmesosim.lib - - - - - $(XERCES_DEBUG_LIB);$(PYTHON_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libmesosim\x64\InternalDebug\y_libmesosim.lib - - - - - $(XERCES_LIB);$(PYTHON_LIB);ws2_32.lib - - - - - $(XERCES_LIB);$(PYTHON_LIB);ws2_32.lib - - - - - $(XERCES_LIB);$(PYTHON_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libmesosim\InternalFastbuild\y_libmesosim.lib - - - - - $(XERCES_LIB);$(PYTHON_LIB);ws2_32.lib;$(MSBuildProjectDirectory)\..\y_libmesosim\x64\InternalFastbuild\y_libmesosim.lib - - - - - - - - - - - {2a069662-6b6f-40d7-a808-211f9c9a4aae} - false - - - {5ea5cb8f-2b57-4fab-a769-e9a64b3b9c36} - false - - - {fc5b65e0-a0b1-40d7-8687-c2fc79e3da47} - false - - - {492b0b5a-0bbe-49ba-82e6-70a82dbc242f} - false - - - {a54d4a8b-9520-40f0-b8cb-152bf506cb47} - false - - - {014f0919-66a3-4aed-8901-b6e02f56dc7c} - - - {9f9f769c-e533-4359-b4d2-09f9e20b0b2e} - - - {cc278de5-d3d8-4bd8-b8a4-bd76cb8fb4f1} - false - - - {af2015d2-2412-4355-87fb-e0d88b0a5fba} - false - - - {26f88652-2664-4ce7-8292-6bd37ee6c3ad} - false - - - {72cdb11a-ec19-4be2-bbe9-1fa33deccb20} - false - - - {334df447-d0b3-4cea-9693-f755eb11c18f} - false - - - {fc588f88-ffc4-4ebd-a790-1b1fe06e1fc8} - false - - - {ee29af87-7317-488d-bf6d-ec422d1dbad6} - false - - - {508f0bff-83fe-444c-9509-a359bca83bc4} - false - - - {00a244e4-0f0d-49b9-a557-5ef1f8b98d7c} - false - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/sumo/sumo.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/sumo/sumo.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/sumo/sumo.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/sumo/sumo.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ - - - - - {0378ea1c-39e4-40ba-9892-189b8339513f} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {ca46e357-e2f6-47d2-b8c5-76947033e238} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/traci-testclient/Traci_TestClient.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/traci-testclient/Traci_TestClient.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/traci-testclient/Traci_TestClient.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/traci-testclient/Traci_TestClient.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,172 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - TraciTestClient - {46274B55-07FE-4911-B4C0-D8B43A203B4A} - Traci_TestClient - Win32Proj - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - $(IntDir)%(Filename)1.obj - $(IntDir)%(Filename)1.xdc - $(IntDir)%(Filename)1.obj - $(IntDir)%(Filename)1.xdc - $(IntDir)%(Filename)1.obj - $(IntDir)%(Filename)1.xdc - $(IntDir)%(Filename)1.obj - $(IntDir)%(Filename)1.xdc - - - - - - - - - - {492b0b5a-0bbe-49ba-82e6-70a82dbc242f} - false - - - {72cdb11a-ec19-4be2-bbe9-1fa33deccb20} - false - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/traci-testclient/Traci_TestClient.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/traci-testclient/Traci_TestClient.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/traci-testclient/Traci_TestClient.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/traci-testclient/Traci_TestClient.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/Win32.props sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/Win32.props --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/Win32.props 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/Win32.props 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ - - - - - - - - $(XERCES)\lib\xerces-c_3.lib - $(XERCES)\lib\xerces-c_3D.lib - $(PROJ_GDAL)\lib\proj_i.lib - $(PROJ_GDAL)\lib\gdal_i.lib - $(FOX16)\lib\FOXDLL-1.6.lib - $(FOX16)\lib\FOXDLLD-1.6.lib - $(OSG)\lib\osgUtil.lib;$(OSG)\lib\osgDB.lib;$(OSG)\lib\osgGA.lib;$(OSG)\lib\osg.lib;$(OSG)\lib\osgViewer.lib - $(OSG)\lib\osgUtild.lib;$(OSG)\lib\osgDBd.lib;$(OSG)\lib\osgGAd.lib;$(OSG)\lib\osgd.lib;$(OSG)\lib\osgViewerd.lib - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - - - - $(XERCES)\include;$(PROJ_GDAL)\include;$(FOX16)\include;$(OSG)\include;..\..\..\src;%(AdditionalIncludeDirectories) - HAVE_PROJ;HAVE_GDAL;%(PreprocessorDefinitions) - - - - - $(XERCES_LIB) - - - $(XERCES_DEBUG_LIB) - - - $(PROJ_LIB) - - - $(GDAL_LIB) - - - $(FOX16_LIB) - - - $(FOX16_DEBUG_LIB) - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/x64.props sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/x64.props --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/x64.props 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/x64.props 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ - - - - - - - $(XERCES_64)\lib\xerces-c_3.lib - $(XERCES_64)\lib\xerces-c_3D.lib - $(PROJ_GDAL_64)\lib\proj_i.lib - $(PROJ_GDAL_64)\lib\gdal_i.lib - $(FOX16_64)\lib\FOXDLL-1.6.lib - $(FOX16_64)\lib\FOXDLLD-1.6.lib - $(OSG_64)\lib\osgUtil.lib;$(OSG_64)\lib\osgDB.lib;$(OSG_64)\lib\osgGA.lib;$(OSG_64)\lib\osg.lib;$(OSG_64)\lib\osgViewer.lib - $(OSG_64)\lib\osgUtild.lib;$(OSG_64)\lib\osgDBd.lib;$(OSG_64)\lib\osgGAd.lib;$(OSG_64)\lib\osgd.lib;$(OSG_64)\lib\osgViewerd.lib - - - <_ProjectFileVersion>10.0.30319.1 - $(PlatformName)\$(Configuration)\ - $(PlatformName)\$(Configuration)\ - - - - $(XERCES_64)\include;$(PROJ_GDAL_64)\include;$(FOX16_64)\include;$(OSG_64)\include;..\..\..\src;%(AdditionalIncludeDirectories) - HAVE_PROJ;HAVE_GDAL;%(PreprocessorDefinitions) - ProgramDatabase - - - MachineX64 - - - - - $(XERCES_LIB) - - - $(XERCES_DEBUG_LIB) - - - $(PROJ_LIB) - - - $(GDAL_LIB) - - - $(FOX16_LIB) - - - $(FOX16_DEBUG_LIB) - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libgui/y_libgui.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libgui/y_libgui.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libgui/y_libgui.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libgui/y_libgui.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,193 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libgui/y_libgui.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libgui/y_libgui.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libgui/y_libgui.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libgui/y_libgui.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ - - - - - {55205cae-e84d-49ec-8c4d-b19f2130f542} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {1d082ba3-d837-4e63-8692-bf8ad4c961b4} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libguinetload/y_libguinetload.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libguinetload/y_libguinetload.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libguinetload/y_libguinetload.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libguinetload/y_libguinetload.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,289 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - true - - - 0x0407 - - - true - - - - - true - - - 0x0407 - - - true - - - - - true - - - 0x0407 - - - - - true - - - 0x0407 - - - - - true - - - 0x0407 - - - - - X64 - - - true - - - 0x0407 - - - - - true - - - 0x0407 - - - true - - - - - X64 - - - true - ProgramDatabase - - - 0x0407 - - - true - - - - - true - - - 0x0407 - - - - - X64 - - - true - - - 0x0407 - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libguinetload/y_libguinetload.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libguinetload/y_libguinetload.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libguinetload/y_libguinetload.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libguinetload/y_libguinetload.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ - - - - - {2b57e634-21a2-4397-bd95-4359e670c714} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {f0473a03-9335-418f-8b73-24a6744058df} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libguisim/y_libguisim.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libguisim/y_libguisim.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libguisim/y_libguisim.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libguisim/y_libguisim.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,310 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {9046260E-78AA-4458-BE80-0747860A0F70} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - true - - - 0x0407 - - - true - - - - - true - - - 0x0407 - - - true - - - - - true - - - 0x0407 - - - - - true - - - 0x0407 - - - - - true - - - 0x0407 - - - - - true - - - 0x0407 - - - - - true - - - 0x0407 - - - true - - - - - true - - - 0x0407 - - - true - - - - - true - - - 0x0407 - - - - - X64 - - - true - - - 0x0407 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libguisim/y_libguisim.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libguisim/y_libguisim.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libguisim/y_libguisim.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libguisim/y_libguisim.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ - - - - - {19733975-5466-448f-b45e-78b39594f6b4} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {45658920-789f-427a-8e46-5fe0efc65f81} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libinternal/y_libinternal.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libinternal/y_libinternal.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libinternal/y_libinternal.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libinternal/y_libinternal.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ - - - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - - {09B71FCB-BE14-466C-A0DC-51F1E0D3CAE3} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libinternal/y_libinternal.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libinternal/y_libinternal.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libinternal/y_libinternal.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libinternal/y_libinternal.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - {cb7c2235-d4ab-4159-9901-22a28793f1a3} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {9135250c-f9c2-4102-8a8c-88177b41b92c} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libmesogui/y_libmesogui.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libmesogui/y_libmesogui.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libmesogui/y_libmesogui.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libmesogui/y_libmesogui.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ - - - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libmesogui/y_libmesogui.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libmesogui/y_libmesogui.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libmesogui/y_libmesogui.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libmesogui/y_libmesogui.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - - {cb7c2235-d4ab-4159-9901-22a28793f1a3} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {9135250c-f9c2-4102-8a8c-88177b41b92c} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libmesosim/y_libmesosim.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libmesosim/y_libmesosim.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libmesosim/y_libmesosim.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libmesosim/y_libmesosim.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ - - - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - - {308BEB29-142B-4088-BD41-80E273E20D3A} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libmesosim/y_libmesosim.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libmesosim/y_libmesosim.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libmesosim/y_libmesosim.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libmesosim/y_libmesosim.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ - - - - - {6858e8b5-bf31-44ad-940c-a60c27cf8a1c} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {480e6f3d-f920-48d1-813e-f1b21c815783} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libmicrosim/y_libmicrosim.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libmicrosim/y_libmicrosim.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libmicrosim/y_libmicrosim.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libmicrosim/y_libmicrosim.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,240 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {2A069662-6B6F-40D7-A808-211F9C9A4AAE} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libmicrosim/y_libmicrosim.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libmicrosim/y_libmicrosim.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libmicrosim/y_libmicrosim.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libmicrosim/y_libmicrosim.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,217 +0,0 @@ - - - - - {1894e5fe-ad15-4e2a-b1af-4c8688a08a92} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {c43de9a3-bdfe-4e9e-84ae-cf004fff1ee9} - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetbuild/y_libnetbuild.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetbuild/y_libnetbuild.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetbuild/y_libnetbuild.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetbuild/y_libnetbuild.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,198 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - X64 - - - 0x0407 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetbuild/y_libnetbuild.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetbuild/y_libnetbuild.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetbuild/y_libnetbuild.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetbuild/y_libnetbuild.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,179 +0,0 @@ - - - - - {74d0eb23-8178-4d08-b576-1ec95d807ce7} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {fc5ccf9d-a2a6-43c3-8a24-62546b4aa5cc} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetimport/y_libnetimport.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetimport/y_libnetimport.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetimport/y_libnetimport.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetimport/y_libnetimport.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,262 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {91422FEF-2369-45E6-87AA-8B38709AD823} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - X64 - - - 0x0407 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetimport/y_libnetimport.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetimport/y_libnetimport.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetimport/y_libnetimport.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetimport/y_libnetimport.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ - - - - - {9da8f089-dc08-4e6e-8ff8-cde8ebf3a151} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {11d96477-594f-4c30-8d76-f51ac63f4d7a} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetload/y_libnetload.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetload/y_libnetload.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetload/y_libnetload.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetload/y_libnetload.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,240 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - X64 - - - 0x0407 - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetload/y_libnetload.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetload/y_libnetload.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetload/y_libnetload.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetload/y_libnetload.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ - - - - - {29492af3-7120-49ea-be6b-4d9fc2c3dd42} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {01f9f510-f886-4fbe-b9f9-5cf26aa9a00b} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetwrite/y_libnetwrite.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetwrite/y_libnetwrite.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetwrite/y_libnetwrite.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetwrite/y_libnetwrite.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,156 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {91422FEF-2369-45E6-87AA-8B38709AD824} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - X64 - - - 0x0407 - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetwrite/y_libnetwrite.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetwrite/y_libnetwrite.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_libnetwrite/y_libnetwrite.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_libnetwrite/y_libnetwrite.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ - - - - - {9da8f089-dc08-4e6e-8ff8-cde8ebf3a151} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {11d96477-594f-4c30-8d76-f51ac63f4d7a} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_librouter/y_librouter.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_librouter/y_librouter.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_librouter/y_librouter.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_librouter/y_librouter.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,268 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D} - y_librouter - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - - - - 0x0407 - - - true - - - - - 0x0407 - - - true - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - true - - - - - 0x0407 - - - true - - - - - 0x0407 - - - - - 0x0407 - - - - - X64 - - - 0x0407 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_librouter/y_librouter.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_librouter/y_librouter.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_librouter/y_librouter.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_librouter/y_librouter.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,104 +0,0 @@ - - - - - {b567d54b-8dae-46d2-9828-34bbd9415ce5} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {97911dca-5e2f-457e-b5e8-ff036e14a427} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_osgview/y_osgview.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_osgview/y_osgview.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_osgview/y_osgview.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_osgview/y_osgview.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ - - - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalFastbuild - Win32 - - - InternalFastbuild - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - - {F5218B3F-4CE3-47F7-8A3D-41683281EAA0} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_osgview/y_osgview.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_osgview/y_osgview.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/y_osgview/y_osgview.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/y_osgview/y_osgview.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - - {55205cae-e84d-49ec-8c4d-b19f2130eeee} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {1d082ba3-d837-4e63-8692-bf8ad4c9eeee} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libgui_dialogs/z_libgui_dialogs.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libgui_dialogs/z_libgui_dialogs.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libgui_dialogs/z_libgui_dialogs.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libgui_dialogs/z_libgui_dialogs.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,183 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libgui_dialogs/z_libgui_dialogs.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libgui_dialogs/z_libgui_dialogs.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libgui_dialogs/z_libgui_dialogs.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libgui_dialogs/z_libgui_dialogs.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ - - - - - {b119485f-6b64-4f63-b037-f7ba18a1faaa} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {ffebfc65-268e-4147-9d27-b69aee1fd76a} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_actions/z_libmicrosim_actions.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_actions/z_libmicrosim_actions.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_actions/z_libmicrosim_actions.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_actions/z_libmicrosim_actions.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,131 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {A54D4A8B-9520-40F0-B8CB-152BF506CB47} - z_libmicrosim_actions - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - X64 - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_actions/z_libmicrosim_actions.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_actions/z_libmicrosim_actions.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_actions/z_libmicrosim_actions.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_actions/z_libmicrosim_actions.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_cfmodels/z_libmicrosim_cfmodels.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_cfmodels/z_libmicrosim_cfmodels.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_cfmodels/z_libmicrosim_cfmodels.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_cfmodels/z_libmicrosim_cfmodels.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,250 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - {014F0919-66A3-4AED-8901-B6E02F56DC7C} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - X64 - - - 0x0407 - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_cfmodels/z_libmicrosim_cfmodels.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_cfmodels/z_libmicrosim_cfmodels.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_cfmodels/z_libmicrosim_cfmodels.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_cfmodels/z_libmicrosim_cfmodels.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ - - - - - {6f3818c8-582e-42f7-8400-01f7d3e3d633} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {ee950d5c-47b9-422d-9c00-89e7d5421551} - h;hpp;hxx;hm;inl - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_devices/z_libmicrosim_devices.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_devices/z_libmicrosim_devices.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_devices/z_libmicrosim_devices.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_devices/z_libmicrosim_devices.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,248 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - {9F9F769C-E533-4359-B4D2-09F9E20B0B2E} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - X64 - - - 0x0407 - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_devices/z_libmicrosim_devices.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_devices/z_libmicrosim_devices.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_devices/z_libmicrosim_devices.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_devices/z_libmicrosim_devices.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ - - - - - {6f3818c8-582e-42f7-8400-01f7d3e3d633} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {ee950d5c-47b9-422d-9c00-89e7d5421551} - h;hpp;hxx;hm;inl - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_logging/z_libmicrosim_logging.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_logging/z_libmicrosim_logging.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_logging/z_libmicrosim_logging.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_logging/z_libmicrosim_logging.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,123 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF} - z_libmicrosim_logging - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - X64 - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_logging/z_libmicrosim_logging.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_logging/z_libmicrosim_logging.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_logging/z_libmicrosim_logging.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_logging/z_libmicrosim_logging.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ - - - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_output/z_libmicrosim_output.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_output/z_libmicrosim_output.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_output/z_libmicrosim_output.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_output/z_libmicrosim_output.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,268 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - X64 - - - 0x0407 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_output/z_libmicrosim_output.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_output/z_libmicrosim_output.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_output/z_libmicrosim_output.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_output/z_libmicrosim_output.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,135 +0,0 @@ - - - - - {6f3818c8-582e-42f7-8400-01f7d3e3d633} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {ee950d5c-47b9-422d-9c00-89e7d5421551} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_traffic_lights/z_libmicrosim_traffic_lights.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_traffic_lights/z_libmicrosim_traffic_lights.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_traffic_lights/z_libmicrosim_traffic_lights.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_traffic_lights/z_libmicrosim_traffic_lights.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,161 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - X64 - - - 0x0407 - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_traffic_lights/z_libmicrosim_traffic_lights.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_traffic_lights/z_libmicrosim_traffic_lights.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_traffic_lights/z_libmicrosim_traffic_lights.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_traffic_lights/z_libmicrosim_traffic_lights.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ - - - - - {64728375-90c2-4a55-8714-1c6664b845f5} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {9c020308-7e53-41d1-b776-716288331d6a} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_trigger/z_libmicrosim_trigger.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_trigger/z_libmicrosim_trigger.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_trigger/z_libmicrosim_trigger.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_trigger/z_libmicrosim_trigger.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,195 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {26F88652-2664-4CE7-8292-6BD37EE6C3AD} - z_libmicrosim_trigger - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - X64 - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_trigger/z_libmicrosim_trigger.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_trigger/z_libmicrosim_trigger.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libmicrosim_trigger/z_libmicrosim_trigger.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libmicrosim_trigger/z_libmicrosim_trigger.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libnetimport_vissim/z_libnetimport_vissim.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libnetimport_vissim/z_libnetimport_vissim.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libnetimport_vissim/z_libnetimport_vissim.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libnetimport_vissim/z_libnetimport_vissim.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,309 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {F7F13336-3E29-4219-8580-A17C71E69718} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - X64 - - - 0x0407 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libnetimport_vissim/z_libnetimport_vissim.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libnetimport_vissim/z_libnetimport_vissim.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libnetimport_vissim/z_libnetimport_vissim.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libnetimport_vissim/z_libnetimport_vissim.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,500 +0,0 @@ - - - - - {a6de7279-0e60-4f60-a32b-6f6eb95b3877} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {61a306a5-165f-4a7f-a37c-1e56ec2cbacf} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_common/z_libutils_common.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_common/z_libutils_common.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_common/z_libutils_common.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_common/z_libutils_common.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,202 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - Unittest - Win32 - - - Unittest - x64 - - - - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - z_libutils_common - - - - Application - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - Application - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - X64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_common/z_libutils_common.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_common/z_libutils_common.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_common/z_libutils_common.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_common/z_libutils_common.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,182 +0,0 @@ - - - - - {52ba6508-815f-4153-8e8c-f08a8f29b554} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {b4ad7313-2600-43e8-aecb-e1dd008bc4b9} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_distribution/z_libutils_distribution.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_distribution/z_libutils_distribution.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_distribution/z_libutils_distribution.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_distribution/z_libutils_distribution.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,155 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - X64 - - - 0x0407 - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_distribution/z_libutils_distribution.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_distribution/z_libutils_distribution.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_distribution/z_libutils_distribution.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_distribution/z_libutils_distribution.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ - - - - - {234a2248-f785-489a-9b02-f1afedf1f1ec} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {ef72eaed-dde4-4e9c-9ed3-1fff4d6fc622} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_foxtools/z_libutils_foxtools.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_foxtools/z_libutils_foxtools.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_foxtools/z_libutils_foxtools.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_foxtools/z_libutils_foxtools.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,199 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - true - - - 0x0407 - - - - - true - - - 0x0407 - - - - - true - - - 0x0407 - - - - - true - - - 0x0407 - - - - - true - - - 0x0407 - - - - - X64 - - - true - - - 0x0407 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_foxtools/z_libutils_foxtools.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_foxtools/z_libutils_foxtools.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_foxtools/z_libutils_foxtools.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_foxtools/z_libutils_foxtools.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,116 +0,0 @@ - - - - - {a9fcd9fd-6716-41cc-8c72-785614ff909f} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {5e31f5b6-2a21-4acf-949b-68276350806d} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_geom/z_libutils_geom.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_geom/z_libutils_geom.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_geom/z_libutils_geom.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_geom/z_libutils_geom.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,200 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {334DF447-D0B3-4CEA-9693-F755EB11C18F} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - MultiThreadedDebugDLL - - - 0x0407 - - - $(PROJ_LIB);%(AdditionalDependencies) - - - - - MultiThreadedDLL - - - 0x0407 - - - $(PROJ_LIB);%(AdditionalDependencies) - - - - - 0x0407 - - - $(PROJ_LIB);%(AdditionalDependencies) - - - - - 0x0407 - - - $(PROJ_LIB);%(AdditionalDependencies) - - - - - 0x0407 - - - $(PROJ_LIB);%(AdditionalDependencies) - - - - - X64 - - - 0x0407 - - - $(PROJ_LIB);%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_geom/z_libutils_geom.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_geom/z_libutils_geom.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_geom/z_libutils_geom.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_geom/z_libutils_geom.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,101 +0,0 @@ - - - - - {13bc5e51-54f6-479f-9f7f-4184f3d11216} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {69921512-f6e5-4435-9cfc-b31fd855b6f2} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_div/z_libutils_gui_div.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_div/z_libutils_gui_div.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_div/z_libutils_gui_div.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_div/z_libutils_gui_div.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,141 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511} - z_libutils_gui_div - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - X64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_div/z_libutils_gui_div.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_div/z_libutils_gui_div.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_div/z_libutils_gui_div.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_div/z_libutils_gui_div.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_events/z_libutils_gui_events.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_events/z_libutils_gui_events.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_events/z_libutils_gui_events.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_events/z_libutils_gui_events.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,122 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {F574684D-2052-46AB-99B9-AFD5DA2174A6} - z_libutils_gui_events - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - X64 - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_events/z_libutils_gui_events.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_events/z_libutils_gui_events.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_events/z_libutils_gui_events.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_events/z_libutils_gui_events.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_globjects/z_libutils_gui_globjects.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_globjects/z_libutils_gui_globjects.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_globjects/z_libutils_gui_globjects.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_globjects/z_libutils_gui_globjects.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,135 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1} - z_libutils_gui_globjects - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - X64 - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_globjects/z_libutils_gui_globjects.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_globjects/z_libutils_gui_globjects.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_globjects/z_libutils_gui_globjects.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_globjects/z_libutils_gui_globjects.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_images/z_libutils_gui_images.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_images/z_libutils_gui_images.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_images/z_libutils_gui_images.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_images/z_libutils_gui_images.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,126 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {5F818AF6-963E-40B3-93F3-35E145FDE30B} - z_libutils_gui_images - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - X64 - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_images/z_libutils_gui_images.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_images/z_libutils_gui_images.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_images/z_libutils_gui_images.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_images/z_libutils_gui_images.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Quelldateien - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_settings/z_libutils_gui_settings.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_settings/z_libutils_gui_settings.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_settings/z_libutils_gui_settings.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_settings/z_libutils_gui_settings.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,187 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {8C2F733C-1C8E-45C9-A546-17EF0146718D} - z_libutils_gui_settings - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - X64 - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_settings/z_libutils_gui_settings.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_settings/z_libutils_gui_settings.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_settings/z_libutils_gui_settings.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_settings/z_libutils_gui_settings.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_tracker/z_libutils_gui_tracker.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_tracker/z_libutils_gui_tracker.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_tracker/z_libutils_gui_tracker.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_tracker/z_libutils_gui_tracker.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {67E76D22-3C3E-44FC-9253-3FE583DB7848} - z_libutils_gui_tracker - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - X64 - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_tracker/z_libutils_gui_tracker.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_tracker/z_libutils_gui_tracker.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_tracker/z_libutils_gui_tracker.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_tracker/z_libutils_gui_tracker.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Quelldateien - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_windows/z_libutils_gui_windows.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_windows/z_libutils_gui_windows.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_windows/z_libutils_gui_windows.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_windows/z_libutils_gui_windows.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,203 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {25AF2C06-8B08-4B33-8775-657E27C304D9} - z_libutils_gui_windows - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_windows/z_libutils_gui_windows.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_windows/z_libutils_gui_windows.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_gui_windows/z_libutils_gui_windows.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_gui_windows/z_libutils_gui_windows.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_importio/z_libutils_importio.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_importio/z_libutils_importio.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_importio/z_libutils_importio.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_importio/z_libutils_importio.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,159 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {9FCF1CAF-0189-4242-88BA-47706E741119} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - 0x0407 - - - true - - - - - 0x0407 - - - true - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - - - X64 - - - 0x0407 - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_importio/z_libutils_importio.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_importio/z_libutils_importio.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_importio/z_libutils_importio.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_importio/z_libutils_importio.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ - - - - - {1b29ecbc-924d-46f1-b19f-5e5461f8bdc1} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {36ba987b-5b62-4ed5-b280-208e49418b54} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_iodevices/z_libutils_iodevices.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_iodevices/z_libutils_iodevices.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_iodevices/z_libutils_iodevices.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_iodevices/z_libutils_iodevices.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,164 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - Unittest - Win32 - - - Unittest - x64 - - - - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} - z_libutils_iodevices - - - - Application - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_iodevices/z_libutils_iodevices.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_iodevices/z_libutils_iodevices.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_iodevices/z_libutils_iodevices.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_iodevices/z_libutils_iodevices.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ - - - - - {510f305b-6296-4d62-879f-954dd4648520} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {4f36d9b7-b98b-4b2b-8f70-c7d6eebdf336} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_options/z_libutils_options.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_options/z_libutils_options.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_options/z_libutils_options.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_options/z_libutils_options.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,166 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - true - - - 0x0407 - - - true - - - - - true - - - 0x0407 - - - true - - - - - true - - - 0x0407 - - - - - X64 - - - true - - - 0x0407 - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_options/z_libutils_options.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_options/z_libutils_options.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_options/z_libutils_options.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_options/z_libutils_options.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ - - - - - {024bbaf0-9867-4761-b1c9-802d6e1f2007} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {87ccca36-a3fa-4cd9-a1a5-3f4ba4fffd6d} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_xml/z_libutils_xml.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_xml/z_libutils_xml.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_xml/z_libutils_xml.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_xml/z_libutils_xml.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,180 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {508F0BFF-83FE-444C-9509-A359BCA83BC4} - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - 0x0407 - - - - - 0x0407 - - - - - 0x0407 - - - true - - - - - 0x0407 - - - true - - - - - 0x0407 - - - - - X64 - - - 0x0407 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_xml/z_libutils_xml.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_xml/z_libutils_xml.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_libutils_xml/z_libutils_xml.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_libutils_xml/z_libutils_xml.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ - - - - - {51cee7cf-1ff0-4deb-bc2d-83852b80f2ad} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {e7a58060-7bc1-488b-86bb-672292c4b8d8} - h;hpp;hxx;hm;inl - - - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - Quellcodedateien - - - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - Header-Dateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_optional_libtraciserver/z_optional_libtraciserver.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_optional_libtraciserver/z_optional_libtraciserver.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_optional_libtraciserver/z_optional_libtraciserver.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_optional_libtraciserver/z_optional_libtraciserver.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,222 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - InternalDebug - Win32 - - - InternalDebug - x64 - - - InternalRelease - Win32 - - - InternalRelease - x64 - - - Release - Win32 - - - Release - x64 - - - - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C} - z_optional_libtraciserver - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_optional_libtraciserver/z_optional_libtraciserver.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_optional_libtraciserver/z_optional_libtraciserver.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/z_optional_libtraciserver/z_optional_libtraciserver.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/z_optional_libtraciserver/z_optional_libtraciserver.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,105 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_eulerspiral/zz_foreign_eulerspiral.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_eulerspiral/zz_foreign_eulerspiral.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_eulerspiral/zz_foreign_eulerspiral.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_eulerspiral/zz_foreign_eulerspiral.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,155 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {50B2C273-2B6A-4A3A-BE24-83E3202DE180} - zz_foreign_eulerspiral - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - WIN32;%(PreprocessorDefinitions) - - - - - WIN32;%(PreprocessorDefinitions) - - - - - WIN32;%(PreprocessorDefinitions) - - - - - WIN32;%(PreprocessorDefinitions) - - - - - WIN32;%(PreprocessorDefinitions) - - - - - X64 - - - WIN32;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_eulerspiral/zz_foreign_eulerspiral.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_eulerspiral/zz_foreign_eulerspiral.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_eulerspiral/zz_foreign_eulerspiral.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_eulerspiral/zz_foreign_eulerspiral.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Quelldateien - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_gl2ps/zz_foreign_gl2ps.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_gl2ps/zz_foreign_gl2ps.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_gl2ps/zz_foreign_gl2ps.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_gl2ps/zz_foreign_gl2ps.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,123 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {272D2367-13FE-45C2-84AD-8480861DB43E} - zz_foreign_gl2ps - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - X64 - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_gl2ps/zz_foreign_gl2ps.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_gl2ps/zz_foreign_gl2ps.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_gl2ps/zz_foreign_gl2ps.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_gl2ps/zz_foreign_gl2ps.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - - {dbb4f97c-9633-481d-973d-14df6a73ebee} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {e2512217-bec5-4597-b72e-73125d838291} - h;hpp;hxx;hm;inl;inc;xsd - - - {6ddca98d-26c2-4c16-ac4a-35f6fda5c7d2} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Quelldateien - - - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_nvwa/zz_foreign_nvwa.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_nvwa/zz_foreign_nvwa.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_nvwa/zz_foreign_nvwa.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_nvwa/zz_foreign_nvwa.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - zz_foreign_nvwa - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - X64 - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_nvwa/zz_foreign_nvwa.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_nvwa/zz_foreign_nvwa.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_nvwa/zz_foreign_nvwa.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_nvwa/zz_foreign_nvwa.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_polyfonts/zz_foreign_polyfonts.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_polyfonts/zz_foreign_polyfonts.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_polyfonts/zz_foreign_polyfonts.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_polyfonts/zz_foreign_polyfonts.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,126 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {306768A4-B73E-4B81-9EC0-B4836EFE0504} - zz_foreign_polyfonts - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - X64 - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_polyfonts/zz_foreign_polyfonts.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_polyfonts/zz_foreign_polyfonts.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_polyfonts/zz_foreign_polyfonts.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_polyfonts/zz_foreign_polyfonts.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ - - - - - {dbb4f97c-9633-481d-973d-14df6a73ebee} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {e2512217-bec5-4597-b72e-73125d838291} - h;hpp;hxx;hm;inl;inc;xsd - - - {6ddca98d-26c2-4c16-ac4a-35f6fda5c7d2} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Quelldateien - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_rtree/zz_foreign_rtree.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_rtree/zz_foreign_rtree.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_rtree/zz_foreign_rtree.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_rtree/zz_foreign_rtree.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,149 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4} - zz_foreign_rtree - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - WIN32;%(PreprocessorDefinitions) - - - - - WIN32;%(PreprocessorDefinitions) - - - - - WIN32;%(PreprocessorDefinitions) - - - - - WIN32;%(PreprocessorDefinitions) - - - - - WIN32;%(PreprocessorDefinitions) - - - - - X64 - - - WIN32;%(PreprocessorDefinitions) - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_rtree/zz_foreign_rtree.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_rtree/zz_foreign_rtree.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_rtree/zz_foreign_rtree.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_rtree/zz_foreign_rtree.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_tcpip/zz_foreign_tcpip.vcxproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_tcpip/zz_foreign_tcpip.vcxproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_tcpip/zz_foreign_tcpip.vcxproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_tcpip/zz_foreign_tcpip.vcxproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,159 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Fastbuild - Win32 - - - Fastbuild - x64 - - - Release - Win32 - - - Release - x64 - - - - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} - zz_foreign_tcpip - - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Configuration)\ - $(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - WIN32;%(PreprocessorDefinitions) - 4786;4290;%(DisableSpecificWarnings) - - - - - WIN32;%(PreprocessorDefinitions) - 4786;4290;%(DisableSpecificWarnings) - - - - - WIN32;%(PreprocessorDefinitions) - 4786;4290;%(DisableSpecificWarnings) - - - - - WIN32;%(PreprocessorDefinitions) - 4786;4290;%(DisableSpecificWarnings) - - - - - WIN32;%(PreprocessorDefinitions) - 4786;4290;%(DisableSpecificWarnings) - - - - - X64 - - - WIN32;%(PreprocessorDefinitions) - 4786;4290;%(DisableSpecificWarnings) - - - - - - - - - - - - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_tcpip/zz_foreign_tcpip.vcxproj.filters sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_tcpip/zz_foreign_tcpip.vcxproj.filters --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc10/zz_foreign_tcpip/zz_foreign_tcpip.vcxproj.filters 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc10/zz_foreign_tcpip/zz_foreign_tcpip.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Quelldateien - - - Quelldateien - - - - - Headerdateien - - - Headerdateien - - - \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/activitygen/activitygen.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/activitygen/activitygen.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/activitygen/activitygen.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/activitygen/activitygen.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,606 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/defaults.vsprops sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/defaults.vsprops --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/defaults.vsprops 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/defaults.vsprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/dfrouter/dfrouter.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/dfrouter/dfrouter.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/dfrouter/dfrouter.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/dfrouter/dfrouter.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,491 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/duarouter/duarouter.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/duarouter/duarouter.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/duarouter/duarouter.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/duarouter/duarouter.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,430 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/exe.vsprops sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/exe.vsprops --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/exe.vsprops 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/exe.vsprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/Fastbuild.vsprops sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/Fastbuild.vsprops --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/Fastbuild.vsprops 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/Fastbuild.vsprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/guisim/guisim.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/guisim/guisim.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/guisim/guisim.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/guisim/guisim.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,669 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/jtrrouter/jtrrouter.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/jtrrouter/jtrrouter.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/jtrrouter/jtrrouter.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/jtrrouter/jtrrouter.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,459 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/meso.sln sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/meso.sln --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/meso.sln 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/meso.sln 1970-01-01 00:00:00.000000000 +0000 @@ -1,526 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "guisim", "guisim\guisim.vcproj", "{F1904C42-F231-4B9D-AD80-E2971969AFA0}" - ProjectSection(ProjectDependencies) = postProject - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511} = {E3AB9C37-6B5A-4D8C-88F3-DF750A493511} - {8C2F733C-1C8E-45C9-A546-17EF0146718D} = {8C2F733C-1C8E-45C9-A546-17EF0146718D} - {334DF447-D0B3-4CEA-9693-F755EB11C18F} = {334DF447-D0B3-4CEA-9693-F755EB11C18F} - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684} = {3CD3D44A-7809-485C-B7A9-D5FDE0C31684} - {26F88652-2664-4CE7-8292-6BD37EE6C3AD} = {26F88652-2664-4CE7-8292-6BD37EE6C3AD} - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60} = {C9CC8A55-BCF5-44D8-9E22-55EA09757C60} - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} = {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} - {2A069662-6B6F-40D7-A808-211F9C9A4AAE} = {2A069662-6B6F-40D7-A808-211F9C9A4AAE} - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} = {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} = {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} - {A54D4A8B-9520-40F0-B8CB-152BF506CB47} = {A54D4A8B-9520-40F0-B8CB-152BF506CB47} - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36} = {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36} - {306768A4-B73E-4B81-9EC0-B4836EFE0504} = {306768A4-B73E-4B81-9EC0-B4836EFE0504} - {272D2367-13FE-45C2-84AD-8480861DB43E} = {272D2367-13FE-45C2-84AD-8480861DB43E} - {9FCF1CAF-0189-4242-88BA-47706E741119} = {9FCF1CAF-0189-4242-88BA-47706E741119} - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D} = {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D} - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD} = {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD} - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA} = {AF2015D2-2412-4355-87FB-E0D88B0A5FBA} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1} = {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1} - {5F818AF6-963E-40B3-93F3-35E145FDE30B} = {5F818AF6-963E-40B3-93F3-35E145FDE30B} - {508F0BFF-83FE-444C-9509-A359BCA83BC4} = {508F0BFF-83FE-444C-9509-A359BCA83BC4} - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A} = {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A} - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1} = {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1} - {308BEB29-142B-4088-BD41-80E273E20D3A} = {308BEB29-142B-4088-BD41-80E273E20D3A} - {67E76D22-3C3E-44FC-9253-3FE583DB7848} = {67E76D22-3C3E-44FC-9253-3FE583DB7848} - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} = {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - {9046260E-78AA-4458-BE80-0747860A0F70} = {9046260E-78AA-4458-BE80-0747860A0F70} - {25AF2C06-8B08-4B33-8775-657E27C304D9} = {25AF2C06-8B08-4B33-8775-657E27C304D9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sumo", "sumo\sumo.vcproj", "{08C90F3F-95F3-46C7-8D87-63AF6DF5558C}" - ProjectSection(ProjectDependencies) = postProject - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} = {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - {308BEB29-142B-4088-BD41-80E273E20D3A} = {308BEB29-142B-4088-BD41-80E273E20D3A} - {334DF447-D0B3-4CEA-9693-F755EB11C18F} = {334DF447-D0B3-4CEA-9693-F755EB11C18F} - {26F88652-2664-4CE7-8292-6BD37EE6C3AD} = {26F88652-2664-4CE7-8292-6BD37EE6C3AD} - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} = {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} - {2A069662-6B6F-40D7-A808-211F9C9A4AAE} = {2A069662-6B6F-40D7-A808-211F9C9A4AAE} - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} = {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} = {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} - {A54D4A8B-9520-40F0-B8CB-152BF506CB47} = {A54D4A8B-9520-40F0-B8CB-152BF506CB47} - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36} = {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36} - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA} = {AF2015D2-2412-4355-87FB-E0D88B0A5FBA} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1} = {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1} - {508F0BFF-83FE-444C-9509-A359BCA83BC4} = {508F0BFF-83FE-444C-9509-A359BCA83BC4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libgui", "y_libgui\y_libgui.vcproj", "{C9CC8A55-BCF5-44D8-9E22-55EA09757C60}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libguinetload", "y_libguinetload\y_libguinetload.vcproj", "{B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libguisim", "y_libguisim\y_libguisim.vcproj", "{9046260E-78AA-4458-BE80-0747860A0F70}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libmesogui", "y_libmesogui\y_libmesogui.vcproj", "{3CD3D44A-7809-485C-B7A9-D5FDE0C31684}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libmesosim", "y_libmesosim\y_libmesosim.vcproj", "{308BEB29-142B-4088-BD41-80E273E20D3A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libmicrosim", "y_libmicrosim\y_libmicrosim.vcproj", "{2A069662-6B6F-40D7-A808-211F9C9A4AAE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libnetload", "y_libnetload\y_libnetload.vcproj", "{5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_output", "z_libmicrosim_output\z_libmicrosim_output.vcproj", "{CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_traffic_lights", "z_libmicrosim_traffic_lights\z_libmicrosim_traffic_lights.vcproj", "{AF2015D2-2412-4355-87FB-E0D88B0A5FBA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_common", "z_libutils_common\z_libutils_common.vcproj", "{72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_foxtools", "z_libutils_foxtools\z_libutils_foxtools.vcproj", "{ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_geom", "z_libutils_geom\z_libutils_geom.vcproj", "{334DF447-D0B3-4CEA-9693-F755EB11C18F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_iodevices", "z_libutils_iodevices\z_libutils_iodevices.vcproj", "{FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_options", "z_libutils_options\z_libutils_options.vcproj", "{EE29AF87-7317-488D-BF6D-EC422D1DBAD6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_xml", "z_libutils_xml\z_libutils_xml.vcproj", "{508F0BFF-83FE-444C-9509-A359BCA83BC4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_importio", "z_libutils_importio\z_libutils_importio.vcproj", "{9FCF1CAF-0189-4242-88BA-47706E741119}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_actions", "z_libmicrosim_actions\z_libmicrosim_actions.vcproj", "{A54D4A8B-9520-40F0-B8CB-152BF506CB47}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_logging", "z_libmicrosim_logging\z_libmicrosim_logging.vcproj", "{0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_trigger", "z_libmicrosim_trigger\z_libmicrosim_trigger.vcproj", "{26F88652-2664-4CE7-8292-6BD37EE6C3AD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_div", "z_libutils_gui_div\z_libutils_gui_div.vcproj", "{E3AB9C37-6B5A-4D8C-88F3-DF750A493511}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_settings", "z_libutils_gui_settings\z_libutils_gui_settings.vcproj", "{8C2F733C-1C8E-45C9-A546-17EF0146718D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_images", "z_libutils_gui_images\z_libutils_gui_images.vcproj", "{5F818AF6-963E-40B3-93F3-35E145FDE30B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_nvwa", "zz_foreign_nvwa\zz_foreign_nvwa.vcproj", "{FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_tcpip", "zz_foreign_tcpip\zz_foreign_tcpip.vcproj", "{492B0B5A-0BBE-49BA-82E6-70A82DBC242F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_polyfonts", "zz_foreign_polyfonts\zz_foreign_polyfonts.vcproj", "{306768A4-B73E-4B81-9EC0-B4836EFE0504}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_gl2ps", "zz_foreign_gl2ps\zz_foreign_gl2ps.vcproj", "{272D2367-13FE-45C2-84AD-8480861DB43E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_windows", "z_libutils_gui_windows\z_libutils_gui_windows.vcproj", "{25AF2C06-8B08-4B33-8775-657E27C304D9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_tracker", "z_libutils_gui_tracker\z_libutils_gui_tracker.vcproj", "{67E76D22-3C3E-44FC-9253-3FE583DB7848}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_globjects", "z_libutils_gui_globjects\z_libutils_gui_globjects.vcproj", "{39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_events", "z_libutils_gui_events\z_libutils_gui_events.vcproj", "{F574684D-2052-46AB-99B9-AFD5DA2174A6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libgui_dialogs", "z_libgui_dialogs\z_libgui_dialogs.vcproj", "{80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Fastbuild|Win32 = Fastbuild|Win32 - Fastbuild|x64 = Fastbuild|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|Win32.ActiveCfg = MesoDebug|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|Win32.Build.0 = MesoDebug|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|x64.ActiveCfg = MesoDebug|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|x64.Build.0 = MesoDebug|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|Win32.ActiveCfg = MesoRelease|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|Win32.Build.0 = MesoRelease|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|x64.ActiveCfg = MesoRelease|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|x64.Build.0 = MesoRelease|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|Win32.ActiveCfg = MesoDebug|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|Win32.Build.0 = MesoDebug|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|x64.ActiveCfg = MesoDebug|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|x64.Build.0 = MesoDebug|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|Win32.ActiveCfg = MesoRelease|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|Win32.Build.0 = MesoRelease|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|x64.ActiveCfg = MesoRelease|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|x64.Build.0 = MesoRelease|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|Win32.ActiveCfg = MesoDebug|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|Win32.Build.0 = MesoDebug|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|x64.ActiveCfg = MesoDebug|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|x64.Build.0 = MesoDebug|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|Win32.ActiveCfg = MesoRelease|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|Win32.Build.0 = MesoRelease|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|x64.ActiveCfg = MesoRelease|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|x64.Build.0 = MesoRelease|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|Win32.ActiveCfg = MesoDebug|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|Win32.Build.0 = MesoDebug|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|x64.ActiveCfg = MesoDebug|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|x64.Build.0 = MesoDebug|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|Win32.ActiveCfg = MesoRelease|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|Win32.Build.0 = MesoRelease|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|x64.ActiveCfg = MesoRelease|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|x64.Build.0 = MesoRelease|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|Win32.ActiveCfg = MesoDebug|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|Win32.Build.0 = MesoDebug|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|x64.ActiveCfg = MesoDebug|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|x64.Build.0 = MesoDebug|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|Win32.ActiveCfg = MesoRelease|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|Win32.Build.0 = MesoRelease|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|x64.ActiveCfg = MesoRelease|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|x64.Build.0 = MesoRelease|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Debug|Win32.ActiveCfg = Debug|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Debug|Win32.Build.0 = Debug|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Debug|x64.ActiveCfg = Debug|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Debug|x64.Build.0 = Debug|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Release|Win32.ActiveCfg = Release|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Release|Win32.Build.0 = Release|Win32 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Release|x64.ActiveCfg = Release|x64 - {3CD3D44A-7809-485C-B7A9-D5FDE0C31684}.Release|x64.Build.0 = Release|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Debug|Win32.ActiveCfg = Debug|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Debug|Win32.Build.0 = Debug|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Debug|x64.ActiveCfg = Debug|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Debug|x64.Build.0 = Debug|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Release|Win32.ActiveCfg = Release|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Release|Win32.Build.0 = Release|Win32 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Release|x64.ActiveCfg = Release|x64 - {308BEB29-142B-4088-BD41-80E273E20D3A}.Release|x64.Build.0 = Release|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|Win32.ActiveCfg = MesoDebug|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|Win32.Build.0 = MesoDebug|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|x64.ActiveCfg = MesoDebug|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|x64.Build.0 = MesoDebug|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|Win32.ActiveCfg = MesoRelease|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|Win32.Build.0 = MesoRelease|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|x64.ActiveCfg = MesoRelease|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|x64.Build.0 = MesoRelease|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|Win32.ActiveCfg = MesoDebug|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|Win32.Build.0 = MesoDebug|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|x64.ActiveCfg = MesoDebug|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|x64.Build.0 = MesoDebug|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|Win32.ActiveCfg = MesoRelease|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|Win32.Build.0 = MesoRelease|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|x64.ActiveCfg = MesoRelease|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|x64.Build.0 = MesoRelease|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|Win32.ActiveCfg = MesoDebug|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|Win32.Build.0 = MesoDebug|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|x64.ActiveCfg = MesoDebug|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|x64.Build.0 = MesoDebug|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|Win32.ActiveCfg = MesoRelease|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|Win32.Build.0 = MesoRelease|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|x64.ActiveCfg = MesoRelease|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|x64.Build.0 = MesoRelease|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|Win32.ActiveCfg = Debug|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|Win32.Build.0 = Debug|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|x64.ActiveCfg = Debug|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|x64.Build.0 = Debug|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|Win32.ActiveCfg = Release|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|Win32.Build.0 = Release|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|x64.ActiveCfg = Release|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|x64.Build.0 = Release|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|Win32.ActiveCfg = Debug|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|Win32.Build.0 = Debug|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|x64.ActiveCfg = Debug|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|x64.Build.0 = Debug|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|Win32.ActiveCfg = Release|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|Win32.Build.0 = Release|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|x64.ActiveCfg = Release|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|x64.Build.0 = Release|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|Win32.ActiveCfg = Debug|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|Win32.Build.0 = Debug|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|x64.ActiveCfg = Debug|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|x64.Build.0 = Debug|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|Win32.ActiveCfg = Release|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|Win32.Build.0 = Release|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|x64.ActiveCfg = Release|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|x64.Build.0 = Release|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|Win32.ActiveCfg = Debug|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|Win32.Build.0 = Debug|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|x64.ActiveCfg = Debug|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|x64.Build.0 = Debug|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|Win32.ActiveCfg = Release|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|Win32.Build.0 = Release|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|x64.ActiveCfg = Release|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|x64.Build.0 = Release|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|Win32.ActiveCfg = Debug|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|Win32.Build.0 = Debug|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|x64.ActiveCfg = Debug|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|x64.Build.0 = Debug|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|Win32.ActiveCfg = Release|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|Win32.Build.0 = Release|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|x64.ActiveCfg = Release|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|x64.Build.0 = Release|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|Win32.ActiveCfg = Debug|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|Win32.Build.0 = Debug|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|x64.ActiveCfg = Debug|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|x64.Build.0 = Debug|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|Win32.ActiveCfg = Release|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|Win32.Build.0 = Release|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|x64.ActiveCfg = Release|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|x64.Build.0 = Release|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|Win32.ActiveCfg = Debug|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|Win32.Build.0 = Debug|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|x64.ActiveCfg = Debug|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|x64.Build.0 = Debug|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|Win32.ActiveCfg = Release|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|Win32.Build.0 = Release|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|x64.ActiveCfg = Release|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|x64.Build.0 = Release|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|Win32.ActiveCfg = Debug|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|Win32.Build.0 = Debug|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|x64.ActiveCfg = Debug|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|x64.Build.0 = Debug|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|Win32.ActiveCfg = Release|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|Win32.Build.0 = Release|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|x64.ActiveCfg = Release|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|x64.Build.0 = Release|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|Win32.ActiveCfg = Debug|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|Win32.Build.0 = Debug|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|x64.ActiveCfg = Debug|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|x64.Build.0 = Debug|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|Win32.ActiveCfg = Release|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|Win32.Build.0 = Release|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|x64.ActiveCfg = Release|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|x64.Build.0 = Release|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|Win32.ActiveCfg = Debug|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|Win32.Build.0 = Debug|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|x64.ActiveCfg = Debug|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|x64.Build.0 = Debug|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|Win32.ActiveCfg = Release|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|Win32.Build.0 = Release|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|x64.ActiveCfg = Release|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|x64.Build.0 = Release|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|Win32.ActiveCfg = MesoDebug|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|Win32.Build.0 = MesoDebug|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|x64.ActiveCfg = MesoDebug|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|x64.Build.0 = MesoDebug|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|Win32.ActiveCfg = MesoRelease|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|Win32.Build.0 = MesoRelease|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|x64.ActiveCfg = MesoRelease|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|x64.Build.0 = MesoRelease|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|Win32.ActiveCfg = Debug|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|Win32.Build.0 = Debug|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|x64.ActiveCfg = Debug|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|x64.Build.0 = Debug|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|Win32.ActiveCfg = Release|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|Win32.Build.0 = Release|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|x64.ActiveCfg = Release|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|x64.Build.0 = Release|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|Win32.ActiveCfg = MesoDebug|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|Win32.Build.0 = MesoDebug|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|x64.ActiveCfg = MesoDebug|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|x64.Build.0 = MesoDebug|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|Win32.ActiveCfg = MesoRelease|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|Win32.Build.0 = MesoRelease|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|x64.ActiveCfg = MesoRelease|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|x64.Build.0 = MesoRelease|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|Win32.ActiveCfg = Debug|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|Win32.Build.0 = Debug|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|x64.ActiveCfg = Debug|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|x64.Build.0 = Debug|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|Win32.ActiveCfg = Release|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|Win32.Build.0 = Release|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|x64.ActiveCfg = Release|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|x64.Build.0 = Release|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|Win32.ActiveCfg = Debug|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|Win32.Build.0 = Debug|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|x64.ActiveCfg = Debug|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|x64.Build.0 = Debug|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|Win32.ActiveCfg = Release|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|Win32.Build.0 = Release|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|x64.ActiveCfg = Release|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|x64.Build.0 = Release|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|Win32.ActiveCfg = Debug|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|Win32.Build.0 = Debug|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|x64.ActiveCfg = Debug|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|x64.Build.0 = Debug|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|Win32.ActiveCfg = Release|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|Win32.Build.0 = Release|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|x64.ActiveCfg = Release|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|x64.Build.0 = Release|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|Win32.ActiveCfg = Debug|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|Win32.Build.0 = Debug|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|x64.ActiveCfg = Debug|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|x64.Build.0 = Debug|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|Win32.ActiveCfg = Release|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|Win32.Build.0 = Release|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|x64.ActiveCfg = Release|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|x64.Build.0 = Release|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|Win32.ActiveCfg = Debug|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|Win32.Build.0 = Debug|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|x64.ActiveCfg = Debug|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|x64.Build.0 = Debug|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|Win32.ActiveCfg = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|Win32.Build.0 = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|x64.ActiveCfg = Release|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|x64.Build.0 = Release|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|Win32.ActiveCfg = MesoDebug|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|Win32.Build.0 = MesoDebug|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|x64.ActiveCfg = MesoDebug|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|x64.Build.0 = MesoDebug|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|Win32.ActiveCfg = MesoRelease|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|Win32.Build.0 = MesoRelease|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|x64.ActiveCfg = MesoRelease|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|x64.Build.0 = MesoRelease|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|Win32.ActiveCfg = Debug|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|Win32.Build.0 = Debug|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|x64.ActiveCfg = Debug|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|x64.Build.0 = Debug|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|Win32.ActiveCfg = Release|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|Win32.Build.0 = Release|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|x64.ActiveCfg = Release|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|x64.Build.0 = Release|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|Win32.ActiveCfg = Debug|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|Win32.Build.0 = Debug|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|x64.ActiveCfg = Debug|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|x64.Build.0 = Debug|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|Win32.ActiveCfg = Release|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|Win32.Build.0 = Release|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|x64.ActiveCfg = Release|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|x64.Build.0 = Release|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|Win32.ActiveCfg = Debug|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|Win32.Build.0 = Debug|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|x64.ActiveCfg = Debug|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|x64.Build.0 = Debug|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|Win32.ActiveCfg = Release|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|Win32.Build.0 = Release|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|x64.ActiveCfg = Release|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|x64.Build.0 = Release|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|Win32.ActiveCfg = MesoDebug|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|Win32.Build.0 = MesoDebug|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|x64.ActiveCfg = MesoDebug|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|x64.Build.0 = MesoDebug|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|Win32.ActiveCfg = MesoRelease|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|Win32.Build.0 = MesoRelease|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|x64.ActiveCfg = MesoRelease|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|x64.Build.0 = MesoRelease|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/meso.vsprops sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/meso.vsprops --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/meso.vsprops 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/meso.vsprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/netconvert/netconvert.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/netconvert/netconvert.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/netconvert/netconvert.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/netconvert/netconvert.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,421 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/netgen/netgen.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/netgen/netgen.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/netgen/netgen.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/netgen/netgen.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,461 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/od2trips/od2trips.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/od2trips/od2trips.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/od2trips/od2trips.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/od2trips/od2trips.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,455 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/polyconvert/polyconvert.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/polyconvert/polyconvert.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/polyconvert/polyconvert.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/polyconvert/polyconvert.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,491 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/prj.sln sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/prj.sln --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/prj.sln 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/prj.sln 1970-01-01 00:00:00.000000000 +0000 @@ -1,932 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "duarouter", "duarouter\duarouter.vcproj", "{90205628-51D7-4194-9FC0-7D74C35A3471}" - ProjectSection(ProjectDependencies) = postProject - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} = {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} = {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} = {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} - {9FCF1CAF-0189-4242-88BA-47706E741119} = {9FCF1CAF-0189-4242-88BA-47706E741119} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D} = {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D} - {508F0BFF-83FE-444C-9509-A359BCA83BC4} = {508F0BFF-83FE-444C-9509-A359BCA83BC4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "guisim", "guisim\guisim.vcproj", "{F1904C42-F231-4B9D-AD80-E2971969AFA0}" - ProjectSection(ProjectDependencies) = postProject - {25AF2C06-8B08-4B33-8775-657E27C304D9} = {25AF2C06-8B08-4B33-8775-657E27C304D9} - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A} = {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A} - {9046260E-78AA-4458-BE80-0747860A0F70} = {9046260E-78AA-4458-BE80-0747860A0F70} - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} = {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - {67E76D22-3C3E-44FC-9253-3FE583DB7848} = {67E76D22-3C3E-44FC-9253-3FE583DB7848} - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511} = {E3AB9C37-6B5A-4D8C-88F3-DF750A493511} - {8C2F733C-1C8E-45C9-A546-17EF0146718D} = {8C2F733C-1C8E-45C9-A546-17EF0146718D} - {334DF447-D0B3-4CEA-9693-F755EB11C18F} = {334DF447-D0B3-4CEA-9693-F755EB11C18F} - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60} = {C9CC8A55-BCF5-44D8-9E22-55EA09757C60} - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} = {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} - {2A069662-6B6F-40D7-A808-211F9C9A4AAE} = {2A069662-6B6F-40D7-A808-211F9C9A4AAE} - {272D2367-13FE-45C2-84AD-8480861DB43E} = {272D2367-13FE-45C2-84AD-8480861DB43E} - {0A050D80-51DA-4F0B-8B2A-3E62E1615972} = {0A050D80-51DA-4F0B-8B2A-3E62E1615972} - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} = {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} = {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36} = {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36} - {306768A4-B73E-4B81-9EC0-B4836EFE0504} = {306768A4-B73E-4B81-9EC0-B4836EFE0504} - {9FCF1CAF-0189-4242-88BA-47706E741119} = {9FCF1CAF-0189-4242-88BA-47706E741119} - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D} = {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D} - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD} = {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD} - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA} = {AF2015D2-2412-4355-87FB-E0D88B0A5FBA} - {F1CFA6D8-7E0F-4F15-A30E-FEBB9510992B} = {F1CFA6D8-7E0F-4F15-A30E-FEBB9510992B} - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1} = {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1} = {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1} - {5F818AF6-963E-40B3-93F3-35E145FDE30B} = {5F818AF6-963E-40B3-93F3-35E145FDE30B} - {508F0BFF-83FE-444C-9509-A359BCA83BC4} = {508F0BFF-83FE-444C-9509-A359BCA83BC4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jtrrouter", "jtrrouter\jtrrouter.vcproj", "{43569450-FB3D-46EA-B9AB-CE92295C5570}" - ProjectSection(ProjectDependencies) = postProject - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} = {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} = {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} = {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} - {9FCF1CAF-0189-4242-88BA-47706E741119} = {9FCF1CAF-0189-4242-88BA-47706E741119} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D} = {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D} - {508F0BFF-83FE-444C-9509-A359BCA83BC4} = {508F0BFF-83FE-444C-9509-A359BCA83BC4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netconvert", "netconvert\netconvert.vcproj", "{4589198B-EBD4-4811-B778-8AE270AEE0CD}" - ProjectSection(ProjectDependencies) = postProject - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6} = {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6} - {CC28660E-1AEB-4812-BB1C-373A6FAC4450} = {CC28660E-1AEB-4812-BB1C-373A6FAC4450} - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} = {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - {F7F13336-3E29-4219-8580-A17C71E69718} = {F7F13336-3E29-4219-8580-A17C71E69718} - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6} = {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6} - {334DF447-D0B3-4CEA-9693-F755EB11C18F} = {334DF447-D0B3-4CEA-9693-F755EB11C18F} - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} = {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} - {50B2C273-2B6A-4A3A-BE24-83E3202DE180} = {50B2C273-2B6A-4A3A-BE24-83E3202DE180} - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} = {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} = {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} - {9FCF1CAF-0189-4242-88BA-47706E741119} = {9FCF1CAF-0189-4242-88BA-47706E741119} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - {91422FEF-2369-45E6-87AA-8B38709AD823} = {91422FEF-2369-45E6-87AA-8B38709AD823} - {508F0BFF-83FE-444C-9509-A359BCA83BC4} = {508F0BFF-83FE-444C-9509-A359BCA83BC4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netgenerate", "netgen\netgen.vcproj", "{F241CA03-4AB1-4BB0-8151-7AF078E2BC06}" - ProjectSection(ProjectDependencies) = postProject - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6} = {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6} - {CC28660E-1AEB-4812-BB1C-373A6FAC4450} = {CC28660E-1AEB-4812-BB1C-373A6FAC4450} - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} = {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - {334DF447-D0B3-4CEA-9693-F755EB11C18F} = {334DF447-D0B3-4CEA-9693-F755EB11C18F} - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} = {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} = {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} = {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - {508F0BFF-83FE-444C-9509-A359BCA83BC4} = {508F0BFF-83FE-444C-9509-A359BCA83BC4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "od2trips", "od2trips\od2trips.vcproj", "{39392259-4561-44C0-98F1-64CA4396C025}" - ProjectSection(ProjectDependencies) = postProject - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} = {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6} = {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6} - {334DF447-D0B3-4CEA-9693-F755EB11C18F} = {334DF447-D0B3-4CEA-9693-F755EB11C18F} - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} = {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} = {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} - {9FCF1CAF-0189-4242-88BA-47706E741119} = {9FCF1CAF-0189-4242-88BA-47706E741119} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - {508F0BFF-83FE-444C-9509-A359BCA83BC4} = {508F0BFF-83FE-444C-9509-A359BCA83BC4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sumo", "sumo\sumo.vcproj", "{08C90F3F-95F3-46C7-8D87-63AF6DF5558C}" - ProjectSection(ProjectDependencies) = postProject - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} = {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - {334DF447-D0B3-4CEA-9693-F755EB11C18F} = {334DF447-D0B3-4CEA-9693-F755EB11C18F} - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} = {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} - {2A069662-6B6F-40D7-A808-211F9C9A4AAE} = {2A069662-6B6F-40D7-A808-211F9C9A4AAE} - {0A050D80-51DA-4F0B-8B2A-3E62E1615972} = {0A050D80-51DA-4F0B-8B2A-3E62E1615972} - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} = {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} = {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36} = {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36} - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA} = {AF2015D2-2412-4355-87FB-E0D88B0A5FBA} - {F1CFA6D8-7E0F-4F15-A30E-FEBB9510992B} = {F1CFA6D8-7E0F-4F15-A30E-FEBB9510992B} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C} = {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C} - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1} = {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1} - {508F0BFF-83FE-444C-9509-A359BCA83BC4} = {508F0BFF-83FE-444C-9509-A359BCA83BC4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libgui", "y_libgui\y_libgui.vcproj", "{C9CC8A55-BCF5-44D8-9E22-55EA09757C60}" - ProjectSection(ProjectDependencies) = postProject - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libguinetload", "y_libguinetload\y_libguinetload.vcproj", "{B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}" - ProjectSection(ProjectDependencies) = postProject - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libguisim", "y_libguisim\y_libguisim.vcproj", "{9046260E-78AA-4458-BE80-0747860A0F70}" - ProjectSection(ProjectDependencies) = postProject - {2A069662-6B6F-40D7-A808-211F9C9A4AAE} = {2A069662-6B6F-40D7-A808-211F9C9A4AAE} - {9FCF1CAF-0189-4242-88BA-47706E741119} = {9FCF1CAF-0189-4242-88BA-47706E741119} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libmicrosim", "y_libmicrosim\y_libmicrosim.vcproj", "{2A069662-6B6F-40D7-A808-211F9C9A4AAE}" - ProjectSection(ProjectDependencies) = postProject - {26F88652-2664-4CE7-8292-6BD37EE6C3AD} = {26F88652-2664-4CE7-8292-6BD37EE6C3AD} - {A54D4A8B-9520-40F0-B8CB-152BF506CB47} = {A54D4A8B-9520-40F0-B8CB-152BF506CB47} - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA} = {AF2015D2-2412-4355-87FB-E0D88B0A5FBA} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C} = {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C} - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1} = {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libnetbuild", "y_libnetbuild\y_libnetbuild.vcproj", "{BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}" - ProjectSection(ProjectDependencies) = postProject - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libnetimport", "y_libnetimport\y_libnetimport.vcproj", "{91422FEF-2369-45E6-87AA-8B38709AD823}" - ProjectSection(ProjectDependencies) = postProject - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libnetload", "y_libnetload\y_libnetload.vcproj", "{5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}" - ProjectSection(ProjectDependencies) = postProject - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_librouter", "y_librouter\y_librouter.vcproj", "{A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}" - ProjectSection(ProjectDependencies) = postProject - {2A069662-6B6F-40D7-A808-211F9C9A4AAE} = {2A069662-6B6F-40D7-A808-211F9C9A4AAE} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_output", "z_libmicrosim_output\z_libmicrosim_output.vcproj", "{CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}" - ProjectSection(ProjectDependencies) = postProject - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_traffic_lights", "z_libmicrosim_traffic_lights\z_libmicrosim_traffic_lights.vcproj", "{AF2015D2-2412-4355-87FB-E0D88B0A5FBA}" - ProjectSection(ProjectDependencies) = postProject - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_common", "z_libutils_common\z_libutils_common.vcproj", "{72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}" - ProjectSection(ProjectDependencies) = postProject - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_distribution", "z_libutils_distribution\z_libutils_distribution.vcproj", "{F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}" - ProjectSection(ProjectDependencies) = postProject - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_foxtools", "z_libutils_foxtools\z_libutils_foxtools.vcproj", "{ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}" - ProjectSection(ProjectDependencies) = postProject - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_geom", "z_libutils_geom\z_libutils_geom.vcproj", "{334DF447-D0B3-4CEA-9693-F755EB11C18F}" - ProjectSection(ProjectDependencies) = postProject - {7327F7CB-C41D-4F9D-99C2-8A3B673F182C} = {7327F7CB-C41D-4F9D-99C2-8A3B673F182C} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_importio", "z_libutils_importio\z_libutils_importio.vcproj", "{9FCF1CAF-0189-4242-88BA-47706E741119}" - ProjectSection(ProjectDependencies) = postProject - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_iodevices", "z_libutils_iodevices\z_libutils_iodevices.vcproj", "{FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}" - ProjectSection(ProjectDependencies) = postProject - {334DF447-D0B3-4CEA-9693-F755EB11C18F} = {334DF447-D0B3-4CEA-9693-F755EB11C18F} - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} = {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_options", "z_libutils_options\z_libutils_options.vcproj", "{EE29AF87-7317-488D-BF6D-EC422D1DBAD6}" - ProjectSection(ProjectDependencies) = postProject - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_xml", "z_libutils_xml\z_libutils_xml.vcproj", "{508F0BFF-83FE-444C-9509-A359BCA83BC4}" - ProjectSection(ProjectDependencies) = postProject - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dfrouter", "dfrouter\dfrouter.vcproj", "{171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}" - ProjectSection(ProjectDependencies) = postProject - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} = {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - {334DF447-D0B3-4CEA-9693-F755EB11C18F} = {334DF447-D0B3-4CEA-9693-F755EB11C18F} - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} = {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} = {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} - {9FCF1CAF-0189-4242-88BA-47706E741119} = {9FCF1CAF-0189-4242-88BA-47706E741119} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D} = {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D} - {508F0BFF-83FE-444C-9509-A359BCA83BC4} = {508F0BFF-83FE-444C-9509-A359BCA83BC4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "polyconvert", "polyconvert\polyconvert.vcproj", "{CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}" - ProjectSection(ProjectDependencies) = postProject - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} = {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - {334DF447-D0B3-4CEA-9693-F755EB11C18F} = {334DF447-D0B3-4CEA-9693-F755EB11C18F} - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} = {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} = {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} - {9FCF1CAF-0189-4242-88BA-47706E741119} = {9FCF1CAF-0189-4242-88BA-47706E741119} - {7327F7CB-C41D-4F9D-99C2-8A3B673F182C} = {7327F7CB-C41D-4F9D-99C2-8A3B673F182C} - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} = {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47} - {508F0BFF-83FE-444C-9509-A359BCA83BC4} = {508F0BFF-83FE-444C-9509-A359BCA83BC4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_nvwa", "zz_foreign_nvwa\zz_foreign_nvwa.vcproj", "{FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_tcpip", "zz_foreign_tcpip\zz_foreign_tcpip.vcproj", "{492B0B5A-0BBE-49BA-82E6-70A82DBC242F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_optional_libtraciserver", "z_optional_libtraciserver\z_optional_libtraciserver.vcproj", "{00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}" - ProjectSection(ProjectDependencies) = postProject - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} = {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_trigger", "z_libmicrosim_trigger\z_libmicrosim_trigger.vcproj", "{26F88652-2664-4CE7-8292-6BD37EE6C3AD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_logging", "z_libmicrosim_logging\z_libmicrosim_logging.vcproj", "{0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_actions", "z_libmicrosim_actions\z_libmicrosim_actions.vcproj", "{A54D4A8B-9520-40F0-B8CB-152BF506CB47}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_images", "z_libutils_gui_images\z_libutils_gui_images.vcproj", "{5F818AF6-963E-40B3-93F3-35E145FDE30B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_div", "z_libutils_gui_div\z_libutils_gui_div.vcproj", "{E3AB9C37-6B5A-4D8C-88F3-DF750A493511}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_settings", "z_libutils_gui_settings\z_libutils_gui_settings.vcproj", "{8C2F733C-1C8E-45C9-A546-17EF0146718D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_polyfonts", "zz_foreign_polyfonts\zz_foreign_polyfonts.vcproj", "{306768A4-B73E-4B81-9EC0-B4836EFE0504}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_windows", "z_libutils_gui_windows\z_libutils_gui_windows.vcproj", "{25AF2C06-8B08-4B33-8775-657E27C304D9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_globjects", "z_libutils_gui_globjects\z_libutils_gui_globjects.vcproj", "{39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_events", "z_libutils_gui_events\z_libutils_gui_events.vcproj", "{F574684D-2052-46AB-99B9-AFD5DA2174A6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libgui_dialogs", "z_libgui_dialogs\z_libgui_dialogs.vcproj", "{80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_gui_tracker", "z_libutils_gui_tracker\z_libutils_gui_tracker.vcproj", "{67E76D22-3C3E-44FC-9253-3FE583DB7848}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libnetimport_vissim", "z_libnetimport_vissim\z_libnetimport_vissim.vcproj", "{F7F13336-3E29-4219-8580-A17C71E69718}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TraciTestClient", "traci-testclient\Traci_TestClient.vcproj", "{46274B55-07FE-4911-B4C0-D8B43A203B4A}" - ProjectSection(ProjectDependencies) = postProject - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} = {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} = {492B0B5A-0BBE-49BA-82E6-70A82DBC242F} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_rtree", "zz_foreign_rtree\zz_foreign_rtree.vcproj", "{25FDF327-EB7A-484A-96BC-AF2DB089D6F4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_eulerspiral", "zz_foreign_eulerspiral\zz_foreign_eulerspiral.vcproj", "{50B2C273-2B6A-4A3A-BE24-83E3202DE180}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "activitygen", "activitygen\activitygen.vcproj", "{3DAC2EC1-D265-4F66-8442-A006E50DC95F}" - ProjectSection(ProjectDependencies) = postProject - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} = {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20} - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} = {EE29AF87-7317-488D-BF6D-EC422D1DBAD6} - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} = {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8} - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D} = {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D} - {508F0BFF-83FE-444C-9509-A359BCA83BC4} = {508F0BFF-83FE-444C-9509-A359BCA83BC4} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zz_foreign_gl2ps", "zz_foreign_gl2ps\zz_foreign_gl2ps.vcproj", "{272D2367-13FE-45C2-84AD-8480861DB43E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "y_libnetwrite", "y_libnetwrite\y_libnetwrite.vcproj", "{CC28660E-1AEB-4812-BB1C-373A6FAC4450}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libutils_shapes", "z_libutils_shapes\z_libutils_shapes.vcproj", "{7327F7CB-C41D-4F9D-99C2-8A3B673F182C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_cfmodels", "z_libmicrosim_cfmodels\z_libmicrosim_cfmodels.vcproj", "{0A050D80-51DA-4F0B-8B2A-3E62E1615972}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "z_libmicrosim_devices", "z_libmicrosim_devices\z_libmicrosim_devices.vcproj", "{F1CFA6D8-7E0F-4F15-A30E-FEBB9510992B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Fastbuild|Win32 = Fastbuild|Win32 - Fastbuild|x64 = Fastbuild|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {90205628-51D7-4194-9FC0-7D74C35A3471}.Debug|Win32.ActiveCfg = Debug|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Debug|Win32.Build.0 = Debug|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Debug|x64.ActiveCfg = Debug|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Debug|x64.Build.0 = Debug|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Release|Win32.ActiveCfg = Release|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Release|Win32.Build.0 = Release|Win32 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Release|x64.ActiveCfg = Release|x64 - {90205628-51D7-4194-9FC0-7D74C35A3471}.Release|x64.Build.0 = Release|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|Win32.ActiveCfg = Debug|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|Win32.Build.0 = Debug|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|x64.ActiveCfg = Debug|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Debug|x64.Build.0 = Debug|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|Win32.ActiveCfg = Release|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|Win32.Build.0 = Release|Win32 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|x64.ActiveCfg = Release|x64 - {F1904C42-F231-4B9D-AD80-E2971969AFA0}.Release|x64.Build.0 = Release|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Debug|Win32.ActiveCfg = Debug|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Debug|Win32.Build.0 = Debug|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Debug|x64.ActiveCfg = Debug|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Debug|x64.Build.0 = Debug|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Release|Win32.ActiveCfg = Release|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Release|Win32.Build.0 = Release|Win32 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Release|x64.ActiveCfg = Release|x64 - {43569450-FB3D-46EA-B9AB-CE92295C5570}.Release|x64.Build.0 = Release|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Debug|Win32.ActiveCfg = Debug|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Debug|Win32.Build.0 = Debug|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Debug|x64.ActiveCfg = Debug|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Debug|x64.Build.0 = Debug|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Release|Win32.ActiveCfg = Release|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Release|Win32.Build.0 = Release|Win32 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Release|x64.ActiveCfg = Release|x64 - {4589198B-EBD4-4811-B778-8AE270AEE0CD}.Release|x64.Build.0 = Release|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Debug|Win32.ActiveCfg = Debug|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Debug|Win32.Build.0 = Debug|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Debug|x64.ActiveCfg = Debug|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Debug|x64.Build.0 = Debug|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Release|Win32.ActiveCfg = Release|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Release|Win32.Build.0 = Release|Win32 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Release|x64.ActiveCfg = Release|x64 - {F241CA03-4AB1-4BB0-8151-7AF078E2BC06}.Release|x64.Build.0 = Release|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Debug|Win32.ActiveCfg = Debug|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Debug|Win32.Build.0 = Debug|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Debug|x64.ActiveCfg = Debug|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Debug|x64.Build.0 = Debug|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Release|Win32.ActiveCfg = Release|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Release|Win32.Build.0 = Release|Win32 - {39392259-4561-44C0-98F1-64CA4396C025}.Release|x64.ActiveCfg = Release|x64 - {39392259-4561-44C0-98F1-64CA4396C025}.Release|x64.Build.0 = Release|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|Win32.ActiveCfg = Debug|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|Win32.Build.0 = Debug|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|x64.ActiveCfg = Debug|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Debug|x64.Build.0 = Debug|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|Win32.ActiveCfg = Release|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|Win32.Build.0 = Release|Win32 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|x64.ActiveCfg = Release|x64 - {08C90F3F-95F3-46C7-8D87-63AF6DF5558C}.Release|x64.Build.0 = Release|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|Win32.ActiveCfg = Debug|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|Win32.Build.0 = Debug|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|x64.ActiveCfg = Debug|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Debug|x64.Build.0 = Debug|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|Win32.ActiveCfg = Release|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|Win32.Build.0 = Release|Win32 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|x64.ActiveCfg = Release|x64 - {C9CC8A55-BCF5-44D8-9E22-55EA09757C60}.Release|x64.Build.0 = Release|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|Win32.ActiveCfg = Debug|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|Win32.Build.0 = Debug|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|x64.ActiveCfg = Debug|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Debug|x64.Build.0 = Debug|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|Win32.ActiveCfg = Release|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|Win32.Build.0 = Release|Win32 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|x64.ActiveCfg = Release|x64 - {B2AD8EB4-16B1-4BDC-9CF5-F7ADADBD316D}.Release|x64.Build.0 = Release|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|Win32.ActiveCfg = Debug|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|Win32.Build.0 = Debug|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|x64.ActiveCfg = Debug|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Debug|x64.Build.0 = Debug|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|Win32.ActiveCfg = Release|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|Win32.Build.0 = Release|Win32 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|x64.ActiveCfg = Release|x64 - {9046260E-78AA-4458-BE80-0747860A0F70}.Release|x64.Build.0 = Release|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|Win32.ActiveCfg = Debug|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|Win32.Build.0 = Debug|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|x64.ActiveCfg = Debug|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Debug|x64.Build.0 = Debug|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|Win32.ActiveCfg = Release|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|Win32.Build.0 = Release|Win32 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|x64.ActiveCfg = Release|x64 - {2A069662-6B6F-40D7-A808-211F9C9A4AAE}.Release|x64.Build.0 = Release|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Debug|Win32.ActiveCfg = Debug|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Debug|Win32.Build.0 = Debug|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Debug|x64.ActiveCfg = Debug|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Debug|x64.Build.0 = Debug|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Release|Win32.ActiveCfg = Release|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Release|Win32.Build.0 = Release|Win32 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Release|x64.ActiveCfg = Release|x64 - {BD855404-FA32-48AE-9AB3-FB8B3D71C8C6}.Release|x64.Build.0 = Release|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Debug|Win32.ActiveCfg = Debug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Debug|Win32.Build.0 = Debug|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Debug|x64.ActiveCfg = Debug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Debug|x64.Build.0 = Debug|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Release|Win32.ActiveCfg = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Release|Win32.Build.0 = Release|Win32 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Release|x64.ActiveCfg = Release|x64 - {91422FEF-2369-45E6-87AA-8B38709AD823}.Release|x64.Build.0 = Release|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|Win32.ActiveCfg = Debug|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|Win32.Build.0 = Debug|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|x64.ActiveCfg = Debug|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Debug|x64.Build.0 = Debug|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|Win32.ActiveCfg = Release|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|Win32.Build.0 = Release|Win32 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|x64.ActiveCfg = Release|x64 - {5EA5CB8F-2B57-4FAB-A769-E9A64B3B9C36}.Release|x64.Build.0 = Release|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Debug|Win32.ActiveCfg = Debug|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Debug|Win32.Build.0 = Debug|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Debug|x64.ActiveCfg = Debug|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Debug|x64.Build.0 = Debug|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Release|Win32.ActiveCfg = Release|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Release|Win32.Build.0 = Release|Win32 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Release|x64.ActiveCfg = Release|x64 - {A003A0ED-38C6-4E03-84D1-BA42D25ABC4D}.Release|x64.Build.0 = Release|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|Win32.ActiveCfg = Debug|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|Win32.Build.0 = Debug|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|x64.ActiveCfg = Debug|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Debug|x64.Build.0 = Debug|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|Win32.ActiveCfg = Release|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|Win32.Build.0 = Release|Win32 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|x64.ActiveCfg = Release|x64 - {CC278DE5-D3D8-4BD8-B8A4-BD76CB8FB4F1}.Release|x64.Build.0 = Release|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|Win32.ActiveCfg = Debug|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|Win32.Build.0 = Debug|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|x64.ActiveCfg = Debug|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Debug|x64.Build.0 = Debug|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|Win32.ActiveCfg = Release|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|Win32.Build.0 = Release|Win32 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|x64.ActiveCfg = Release|x64 - {AF2015D2-2412-4355-87FB-E0D88B0A5FBA}.Release|x64.Build.0 = Release|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|Win32.ActiveCfg = Debug|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|Win32.Build.0 = Debug|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|x64.ActiveCfg = Debug|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Debug|x64.Build.0 = Debug|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|Win32.ActiveCfg = Release|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|Win32.Build.0 = Release|Win32 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|x64.ActiveCfg = Release|x64 - {72CDB11A-EC19-4BE2-BBE9-1FA33DECCB20}.Release|x64.Build.0 = Release|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Debug|Win32.ActiveCfg = Debug|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Debug|Win32.Build.0 = Debug|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Debug|x64.ActiveCfg = Debug|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Debug|x64.Build.0 = Debug|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Release|Win32.ActiveCfg = Release|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Release|Win32.Build.0 = Release|Win32 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Release|x64.ActiveCfg = Release|x64 - {F5D8313C-621D-4CCE-A6DA-83EFFBDE7CE6}.Release|x64.Build.0 = Release|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|Win32.ActiveCfg = Debug|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|Win32.Build.0 = Debug|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|x64.ActiveCfg = Debug|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Debug|x64.Build.0 = Debug|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|Win32.ActiveCfg = Release|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|Win32.Build.0 = Release|Win32 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|x64.ActiveCfg = Release|x64 - {ECAEBBBD-18B0-4E40-9507-4AD2B018C1CD}.Release|x64.Build.0 = Release|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|Win32.ActiveCfg = Debug|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|Win32.Build.0 = Debug|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|x64.ActiveCfg = Debug|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Debug|x64.Build.0 = Debug|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|Win32.ActiveCfg = Release|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|Win32.Build.0 = Release|Win32 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|x64.ActiveCfg = Release|x64 - {334DF447-D0B3-4CEA-9693-F755EB11C18F}.Release|x64.Build.0 = Release|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|Win32.ActiveCfg = Debug|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|Win32.Build.0 = Debug|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|x64.ActiveCfg = Debug|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Debug|x64.Build.0 = Debug|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|Win32.ActiveCfg = Release|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|Win32.Build.0 = Release|Win32 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|x64.ActiveCfg = Release|x64 - {9FCF1CAF-0189-4242-88BA-47706E741119}.Release|x64.Build.0 = Release|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|Win32.ActiveCfg = Debug|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|Win32.Build.0 = Debug|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|x64.ActiveCfg = Debug|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Debug|x64.Build.0 = Debug|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|Win32.ActiveCfg = Release|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|Win32.Build.0 = Release|Win32 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|x64.ActiveCfg = Release|x64 - {FC588F88-FFC4-4EBD-A790-1B1FE06E1FC8}.Release|x64.Build.0 = Release|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|Win32.ActiveCfg = Debug|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|Win32.Build.0 = Debug|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|x64.ActiveCfg = Debug|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Debug|x64.Build.0 = Debug|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|Win32.ActiveCfg = Release|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|Win32.Build.0 = Release|Win32 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|x64.ActiveCfg = Release|x64 - {EE29AF87-7317-488D-BF6D-EC422D1DBAD6}.Release|x64.Build.0 = Release|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|Win32.ActiveCfg = Debug|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|Win32.Build.0 = Debug|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|x64.ActiveCfg = Debug|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Debug|x64.Build.0 = Debug|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|Win32.ActiveCfg = Release|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|Win32.Build.0 = Release|Win32 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|x64.ActiveCfg = Release|x64 - {508F0BFF-83FE-444C-9509-A359BCA83BC4}.Release|x64.Build.0 = Release|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Debug|Win32.ActiveCfg = Debug|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Debug|Win32.Build.0 = Debug|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Debug|x64.ActiveCfg = Debug|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Debug|x64.Build.0 = Debug|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Release|Win32.ActiveCfg = Release|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Release|Win32.Build.0 = Release|Win32 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Release|x64.ActiveCfg = Release|x64 - {171F8F50-AC6B-4FBC-9F6C-32C65F0A310C}.Release|x64.Build.0 = Release|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Debug|Win32.ActiveCfg = Debug|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Debug|Win32.Build.0 = Debug|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Debug|x64.ActiveCfg = Debug|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Debug|x64.Build.0 = Debug|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Release|Win32.ActiveCfg = Release|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Release|Win32.Build.0 = Release|Win32 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Release|x64.ActiveCfg = Release|x64 - {CEBAFD4D-0E92-4DEB-9CC9-BBCF78EBE1B5}.Release|x64.Build.0 = Release|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|Win32.ActiveCfg = Debug|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|Win32.Build.0 = Debug|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|x64.ActiveCfg = Debug|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Debug|x64.Build.0 = Debug|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|Win32.ActiveCfg = Release|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|Win32.Build.0 = Release|Win32 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|x64.ActiveCfg = Release|x64 - {FC5B65E0-A0B1-40D7-8687-C2FC79E3DA47}.Release|x64.Build.0 = Release|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|Win32.ActiveCfg = Debug|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|Win32.Build.0 = Debug|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|x64.ActiveCfg = Debug|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Debug|x64.Build.0 = Debug|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|Win32.ActiveCfg = Release|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|Win32.Build.0 = Release|Win32 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|x64.ActiveCfg = Release|x64 - {492B0B5A-0BBE-49BA-82E6-70A82DBC242F}.Release|x64.Build.0 = Release|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Debug|Win32.ActiveCfg = Debug|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Debug|Win32.Build.0 = Debug|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Debug|x64.ActiveCfg = Debug|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Debug|x64.Build.0 = Debug|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Release|Win32.ActiveCfg = Release|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Release|Win32.Build.0 = Release|Win32 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Release|x64.ActiveCfg = Release|x64 - {00A244E4-0F0D-49B9-A557-5EF1F8B98D7C}.Release|x64.Build.0 = Release|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|Win32.ActiveCfg = Debug|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|Win32.Build.0 = Debug|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|x64.ActiveCfg = Debug|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Debug|x64.Build.0 = Debug|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|Win32.ActiveCfg = Release|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|Win32.Build.0 = Release|Win32 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|x64.ActiveCfg = Release|x64 - {26F88652-2664-4CE7-8292-6BD37EE6C3AD}.Release|x64.Build.0 = Release|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|Win32.ActiveCfg = Debug|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|Win32.Build.0 = Debug|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|x64.ActiveCfg = Debug|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Debug|x64.Build.0 = Debug|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|Win32.ActiveCfg = Release|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|Win32.Build.0 = Release|Win32 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|x64.ActiveCfg = Release|x64 - {0716FBE6-18CE-4ED5-B5EC-0B358991A8EF}.Release|x64.Build.0 = Release|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|Win32.ActiveCfg = Debug|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|Win32.Build.0 = Debug|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|x64.ActiveCfg = Debug|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Debug|x64.Build.0 = Debug|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|Win32.ActiveCfg = Release|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|Win32.Build.0 = Release|Win32 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|x64.ActiveCfg = Release|x64 - {A54D4A8B-9520-40F0-B8CB-152BF506CB47}.Release|x64.Build.0 = Release|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|Win32.ActiveCfg = Debug|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|Win32.Build.0 = Debug|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|x64.ActiveCfg = Debug|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Debug|x64.Build.0 = Debug|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|Win32.ActiveCfg = Release|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|Win32.Build.0 = Release|Win32 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|x64.ActiveCfg = Release|x64 - {5F818AF6-963E-40B3-93F3-35E145FDE30B}.Release|x64.Build.0 = Release|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|Win32.ActiveCfg = Debug|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|Win32.Build.0 = Debug|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|x64.ActiveCfg = Debug|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Debug|x64.Build.0 = Debug|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|Win32.ActiveCfg = Release|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|Win32.Build.0 = Release|Win32 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|x64.ActiveCfg = Release|x64 - {E3AB9C37-6B5A-4D8C-88F3-DF750A493511}.Release|x64.Build.0 = Release|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|Win32.ActiveCfg = Debug|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|Win32.Build.0 = Debug|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|x64.ActiveCfg = Debug|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Debug|x64.Build.0 = Debug|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|Win32.ActiveCfg = Release|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|Win32.Build.0 = Release|Win32 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|x64.ActiveCfg = Release|x64 - {8C2F733C-1C8E-45C9-A546-17EF0146718D}.Release|x64.Build.0 = Release|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|Win32.ActiveCfg = Debug|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|Win32.Build.0 = Debug|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|x64.ActiveCfg = Debug|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Debug|x64.Build.0 = Debug|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|Win32.ActiveCfg = Release|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|Win32.Build.0 = Release|Win32 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|x64.ActiveCfg = Release|x64 - {306768A4-B73E-4B81-9EC0-B4836EFE0504}.Release|x64.Build.0 = Release|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|Win32.Build.0 = Debug|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|x64.ActiveCfg = Debug|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Debug|x64.Build.0 = Debug|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|Win32.ActiveCfg = Release|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|Win32.Build.0 = Release|Win32 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|x64.ActiveCfg = Release|x64 - {25AF2C06-8B08-4B33-8775-657E27C304D9}.Release|x64.Build.0 = Release|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|Win32.ActiveCfg = Debug|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|Win32.Build.0 = Debug|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|x64.ActiveCfg = Debug|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Debug|x64.Build.0 = Debug|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|Win32.ActiveCfg = Release|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|Win32.Build.0 = Release|Win32 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|x64.ActiveCfg = Release|x64 - {39F2DFDE-76C6-46FD-A20A-6C8FD52C9DB1}.Release|x64.Build.0 = Release|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|Win32.ActiveCfg = Debug|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|Win32.Build.0 = Debug|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|x64.ActiveCfg = Debug|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Debug|x64.Build.0 = Debug|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|Win32.ActiveCfg = Release|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|Win32.Build.0 = Release|Win32 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|x64.ActiveCfg = Release|x64 - {F574684D-2052-46AB-99B9-AFD5DA2174A6}.Release|x64.Build.0 = Release|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|Win32.ActiveCfg = Debug|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|Win32.Build.0 = Debug|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|x64.ActiveCfg = Debug|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Debug|x64.Build.0 = Debug|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|Win32.ActiveCfg = Release|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|Win32.Build.0 = Release|Win32 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|x64.ActiveCfg = Release|x64 - {80AC8A07-6702-4D2E-AF75-F8DB7FDA169A}.Release|x64.Build.0 = Release|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|Win32.ActiveCfg = Debug|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|Win32.Build.0 = Debug|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|x64.ActiveCfg = Debug|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Debug|x64.Build.0 = Debug|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|Win32.ActiveCfg = Release|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|Win32.Build.0 = Release|Win32 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|x64.ActiveCfg = Release|x64 - {67E76D22-3C3E-44FC-9253-3FE583DB7848}.Release|x64.Build.0 = Release|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Debug|Win32.ActiveCfg = Debug|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Debug|Win32.Build.0 = Debug|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Debug|x64.ActiveCfg = Debug|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Debug|x64.Build.0 = Debug|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Release|Win32.ActiveCfg = Release|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Release|Win32.Build.0 = Release|Win32 - {F7F13336-3E29-4219-8580-A17C71E69718}.Release|x64.ActiveCfg = Release|x64 - {F7F13336-3E29-4219-8580-A17C71E69718}.Release|x64.Build.0 = Release|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Debug|Win32.ActiveCfg = Debug|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Debug|Win32.Build.0 = Debug|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Debug|x64.ActiveCfg = Debug|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Debug|x64.Build.0 = Debug|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Fastbuild|Win32.ActiveCfg = Release|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Fastbuild|Win32.Build.0 = Release|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Fastbuild|x64.ActiveCfg = Release|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Fastbuild|x64.Build.0 = Release|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Release|Win32.ActiveCfg = Release|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Release|Win32.Build.0 = Release|Win32 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Release|x64.ActiveCfg = Release|x64 - {46274B55-07FE-4911-B4C0-D8B43A203B4A}.Release|x64.Build.0 = Release|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Debug|Win32.ActiveCfg = Debug|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Debug|Win32.Build.0 = Debug|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Debug|x64.ActiveCfg = Debug|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Debug|x64.Build.0 = Debug|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Release|Win32.ActiveCfg = Release|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Release|Win32.Build.0 = Release|Win32 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Release|x64.ActiveCfg = Release|x64 - {25FDF327-EB7A-484A-96BC-AF2DB089D6F4}.Release|x64.Build.0 = Release|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Debug|Win32.ActiveCfg = Debug|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Debug|Win32.Build.0 = Debug|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Debug|x64.ActiveCfg = Debug|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Debug|x64.Build.0 = Debug|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Release|Win32.ActiveCfg = Release|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Release|Win32.Build.0 = Release|Win32 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Release|x64.ActiveCfg = Release|x64 - {50B2C273-2B6A-4A3A-BE24-83E3202DE180}.Release|x64.Build.0 = Release|x64 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Debug|Win32.ActiveCfg = Debug|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Debug|Win32.Build.0 = Debug|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Debug|x64.ActiveCfg = Debug|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Fastbuild|x64.ActiveCfg = Fastbuild|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Release|Win32.ActiveCfg = Release|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Release|Win32.Build.0 = Release|Win32 - {3DAC2EC1-D265-4F66-8442-A006E50DC95F}.Release|x64.ActiveCfg = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|Win32.ActiveCfg = Debug|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|Win32.Build.0 = Debug|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|x64.ActiveCfg = Debug|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Debug|x64.Build.0 = Debug|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|Win32.ActiveCfg = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|Win32.Build.0 = Release|Win32 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|x64.ActiveCfg = Release|x64 - {272D2367-13FE-45C2-84AD-8480861DB43E}.Release|x64.Build.0 = Release|x64 - {CC28660E-1AEB-4812-BB1C-373A6FAC4450}.Debug|Win32.ActiveCfg = Debug|Win32 - {CC28660E-1AEB-4812-BB1C-373A6FAC4450}.Debug|Win32.Build.0 = Debug|Win32 - {CC28660E-1AEB-4812-BB1C-373A6FAC4450}.Debug|x64.ActiveCfg = Debug|x64 - {CC28660E-1AEB-4812-BB1C-373A6FAC4450}.Debug|x64.Build.0 = Debug|x64 - {CC28660E-1AEB-4812-BB1C-373A6FAC4450}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {CC28660E-1AEB-4812-BB1C-373A6FAC4450}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {CC28660E-1AEB-4812-BB1C-373A6FAC4450}.Fastbuild|x64.ActiveCfg = Fastbuild|x64 - {CC28660E-1AEB-4812-BB1C-373A6FAC4450}.Fastbuild|x64.Build.0 = Fastbuild|x64 - {CC28660E-1AEB-4812-BB1C-373A6FAC4450}.Release|Win32.ActiveCfg = Release|Win32 - {CC28660E-1AEB-4812-BB1C-373A6FAC4450}.Release|Win32.Build.0 = Release|Win32 - {CC28660E-1AEB-4812-BB1C-373A6FAC4450}.Release|x64.ActiveCfg = Release|x64 - {CC28660E-1AEB-4812-BB1C-373A6FAC4450}.Release|x64.Build.0 = Release|x64 - {7327F7CB-C41D-4F9D-99C2-8A3B673F182C}.Debug|Win32.ActiveCfg = Debug|Win32 - {7327F7CB-C41D-4F9D-99C2-8A3B673F182C}.Debug|Win32.Build.0 = Debug|Win32 - {7327F7CB-C41D-4F9D-99C2-8A3B673F182C}.Debug|x64.ActiveCfg = Debug|Win32 - {7327F7CB-C41D-4F9D-99C2-8A3B673F182C}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {7327F7CB-C41D-4F9D-99C2-8A3B673F182C}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {7327F7CB-C41D-4F9D-99C2-8A3B673F182C}.Fastbuild|x64.ActiveCfg = Fastbuild|Win32 - {7327F7CB-C41D-4F9D-99C2-8A3B673F182C}.Release|Win32.ActiveCfg = Release|Win32 - {7327F7CB-C41D-4F9D-99C2-8A3B673F182C}.Release|Win32.Build.0 = Release|Win32 - {7327F7CB-C41D-4F9D-99C2-8A3B673F182C}.Release|x64.ActiveCfg = Release|Win32 - {0A050D80-51DA-4F0B-8B2A-3E62E1615972}.Debug|Win32.ActiveCfg = Debug|Win32 - {0A050D80-51DA-4F0B-8B2A-3E62E1615972}.Debug|Win32.Build.0 = Debug|Win32 - {0A050D80-51DA-4F0B-8B2A-3E62E1615972}.Debug|x64.ActiveCfg = Debug|Win32 - {0A050D80-51DA-4F0B-8B2A-3E62E1615972}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {0A050D80-51DA-4F0B-8B2A-3E62E1615972}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {0A050D80-51DA-4F0B-8B2A-3E62E1615972}.Fastbuild|x64.ActiveCfg = Fastbuild|Win32 - {0A050D80-51DA-4F0B-8B2A-3E62E1615972}.Release|Win32.ActiveCfg = Release|Win32 - {0A050D80-51DA-4F0B-8B2A-3E62E1615972}.Release|Win32.Build.0 = Release|Win32 - {0A050D80-51DA-4F0B-8B2A-3E62E1615972}.Release|x64.ActiveCfg = Release|Win32 - {F1CFA6D8-7E0F-4F15-A30E-FEBB9510992B}.Debug|Win32.ActiveCfg = Debug|Win32 - {F1CFA6D8-7E0F-4F15-A30E-FEBB9510992B}.Debug|Win32.Build.0 = Debug|Win32 - {F1CFA6D8-7E0F-4F15-A30E-FEBB9510992B}.Debug|x64.ActiveCfg = Debug|Win32 - {F1CFA6D8-7E0F-4F15-A30E-FEBB9510992B}.Fastbuild|Win32.ActiveCfg = Fastbuild|Win32 - {F1CFA6D8-7E0F-4F15-A30E-FEBB9510992B}.Fastbuild|Win32.Build.0 = Fastbuild|Win32 - {F1CFA6D8-7E0F-4F15-A30E-FEBB9510992B}.Fastbuild|x64.ActiveCfg = Fastbuild|Win32 - {F1CFA6D8-7E0F-4F15-A30E-FEBB9510992B}.Release|Win32.ActiveCfg = Release|Win32 - {F1CFA6D8-7E0F-4F15-A30E-FEBB9510992B}.Release|Win32.Build.0 = Release|Win32 - {F1CFA6D8-7E0F-4F15-A30E-FEBB9510992B}.Release|x64.ActiveCfg = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/Release.vsprops sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/Release.vsprops --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/Release.vsprops 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/Release.vsprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/sumo/sumo.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/sumo/sumo.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/sumo/sumo.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/sumo/sumo.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,686 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/traci-testclient/Traci_TestClient.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/traci-testclient/Traci_TestClient.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/traci-testclient/Traci_TestClient.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/traci-testclient/Traci_TestClient.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,417 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/Win32.vsprops sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/Win32.vsprops --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/Win32.vsprops 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/Win32.vsprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/x64.vsprops sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/x64.vsprops --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/x64.vsprops 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/x64.vsprops 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libgui/y_libgui.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libgui/y_libgui.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libgui/y_libgui.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libgui/y_libgui.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,658 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libguinetload/y_libguinetload.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libguinetload/y_libguinetload.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libguinetload/y_libguinetload.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libguinetload/y_libguinetload.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,607 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libguisim/y_libguisim.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libguisim/y_libguisim.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libguisim/y_libguisim.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libguisim/y_libguisim.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,740 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libmesogui/y_libmesogui.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libmesogui/y_libmesogui.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libmesogui/y_libmesogui.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libmesogui/y_libmesogui.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,357 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libmesosim/y_libmesosim.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libmesosim/y_libmesosim.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libmesosim/y_libmesosim.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libmesosim/y_libmesosim.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,397 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libmicrosim/y_libmicrosim.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libmicrosim/y_libmicrosim.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libmicrosim/y_libmicrosim.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libmicrosim/y_libmicrosim.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,825 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libnetbuild/y_libnetbuild.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libnetbuild/y_libnetbuild.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libnetbuild/y_libnetbuild.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libnetbuild/y_libnetbuild.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,570 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libnetimport/y_libnetimport.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libnetimport/y_libnetimport.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libnetimport/y_libnetimport.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libnetimport/y_libnetimport.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libnetload/y_libnetload.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libnetload/y_libnetload.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libnetload/y_libnetload.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libnetload/y_libnetload.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,614 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libnetwrite/y_libnetwrite.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libnetwrite/y_libnetwrite.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_libnetwrite/y_libnetwrite.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_libnetwrite/y_libnetwrite.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,398 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_librouter/y_librouter.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_librouter/y_librouter.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/y_librouter/y_librouter.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/y_librouter/y_librouter.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,469 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libgui_dialogs/z_libgui_dialogs.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libgui_dialogs/z_libgui_dialogs.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libgui_dialogs/z_libgui_dialogs.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libgui_dialogs/z_libgui_dialogs.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,606 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libmicrosim_actions/z_libmicrosim_actions.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libmicrosim_actions/z_libmicrosim_actions.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libmicrosim_actions/z_libmicrosim_actions.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libmicrosim_actions/z_libmicrosim_actions.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,391 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libmicrosim_cfmodels/z_libmicrosim_cfmodels.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libmicrosim_cfmodels/z_libmicrosim_cfmodels.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libmicrosim_cfmodels/z_libmicrosim_cfmodels.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libmicrosim_cfmodels/z_libmicrosim_cfmodels.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,431 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libmicrosim_devices/z_libmicrosim_devices.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libmicrosim_devices/z_libmicrosim_devices.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libmicrosim_devices/z_libmicrosim_devices.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libmicrosim_devices/z_libmicrosim_devices.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,407 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libmicrosim_logging/z_libmicrosim_logging.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libmicrosim_logging/z_libmicrosim_logging.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libmicrosim_logging/z_libmicrosim_logging.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libmicrosim_logging/z_libmicrosim_logging.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,361 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libmicrosim_output/z_libmicrosim_output.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libmicrosim_output/z_libmicrosim_output.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libmicrosim_output/z_libmicrosim_output.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libmicrosim_output/z_libmicrosim_output.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,714 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libmicrosim_traffic_lights/z_libmicrosim_traffic_lights.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libmicrosim_traffic_lights/z_libmicrosim_traffic_lights.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libmicrosim_traffic_lights/z_libmicrosim_traffic_lights.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libmicrosim_traffic_lights/z_libmicrosim_traffic_lights.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,406 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libmicrosim_trigger/z_libmicrosim_trigger.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libmicrosim_trigger/z_libmicrosim_trigger.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libmicrosim_trigger/z_libmicrosim_trigger.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libmicrosim_trigger/z_libmicrosim_trigger.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,603 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libnetimport_vissim/z_libnetimport_vissim.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libnetimport_vissim/z_libnetimport_vissim.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libnetimport_vissim/z_libnetimport_vissim.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libnetimport_vissim/z_libnetimport_vissim.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,998 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_common/z_libutils_common.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_common/z_libutils_common.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_common/z_libutils_common.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_common/z_libutils_common.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,689 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_distribution/z_libutils_distribution.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_distribution/z_libutils_distribution.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_distribution/z_libutils_distribution.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_distribution/z_libutils_distribution.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,382 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_foxtools/z_libutils_foxtools.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_foxtools/z_libutils_foxtools.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_foxtools/z_libutils_foxtools.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_foxtools/z_libutils_foxtools.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,492 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_geom/z_libutils_geom.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_geom/z_libutils_geom.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_geom/z_libutils_geom.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_geom/z_libutils_geom.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,466 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_gui_div/z_libutils_gui_div.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_gui_div/z_libutils_gui_div.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_gui_div/z_libutils_gui_div.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_gui_div/z_libutils_gui_div.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,431 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_gui_events/z_libutils_gui_events.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_gui_events/z_libutils_gui_events.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_gui_events/z_libutils_gui_events.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_gui_events/z_libutils_gui_events.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,363 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_gui_globjects/z_libutils_gui_globjects.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_gui_globjects/z_libutils_gui_globjects.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_gui_globjects/z_libutils_gui_globjects.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_gui_globjects/z_libutils_gui_globjects.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,407 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_gui_images/z_libutils_gui_images.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_gui_images/z_libutils_gui_images.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_gui_images/z_libutils_gui_images.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_gui_images/z_libutils_gui_images.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,371 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_gui_settings/z_libutils_gui_settings.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_gui_settings/z_libutils_gui_settings.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_gui_settings/z_libutils_gui_settings.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_gui_settings/z_libutils_gui_settings.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,583 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_gui_tracker/z_libutils_gui_tracker.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_gui_tracker/z_libutils_gui_tracker.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_gui_tracker/z_libutils_gui_tracker.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_gui_tracker/z_libutils_gui_tracker.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,367 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_gui_windows/z_libutils_gui_windows.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_gui_windows/z_libutils_gui_windows.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_gui_windows/z_libutils_gui_windows.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_gui_windows/z_libutils_gui_windows.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,634 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_importio/z_libutils_importio.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_importio/z_libutils_importio.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_importio/z_libutils_importio.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_importio/z_libutils_importio.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,376 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_iodevices/z_libutils_iodevices.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_iodevices/z_libutils_iodevices.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_iodevices/z_libutils_iodevices.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_iodevices/z_libutils_iodevices.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,548 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_options/z_libutils_options.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_options/z_libutils_options.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_options/z_libutils_options.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_options/z_libutils_options.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,398 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_shapes/z_libutils_shapes.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_shapes/z_libutils_shapes.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_shapes/z_libutils_shapes.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_shapes/z_libutils_shapes.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,386 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_xml/z_libutils_xml.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_xml/z_libutils_xml.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_libutils_xml/z_libutils_xml.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_libutils_xml/z_libutils_xml.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,460 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_optional_libtraciserver/z_optional_libtraciserver.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_optional_libtraciserver/z_optional_libtraciserver.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/z_optional_libtraciserver/z_optional_libtraciserver.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/z_optional_libtraciserver/z_optional_libtraciserver.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,491 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/zz_foreign_eulerspiral/zz_foreign_eulerspiral.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/zz_foreign_eulerspiral/zz_foreign_eulerspiral.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/zz_foreign_eulerspiral/zz_foreign_eulerspiral.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/zz_foreign_eulerspiral/zz_foreign_eulerspiral.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,381 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/zz_foreign_gl2ps/zz_foreign_gl2ps.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/zz_foreign_gl2ps/zz_foreign_gl2ps.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/zz_foreign_gl2ps/zz_foreign_gl2ps.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/zz_foreign_gl2ps/zz_foreign_gl2ps.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,371 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/zz_foreign_nvwa/zz_foreign_nvwa.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/zz_foreign_nvwa/zz_foreign_nvwa.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/zz_foreign_nvwa/zz_foreign_nvwa.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/zz_foreign_nvwa/zz_foreign_nvwa.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,373 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/zz_foreign_polyfonts/zz_foreign_polyfonts.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/zz_foreign_polyfonts/zz_foreign_polyfonts.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/zz_foreign_polyfonts/zz_foreign_polyfonts.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/zz_foreign_polyfonts/zz_foreign_polyfonts.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/zz_foreign_rtree/zz_foreign_rtree.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/zz_foreign_rtree/zz_foreign_rtree.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/zz_foreign_rtree/zz_foreign_rtree.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/zz_foreign_rtree/zz_foreign_rtree.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,365 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/zz_foreign_tcpip/zz_foreign_tcpip.vcproj sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/zz_foreign_tcpip/zz_foreign_tcpip.vcproj --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/msvc9/zz_foreign_tcpip/zz_foreign_tcpip.vcproj 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/msvc9/zz_foreign_tcpip/zz_foreign_tcpip.vcproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,379 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/package/sumo.spec sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/package/sumo.spec --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/build/package/sumo.spec 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/build/package/sumo.spec 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ -# -# spec file for package sumo -# -# Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -# This file is part of SUMO. -# SUMO is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# norootforbuild -Name: sumo -Summary: Simulation of Urban Mobility - A Microscopic Traffic Simulation -Version: svn -Release: 1 -Url: http://sumo.sourceforge.net/ -Source0: %{name}-src-%{version}.tar.gz -Source1: %{name}-doc-%{version}.zip -Source2: %{name}.desktop -Source3: %{name}.png -Source4: %{name}.xml -License: GPL-3.0+ -Group: Productivity/Scientific/Other -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: gcc-c++ libproj-devel libgdal-devel fox16-devel unzip -BuildRequires: libxerces-c-devel help2man fdupes -%if 0%{?mandriva_version} -BuildRequires: XFree86-devel postgresql-devel libmesaglu1-devel -%else -BuildRequires: xorg-x11-devel xorg-x11-Mesa-devel -%endif -%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?scientificlinux_version} -BuildRequires: libGLU-devel libXext-devel libXft-devel -%if 0%{?fedora_version} >= 15 -BuildRequires: netcdf hdf5 javamail -%endif -%endif -%if 0%{?suse_version} -BuildRequires: update-desktop-files -%endif - -Autoreqprov: on - -%description -"Simulation of Urban MObility" (SUMO) is an open source, -highly portable, microscopic road traffic simulation package -designed to handle large road networks. - -%prep -%setup -q -unzip -o %{SOURCE1} -d .. -mv docs/tutorial docs/examples -%if 0%{?sles_version} -find . -name "*.jar" | xargs rm -%endif - -%build -%configure -%{__make} -%{__make} man - -%install -%makeinstall -%__mkdir_p %{buildroot}%{_prefix}/lib/sumo -rm -rf tools/contributed/traci4j -cp -a tools/* %{buildroot}%{_prefix}/lib/sumo -%__mkdir_p %{buildroot}%{_bindir} -%__ln_s ../lib/sumo/assign/duaIterate.py %{buildroot}%{_bindir}/duaIterate.py -install -d -m 755 %{buildroot}%{_mandir}/man1 -install -p -m 644 docs/man/*.1 %{buildroot}%{_mandir}/man1 -install -Dm644 %{SOURCE2} %{buildroot}%{_datadir}/applications/%{name}.desktop -install -Dm644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/%{name}.png -%if 0%{?suse_version} -%if 0%{?suse_version} > 1200 -install -Dm644 %{SOURCE4} %{buildroot}%{_datadir}/mime/application/%{name}.xml -%endif -%suse_update_desktop_file %{name} Science Education -%fdupes -s docs -%fdupes %{buildroot} -%endif - -%files -%defattr(-,root,root) -%{_bindir}/* -%{_prefix}/lib/sumo -%doc AUTHORS COPYING README ChangeLog docs/pydoc docs/userdoc docs/examples -%{_mandir}/man1/* -%{_datadir}/applications/%{name}.desktop -%{_datadir}/pixmaps/%{name}.png -%if 0%{?suse_version} > 1200 -%{_datadir}/mime/application/%{name}.xml -%endif - -%changelog diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/configure sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/configure --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/configure 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/configure 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for sumo 0.18.0. +# Generated by GNU Autoconf 2.69 for sumo 0.23.0. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -167,7 +190,8 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -220,21 +244,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -336,6 +364,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -457,6 +493,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -491,16 +531,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -512,28 +552,8 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -567,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='sumo' PACKAGE_TARNAME='sumo' -PACKAGE_VERSION='0.18.0' -PACKAGE_STRING='sumo 0.18.0' +PACKAGE_VERSION='0.23.0' +PACKAGE_STRING='sumo 0.23.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -622,18 +642,14 @@ PYTHON_LIBS WITH_GTEST_FALSE WITH_GTEST_TRUE -LIB_GTEST +GTEST_LDFLAGS +GTEST_CONFIG WITH_GUI_FALSE WITH_GUI_TRUE -LIB_FOX FOX_LDFLAGS -WITH_GDAL_FALSE -WITH_GDAL_TRUE -LIB_GDAL +FOX_CONFIG GDAL_LDFLAGS -WITH_PROJ_FALSE -WITH_PROJ_TRUE -LIB_PROJ +GDAL_CONFIG PROJ_LDFLAGS LIB_XERCES XERCES_LDFLAGS @@ -682,6 +698,7 @@ am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -695,6 +712,10 @@ LDFLAGS CFLAGS CC +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -771,6 +792,7 @@ ac_subst_files='' ac_user_opts=' enable_option_checking +enable_silent_rules enable_debug enable_profiling enable_dependency_tracking @@ -792,12 +814,9 @@ with_proj_gdal with_proj_libraries with_proj_includes -with_gdal_libraries -with_gdal_includes -with_fox -with_fox_libraries -with_fox_includes -with_gtest +with_gdal_config +with_fox_config +with_gtest_config with_python ' ac_precious_vars='build_alias @@ -1273,8 +1292,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1360,7 +1377,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sumo 0.18.0 to adapt to many kinds of systems. +\`configure' configures sumo 0.23.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1431,7 +1448,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sumo 0.18.0:";; + short | recursive ) echo "Configuration of sumo 0.23.0:";; esac cat <<\_ACEOF @@ -1439,11 +1456,15 @@ --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") --enable-debug enable sumo debugging code [default=no]. --enable-profiling enable compilation of gprof profiling code [default=no]. - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -1462,7 +1483,7 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR @@ -1481,19 +1502,10 @@ --with-proj-includes=DIR where the PROJ includes are (overrides previous settings). - --with-gdal-libraries=DIR - where the GDAL library is installed (overrides - previous settings). - --with-gdal-includes=DIR - where the GDAL includes are (overrides previous - settings). - --with-fox=DIR where Fox is installed (libraries in DIR/lib, - headers in DIR/include/fox-1.6). - --with-fox-libraries=DIR - where the Fox library is installed. - --with-fox-includes=DIR where the Fox includes are. - --with-gtest=DIR where googletest is installed (libraries in DIR/lib, - headers in DIR/include). + --with-gdal-config=FILE specify an alternative gdal-config file + --with-fox-config=FILE specify an alternative fox-config executable + --with-gtest-config=FILE + specify an alternative gtest-config. --with-python enable python scripting. Some influential environment variables: @@ -1583,10 +1595,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sumo configure 0.18.0 -generated by GNU Autoconf 2.68 +sumo configure 0.23.0 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1737,7 +1749,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1960,7 +1972,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1979,12 +1991,12 @@ } # ac_fn_cxx_try_link -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- +# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES +# --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. -ac_fn_c_check_header_mongrel () +ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : @@ -2005,7 +2017,7 @@ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no @@ -2021,7 +2033,7 @@ /* end confdefs.h. */ #include <$2> _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no @@ -2031,7 +2043,7 @@ $as_echo "$ac_header_preproc" >&6; } # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} @@ -2064,13 +2076,13 @@ fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_c_check_header_mongrel +} # ac_fn_cxx_check_header_mongrel -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- +# ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES +# --------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. -ac_fn_c_check_type () +ac_fn_cxx_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 @@ -2091,7 +2103,7 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @@ -2104,7 +2116,7 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : else eval "$3=yes" @@ -2118,13 +2130,122 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_c_check_type +} # ac_fn_cxx_check_type + +# ac_fn_cxx_check_func LINENO FUNC VAR +# ------------------------------------ +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_cxx_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_cxx_check_func + +# ac_fn_cxx_try_run LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_cxx_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_run cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sumo $as_me 0.18.0, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by sumo $as_me 0.23.0, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2616,7 +2737,7 @@ ac_config_headers="$ac_config_headers src/config.h" -am__api_version='1.11' +am__api_version='1.13' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2655,7 +2776,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2713,9 +2834,6 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -2726,32 +2844,40 @@ esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -2763,6 +2889,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -2785,12 +2921,12 @@ esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then @@ -2802,10 +2938,10 @@ esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. @@ -2824,7 +2960,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2864,7 +3000,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2915,7 +3051,7 @@ test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -2944,12 +3080,6 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -2968,7 +3098,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3032,6 +3162,45 @@ fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -3054,7 +3223,7 @@ # Define the identity of the package. PACKAGE='sumo' - VERSION='0.18.0' + VERSION='0.23.0' cat >>confdefs.h <<_ACEOF @@ -3082,93 +3251,138 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + -AMTAR=${AMTAR-"${am_missing_run}tar"} +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar plaintar pax cpio none' +# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 +$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } + if test $am_uid -le $am_max_uid; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _am_tools=none + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 +$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } + if test $am_gid -le $am_max_gid; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _am_tools=none + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 $as_echo_n "checking how to create a ustar tar archive... " >&6; } -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar plaintar pax cpio none' -_am_tools=${am_cv_prog_tar_ustar-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - { echo "$as_me:$LINENO: $_am_tar --version" >&5 + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_ustar-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break - done - am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x ustar -w "$$tardir"' - am__tar_='pax -L -x ustar -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H ustar -L' - am__tar_='find "$tardir" -print | cpio -o -H ustar -L' - am__untar='cpio -i -H ustar -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_ustar}" && break + done + am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x ustar -w "$$tardir"' + am__tar_='pax -L -x ustar -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H ustar -L' + am__tar_='find "$tardir" -print | cpio -o -H ustar -L' + am__untar='cpio -i -H ustar -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_ustar}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } - rm -rf conftest.dir - if test -s conftest.tar; then - { echo "$as_me:$LINENO: $am__untar &5 + rm -rf conftest.dir + if test -s conftest.tar; then + { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi -done -rm -rf conftest.dir + { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 + (cat conftest.dir/file) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done + rm -rf conftest.dir -if ${am_cv_prog_tar_ustar+:} false; then : + if ${am_cv_prog_tar_ustar+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_ustar=$_am_tool fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 $as_echo "$am_cv_prog_tar_ustar" >&6; } @@ -3177,6 +3391,18 @@ +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +if test x$CXX = xclang++; then + CXXFLAGS="-msse2 $CXXFLAGS" +else + CXXFLAGS="-msse2 -mfpmath=sse $CXXFLAGS" +fi # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; @@ -3229,7 +3455,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3269,7 +3495,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3322,7 +3548,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3363,7 +3589,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3421,7 +3647,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3465,7 +3691,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3911,8 +4137,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3991,11 +4216,11 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -4015,7 +4240,7 @@ _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -4048,6 +4273,7 @@ if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -4070,8 +4296,9 @@ # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -4105,16 +4332,16 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -4123,16 +4350,16 @@ test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -4317,11 +4544,11 @@ See \`config.log' for more details" "$LINENO" 5; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -4351,7 +4578,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4395,7 +4622,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4574,11 +4801,11 @@ CXXFLAGS= fi fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= @@ -4591,8 +4818,9 @@ # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -4626,16 +4854,16 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -4644,16 +4872,16 @@ test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -4768,7 +4996,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4808,7 +5036,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4851,8 +5079,8 @@ -macro_version='2.4' -macro_revision='1.3293' +macro_version='2.4.2' +macro_revision='1.3337' @@ -4959,7 +5187,7 @@ for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -5035,7 +5263,7 @@ for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -5101,7 +5329,7 @@ for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -5168,7 +5396,7 @@ for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -5424,7 +5652,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5468,7 +5696,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5615,6 +5843,11 @@ lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -5654,7 +5887,7 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -5876,7 +6109,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5916,7 +6149,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6083,7 +6316,7 @@ lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -6222,7 +6455,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6262,7 +6495,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6366,7 +6599,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6410,7 +6643,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6477,7 +6710,7 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 @@ -6535,7 +6768,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6575,7 +6808,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6634,7 +6867,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6674,7 +6907,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6724,13 +6957,13 @@ if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -6877,6 +7110,7 @@ # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -7099,6 +7333,7 @@ + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; @@ -7265,7 +7500,7 @@ CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -7276,7 +7511,20 @@ case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -7309,7 +7557,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7349,7 +7597,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7429,7 +7677,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7469,7 +7717,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7521,7 +7769,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7561,7 +7809,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7613,7 +7861,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7653,7 +7901,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7705,7 +7953,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7745,7 +7993,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7797,7 +8045,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7837,7 +8085,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7916,7 +8164,13 @@ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -7927,6 +8181,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : @@ -7959,6 +8214,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : @@ -7980,7 +8236,9 @@ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -8171,7 +8429,6 @@ - func_stripname_cnf () { case ${2} in @@ -8259,7 +8516,22 @@ # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac else pic_mode=default fi @@ -8337,6 +8609,10 @@ + + + + test -z "$LN_S" && LN_S="ln -s" @@ -8792,7 +9068,9 @@ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi ;; esac else @@ -8883,19 +9161,34 @@ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; - esac + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac ;; esac ;; @@ -9256,7 +9549,6 @@ hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported @@ -9506,8 +9798,7 @@ xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ @@ -9886,6 +10177,7 @@ # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' @@ -9931,6 +10223,7 @@ hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else whole_archive_flag_spec='' fi @@ -9959,10 +10252,6 @@ hardcode_shlibpath_var=no ;; - freebsd1*) - ld_shlibs=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -9975,7 +10264,7 @@ ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -10014,7 +10303,6 @@ fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes @@ -10638,11 +10926,6 @@ - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } @@ -10732,7 +11015,7 @@ case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -10741,7 +11024,7 @@ ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -10806,7 +11089,7 @@ ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -10945,7 +11228,7 @@ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -10953,10 +11236,6 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -10964,7 +11243,7 @@ objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -10982,7 +11261,7 @@ esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -11002,17 +11281,18 @@ ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -11073,7 +11353,7 @@ ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -11089,7 +11369,7 @@ nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -11126,9 +11406,9 @@ dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -11210,7 +11490,7 @@ ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -11279,7 +11559,7 @@ ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -11304,7 +11584,7 @@ ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -11328,7 +11608,7 @@ sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -11359,7 +11639,7 @@ tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -11369,7 +11649,7 @@ ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -12131,11 +12411,11 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC="$lt_save_CC" @@ -12269,11 +12549,11 @@ See \`config.log' for more details" "$LINENO" 5; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu else _lt_caught_CXX_error=yes @@ -12294,7 +12574,6 @@ hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported @@ -12878,6 +13157,7 @@ hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else whole_archive_flag_spec_CXX='' fi @@ -12922,7 +13202,7 @@ esac ;; - freebsd[12]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no @@ -13598,6 +13878,7 @@ case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -14387,7 +14668,9 @@ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' @@ -14540,8 +14823,6 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } @@ -14567,7 +14848,7 @@ case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -14576,7 +14857,7 @@ ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -14641,7 +14922,7 @@ ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -14778,7 +15059,7 @@ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -14786,10 +15067,6 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -14797,7 +15074,7 @@ objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -14815,7 +15092,7 @@ esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -14835,17 +15112,18 @@ ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -14906,7 +15184,7 @@ ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -14922,7 +15200,7 @@ nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -14959,9 +15237,9 @@ dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -15043,7 +15321,7 @@ ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -15112,7 +15390,7 @@ ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -15137,7 +15415,7 @@ ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -15161,7 +15439,7 @@ sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -15192,7 +15470,7 @@ tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -15202,7 +15480,7 @@ ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -15323,11 +15601,13 @@ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + @@ -15356,6 +15636,13 @@ enableval=$enable_memcheck; fi +if test x$enable_memcheck = xyes; then + if test x$CXX = xclang++; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-memcheck does not work with clang yet" >&5 +$as_echo "$as_me: WARNING: --enable-memcheck does not work with clang yet" >&2;} + enable_memcheck="no" + fi +fi if test x$enable_memcheck = xyes; then CHECK_MEMORY_LEAKS_TRUE= CHECK_MEMORY_LEAKS_FALSE='#' @@ -15422,10 +15709,10 @@ fi -$as_echo "#define POSITION_EPS 0.1" >>confdefs.h +$as_echo "#define POSITION_EPS (SUMOReal)0.1" >>confdefs.h -$as_echo "#define NUMERICAL_EPS 0.001" >>confdefs.h +$as_echo "#define NUMERICAL_EPS (SUMOReal)0.001" >>confdefs.h $as_echo "#define OUTPUT_ACCURACY 2" >>confdefs.h @@ -15443,6 +15730,7 @@ + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -15463,7 +15751,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15506,7 +15794,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15571,6 +15859,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XERCES_CFLAGS=`$PKG_CONFIG --cflags "xerces-c >= 3.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -15587,6 +15876,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XERCES_LIBS=`$PKG_CONFIG --libs "xerces-c >= 3.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -15606,9 +15896,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XERCES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xerces-c >= 3.0" 2>&1` + XERCES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xerces-c >= 3.0" 2>&1` else - XERCES_PKG_ERRORS=`$PKG_CONFIG --print-errors "xerces-c >= 3.0" 2>&1` + XERCES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xerces-c >= 3.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XERCES_PKG_ERRORS" >&5 @@ -15633,7 +15923,7 @@ fi - if test -d $srcdir/src/internal; then + if test -d $srcdir/src/mesosim; then INTERNAL_TRUE= INTERNAL_FALSE='#' else @@ -15666,7 +15956,7 @@ ac_disabled="$ac_disabled TRACI" fi - if test -f .svn/entries; then + if test -d .svn; then WITH_VERSION_H_TRUE= WITH_VERSION_H_FALSE='#' else @@ -15674,7 +15964,7 @@ WITH_VERSION_H_FALSE= fi -if test -f .svn/entries; then +if test -d .svn; then $as_echo "#define HAVE_VERSION_H 1" >>confdefs.h @@ -15746,7 +16036,7 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" @@ -15788,7 +16078,7 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" @@ -15821,7 +16111,8 @@ if test x"$with_xerces_includes" = x; then CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/usr/include" export CPPFLAGS - ac_fn_c_check_header_mongrel "$LINENO" "xercesc/util/XercesVersion.hpp" "ac_cv_header_xercesc_util_XercesVersion_hpp" "$ac_includes_default" + +ac_fn_cxx_check_header_mongrel "$LINENO" "xercesc/util/XercesVersion.hpp" "ac_cv_header_xercesc_util_XercesVersion_hpp" "$ac_includes_default" if test "x$ac_cv_header_xercesc_util_XercesVersion_hpp" = xyes; then : AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS" else @@ -15832,7 +16123,7 @@ else CPPFLAGS="-I$with_xerces_includes" export CPPFLAGS - ac_fn_c_check_header_mongrel "$LINENO" "xercesc/util/XercesVersion.hpp" "ac_cv_header_xercesc_util_XercesVersion_hpp" "$ac_includes_default" + ac_fn_cxx_check_header_mongrel "$LINENO" "xercesc/util/XercesVersion.hpp" "ac_cv_header_xercesc_util_XercesVersion_hpp" "$ac_includes_default" if test "x$ac_cv_header_xercesc_util_XercesVersion_hpp" = xyes; then : AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS" else @@ -15865,7 +16156,6 @@ fi fi -LIB_PROJ="proj" # Check whether --with-proj-libraries was given. if test "${with_proj_libraries+set}" = set; then : @@ -15873,14 +16163,13 @@ fi if test x"$with_proj_libraries" = x; then - as_ac_Lib=`$as_echo "ac_cv_lib_$LIB_PROJ''_main" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$LIB_PROJ" >&5 -$as_echo_n "checking for main in -l$LIB_PROJ... " >&6; } -if eval \${$as_ac_Lib+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lproj" >&5 +$as_echo_n "checking for main in -lproj... " >&6; } +if ${ac_cv_lib_proj_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-l$LIB_PROJ $LIBS" +LIBS="-lproj $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15893,20 +16182,19 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" +if ac_fn_cxx_try_link "$LINENO"; then : + ac_cv_lib_proj_main=yes else - eval "$as_ac_Lib=no" + ac_cv_lib_proj_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - with_proj_libraries=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_main" >&5 +$as_echo "$ac_cv_lib_proj_main" >&6; } +if test "x$ac_cv_lib_proj_main" = xyes; then : + PROJ_LDFLAGS="-lproj" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: proj-lib not found. Specify path with option --with-proj-libraries=DIR." >&5 $as_echo "$as_me: WARNING: proj-lib not found. Specify path with option --with-proj-libraries=DIR." >&2;} @@ -15916,14 +16204,13 @@ save_ldflags=$LDFLAGS LDFLAGS="-L$with_proj_libraries" export LDFLAGS - as_ac_Lib=`$as_echo "ac_cv_lib_$LIB_PROJ''_main" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$LIB_PROJ" >&5 -$as_echo_n "checking for main in -l$LIB_PROJ... " >&6; } -if eval \${$as_ac_Lib+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lproj" >&5 +$as_echo_n "checking for main in -lproj... " >&6; } +if ${ac_cv_lib_proj_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-l$LIB_PROJ $LIBS" +LIBS="-lproj $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15936,26 +16223,24 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" +if ac_fn_cxx_try_link "$LINENO"; then : + ac_cv_lib_proj_main=yes else - eval "$as_ac_Lib=no" + ac_cv_lib_proj_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - PROJ_LDFLAGS=$LDFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_main" >&5 +$as_echo "$ac_cv_lib_proj_main" >&6; } +if test "x$ac_cv_lib_proj_main" = xyes; then : + PROJ_LDFLAGS="$LDFLAGS -lproj" else as_fn_error $? "proj-lib not found in \"$with_proj_libraries\"." "$LINENO" 5 fi LDFLAGS=$save_ldflags - fi @@ -15966,7 +16251,7 @@ fi if test x"$with_proj_includes" = x; then - ac_fn_c_check_header_mongrel "$LINENO" "proj_api.h" "ac_cv_header_proj_api_h" "$ac_includes_default" + ac_fn_cxx_check_header_mongrel "$LINENO" "proj_api.h" "ac_cv_header_proj_api_h" "$ac_includes_default" if test "x$ac_cv_header_proj_api_h" = xyes; then : with_proj_includes=yes else @@ -15979,7 +16264,7 @@ save_cppflags=$CPPFLAGS CPPFLAGS="-I$with_proj_includes" export CPPFLAGS - ac_fn_c_check_header_mongrel "$LINENO" "proj_api.h" "ac_cv_header_proj_api_h" "$ac_includes_default" + ac_fn_cxx_check_header_mongrel "$LINENO" "proj_api.h" "ac_cv_header_proj_api_h" "$ac_includes_default" if test "x$ac_cv_header_proj_api_h" = xyes; then : AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS" else @@ -15990,15 +16275,7 @@ CPPFLAGS=$save_cppflags fi fi - if test x"$with_proj_includes" != x && test x"$with_proj_libraries" != x; then - WITH_PROJ_TRUE= - WITH_PROJ_FALSE='#' -else - WITH_PROJ_TRUE='#' - WITH_PROJ_FALSE= -fi - -if test x"$with_proj_includes" != x && test x"$with_proj_libraries" != x; then +if test x"$with_proj_includes" != x && test x"$PROJ_LDFLAGS" != x; then $as_echo "#define HAVE_PROJ 1" >>confdefs.h @@ -16008,299 +16285,189 @@ fi -if test x"$with_proj_gdal" != xno; then -LIB_GDAL="gdal" -# Check whether --with-gdal-libraries was given. -if test "${with_gdal_libraries+set}" = set; then : - withval=$with_gdal_libraries; -fi - -if test x"$with_gdal_libraries" = x; then - as_ac_Lib=`$as_echo "ac_cv_lib_$LIB_GDAL''_main" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$LIB_GDAL" >&5 -$as_echo_n "checking for main in -l$LIB_GDAL... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 +# Check whether --with-gdal-config was given. +if test "${with_gdal_config+set}" = set; then : + withval=$with_gdal_config; GDAL_CONFIG="$withval" else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l$LIB_GDAL $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" -else - eval "$as_ac_Lib=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - with_gdal_libraries=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdal-lib not found. Specify path with option --with-gdal-libraries=DIR." >&5 -$as_echo "$as_me: WARNING: gdal-lib not found. Specify path with option --with-gdal-libraries=DIR." >&2;} + GDAL_CONFIG="" fi -else - save_ldflags=$LDFLAGS - LDFLAGS="-L$with_gdal_libraries" - export LDFLAGS - as_ac_Lib=`$as_echo "ac_cv_lib_$LIB_GDAL''_main" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$LIB_GDAL" >&5 -$as_echo_n "checking for main in -l$LIB_GDAL... " >&6; } -if eval \${$as_ac_Lib+:} false; then : +if test x"$with_proj_gdal" != xno && test x"$with_gdal_config" != xno; then + if test -z $GDAL_CONFIG; then + # Extract the first word of "gdal-config", so it can be a program name with args. +set dummy gdal-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GDAL_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l$LIB_GDAL $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - + case $GDAL_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GDAL_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" -else - eval "$as_ac_Lib=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + ;; +esac fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - GDAL_LDFLAGS=$LDFLAGS +GDAL_CONFIG=$ac_cv_path_GDAL_CONFIG +if test -n "$GDAL_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDAL_CONFIG" >&5 +$as_echo "$GDAL_CONFIG" >&6; } else - as_fn_error $? "gdal-lib not found in \"$with_gdal_libraries\"." "$LINENO" 5 -fi - - LDFLAGS=$save_ldflags - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + if test -z $GDAL_CONFIG; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find gdal-config from libgdal within the current path. Specify path with option --with-gdal-config." >&5 +$as_echo "$as_me: WARNING: could not find gdal-config from libgdal within the current path. Specify path with option --with-gdal-config." >&2;} + fi + else + if test -f $GDAL_CONFIG; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using user-specified gdal-config file: $GDAL_CONFIG" >&5 +$as_echo "Using user-specified gdal-config file: $GDAL_CONFIG" >&6; } + else + as_fn_error $? "the user-specified gdal-config file $GDAL_CONFIG does not exist" "$LINENO" 5 + fi + fi -# Check whether --with-gdal-includes was given. -if test "${with_gdal_includes+set}" = set; then : - withval=$with_gdal_includes; -fi - -save_cppflags=$CPPFLAGS -if test x"$with_gdal_includes" = x; then - CPPFLAGS="$CPPFLAGS -I/usr/local/include/gdal -I/usr/include/gdal" - export CPPFLAGS - ac_fn_c_check_header_mongrel "$LINENO" "ogr_api.h" "ac_cv_header_ogr_api_h" "$ac_includes_default" -if test "x$ac_cv_header_ogr_api_h" = xyes; then : - AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS" - with_gdal_includes=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdal-includes not found. Specify path with option --with-gdal-includes=DIR." >&5 -$as_echo "$as_me: WARNING: gdal-includes not found. Specify path with option --with-gdal-includes=DIR." >&2;} -fi + if test -z $GDAL_CONFIG; then + ac_disabled="$ac_disabled GDAL" + else + GDAL_CFLAGS="`$GDAL_CONFIG --cflags`" + GDAL_LDFLAGS="`$GDAL_CONFIG --libs`" -else - CPPFLAGS="-I$with_gdal_includes" - export CPPFLAGS - ac_fn_c_check_header_mongrel "$LINENO" "ogr_api.h" "ac_cv_header_ogr_api_h" "$ac_includes_default" + save_cppflags=$CPPFLAGS + CPPFLAGS="$GDAL_CFLAGS" + export CPPFLAGS + ac_fn_cxx_check_header_mongrel "$LINENO" "ogr_api.h" "ac_cv_header_ogr_api_h" "$ac_includes_default" if test "x$ac_cv_header_ogr_api_h" = xyes; then : AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS" else - as_fn_error $? "gdal-includes not found in \"$with_gdal_includes\"." "$LINENO" 5 + as_fn_error $? "gdal-includes not found." "$LINENO" 5 fi -fi -CPPFLAGS=$save_cppflags -fi - if test x"$with_gdal_includes" != x && test x"$with_gdal_libraries" != x; then - WITH_GDAL_TRUE= - WITH_GDAL_FALSE='#' -else - WITH_GDAL_TRUE='#' - WITH_GDAL_FALSE= -fi - -if test x"$with_gdal_includes" != x && test x"$with_gdal_libraries" != x; then + CPPFLAGS=$save_cppflags $as_echo "#define HAVE_GDAL 1" >>confdefs.h - ac_enabled="$ac_enabled GDAL" + ac_enabled="$ac_enabled GDAL" + fi else ac_disabled="$ac_disabled GDAL" fi -fox_include_prefix="fox-1.6" - -# Check whether --with-fox was given. -if test "${with_fox+set}" = set; then : - withval=$with_fox; -fi - -if test x"$with_fox" != xno; then - if test x"$with_fox" != x; then - if test x"$with_fox_libraries" = x; then - with_fox_libraries=$with_fox/lib - fi - if test x"$with_fox_includes" = x; then - with_fox_includes=$with_fox/include/$fox_include_prefix - fi - fi - LIB_FOX="FOX-1.6" - -# Check whether --with-fox-libraries was given. -if test "${with_fox_libraries+set}" = set; then : - withval=$with_fox_libraries; -fi - - if test x"$with_fox_libraries" = x; then - as_ac_Lib=`$as_echo "ac_cv_lib_$LIB_FOX''_main" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$LIB_FOX" >&5 -$as_echo_n "checking for main in -l$LIB_FOX... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l$LIB_FOX $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" +# Check whether --with-fox-config was given. +if test "${with_fox_config+set}" = set; then : + withval=$with_fox_config; FOX_CONFIG="$withval" else - eval "$as_ac_Lib=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - with_fox_libraries=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fox-lib not found. Specify path with option --with-fox-libraries=DIR for gui applications." >&5 -$as_echo "$as_me: WARNING: fox-lib not found. Specify path with option --with-fox-libraries=DIR for gui applications." >&2;} + FOX_CONFIG="" fi - else - save_ldflags=$LDFLAGS - LDFLAGS="-L$with_fox_libraries" - export LDFLAGS - as_ac_Lib=`$as_echo "ac_cv_lib_$LIB_FOX''_main" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$LIB_FOX" >&5 -$as_echo_n "checking for main in -l$LIB_FOX... " >&6; } -if eval \${$as_ac_Lib+:} false; then : +if test x"$with_fox_config" != xno; then + if test -z $FOX_CONFIG; then + # Extract the first word of "fox-config", so it can be a program name with args. +set dummy fox-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_FOX_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l$LIB_FOX $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - + case $FOX_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_FOX_CONFIG="$FOX_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_FOX_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" -else - eval "$as_ac_Lib=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + ;; +esac fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - FOX_LDFLAGS=$LDFLAGS +FOX_CONFIG=$ac_cv_path_FOX_CONFIG +if test -n "$FOX_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOX_CONFIG" >&5 +$as_echo "$FOX_CONFIG" >&6; } else - as_fn_error $? "fox-lib not found in \"$with_fox_libraries\"." "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - LDFLAGS=$save_ldflags + if test -z $FOX_CONFIG; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find fox-config from libfox within the current path. Specify path with option --with-fox-config." >&5 +$as_echo "$as_me: WARNING: could not find fox-config from libfox within the current path. Specify path with option --with-fox-config." >&2;} + fi + else + if test -f $FOX_CONFIG; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using user-specified fox-config file: $FOX_CONFIG" >&5 +$as_echo "Using user-specified fox-config file: $FOX_CONFIG" >&6; } + else + as_fn_error $? "the user-specified fox-config file $FOX_CONFIG does not exist" "$LINENO" 5 + fi fi + if test -z $FOX_CONFIG; then + ac_disabled="$ac_disabled GUI" + else + FOX_CFLAGS="`$FOX_CONFIG --cflags`" + FOX_LDFLAGS="`$FOX_CONFIG --libs`" -# Check whether --with-fox-includes was given. -if test "${with_fox_includes+set}" = set; then : - withval=$with_fox_includes; -fi - - save_cppflags=$CPPFLAGS - if test x"$with_fox_includes" = x; then - CPPFLAGS="$CPPFLAGS -I/usr/local/include/$fox_include_prefix -I/usr/include/$fox_include_prefix" + save_cppflags=$CPPFLAGS + CPPFLAGS="$FOX_CFLAGS" export CPPFLAGS - ac_fn_c_check_header_mongrel "$LINENO" "fxver.h" "ac_cv_header_fxver_h" "$ac_includes_default" + ac_fn_cxx_check_header_mongrel "$LINENO" "fxver.h" "ac_cv_header_fxver_h" "$ac_includes_default" if test "x$ac_cv_header_fxver_h" = xyes; then : AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS" - with_fox_includes=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fox-includes not found. Specify path with option --with-fox-includes=DIR for gui applications." >&5 -$as_echo "$as_me: WARNING: fox-includes not found. Specify path with option --with-fox-includes=DIR for gui applications." >&2;} + as_fn_error $? "fox-includes not found." "$LINENO" 5 fi - else - CPPFLAGS="-I$with_fox_includes -I/usr/include/$fox_include_prefix" - export CPPFLAGS - ac_fn_c_check_header_mongrel "$LINENO" "fxver.h" "ac_cv_header_fxver_h" "$ac_includes_default" -if test "x$ac_cv_header_fxver_h" = xyes; then : - AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS" -else - as_fn_error $? "fox-includes not found in \"$with_fox_includes\"." "$LINENO" 5 -fi + CPPFLAGS=$save_cppflags +$as_echo "#define HAVE_FOX 1" >>confdefs.h + ac_enabled="$ac_enabled GUI" fi - CPPFLAGS=$save_cppflags +else + ac_disabled="$ac_disabled GUI" fi - if test x"$with_fox_includes" != x && test x"$with_fox_libraries" != x; then + if test x"$FOX_CONFIG" != x && test x"$with_fox_config" != xno; then WITH_GUI_TRUE= WITH_GUI_FALSE='#' else @@ -16308,43 +16475,92 @@ WITH_GUI_FALSE= fi -if test x"$with_fox_includes" != x && test x"$with_fox_libraries" != x; then - for ac_header in GL/gl.h GL/glu.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + + +# Check whether --with-gtest-config was given. +if test "${with_gtest_config+set}" = set; then : + withval=$with_gtest_config; GTEST_CONFIG="$withval" else - as_fn_error $? "Fox was found but no GL includes. Please either disable Fox or install the GL headers." "$LINENO" 5 + GTEST_CONFIG="" fi +if test x"$with_gtest_config" != xno; then + if test -z $GTEST_CONFIG; then + # Extract the first word of "gtest-config", so it can be a program name with args. +set dummy gtest-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GTEST_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GTEST_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_GTEST_CONFIG="$GTEST_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GTEST_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS - ac_enabled="$ac_enabled GUI" + ;; +esac +fi +GTEST_CONFIG=$ac_cv_path_GTEST_CONFIG +if test -n "$GTEST_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTEST_CONFIG" >&5 +$as_echo "$GTEST_CONFIG" >&6; } else - ac_disabled="$ac_disabled GUI" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + else + if test -f $GTEST_CONFIG; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using user-specified gtest-config file: $GTEST_CONFIG" >&5 +$as_echo "Using user-specified gtest-config file: $GTEST_CONFIG" >&6; } + else + as_fn_error $? "the user-specified gtest-config file $GTEST_CONFIG does not exist" "$LINENO" 5 + fi + fi + + if test -z $GTEST_CONFIG; then + ac_disabled="$ac_disabled UnitTests" + else + GTEST_CFLAGS="`$GTEST_CONFIG --cxxflags`" + GTEST_LDFLAGS="`$GTEST_CONFIG --libs`" -# Check whether --with-gtest was given. -if test "${with_gtest+set}" = set; then : - withval=$with_gtest; -fi -if test x"$with_gtest" == x; then - with_gtest=no + save_cppflags=$CPPFLAGS + CPPFLAGS="$GTEST_CFLAGS" + export CPPFLAGS + ac_fn_cxx_check_header_mongrel "$LINENO" "gtest/gtest.h" "ac_cv_header_gtest_gtest_h" "$ac_includes_default" +if test "x$ac_cv_header_gtest_gtest_h" = xyes; then : + AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS" +else + as_fn_error $? "gtest-includes not found." "$LINENO" 5 fi -if test x"$with_gtest" != xno; then - LIB_GTEST="$with_gtest/lib/libgtest.a" - AM_CPPFLAGS="-I$with_gtest/include $AM_CPPFLAGS" + + CPPFLAGS=$save_cppflags + ac_enabled="$ac_enabled UnitTests" + fi +else + ac_disabled="$ac_disabled UnitTests" fi - if test x"$with_gtest" != xno; then + if test x"$GTEST_CONFIG" != x && test x"$with_gtest_config" != xno; then WITH_GTEST_TRUE= WITH_GTEST_FALSE='#' else @@ -16352,11 +16568,6 @@ WITH_GTEST_FALSE= fi -if test x"$with_gtest" != xno; then - ac_enabled="$ac_enabled UnitTests" -else - ac_disabled="$ac_disabled UnitTests" -fi @@ -16375,7 +16586,7 @@ PYTHON_INCLUDES=`python -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY')"` CPPFLAGS="$CPPFLAGS -I$PYTHON_INCLUDES" export CPPFLAGS - ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" + ac_fn_cxx_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" if test "x$ac_cv_header_Python_h" = xyes; then : AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS" else @@ -16403,12 +16614,12 @@ fi if test -d src/osgview; then - ac_fn_c_check_header_mongrel "$LINENO" "osg/Config" "ac_cv_header_osg_Config" "$ac_includes_default" + ac_fn_cxx_check_header_mongrel "$LINENO" "osg/Config" "ac_cv_header_osg_Config" "$ac_includes_default" if test "x$ac_cv_header_osg_Config" = xyes; then : $as_echo "#define HAVE_OSG 1" >>confdefs.h - OSG_LIBS="-losg -losgGA -losgViewer -losgUtil -losgDB -lOpenThreads" + OSG_LIBS="-losg -losgGA -losgViewer -losgUtil -losgDB -lOpenThreads -losgText" ac_enabled="$ac_enabled OSG" else ac_disabled="$ac_disabled OSG" @@ -16422,7 +16633,7 @@ -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else @@ -16452,7 +16663,7 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no @@ -16505,7 +16716,7 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no @@ -16559,7 +16770,7 @@ if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @@ -16584,26 +16795,23 @@ /* end confdefs.h. */ $ac_includes_default int -find_stack_direction () +find_stack_direction (int *addr, int depth) { - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; } int -main () +main (int argc, char **argv) { - return find_stack_direction () < 0; + return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 @@ -16642,7 +16850,7 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no @@ -16715,7 +16923,7 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_cxx_try_run "$LINENO"; then : else ac_cv_header_stdc=no @@ -16737,7 +16945,7 @@ for ac_header in float.h limits.h malloc.h math.h stddef.h stdlib.h string.h sys/time.h unistd.h wchar.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -16756,66 +16964,66 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#ifndef bool - "error: bool is not defined" -#endif -#ifndef false - "error: false is not defined" -#endif -#if false - "error: false is not 0" -#endif -#ifndef true - "error: true is not defined" -#endif -#if true != 1 - "error: true is not 1" -#endif -#ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" -#endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; + #include + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif + + struct s { _Bool s: 1; _Bool t; } s; + + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; int main () { - bool e = &s; - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); + bool e = &s; + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no @@ -16824,7 +17032,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } -ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" + ac_fn_cxx_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -16834,6 +17042,7 @@ fi + if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h @@ -16851,11 +17060,11 @@ int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -16872,8 +17081,9 @@ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -16889,10 +17099,10 @@ iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -16905,7 +17115,7 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no @@ -16936,7 +17146,7 @@ #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -16962,7 +17172,7 @@ ;; esac -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else @@ -16993,7 +17203,7 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no @@ -17028,7 +17238,7 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h @@ -17062,7 +17272,7 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_volatile=yes else ac_cv_c_volatile=no @@ -17094,7 +17304,7 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_error_at_line=yes else ac_cv_lib_error_at_line=no @@ -17115,7 +17325,7 @@ for ac_header in stdlib.h do : - ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" + ac_fn_cxx_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 @@ -17149,7 +17359,7 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no @@ -17183,7 +17393,7 @@ for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -17221,7 +17431,7 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -17273,7 +17483,7 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void @@ -17314,7 +17524,7 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no @@ -17370,7 +17580,7 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes @@ -17399,7 +17609,7 @@ for ac_func in floor getcwd gettimeofday memset pow select socket sqrt do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17410,7 +17620,7 @@ -ac_config_files="$ac_config_files src/Makefile src/activitygen/Makefile src/activitygen/activities/Makefile src/activitygen/city/Makefile src/foreign/Makefile src/foreign/eulerspiral/Makefile src/foreign/gl2ps/Makefile src/foreign/mersenne/Makefile src/foreign/nvwa/Makefile src/foreign/polyfonts/Makefile src/foreign/rtree/Makefile src/foreign/tcpip/Makefile src/gui/Makefile src/gui/dialogs/Makefile src/guinetload/Makefile src/guisim/Makefile src/microsim/Makefile src/microsim/actions/Makefile src/microsim/cfmodels/Makefile src/microsim/devices/Makefile src/microsim/logging/Makefile src/microsim/output/Makefile src/microsim/traffic_lights/Makefile src/microsim/trigger/Makefile src/netbuild/Makefile src/netgen/Makefile src/netimport/Makefile src/netimport/vissim/Makefile src/netimport/vissim/tempstructs/Makefile src/netimport/vissim/typeloader/Makefile src/netload/Makefile src/netwrite/Makefile src/od2trips/Makefile src/polyconvert/Makefile src/router/Makefile src/dfrouter/Makefile src/duarouter/Makefile src/jtrrouter/Makefile src/traci_testclient/Makefile src/traci-server/Makefile src/utils/Makefile src/utils/common/Makefile src/utils/distribution/Makefile src/utils/foxtools/Makefile src/utils/geom/Makefile src/utils/gui/Makefile src/utils/gui/div/Makefile src/utils/gui/events/Makefile src/utils/gui/globjects/Makefile src/utils/gui/images/Makefile src/utils/gui/settings/Makefile src/utils/gui/tracker/Makefile src/utils/gui/windows/Makefile src/utils/importio/Makefile src/utils/iodevices/Makefile src/utils/options/Makefile src/utils/shapes/Makefile src/utils/traci/Makefile src/utils/xml/Makefile unittest/Makefile unittest/src/Makefile unittest/src/microsim/Makefile unittest/src/netbuild/Makefile unittest/src/utils/Makefile unittest/src/utils/common/Makefile unittest/src/utils/geom/Makefile unittest/src/utils/iodevices/Makefile bin/Makefile Makefile" +ac_config_files="$ac_config_files src/Makefile src/activitygen/Makefile src/activitygen/activities/Makefile src/activitygen/city/Makefile src/foreign/Makefile src/foreign/eulerspiral/Makefile src/foreign/gl2ps/Makefile src/foreign/mersenne/Makefile src/foreign/nvwa/Makefile src/foreign/polyfonts/Makefile src/foreign/rtree/Makefile src/foreign/tcpip/Makefile src/gui/Makefile src/gui/dialogs/Makefile src/guinetload/Makefile src/guisim/Makefile src/microsim/Makefile src/microsim/actions/Makefile src/microsim/cfmodels/Makefile src/microsim/devices/Makefile src/microsim/lcmodels/Makefile src/microsim/logging/Makefile src/microsim/output/Makefile src/microsim/pedestrians/Makefile src/microsim/traffic_lights/Makefile src/microsim/trigger/Makefile src/marouter/Makefile src/netbuild/Makefile src/netgen/Makefile src/netimport/Makefile src/netimport/vissim/Makefile src/netimport/vissim/tempstructs/Makefile src/netimport/vissim/typeloader/Makefile src/netload/Makefile src/netwrite/Makefile src/od/Makefile src/polyconvert/Makefile src/router/Makefile src/dfrouter/Makefile src/duarouter/Makefile src/jtrrouter/Makefile src/tools/Makefile src/traci_testclient/Makefile src/traci-server/Makefile src/utils/Makefile src/utils/common/Makefile src/utils/distribution/Makefile src/utils/emissions/Makefile src/utils/foxtools/Makefile src/utils/geom/Makefile src/utils/gui/Makefile src/utils/gui/div/Makefile src/utils/gui/events/Makefile src/utils/gui/globjects/Makefile src/utils/gui/images/Makefile src/utils/gui/settings/Makefile src/utils/gui/tracker/Makefile src/utils/gui/windows/Makefile src/utils/importio/Makefile src/utils/iodevices/Makefile src/utils/options/Makefile src/utils/shapes/Makefile src/utils/traci/Makefile src/utils/vehicle/Makefile src/utils/xml/Makefile unittest/Makefile unittest/src/Makefile unittest/src/microsim/Makefile unittest/src/netbuild/Makefile unittest/src/utils/Makefile unittest/src/utils/common/Makefile unittest/src/utils/foxtools/Makefile unittest/src/utils/geom/Makefile unittest/src/utils/iodevices/Makefile bin/Makefile Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -17521,6 +17731,14 @@ LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -17557,14 +17775,6 @@ as_fn_error $? "conditional \"WITH_VERSION_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${WITH_PROJ_TRUE}" && test -z "${WITH_PROJ_FALSE}"; then - as_fn_error $? "conditional \"WITH_PROJ\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_GDAL_TRUE}" && test -z "${WITH_GDAL_FALSE}"; then - as_fn_error $? "conditional \"WITH_GDAL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${WITH_GUI_TRUE}" && test -z "${WITH_GUI_FALSE}"; then as_fn_error $? "conditional \"WITH_GUI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -17875,16 +18085,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -17944,28 +18154,16 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -17986,8 +18184,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sumo $as_me 0.18.0, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by sumo $as_me 0.23.0, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -18052,11 +18250,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sumo config.status 0.18.0 -configured by $0, generated by GNU Autoconf 2.68, +sumo config.status 0.23.0 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -18147,7 +18345,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -18189,6 +18387,7 @@ enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' @@ -18271,7 +18470,6 @@ allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' @@ -18343,7 +18541,6 @@ allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' @@ -18382,6 +18579,7 @@ # Quote evaled strings. for var in SHELL \ ECHO \ +PATH_SEPARATOR \ SED \ GREP \ EGREP \ @@ -18432,7 +18630,6 @@ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ @@ -18466,7 +18663,6 @@ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ @@ -18581,10 +18777,13 @@ "src/microsim/actions/Makefile") CONFIG_FILES="$CONFIG_FILES src/microsim/actions/Makefile" ;; "src/microsim/cfmodels/Makefile") CONFIG_FILES="$CONFIG_FILES src/microsim/cfmodels/Makefile" ;; "src/microsim/devices/Makefile") CONFIG_FILES="$CONFIG_FILES src/microsim/devices/Makefile" ;; + "src/microsim/lcmodels/Makefile") CONFIG_FILES="$CONFIG_FILES src/microsim/lcmodels/Makefile" ;; "src/microsim/logging/Makefile") CONFIG_FILES="$CONFIG_FILES src/microsim/logging/Makefile" ;; "src/microsim/output/Makefile") CONFIG_FILES="$CONFIG_FILES src/microsim/output/Makefile" ;; + "src/microsim/pedestrians/Makefile") CONFIG_FILES="$CONFIG_FILES src/microsim/pedestrians/Makefile" ;; "src/microsim/traffic_lights/Makefile") CONFIG_FILES="$CONFIG_FILES src/microsim/traffic_lights/Makefile" ;; "src/microsim/trigger/Makefile") CONFIG_FILES="$CONFIG_FILES src/microsim/trigger/Makefile" ;; + "src/marouter/Makefile") CONFIG_FILES="$CONFIG_FILES src/marouter/Makefile" ;; "src/netbuild/Makefile") CONFIG_FILES="$CONFIG_FILES src/netbuild/Makefile" ;; "src/netgen/Makefile") CONFIG_FILES="$CONFIG_FILES src/netgen/Makefile" ;; "src/netimport/Makefile") CONFIG_FILES="$CONFIG_FILES src/netimport/Makefile" ;; @@ -18593,17 +18792,19 @@ "src/netimport/vissim/typeloader/Makefile") CONFIG_FILES="$CONFIG_FILES src/netimport/vissim/typeloader/Makefile" ;; "src/netload/Makefile") CONFIG_FILES="$CONFIG_FILES src/netload/Makefile" ;; "src/netwrite/Makefile") CONFIG_FILES="$CONFIG_FILES src/netwrite/Makefile" ;; - "src/od2trips/Makefile") CONFIG_FILES="$CONFIG_FILES src/od2trips/Makefile" ;; + "src/od/Makefile") CONFIG_FILES="$CONFIG_FILES src/od/Makefile" ;; "src/polyconvert/Makefile") CONFIG_FILES="$CONFIG_FILES src/polyconvert/Makefile" ;; "src/router/Makefile") CONFIG_FILES="$CONFIG_FILES src/router/Makefile" ;; "src/dfrouter/Makefile") CONFIG_FILES="$CONFIG_FILES src/dfrouter/Makefile" ;; "src/duarouter/Makefile") CONFIG_FILES="$CONFIG_FILES src/duarouter/Makefile" ;; "src/jtrrouter/Makefile") CONFIG_FILES="$CONFIG_FILES src/jtrrouter/Makefile" ;; + "src/tools/Makefile") CONFIG_FILES="$CONFIG_FILES src/tools/Makefile" ;; "src/traci_testclient/Makefile") CONFIG_FILES="$CONFIG_FILES src/traci_testclient/Makefile" ;; "src/traci-server/Makefile") CONFIG_FILES="$CONFIG_FILES src/traci-server/Makefile" ;; "src/utils/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/Makefile" ;; "src/utils/common/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/common/Makefile" ;; "src/utils/distribution/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/distribution/Makefile" ;; + "src/utils/emissions/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/emissions/Makefile" ;; "src/utils/foxtools/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/foxtools/Makefile" ;; "src/utils/geom/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/geom/Makefile" ;; "src/utils/gui/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/gui/Makefile" ;; @@ -18619,6 +18820,7 @@ "src/utils/options/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/options/Makefile" ;; "src/utils/shapes/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/shapes/Makefile" ;; "src/utils/traci/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/traci/Makefile" ;; + "src/utils/vehicle/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/vehicle/Makefile" ;; "src/utils/xml/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/xml/Makefile" ;; "unittest/Makefile") CONFIG_FILES="$CONFIG_FILES unittest/Makefile" ;; "unittest/src/Makefile") CONFIG_FILES="$CONFIG_FILES unittest/src/Makefile" ;; @@ -18626,6 +18828,7 @@ "unittest/src/netbuild/Makefile") CONFIG_FILES="$CONFIG_FILES unittest/src/netbuild/Makefile" ;; "unittest/src/utils/Makefile") CONFIG_FILES="$CONFIG_FILES unittest/src/utils/Makefile" ;; "unittest/src/utils/common/Makefile") CONFIG_FILES="$CONFIG_FILES unittest/src/utils/common/Makefile" ;; + "unittest/src/utils/foxtools/Makefile") CONFIG_FILES="$CONFIG_FILES unittest/src/utils/foxtools/Makefile" ;; "unittest/src/utils/geom/Makefile") CONFIG_FILES="$CONFIG_FILES unittest/src/utils/geom/Makefile" ;; "unittest/src/utils/iodevices/Makefile") CONFIG_FILES="$CONFIG_FILES unittest/src/utils/iodevices/Makefile" ;; "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; @@ -19226,7 +19429,7 @@ case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -19239,7 +19442,7 @@ # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -19273,21 +19476,19 @@ continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || @@ -19341,8 +19542,8 @@ # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -19396,6 +19597,9 @@ # An echo program that protects backslashes. ECHO=$lt_ECHO +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + # The host system. host_alias=$host_alias host=$host @@ -19697,10 +19901,6 @@ # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator @@ -20043,10 +20243,6 @@ # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/configure.ac sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/configure.ac --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/configure.ac 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/configure.ac 2015-04-17 00:20:33.000000000 +0000 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(sumo, 0.18.0) +AC_INIT(sumo, 0.23.0) AC_CONFIG_SRCDIR(src/sumo_main.cpp) AC_CANONICAL_SYSTEM @@ -9,9 +9,15 @@ dnl enable automake-support AM_INIT_AUTOMAKE([gnu dist-zip tar-ustar]) +AC_LANG([C++]) dnl the debug check has to be made before the program checks dnl because it modifies CXXFLAGS +if test x$CXX = xclang++; then + CXXFLAGS="-msse2 $CXXFLAGS" +else + CXXFLAGS="-msse2 -mfpmath=sse $CXXFLAGS" +fi AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],[enable sumo debugging code [default=no].])]) if test x$enable_debug = xyes; then AC_DEFINE(_DEBUG, 1, [Define to 1 in order to enable sumo debugging code.]) @@ -48,6 +54,12 @@ dnl Check for enable-features that shall go into config.h AC_ARG_ENABLE([memcheck], [AS_HELP_STRING([--enable-memcheck],[enable compilation of memory leak checks [default=no].])]) +if test x$enable_memcheck = xyes; then + if test x$CXX = xclang++; then + AC_MSG_WARN([--enable-memcheck does not work with clang yet]) + enable_memcheck="no" + fi +fi AM_CONDITIONAL(CHECK_MEMORY_LEAKS, test x$enable_memcheck = xyes) if test x$enable_memcheck = xyes; then AC_DEFINE(CHECK_MEMORY_LEAKS, 1, [Define to 1 in order to enable memory checks.]) @@ -82,8 +94,8 @@ ac_disabled="$ac_disabled Subsecond" fi -AC_DEFINE([POSITION_EPS], [0.1], [defines the epsilon to use on position comparison]) -AC_DEFINE([NUMERICAL_EPS], [0.001], [defines the epsilon to use on general floating point comparison]) +AC_DEFINE([POSITION_EPS], [(SUMOReal)0.1], [defines the epsilon to use on position comparison]) +AC_DEFINE([NUMERICAL_EPS], [(SUMOReal)0.001], [defines the epsilon to use on general floating point comparison]) AC_DEFINE([OUTPUT_ACCURACY], [2], [defines the number of digits after the comma in output]) AC_DEFINE([GEO_OUTPUT_ACCURACY], [6], [defines the number of digits after the comma in geo-coordinates output]) AC_DEFINE([SUMOLong], [long long int], [defines the type for very long integers]) @@ -94,19 +106,17 @@ [AC_DEFINE([XERCES3_SIZE_t],[unsigned int],[Define length for Xerces 2.])]) -AM_CONDITIONAL(INTERNAL, test -d $srcdir/src/internal) -m4_syscmd([test -d src/internal]) +AM_CONDITIONAL(INTERNAL, test -d $srcdir/src/mesosim) +m4_syscmd([test -d src/mesosim]) m4_if(m4_sysval,[0],[ AC_DEFINE([HAVE_INTERNAL], [1], [Define to enable internal code.]) - AC_CONFIG_FILES([src/mesogui/Makefile src/mesosim/Makefile src/netedit/Makefile src/osgview/Makefile src/marouter/Makefile src/internal/Makefile unittest/src/internal/Makefile]) - INTERNAL_DIRS="mesosim marouter internal" + AC_CONFIG_FILES([src/mesogui/Makefile src/mesosim/Makefile src/netedit/Makefile src/osgview/Makefile]) + INTERNAL_DIRS="mesosim" AC_SUBST([INTERNAL_DIRS]) GUI_INTERNAL_DIRS="mesogui netedit osgview" AC_SUBST([GUI_INTERNAL_DIRS]) - UNITTEST_INTERNAL_DIRS=internal - AC_SUBST([UNITTEST_INTERNAL_DIRS]) ac_enabled="$ac_enabled Internal" - program_transform_name="s,\$\$,Int,; s,sumoInt,meso,; s,sumo-guiInt,meso-gui,; s,marouterInt,marouter,; s,neteditInt,netedit,; $program_transform_name" + program_transform_name="s,\$\$,Int,; s,sumoInt,meso,; s,sumo-guiInt,meso-gui,; s,neteditInt,netedit,; $program_transform_name" ]) AC_ARG_ENABLE([traci],[AS_HELP_STRING([--disable-traci],[disable Traffic Control Interface (TraCI) Server [default=no].])]) @@ -118,8 +128,8 @@ ac_disabled="$ac_disabled TRACI" fi -AM_CONDITIONAL([WITH_VERSION_H], test -f .svn/entries) -if test -f .svn/entries; then +AM_CONDITIONAL([WITH_VERSION_H], test -d .svn) +if test -d .svn; then AC_DEFINE([HAVE_VERSION_H], [1], [Define if auto-generated version.h should be used.]) else AC_DEFINE_UNQUOTED(VERSION_STRING, "$PACKAGE_VERSION", [Defined if auto-generated version.h is unavailable.]) @@ -207,21 +217,19 @@ dnl ... for proj.4 dnl ... for libs -LIB_PROJ="proj" AC_ARG_WITH([proj-libraries], [AS_HELP_STRING([--with-proj-libraries=DIR],[where the PROJ library is installed (overrides previous settings).])]) if test x"$with_proj_libraries" = x; then - AC_CHECK_LIB([$LIB_PROJ], [main], [with_proj_libraries=yes], + AC_CHECK_LIB([proj], [main], [PROJ_LDFLAGS="-lproj"], [AC_MSG_WARN([proj-lib not found. Specify path with option --with-proj-libraries=DIR.])]) else save_ldflags=$LDFLAGS LDFLAGS="-L$with_proj_libraries" export LDFLAGS - AC_CHECK_LIB([$LIB_PROJ], [main], [PROJ_LDFLAGS=$LDFLAGS], + AC_CHECK_LIB([proj], [main], [PROJ_LDFLAGS="$LDFLAGS -lproj"], [AC_MSG_ERROR([proj-lib not found in "$with_proj_libraries".])]) LDFLAGS=$save_ldflags - AC_SUBST(PROJ_LDFLAGS) fi -AC_SUBST(LIB_PROJ) +AC_SUBST(PROJ_LDFLAGS) dnl ... for includes AC_ARG_WITH([proj-includes], [AS_HELP_STRING([--with-proj-includes=DIR],[where the PROJ includes are (overrides previous settings).])]) @@ -237,8 +245,7 @@ CPPFLAGS=$save_cppflags fi fi -AM_CONDITIONAL([WITH_PROJ], [test x"$with_proj_includes" != x && test x"$with_proj_libraries" != x]) -if test x"$with_proj_includes" != x && test x"$with_proj_libraries" != x; then +if test x"$with_proj_includes" != x && test x"$PROJ_LDFLAGS" != x; then AC_DEFINE([HAVE_PROJ], [1], [defined if PROJ is available]) ac_enabled="$ac_enabled PROJ" else @@ -248,45 +255,39 @@ dnl - - - - - - - - - - - - - - - - - - - - - - - dnl ... for gdal -dnl ... for libs -if test x"$with_proj_gdal" != xno; then -LIB_GDAL="gdal" -AC_ARG_WITH([gdal-libraries], [AS_HELP_STRING([--with-gdal-libraries=DIR],[where the GDAL library is installed (overrides previous settings).])]) -if test x"$with_gdal_libraries" = x; then - AC_CHECK_LIB([$LIB_GDAL], [main], [with_gdal_libraries=yes], - [AC_MSG_WARN([gdal-lib not found. Specify path with option --with-gdal-libraries=DIR.])]) -else - save_ldflags=$LDFLAGS - LDFLAGS="-L$with_gdal_libraries" - export LDFLAGS - AC_CHECK_LIB([$LIB_GDAL], [main], [GDAL_LDFLAGS=$LDFLAGS], - [AC_MSG_ERROR([gdal-lib not found in "$with_gdal_libraries".])]) - LDFLAGS=$save_ldflags - AC_SUBST(GDAL_LDFLAGS) -fi -AC_SUBST(LIB_GDAL) +AC_ARG_WITH([gdal-config], + [AS_HELP_STRING([--with-gdal-config=FILE], [specify an alternative gdal-config file])], + [GDAL_CONFIG="$withval"], [GDAL_CONFIG=""]) +if test x"$with_proj_gdal" != xno && test x"$with_gdal_config" != xno; then + if test -z $GDAL_CONFIG; then + AC_PATH_PROG([GDAL_CONFIG], [gdal-config]) + if test -z $GDAL_CONFIG; then + AC_MSG_WARN([could not find gdal-config from libgdal within the current path. Specify path with option --with-gdal-config.]) + fi + else + if test -f $GDAL_CONFIG; then + AC_MSG_RESULT([Using user-specified gdal-config file: $GDAL_CONFIG]) + else + AC_MSG_ERROR([the user-specified gdal-config file $GDAL_CONFIG does not exist]) + fi + fi -dnl ... for includes -AC_ARG_WITH([gdal-includes], [AS_HELP_STRING([--with-gdal-includes=DIR],[where the GDAL includes are (overrides previous settings).])]) -save_cppflags=$CPPFLAGS -if test x"$with_gdal_includes" = x; then - CPPFLAGS="$CPPFLAGS -I/usr/local/include/gdal -I/usr/include/gdal" - export CPPFLAGS - AC_CHECK_HEADER([ogr_api.h], [AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS" - with_gdal_includes=yes], - [AC_MSG_WARN([gdal-includes not found. Specify path with option --with-gdal-includes=DIR.])]) -else - CPPFLAGS="-I$with_gdal_includes" - export CPPFLAGS - AC_CHECK_HEADER([ogr_api.h], [AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS"], - [AC_MSG_ERROR([gdal-includes not found in "$with_gdal_includes".])]) -fi -CPPFLAGS=$save_cppflags -fi -AM_CONDITIONAL([WITH_GDAL], [test x"$with_gdal_includes" != x && test x"$with_gdal_libraries" != x]) -if test x"$with_gdal_includes" != x && test x"$with_gdal_libraries" != x; then - AC_DEFINE([HAVE_GDAL], [1], [defined if GDAL is available]) - ac_enabled="$ac_enabled GDAL" + if test -z $GDAL_CONFIG; then + ac_disabled="$ac_disabled GDAL" + else + GDAL_CFLAGS="`$GDAL_CONFIG --cflags`" + GDAL_LDFLAGS="`$GDAL_CONFIG --libs`" + AC_SUBST([GDAL_LDFLAGS]) + + save_cppflags=$CPPFLAGS + CPPFLAGS="$GDAL_CFLAGS" + export CPPFLAGS + AC_CHECK_HEADER([ogr_api.h], [AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS"], + [AC_MSG_ERROR([gdal-includes not found.])]) + CPPFLAGS=$save_cppflags + AC_DEFINE([HAVE_GDAL], [1], [defined if GDAL is available]) + ac_enabled="$ac_enabled GDAL" + fi else ac_disabled="$ac_disabled GDAL" fi @@ -294,79 +295,79 @@ dnl - - - - - - - - - - - - - - - - - - - - - - - dnl ... for fox -fox_include_prefix="fox-1.6" -AC_ARG_WITH([fox], [AS_HELP_STRING([--with-fox=DIR],[where Fox is installed (libraries in DIR/lib, headers in DIR/include/fox-1.6).])]) -if test x"$with_fox" != xno; then - if test x"$with_fox" != x; then - if test x"$with_fox_libraries" = x; then - with_fox_libraries=$with_fox/lib - fi - if test x"$with_fox_includes" = x; then - with_fox_includes=$with_fox/include/$fox_include_prefix - fi - fi - -dnl ... for libs - LIB_FOX="FOX-1.6" - AC_ARG_WITH([fox-libraries], [AS_HELP_STRING([--with-fox-libraries=DIR],[where the Fox library is installed.])]) - if test x"$with_fox_libraries" = x; then - AC_CHECK_LIB([$LIB_FOX], [main], [with_fox_libraries=yes], - [AC_MSG_WARN([fox-lib not found. Specify path with option --with-fox-libraries=DIR for gui applications.])]) +AC_ARG_WITH([fox-config], + [AS_HELP_STRING([--with-fox-config=FILE], [specify an alternative fox-config executable])], + [FOX_CONFIG="$withval"], [FOX_CONFIG=""]) +if test x"$with_fox_config" != xno; then + if test -z $FOX_CONFIG; then + AC_PATH_PROG([FOX_CONFIG], [fox-config]) + if test -z $FOX_CONFIG; then + AC_MSG_WARN([could not find fox-config from libfox within the current path. Specify path with option --with-fox-config.]) + fi else - save_ldflags=$LDFLAGS - LDFLAGS="-L$with_fox_libraries" - export LDFLAGS - AC_CHECK_LIB([$LIB_FOX], [main], [FOX_LDFLAGS=$LDFLAGS], - [AC_MSG_ERROR([fox-lib not found in "$with_fox_libraries".])]) - LDFLAGS=$save_ldflags - AC_SUBST(FOX_LDFLAGS) + if test -f $FOX_CONFIG; then + AC_MSG_RESULT([Using user-specified fox-config file: $FOX_CONFIG]) + else + AC_MSG_ERROR([the user-specified fox-config file $FOX_CONFIG does not exist]) + fi fi - AC_SUBST(LIB_FOX) -dnl ... for includes - AC_ARG_WITH([fox-includes], [AS_HELP_STRING([--with-fox-includes=DIR],[where the Fox includes are.])]) - save_cppflags=$CPPFLAGS - if test x"$with_fox_includes" = x; then - CPPFLAGS="$CPPFLAGS -I/usr/local/include/$fox_include_prefix -I/usr/include/$fox_include_prefix" - export CPPFLAGS - AC_CHECK_HEADER([fxver.h], [AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS" - with_fox_includes=yes], - [AC_MSG_WARN([fox-includes not found. Specify path with option --with-fox-includes=DIR for gui applications.])]) + if test -z $FOX_CONFIG; then + ac_disabled="$ac_disabled GUI" else - CPPFLAGS="-I$with_fox_includes -I/usr/include/$fox_include_prefix" + FOX_CFLAGS="`$FOX_CONFIG --cflags`" + FOX_LDFLAGS="`$FOX_CONFIG --libs`" + AC_SUBST([FOX_LDFLAGS]) + + save_cppflags=$CPPFLAGS + CPPFLAGS="$FOX_CFLAGS" export CPPFLAGS AC_CHECK_HEADER([fxver.h], [AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS"], - [AC_MSG_ERROR([fox-includes not found in "$with_fox_includes".])]) + [AC_MSG_ERROR([fox-includes not found.])]) + CPPFLAGS=$save_cppflags + AC_DEFINE([HAVE_FOX], [1], [defined if FOX is available]) + ac_enabled="$ac_enabled GUI" fi - CPPFLAGS=$save_cppflags -fi -AM_CONDITIONAL([WITH_GUI], [test x"$with_fox_includes" != x && test x"$with_fox_libraries" != x]) -if test x"$with_fox_includes" != x && test x"$with_fox_libraries" != x; then - AC_CHECK_HEADERS([GL/gl.h GL/glu.h],, - [AC_MSG_ERROR([Fox was found but no GL includes. Please either disable Fox or install the GL headers.])]) - ac_enabled="$ac_enabled GUI" else ac_disabled="$ac_disabled GUI" fi +AM_CONDITIONAL([WITH_GUI], [test x"$FOX_CONFIG" != x && test x"$with_fox_config" != xno]) dnl - - - - - - - - - - - - - - - - - - - - - - - dnl ... for gtest -AC_ARG_WITH([gtest], [AS_HELP_STRING([--with-gtest=DIR],[where googletest is installed (libraries in DIR/lib, headers in DIR/include).])]) -if test x"$with_gtest" == x; then - with_gtest=no -fi -if test x"$with_gtest" != xno; then - LIB_GTEST="$with_gtest/lib/libgtest.a" - AC_SUBST(LIB_GTEST) - AM_CPPFLAGS="-I$with_gtest/include $AM_CPPFLAGS" -fi -AM_CONDITIONAL([WITH_GTEST], [test x"$with_gtest" != xno]) -if test x"$with_gtest" != xno; then - ac_enabled="$ac_enabled UnitTests" +AC_ARG_WITH([gtest-config], [AS_HELP_STRING([--with-gtest-config=FILE], [specify an alternative gtest-config.])], + [GTEST_CONFIG="$withval"], [GTEST_CONFIG=""]) +if test x"$with_gtest_config" != xno; then + if test -z $GTEST_CONFIG; then + AC_PATH_PROG([GTEST_CONFIG], [gtest-config]) + else + if test -f $GTEST_CONFIG; then + AC_MSG_RESULT([Using user-specified gtest-config file: $GTEST_CONFIG]) + else + AC_MSG_ERROR([the user-specified gtest-config file $GTEST_CONFIG does not exist]) + fi + fi + + if test -z $GTEST_CONFIG; then + ac_disabled="$ac_disabled UnitTests" + else + GTEST_CFLAGS="`$GTEST_CONFIG --cxxflags`" + GTEST_LDFLAGS="`$GTEST_CONFIG --libs`" + AC_SUBST([GTEST_LDFLAGS]) + + save_cppflags=$CPPFLAGS + CPPFLAGS="$GTEST_CFLAGS" + export CPPFLAGS + AC_CHECK_HEADER([gtest/gtest.h], [AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS"], + [AC_MSG_ERROR([gtest-includes not found.])]) + CPPFLAGS=$save_cppflags + ac_enabled="$ac_enabled UnitTests" + fi else ac_disabled="$ac_disabled UnitTests" fi +AM_CONDITIONAL([WITH_GTEST], [test x"$GTEST_CONFIG" != x && test x"$with_gtest_config" != xno]) dnl - - - - - - - - - - - - - - - - - - - - - - - @@ -397,7 +398,7 @@ if test -d src/osgview; then AC_CHECK_HEADER([osg/Config], [AC_DEFINE([HAVE_OSG], [1], [defined if osg is available]) - OSG_LIBS="-losg -losgGA -losgViewer -losgUtil -losgDB -lOpenThreads" AC_SUBST(OSG_LIBS) + OSG_LIBS="-losg -losgGA -losgViewer -losgUtil -losgDB -lOpenThreads -losgText" AC_SUBST(OSG_LIBS) ac_enabled="$ac_enabled OSG"], [ac_disabled="$ac_disabled OSG"]) fi @@ -441,7 +442,6 @@ src/activitygen/city/Makefile src/foreign/Makefile src/foreign/eulerspiral/Makefile -src/foreign/gl2ps/Makefile src/foreign/mersenne/Makefile src/foreign/nvwa/Makefile src/foreign/polyfonts/Makefile @@ -455,10 +455,13 @@ src/microsim/actions/Makefile src/microsim/cfmodels/Makefile src/microsim/devices/Makefile +src/microsim/lcmodels/Makefile src/microsim/logging/Makefile src/microsim/output/Makefile +src/microsim/pedestrians/Makefile src/microsim/traffic_lights/Makefile src/microsim/trigger/Makefile +src/marouter/Makefile src/netbuild/Makefile src/netgen/Makefile src/netimport/Makefile @@ -467,17 +470,19 @@ src/netimport/vissim/typeloader/Makefile src/netload/Makefile src/netwrite/Makefile -src/od2trips/Makefile +src/od/Makefile src/polyconvert/Makefile src/router/Makefile src/dfrouter/Makefile src/duarouter/Makefile src/jtrrouter/Makefile +src/tools/Makefile src/traci_testclient/Makefile src/traci-server/Makefile src/utils/Makefile src/utils/common/Makefile src/utils/distribution/Makefile +src/utils/emissions/Makefile src/utils/foxtools/Makefile src/utils/geom/Makefile src/utils/gui/Makefile @@ -493,6 +498,7 @@ src/utils/options/Makefile src/utils/shapes/Makefile src/utils/traci/Makefile +src/utils/vehicle/Makefile src/utils/xml/Makefile unittest/Makefile unittest/src/Makefile @@ -500,6 +506,7 @@ unittest/src/netbuild/Makefile unittest/src/utils/Makefile unittest/src/utils/common/Makefile +unittest/src/utils/foxtools/Makefile unittest/src/utils/geom/Makefile unittest/src/utils/iodevices/Makefile bin/Makefile diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4.csv sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4.csv --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4.csv 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4.csv 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,35 @@ +cp_norm(drive),NOx,HC,CO,PM,PN,NO +[-],[g/h],[g/h],[g/h],[g/h],[#/h],[g/h] +Pdrive (Engine)= 22.11115 +idle,5.955342,0.1406479,0.2413937,0.1616896,1.111105E+14,3.263419 +-1.5,-2.576232,-0.1389703,-0.4065005,-0.2009129,-2.761986E+14,-1.469783 +-1.25,-0.389158,-0.01329479,-0.002300322,-0.02079403,-4.531862E+13,-0.2257273 +-1,1.797917,0.1123807,0.4018998,0.1593248,1.855614E+14,1.018328 +-0.75,3.984991,0.2380562,0.8061,0.3394436,4.164413E+14,2.262383 +-0.5,6.76352,0.3292956,1.062789,0.4497962,5.836751E+14,3.863992 +-0.25,8.32956,0.389348,0.8385231,0.4956411,6.642329E+14,4.735249 +0,12.58213,0.4284569,0.7813259,0.5850523,8.026378E+14,7.191719 +0.25,19.62311,0.5647688,1.416378,0.8449895,1.152981E+15,11.22942 +0.5,27.78785,0.6734931,1.878894,1.178246,1.543017E+15,15.98242 +0.75,40.30426,0.7420521,2.544242,1.590989,2.014126E+15,23.28452 +1,58.02473,0.7680771,3.155005,2.063316,2.589906E+15,33.76013 +1.25,79.04489,0.8196165,2.823195,2.329949,2.995602E+15,46.12777 +1.5,97.38378,0.9033943,1.988912,2.69727,3.524081E+15,57.3409 +1.75,112.9292,0.9568881,1.74368,2.874488,3.961159E+15,66.59665 +2,140.8948,1.026206,2.155553,3.014926,4.624136E+15,83.28246 +2.25,165.7707,1.039235,8.567539,2.731716,4.229687E+15,97.15863 +2.5,227.8597,1.048754,13.83295,2.359693,3.676876E+15,131.9496 +2.75,253.1145,1.164797,3.480716,2.650474,4.510258E+15,147.7743 +3,269.503,1.312524,2.388683,3.925892,5.253795E+15,158.6066 +3.25,278.0219,1.40402,2.06147,4.675897,5.935875E+15,164.2055 +3.5,286.5407,1.495517,1.734256,5.425901,6.617955E+15,169.8044 +3.75,295.0596,1.587013,1.407043,6.175906,7.300035E+15,175.4033 +4,303.5785,1.678509,1.079829,6.925911,7.982115E+15,181.0022 +4.25,312.0973,1.770006,0.7526155,7.675916,8.664195E+15,186.601 +4.5,320.6162,1.861502,0.4254019,8.42592,9.346275E+15,192.1999 +4.75,329.135,1.952998,0.0981884,9.175925,1.002836E+16,197.7988 +5,337.6539,2.044495,-0.2290251,9.92593,1.071044E+16,203.3977 +5.25,346.1728,2.135991,-0.5562387,10.67593,1.139252E+16,208.9965 +5.5,354.6916,2.227487,-0.8834522,11.42594,1.20746E+16,214.5954 +5.75,363.2105,2.318983,-1.210666,12.17594,1.275668E+16,220.1943 +6,371.7293,2.41048,-1.537879,12.92595,1.343876E+16,225.7932 diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4.dec.csv sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4.dec.csv --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4.dec.csv 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4.dec.csv 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,31 @@ +v,decel_coast +[km/h],[m/s²] +10,-0.3525988 +15,-0.3821267 +20,-0.3977517 +25,-0.3907145 +30,-0.3716978 +35,-0.3561859 +40,-0.3349187 +45,-0.3182591 +50,-0.3246279 +55,-0.3301134 +60,-0.3352075 +65,-0.340262 +70,-0.3460579 +75,-0.3577655 +80,-0.3707729 +85,-0.3842998 +90,-0.3984441 +95,-0.4138175 +100,-0.4333191 +105,-0.4537386 +110,-0.4751647 +115,-0.4976779 +120,-0.5213535 +125,-0.5509461 +130,-0.5839656 +135,-0.6183105 +140,-0.6539034 +145,-0.6920814 +150,-0.7326561 diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4_FC.csv sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4_FC.csv --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4_FC.csv 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4_FC.csv 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,17 @@ +cp_norm(rated),FC +[-],[g/h/kWrated] +Pdrive (Engine)= 22.11115 +idle,6.225251 +-0.2,3.857434 +-0.1,10.89407 +0,18.83705 +0.1,32.91733 +0.2,51.09933 +0.3,72.51001 +0.4,90.11015 +0.5,107.4671 +0.6,124.532 +0.7,140.9465 +0.8000001,157.361 +0.9000001,173.7755 +1,190.19 diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4.PHEMLight.veh sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4.PHEMLight.veh --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4.PHEMLight.veh 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_D_EU4.PHEMLight.veh 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,134 @@ +c PHEMLight Vehicle Input filefc (based on PHEM .veh file format) +c PHEM 11.6.2 +c 10.10.2014 11:59:25 +c Vehicle mass [kg] +1500 +c Vehicle loading [kg] +50 +c Cd value [-] +0.3113 +c Cross sectional area [m^2] +2.16 +c Delta [-] (not supported since Version 10.7) +0 +c Engine rotational inertia [kg*m^2] +0.5234 +c Wheels equivalent rotational inertia [kg] (= I_wheel/rdyn^2) +41.3424 +c Gearbox rotational inertia [kg*m^2] +0.06046 +c Auxiliaries base power demand (normalized) [-] +0 +c Engine rated power [kW] +93 +c Engine rated speed [rpm] +4073 +c Engine idling speed [rpm] +816 +c --- +0 +c Rolling resistance coefficients +c Fr0 +0.009 +c Fr1 +5E-05 +c Fr2 +0 +c Fr3 +0 +c Fr4 +1.6E-09 +c --- +0 +c Transmission loss factor +0.3 +c Transmission +c Axle ratio [-] +3.7284, +c Wheel effective diameter [m] +0.6264 +c Transmission gears: Ratio [-], path to efficiency map filefc (optional) +c Gear 1 +3.7079, +c Gear 2 +2.0237, +c Gear 3 +1.2784, +c Gear 4 +0.9359, +c Gear 5 +0.7414, +c Gear 6 +0.6162, +c Gear 7 +0, +c Gear 8 +0, +c Gear 9 +0, +c Gear 10 +0, +c Gear 11 +0, +c Gear 12 +0, +c Gear 13 +0, +c Gear 14 +0, +c Gear 15 +0, +c Gear 16 +0, +c Gear shift behaviour: +c Gearshift model (Version fast driver) +c shift up at ratio rpm/rated rpm in actual gear greater than +0.7840928 +c shift down when rpm/rated rpm in lower gear is higher than +0.6081684 +c Gearshift model (Version economic driver) +c shift up at ratio rpm/rated rpm in higher gear greater than +0.5601891 +c Shift down when ratio rpm/rated rpm in actual gear is lower than +0.5202062 +c Share of version economic driver (0 to 1) +0 +c Share of version mixed model (0 to 1) +1 +cVehiclemasstypeforPHEMlight +LV +cFueltypeforPHEMlight +D +c P_n_max_v0 +5 +c P_n_max_p0 +0.13 +c P_n_max_v1 +26 +c P_n_max_p1 +0.75 +c vehicle speed [km/h] (converted to m/s after read-in), gear ratio [-], rotational mass factor [-] +0,3.7079,1.67 +10.53695,3.7079,1.67 +28.99677,2.0237,1.2 +43.68127,1.2784,1.08 +69.56696,0.9359,1.05 +94.3671,0.7414,1.03 +121.0647,0.6162,1.02 +250,0.6162,1.02 +c n_norm, pe_drag _norm +0,-0.015 +0.002,-0.015 +0.05,-0.017 +0.1,-0.02 +0.2,-0.028 +0.3,-0.039 +0.4,-0.05 +0.5,-0.063 +0.6,-0.078 +0.7,-0.098 +0.8,-0.121 +0.9,-0.145 +1,-0.169 +1.1,-0.198 +1.2,-0.232 diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4.csv sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4.csv --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4.csv 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4.csv 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,35 @@ +cp_norm(drive),NOx,HC,CO,PM,PN,NO +[-],[g/h],[g/h],[g/h],[g/h],[#/h],[g/h] +Pdrive (Engine)= 19.39067 +idle,0.2311569,0.06580319,1.57672,0.0005531011,3.260417E+12,0.2195989 +-1.5,0.3098871,0.05490542,16.24198,0.1208655,5.262424E+13,0.2943927 +-1.25,0.2780301,0.06236606,11.80099,0.08224616,3.909569E+13,0.2641286 +-1,0.2461731,0.0698267,7.359998,0.0436268,2.556714E+13,0.2338644 +-0.75,0.214316,0.07728734,2.919005,0.005007447,1.203859E+13,0.2036003 +-0.5,0.4842853,0.1181871,4.410676,0.009723747,1.518959E+13,0.4600711 +-0.25,0.7335005,0.160183,7.348531,0.008589056,1.449587E+13,0.6968251 +0,1.027868,0.1308419,6.967961,0.01039302,1.371341E+13,0.9764751 +0.25,1.879347,0.1673481,8.292696,0.0111202,1.944705E+13,1.78538 +0.5,2.755008,0.2400655,10.51681,0.02782438,3.09744E+13,2.617256 +0.75,4.158228,0.4294027,21.32977,0.1036785,6.424386E+13,3.950318 +1,6.191795,0.776246,47.51457,0.2247769,1.031063E+14,5.882205 +1.25,10.13954,1.374057,106.1412,0.3900392,1.611524E+14,9.632558 +1.5,12.61938,2.230839,199.4636,0.5781541,2.525558E+14,11.98842 +1.75,13.94988,2.562111,215.1183,0.7788944,3.76344E+14,13.25239 +2,18.94407,3.035618,303.0314,1.404961,7.892802E+14,17.99687 +2.25,19.77032,3.542301,424.2019,2.518004,1.084592E+15,18.78181 +2.5,22.55479,6.882059,956.8351,3.546072,1.275273E+15,21.42705 +2.75,26.3791,8.126064,1536.675,3.824628,1.386037E+15,25.06014 +3,30.20341,9.37007,2116.515,4.103183,1.496801E+15,28.69324 +3.25,34.02771,10.61407,2696.355,4.381738,1.607565E+15,32.32632 +3.5,37.85201,11.85808,3276.196,4.660293,1.71833E+15,35.95941 +3.75,41.67632,13.10209,3856.036,4.938848,1.829094E+15,39.5925 +4,45.50062,14.34609,4435.876,5.217402,1.939858E+15,43.22559 +4.25,49.32492,15.5901,5015.716,5.495957,2.050622E+15,46.85867 +4.5,53.14922,16.8341,5595.557,5.774512,2.161387E+15,50.49176 +4.75,56.97353,18.07811,6175.397,6.053067,2.272151E+15,54.12485 +5,60.79783,19.32211,6755.237,6.331622,2.382915E+15,57.75793 +5.25,64.62213,20.56612,7335.078,6.610177,2.493679E+15,61.39102 +5.5,68.44643,21.81012,7914.918,6.888732,2.604444E+15,65.02411 +5.75,72.27074,23.05413,8494.758,7.167287,2.715208E+15,68.6572 +6,76.09504,24.29813,9074.598,7.445842,2.825972E+15,72.29028 diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4.dec.csv sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4.dec.csv --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4.dec.csv 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4.dec.csv 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,31 @@ +v,decel_coast +[km/h],[m/s²] +10,-0.2684278 +15,-0.2693753 +20,-0.2692612 +25,-0.2715204 +30,-0.2762249 +35,-0.2731925 +40,-0.270826 +45,-0.2707604 +50,-0.2779272 +55,-0.2865081 +60,-0.2963224 +65,-0.3074608 +70,-0.3201242 +75,-0.3352677 +80,-0.3517197 +85,-0.3695383 +90,-0.388737 +95,-0.4093591 +100,-0.4314485 +105,-0.4557404 +110,-0.4830516 +115,-0.5114193 +120,-0.5411544 +125,-0.5724216 +130,-0.6052775 +135,-0.6400956 +140,-0.6765129 +145,-0.7145674 +150,-0.7543085 diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4_FC.csv sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4_FC.csv --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4_FC.csv 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4_FC.csv 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,17 @@ +cp_norm(rated),FC +[-],[g/h/kWrated] +Pdrive (Engine)= 19.39067 +idle,10.82389 +-0.2,4.995791 +-0.1,13.34568 +0,22.62047 +0.1,39.36962 +0.2,61.06668 +0.3,87.8808 +0.4,108.9163 +0.5,137.4741 +0.6,155.8149 +0.7,186.5109 +0.8000001,217.2069 +0.9000001,247.903 +1,278.599 diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4.PHEMLight.veh sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4.PHEMLight.veh --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4.PHEMLight.veh 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/emissions/PHEMlight/PKW_G_EU4.PHEMLight.veh 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,133 @@ +c PHEMLight Vehicle Input filefc (based on PHEM .veh file format) +c PHEM 11.6.2 +c 10.10.2014 11:59:36 +c Vehicle mass [kg] +1235 +c Vehicle loading [kg] +50 +c Cd value [-] +0.3113 +c Cross sectional area [m^2] +2.11756 +c Delta [-] (not supported since Version 10.7) +0 +c Engine rotational inertia [kg*m^2] +0.5 +c Wheels equivalent rotational inertia [kg] (= I_wheel/rdyn^2) +40 +c Gearbox rotational inertia [kg*m^2] +0.06 +c Auxiliaries base power demand (normalized) [-] +0 +c Engine rated power [kW] +72 +c Engine rated speed [rpm] +5565 +c Engine idling speed [rpm] +798 +c --- +0 +c Rolling resistance coefficients +c Fr0 +0.009 +c Fr1 +5E-05 +c Fr2 +0 +c Fr3 +0 +c Fr4 +1.6E-09 +c --- +0 +c Transmission loss factor +0.3 +c Transmission +c Axle ratio [-] +4.0826, +c Wheel effective diameter [m] +0.6064 +c Transmission gears: Ratio [-], path to efficiency map filefc (optional) +c Gear 1 +3.6298, +c Gear 2 +2.0523, +c Gear 3 +1.3801, +c Gear 4 +1.0477, +c Gear 5 +0.8423, +c Gear 6 +0, +c Gear 7 +0, +c Gear 8 +0, +c Gear 9 +0, +c Gear 10 +0, +c Gear 11 +0, +c Gear 12 +0, +c Gear 13 +0, +c Gear 14 +0, +c Gear 15 +0, +c Gear 16 +0, +c Gear shift behaviour: +c Gearshift model (Version fast driver) +c shift up at ratio rpm/rated rpm in actual gear greater than +0.768717 +c shift down when rpm/rated rpm in lower gear is higher than +0.5802642 +c Gearshift model (Version economic driver) +c shift up at ratio rpm/rated rpm in higher gear greater than +0.5288679 +c Shift down when ratio rpm/rated rpm in actual gear is lower than +0.4860377 +c Share of version economic driver (0 to 1) +0 +c Share of version mixed model (0 to 1) +1 +cVehiclemasstypeforPHEMlight +LV +cFueltypeforPHEMlight +G +c P_n_max_v0 +5 +c P_n_max_p0 +0.15 +c P_n_max_v1 +40 +c P_n_max_p1 +0.8 +c vehicle speed [km/h] (converted to m/s after read-in), gear ratio [-], rotational mass factor [-] +0,3.6298,2.008095 +12.31168,3.6298,2.008095 +29.96561,2.0523,1.316293 +44.09933,1.3801,1.145397 +69.54142,1.0477,1.077003 +103.4718,0.8423,1.053688 +250,0.8423,1.053688 +c n_norm, pe_drag _norm +0,-0.012 +0.071,-0.017 +0.128,-0.022 +0.186,-0.026 +0.244,-0.03 +0.302,-0.034 +0.419,-0.043 +0.535,-0.052 +0.651,-0.06 +0.768,-0.069 +0.884,-0.078 +1,-0.086 +1.117,-0.095 +1.233,-0.103 +1.349,-0.112 diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/typemap/navteqPolyconvert.typ.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/typemap/navteqPolyconvert.typ.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/typemap/navteqPolyconvert.typ.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/typemap/navteqPolyconvert.typ.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/typemap/osmNetconvertPedestrians.typ.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/typemap/osmNetconvertPedestrians.typ.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/typemap/osmNetconvertPedestrians.typ.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/typemap/osmNetconvertPedestrians.typ.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + /> + /> + /> + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/typemap/osmNetconvertShips.typ.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/typemap/osmNetconvertShips.typ.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/typemap/osmNetconvertShips.typ.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/typemap/osmNetconvertShips.typ.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,4 @@ + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/typemap/osmNetconvert.typ.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/typemap/osmNetconvert.typ.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/typemap/osmNetconvert.typ.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/typemap/osmNetconvert.typ.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/typemap/osmNetconvertUrbanDe.typ.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/typemap/osmNetconvertUrbanDe.typ.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/typemap/osmNetconvertUrbanDe.typ.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/typemap/osmNetconvertUrbanDe.typ.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/typemap/osmPolyconvert.typ.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/typemap/osmPolyconvert.typ.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/typemap/osmPolyconvert.typ.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/typemap/osmPolyconvert.typ.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/typemap/visumPolyconvert.typ.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/typemap/visumPolyconvert.typ.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/typemap/visumPolyconvert.typ.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/typemap/visumPolyconvert.typ.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/activitygenConfiguration.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/activitygenConfiguration.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/activitygenConfiguration.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/activitygenConfiguration.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/additional_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/additional_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/additional_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/additional_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,316 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/amitran/linkdata.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/amitran/linkdata.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/amitran/linkdata.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/amitran/linkdata.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/amitran/network.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/amitran/network.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/amitran/network.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/amitran/network.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/amitran/od.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/amitran/od.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/amitran/od.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/amitran/od.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/amitran/routes.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/amitran/routes.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/amitran/routes.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/amitran/routes.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/amitran/trajectories.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/amitran/trajectories.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/amitran/trajectories.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/amitran/trajectories.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/baseTypes.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/baseTypes.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/baseTypes.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/baseTypes.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,217 @@ + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/connections_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/connections_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/connections_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/connections_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/det_e1_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/det_e1_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/det_e1_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/det_e1_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/det_e2_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/det_e2_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/det_e2_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/det_e2_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/dfrouterConfiguration.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/dfrouterConfiguration.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/dfrouterConfiguration.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/dfrouterConfiguration.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/duarouterConfiguration.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/duarouterConfiguration.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/duarouterConfiguration.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/duarouterConfiguration.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/edgediff_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/edgediff_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/edgediff_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/edgediff_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/edges_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/edges_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/edges_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/edges_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/emission_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/emission_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/emission_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/emission_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/fcd_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/fcd_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/fcd_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/fcd_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/full_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/full_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/full_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/full_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/jtrrouterConfiguration.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/jtrrouterConfiguration.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/jtrrouterConfiguration.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/jtrrouterConfiguration.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/marouterConfiguration.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/marouterConfiguration.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/marouterConfiguration.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/marouterConfiguration.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/meandata_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/meandata_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/meandata_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/meandata_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/meandataTypes.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/meandataTypes.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/meandataTypes.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/meandataTypes.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/netconvertConfiguration.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/netconvertConfiguration.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/netconvertConfiguration.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/netconvertConfiguration.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/net_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/net_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/net_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/net_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/netgenerateConfiguration.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/netgenerateConfiguration.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/netgenerateConfiguration.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/netgenerateConfiguration.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/netstate_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/netstate_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/netstate_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/netstate_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/nodes_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/nodes_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/nodes_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/nodes_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/od2tripsConfiguration.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/od2tripsConfiguration.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/od2tripsConfiguration.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/od2tripsConfiguration.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/polyconvertConfiguration.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/polyconvertConfiguration.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/polyconvertConfiguration.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/polyconvertConfiguration.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/queue_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/queue_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/queue_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/queue_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/routes_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/routes_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/routes_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/routes_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/routeTypes.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/routeTypes.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/routeTypes.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/routeTypes.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,477 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/summary_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/summary_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/summary_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/summary_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/sumoConfiguration.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/sumoConfiguration.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/sumoConfiguration.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/sumoConfiguration.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/taz_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/taz_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/taz_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/taz_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/tllogic_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/tllogic_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/tllogic_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/tllogic_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/tripinfo_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/tripinfo_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/tripinfo_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/tripinfo_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/turns_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/turns_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/turns_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/turns_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/types_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/types_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/types_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/types_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/vtypeprobe_file.xsd sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/vtypeprobe_file.xsd --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/data/xsd/vtypeprobe_file.xsd 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/data/xsd/vtypeprobe_file.xsd 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/debian/bzr-builder.manifest sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/debian/bzr-builder.manifest --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/debian/bzr-builder.manifest 2014-03-16 09:53:43.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/debian/bzr-builder.manifest 2015-04-17 00:20:33.000000000 +0000 @@ -1,3 +1,3 @@ -# bzr-builder format 0.3 deb-version {debupstream}+1+8 -lp:~sumo/+junk/sumo revid:gladky.anton@gmail.com-20131118194509-clgze9kc0z346z02 -nest packaging lp:~sumo/+junk/sumo-debian debian revid:gladky.anton@gmail.com-20140316073028-zprkahp1swz2uo4u +# bzr-builder format 0.3 deb-version {debupstream}+5+10 +lp:~sumo/+junk/sumo revid:gladky.anton@gmail.com-20150416212722-pkbewc5vub8jj3zl +nest packaging lp:~sumo/+junk/sumo-debian debian revid:gladky.anton@gmail.com-20150416214646-d8p16f9v635t5hhp diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/debian/changelog sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/debian/changelog --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/debian/changelog 2014-03-16 09:53:43.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/debian/changelog 2015-04-17 00:20:33.000000000 +0000 @@ -1,10 +1,10 @@ -sumo (0.20.0+dfsg+1+8~ubuntu12.04.1) precise; urgency=low +sumo (0.23.0+dfsg+5+10~ubuntu12.04.1) precise; urgency=low * Auto build. - -- Anton Gladky Sun, 16 Mar 2014 09:53:43 +0000 + -- Anton Gladky Fri, 17 Apr 2015 00:20:33 +0000 -sumo (0.20.0+dfsg-1) unstable; urgency=medium +sumo (0.23.0+dfsg-1) unstable; urgency=medium * [83c56d0] Remove debian/README.source * [fd5408c] Imported Upstream version 0.20.0+dfsg diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/dfrouter/dfrouter.dfrocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/dfrouter/dfrouter.dfrocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/dfrouter/dfrouter.dfrocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/dfrouter/dfrouter.dfrocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -22,4 +22,8 @@ + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/dfrouter/input_tri.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/dfrouter/input_tri.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/dfrouter/input_tri.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/dfrouter/input_tri.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + - + - + - + - + - + - + - + - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes/flows2routes.duarcfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes/flows2routes.duarcfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes/flows2routes.duarcfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes/flows2routes.duarcfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes/input_net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes/input_net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes/input_net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes/input_net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + - - + + - + - - + + - + - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval/flows2routes_100s_interval.duarcfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval/flows2routes_100s_interval.duarcfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval/flows2routes_100s_interval.duarcfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval/flows2routes_100s_interval.duarcfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval/input_net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval/input_net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval/input_net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval/input_net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + - - + + - + - - + + - + - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval_ext/flows2routes_100s_interval_ext.duarcfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval_ext/flows2routes_100s_interval_ext.duarcfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval_ext/flows2routes_100s_interval_ext.duarcfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval_ext/flows2routes_100s_interval_ext.duarcfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval_ext/input_net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval_ext/input_net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval_ext/input_net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes_100s_interval_ext/input_net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + - - + + - + - - + + - + - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes_200s_interval/flows2routes_200s_interval.duarcfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes_200s_interval/flows2routes_200s_interval.duarcfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes_200s_interval/flows2routes_200s_interval.duarcfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes_200s_interval/flows2routes_200s_interval.duarcfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes_200s_interval/input_net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes_200s_interval/input_net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/flows2routes_200s_interval/input_net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/flows2routes_200s_interval/input_net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + - - + + - + - - + + - + - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/trips2routes/input_net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/trips2routes/input_net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/trips2routes/input_net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/trips2routes/input_net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + - - + + - + - - + + - + - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/trips2routes/trips2routes.duarcfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/trips2routes/trips2routes.duarcfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/duarouter/trips2routes/trips2routes.duarcfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/duarouter/trips2routes/trips2routes.duarcfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/jtrrouter/straight_only_sinks/input_net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/jtrrouter/straight_only_sinks/input_net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/jtrrouter/straight_only_sinks/input_net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/jtrrouter/straight_only_sinks/input_net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/jtrrouter/straight_only_sinks/straight_only_sinks.jtrrcfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/jtrrouter/straight_only_sinks/straight_only_sinks.jtrrcfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/jtrrouter/straight_only_sinks/straight_only_sinks.jtrrcfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/jtrrouter/straight_only_sinks/straight_only_sinks.jtrrcfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -18,6 +18,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/jtrrouter/turns/input_net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/jtrrouter/turns/input_net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/jtrrouter/turns/input_net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/jtrrouter/turns/input_net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/jtrrouter/turns/input_turns.turns.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/jtrrouter/turns/input_turns.turns.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/jtrrouter/turns/input_turns.turns.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/jtrrouter/turns/input_turns.turns.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/jtrrouter/turns/turns.jtrrcfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/jtrrouter/turns/turns.jtrrcfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/jtrrouter/turns/turns.jtrrcfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/jtrrouter/turns/turns.jtrrcfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -18,6 +18,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/cross3l_edge2edge_conns.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/cross3l_edge2edge_conns.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/cross3l_edge2edge_conns.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/cross3l_edge2edge_conns.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -16,4 +16,8 @@ + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/input_connections.con.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/input_connections.con.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/input_connections.con.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/input_connections.con.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/input_edges.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/input_edges.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/input_edges.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/input_edges.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/input_nodes.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/input_nodes.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/input_nodes.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_edge2edge_conns/input_nodes.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/cross3l_lane2lane_conns.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/cross3l_lane2lane_conns.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/cross3l_lane2lane_conns.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/cross3l_lane2lane_conns.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -16,4 +16,8 @@ + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/input_connections.con.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/input_connections.con.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/input_connections.con.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/input_connections.con.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/input_edges.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/input_edges.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/input_edges.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/input_edges.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/input_nodes.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/input_nodes.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/input_nodes.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_lane2lane_conns/input_nodes.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_no_turnarounds/cross3l_no_turnarounds.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_no_turnarounds/cross3l_no_turnarounds.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_no_turnarounds/cross3l_no_turnarounds.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_no_turnarounds/cross3l_no_turnarounds.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -16,4 +16,8 @@ + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_no_turnarounds/input_edges.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_no_turnarounds/input_edges.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_no_turnarounds/input_edges.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_no_turnarounds/input_edges.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_no_turnarounds/input_nodes.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_no_turnarounds/input_nodes.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_no_turnarounds/input_nodes.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_no_turnarounds/input_nodes.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/cross3l_prohibitions.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/cross3l_prohibitions.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/cross3l_prohibitions.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/cross3l_prohibitions.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -16,4 +16,8 @@ + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/input_connections.con.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/input_connections.con.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/input_connections.con.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/input_connections.con.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/input_edges.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/input_edges.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/input_edges.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/input_edges.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/input_nodes.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/input_nodes.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/input_nodes.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_prohibitions/input_nodes.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_unconstrained/cross3l_unconstrained.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_unconstrained/cross3l_unconstrained.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_unconstrained/cross3l_unconstrained.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_unconstrained/cross3l_unconstrained.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -15,4 +15,8 @@ + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_unconstrained/input_edges.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_unconstrained/input_edges.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_unconstrained/input_edges.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_unconstrained/input_edges.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_unconstrained/input_nodes.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_unconstrained/input_nodes.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_unconstrained/input_nodes.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/connections/cross3l_unconstrained/input_nodes.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/dlr-testtrack.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/dlr-testtrack.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/dlr-testtrack.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/dlr-testtrack.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -16,4 +16,8 @@ + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/input_connections.con.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/input_connections.con.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/input_connections.con.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/input_connections.con.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/input_edges.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/input_edges.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/input_edges.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/input_edges.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/input_nodes.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/input_nodes.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/input_nodes.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/dlr-testtrack/input_nodes.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/hokkaido/hokkaido.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/hokkaido/hokkaido.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/hokkaido/hokkaido.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/hokkaido/hokkaido.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -16,4 +16,8 @@ + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/hokkaido/input_edges.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/hokkaido/input_edges.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/hokkaido/input_edges.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/hokkaido/input_edges.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/hokkaido/input_nodes.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/hokkaido/input_nodes.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/hokkaido/input_nodes.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/hokkaido/input_nodes.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/OSM/adlershof_dlr/adlershof_dlr.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/OSM/adlershof_dlr/adlershof_dlr.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/OSM/adlershof_dlr/adlershof_dlr.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/OSM/adlershof_dlr/adlershof_dlr.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -23,6 +23,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/cross_notypes_kmh.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/cross_notypes_kmh.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/cross_notypes_kmh.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/cross_notypes_kmh.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -15,4 +15,8 @@ + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/input_edges.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/input_edges.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/input_edges.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/input_edges.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/input_nodes.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/input_nodes.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/input_nodes.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/input_nodes.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/input_types.typ.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/input_types.typ.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/input_types.typ.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_notypes_kmh/input_types.typ.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/cross_usingtypes_kmh.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/cross_usingtypes_kmh.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/cross_usingtypes_kmh.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/cross_usingtypes_kmh.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -16,4 +16,8 @@ + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/input_edges.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/input_edges.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/input_edges.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/input_edges.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/input_nodes.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/input_nodes.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/input_nodes.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/input_nodes.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/input_types.typ.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/input_types.typ.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/input_types.typ.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/speed_in_kmh/cross_usingtypes_kmh/input_types.typ.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/cross_notypes.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/cross_notypes.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/cross_notypes.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/cross_notypes.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -11,4 +11,8 @@ + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/input_edges.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/input_edges.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/input_edges.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/input_edges.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/input_nodes.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/input_nodes.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/input_nodes.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/input_nodes.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/input_types.typ.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/input_types.typ.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/input_types.typ.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_notypes/input_types.typ.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/cross_usingtypes.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/cross_usingtypes.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/cross_usingtypes.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/cross_usingtypes.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,4 +12,8 @@ + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/input_edges.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/input_edges.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/input_edges.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/input_edges.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/input_nodes.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/input_nodes.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/input_nodes.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/input_nodes.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/input_types.typ.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/input_types.typ.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/input_types.typ.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/netconvert/types/cross_usingtypes/input_types.typ.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/busses/busses.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/busses/busses.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/busses/busses.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/busses/busses.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/busses/input_additional.add.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/busses/input_additional.add.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/busses/input_additional.add.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/busses/input_additional.add.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,9 @@ - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/busses/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/busses/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/busses/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/busses/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/busses/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/busses/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/busses/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/busses/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,9 @@ - - + @@ -56,12 +56,12 @@ - - - + + + @@ -71,12 +71,12 @@ - - - + + + @@ -116,12 +116,12 @@ - - - + + + @@ -143,12 +143,12 @@ - - - + + + @@ -161,12 +161,12 @@ - - - + + + @@ -179,12 +179,12 @@ - - - + + + @@ -197,12 +197,12 @@ - - - + + + @@ -215,12 +215,12 @@ - - - + + + @@ -230,12 +230,12 @@ - - - + + + @@ -245,12 +245,12 @@ - - - + + + @@ -302,12 +302,12 @@ - - - + + + @@ -317,12 +317,12 @@ - - - + + + @@ -679,108 +679,108 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/hokkaido/hokkaido.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/hokkaido/hokkaido.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/hokkaido/hokkaido.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/hokkaido/hokkaido.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -13,6 +13,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/hokkaido/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/hokkaido/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/hokkaido/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/hokkaido/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/hokkaido/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/hokkaido/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/hokkaido/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/hokkaido/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_emission/cross3ltl_emission.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_emission/cross3ltl_emission.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_emission/cross3ltl_emission.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_emission/cross3ltl_emission.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_emission/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_emission/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_emission/input_routes.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_emission/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,11 @@ + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_emission/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_emission/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_emission/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_emission/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_fcd/cross3ltl_fcd.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_fcd/cross3ltl_fcd.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_fcd/cross3ltl_fcd.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_fcd/cross3ltl_fcd.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_fcd/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_fcd/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_fcd/input_routes.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_fcd/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,11 @@ + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_fcd/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_fcd/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_fcd/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_fcd/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_full/cross3ltl_full.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_full/cross3ltl_full.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_full/cross3ltl_full.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_full/cross3ltl_full.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_full/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_full/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_full/input_routes.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_full/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,11 @@ + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_full/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_full/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_full/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_full/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_inductloops/cross3ltl_inductloops.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_inductloops/cross3ltl_inductloops.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_inductloops/cross3ltl_inductloops.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_inductloops/cross3ltl_inductloops.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -14,6 +14,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_inductloops/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_inductloops/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_inductloops/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_inductloops/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,11 @@ - - - - - - + + + - - + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_inductloops/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_inductloops/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_inductloops/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_inductloops/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + @@ -34,12 +34,12 @@ - - - + + + @@ -52,12 +52,12 @@ - - - + + + @@ -70,12 +70,12 @@ - - - + + + @@ -88,12 +88,12 @@ - - - + + + @@ -110,40 +110,24 @@ - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + @@ -232,22 +216,22 @@ - + - + - + - + @@ -263,32 +247,32 @@ - - + + - - + + - - + + - - + + @@ -297,43 +281,43 @@ - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/cross3ltl_meandata_constrained.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/cross3ltl_meandata_constrained.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/cross3ltl_meandata_constrained.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/cross3ltl_meandata_constrained.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -14,6 +14,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/input_additional.add.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/input_additional.add.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/input_additional.add.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/input_additional.add.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + @@ -15,4 +15,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,11 @@ - - - - - - + + + - - + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_constrained/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + @@ -34,12 +34,12 @@ - - - + + + @@ -52,12 +52,12 @@ - - - + + + @@ -70,12 +70,12 @@ - - - + + + @@ -88,12 +88,12 @@ - - - + + + @@ -110,40 +110,24 @@ - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + @@ -232,22 +216,22 @@ - + - + - + - + @@ -263,32 +247,32 @@ - - + + - - + + - - + + - - + + @@ -297,43 +281,43 @@ - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/cross3ltl_meandata_edges.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/cross3ltl_meandata_edges.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/cross3ltl_meandata_edges.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/cross3ltl_meandata_edges.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -14,6 +14,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/input_additional.add.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/input_additional.add.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/input_additional.add.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/input_additional.add.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,7 +1,7 @@ - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,11 @@ - - - - - - + + + - - + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_edges/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + @@ -34,12 +34,12 @@ - - - + + + @@ -52,12 +52,12 @@ - - - + + + @@ -70,12 +70,12 @@ - - - + + + @@ -88,12 +88,12 @@ - - - + + + @@ -110,40 +110,24 @@ - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + @@ -232,22 +216,22 @@ - + - + - + - + @@ -263,32 +247,32 @@ - - + + - - + + - - + + - - + + @@ -297,43 +281,43 @@ - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/cross3ltl_meandata_lanes.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/cross3ltl_meandata_lanes.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/cross3ltl_meandata_lanes.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/cross3ltl_meandata_lanes.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -14,6 +14,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/input_additional.add.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/input_additional.add.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/input_additional.add.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/input_additional.add.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,7 +1,7 @@ - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,11 @@ - - - - - - + + + - - + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_meandata_lanes/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + @@ -34,12 +34,12 @@ - - - + + + @@ -52,12 +52,12 @@ - - - + + + @@ -70,12 +70,12 @@ - - - + + + @@ -88,12 +88,12 @@ - - - + + + @@ -110,40 +110,24 @@ - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + @@ -232,22 +216,22 @@ - + - + - + - + @@ -263,32 +247,32 @@ - - + + - - + + - - + + - - + + @@ -297,43 +281,43 @@ - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_queue/cross3ltl_queue.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_queue/cross3ltl_queue.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_queue/cross3ltl_queue.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_queue/cross3ltl_queue.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_queue/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_queue/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_queue/input_routes.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_queue/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,11 @@ + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_queue/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_queue/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_queue/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_queue/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_rawdump/cross3ltl_rawdump.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_rawdump/cross3ltl_rawdump.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_rawdump/cross3ltl_rawdump.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_rawdump/cross3ltl_rawdump.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -17,6 +17,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_rawdump/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_rawdump/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_rawdump/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_rawdump/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,11 @@ - - - - - - + + + - - + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_rawdump/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_rawdump/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_rawdump/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_rawdump/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + @@ -34,12 +34,12 @@ - - - + + + @@ -52,12 +52,12 @@ - - - + + + @@ -70,12 +70,12 @@ - - - + + + @@ -88,12 +88,12 @@ - - - + + + @@ -110,40 +110,24 @@ - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + @@ -232,22 +216,22 @@ - + - + - + - + @@ -263,32 +247,32 @@ - - + + - - + + - - + + - - + + @@ -297,43 +281,43 @@ - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_summary/cross3ltl_summary.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_summary/cross3ltl_summary.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_summary/cross3ltl_summary.sumocfg 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_summary/cross3ltl_summary.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_summary/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_summary/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_summary/input_routes.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_summary/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,11 @@ + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_summary/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_summary/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_summary/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_summary/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_tripinfo/cross3ltl_tripinfo.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_tripinfo/cross3ltl_tripinfo.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_tripinfo/cross3ltl_tripinfo.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_tripinfo/cross3ltl_tripinfo.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -17,6 +17,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_tripinfo/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_tripinfo/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_tripinfo/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_tripinfo/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,11 @@ - - - - - - + + + - - + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_tripinfo/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_tripinfo/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_tripinfo/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_tripinfo/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + @@ -34,12 +34,12 @@ - - - + + + @@ -52,12 +52,12 @@ - - - + + + @@ -70,12 +70,12 @@ - - - + + + @@ -88,12 +88,12 @@ - - - + + + @@ -110,40 +110,24 @@ - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + @@ -232,22 +216,22 @@ - + - + - + - + @@ -263,32 +247,32 @@ - - + + - - + + - - + + - - + + @@ -297,43 +281,43 @@ - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vehroutes/cross3ltl_vehroutes.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vehroutes/cross3ltl_vehroutes.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vehroutes/cross3ltl_vehroutes.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vehroutes/cross3ltl_vehroutes.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -17,6 +17,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vehroutes/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vehroutes/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vehroutes/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vehroutes/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,11 @@ - - - - - - + + + - - + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vehroutes/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vehroutes/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vehroutes/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vehroutes/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + @@ -34,12 +34,12 @@ - - - + + + @@ -52,12 +52,12 @@ - - - + + + @@ -70,12 +70,12 @@ - - - + + + @@ -88,12 +88,12 @@ - - - + + + @@ -110,40 +110,24 @@ - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + @@ -232,22 +216,22 @@ - + - + - + - + @@ -263,32 +247,32 @@ - - + + - - + + - - + + - - + + @@ -297,43 +281,43 @@ - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/cross3ltl_vtypeprobe.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/cross3ltl_vtypeprobe.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/cross3ltl_vtypeprobe.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/cross3ltl_vtypeprobe.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -14,6 +14,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/input_additional.add.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/input_additional.add.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/input_additional.add.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/input_additional.add.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,11 @@ - - - - - - + + + - - + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/output/cross3ltl_vtypeprobe/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + @@ -34,12 +34,12 @@ - - - + + + @@ -52,12 +52,12 @@ - - - + + + @@ -70,12 +70,12 @@ - - - + + + @@ -88,12 +88,12 @@ - - - + + + @@ -110,40 +110,24 @@ - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + @@ -232,22 +216,22 @@ - + - + - + - + @@ -263,32 +247,32 @@ - - + + - - + + - - + + - - + + @@ -297,43 +281,43 @@ - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box1l/box1l.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box1l/box1l.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box1l/box1l.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box1l/box1l.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box1l/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box1l/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box1l/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box1l/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box1l/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box1l/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box1l/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box1l/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box2l/box2l.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box2l/box2l.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box2l/box2l.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box2l/box2l.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box2l/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box2l/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box2l/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box2l/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box2l/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box2l/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box2l/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box2l/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + - - - - + + - - - - + + - - - - + + - - - - + + @@ -67,39 +59,39 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box3l/box3l.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box3l/box3l.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box3l/box3l.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box3l/box3l.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box3l/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box3l/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box3l/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box3l/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box3l/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box3l/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box3l/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box3l/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + @@ -83,51 +67,51 @@ - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box4l/box4l.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box4l/box4l.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box4l/box4l.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box4l/box4l.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box4l/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box4l/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box4l/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box4l/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box4l/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box4l/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box4l/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/box/box4l/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + - - - - - - - - - - + + + + - - - - - - - - - - + + + + - - - - - - - - - - + + + + - - - - - - - - - - + + + + @@ -99,25 +75,25 @@ - + - + - + - + @@ -125,37 +101,37 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1l/cross1l.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1l/cross1l.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1l/cross1l.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1l/cross1l.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -13,6 +13,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1l/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1l/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1l/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1l/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1l/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1l/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1l/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1l/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + @@ -34,12 +34,12 @@ - - - + + + @@ -64,12 +64,12 @@ - - - + + + @@ -182,9 +182,9 @@ - + - + @@ -192,9 +192,9 @@ - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1ltl/cross1ltl.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1ltl/cross1ltl.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1ltl/cross1ltl.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1ltl/cross1ltl.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1ltl/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1ltl/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1ltl/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1ltl/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1ltl/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1ltl/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1ltl/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross1ltl/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + @@ -34,12 +34,12 @@ - - - + + + @@ -52,12 +52,12 @@ - - - + + + @@ -70,12 +70,12 @@ - - - + + + @@ -88,12 +88,12 @@ - - - + + + @@ -209,27 +209,27 @@ - + - + - + - + - + - + - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3l/cross3l.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3l/cross3l.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3l/cross3l.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3l/cross3l.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3l/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3l/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3l/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3l/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3l/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3l/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3l/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3l/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + @@ -34,12 +34,12 @@ - - - + + + @@ -64,12 +64,12 @@ - - - + + + @@ -98,40 +98,24 @@ - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + @@ -209,22 +193,22 @@ - + - + - + - + @@ -236,32 +220,32 @@ - - + + - - + + - - + + - - + + @@ -270,9 +254,9 @@ - + - + @@ -280,9 +264,9 @@ - + - + @@ -293,16 +277,16 @@ - - + + - - + + - - + + - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3ltl/cross3ltl.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3ltl/cross3ltl.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3ltl/cross3ltl.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3ltl/cross3ltl.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3ltl/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3ltl/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3ltl/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3ltl/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3ltl/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3ltl/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3ltl/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/simple_nets/cross/cross3ltl/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + @@ -34,12 +34,12 @@ - - - + + + @@ -52,12 +52,12 @@ - - - + + + @@ -70,12 +70,12 @@ - - - + + + @@ -88,12 +88,12 @@ - - - + + + @@ -110,40 +110,24 @@ - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + @@ -232,22 +216,22 @@ - + - + - + - + @@ -263,32 +247,32 @@ - - + + - - + + - - + + - - + + @@ -297,43 +281,43 @@ - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/input_additional2.add.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/input_additional2.add.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/input_additional2.add.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/input_additional2.add.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,3 @@ - - - - - + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/input_additional.add.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/input_additional.add.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/input_additional.add.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/input_additional.add.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,3 +1,3 @@ - + - \ No newline at end of file + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/variable_speed_signs.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/variable_speed_signs.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/variable_speed_signs.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/variable_speed_signs/variable_speed_signs.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -14,6 +14,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/vehicle_stops/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/vehicle_stops/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/vehicle_stops/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/vehicle_stops/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,7 +1,6 @@ - - + + @@ -9,4 +8,4 @@ - \ No newline at end of file + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/vehicle_stops/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/vehicle_stops/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/vehicle_stops/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/vehicle_stops/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/vehicle_stops/vehicle_stops.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/vehicle_stops/vehicle_stops.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/vehicle_stops/vehicle_stops.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/vehicle_stops/vehicle_stops.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/visualization/parade/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/visualization/parade/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/visualization/parade/input_routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/visualization/parade/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,94 +1,82 @@ - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - - + + - + - - + + - + - - + + - - - - - - - - - - - - - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/visualization/parade/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/visualization/parade/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/visualization/parade/net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/visualization/parade/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + @@ -34,12 +34,12 @@ - - - + + + @@ -64,12 +64,12 @@ - - - + + + @@ -182,9 +182,9 @@ - + - + @@ -192,9 +192,9 @@ - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/visualization/parade/parade.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/visualization/parade/parade.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/sumo/visualization/parade/parade.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/sumo/visualization/parade/parade.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -12,6 +12,7 @@ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/dua-iterate/dua-iterate.bat sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/dua-iterate/dua-iterate.bat --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/dua-iterate/dua-iterate.bat 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/dua-iterate/dua-iterate.bat 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1 @@ +%SUMO_HOME%/tools/assign/duaIterate.py -n input_net.net.xml -t input_trips.trips.xml -l 5 \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/dua-iterate/dua-iterate.sh sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/dua-iterate/dua-iterate.sh --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/dua-iterate/dua-iterate.sh 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/dua-iterate/dua-iterate.sh 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1 @@ +$SUMO_HOME/tools/assign/duaIterate.py -n input_net.net.xml -t input_trips.trips.xml -l 5 \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/dua-iterate/input_net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/dua-iterate/input_net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/dua-iterate/input_net.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/dua-iterate/input_net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + - - + + - + - - + + - + - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/dua-iterate/input_trips.trips.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/dua-iterate/input_trips.trips.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/dua-iterate/input_trips.trips.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/dua-iterate/input_trips.trips.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,12 +1,13 @@ - - - - - - - - - - + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/dua-iterate/routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/dua-iterate/routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/dua-iterate/routes.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/dua-iterate/routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/flowrouter/flowrouter.bat sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/flowrouter/flowrouter.bat --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/flowrouter/flowrouter.bat 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/flowrouter/flowrouter.bat 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1 @@ +%SUMO_HOME%/tools/detector/flowrouter.py -n input_net.net.xml -d input_detectors.det.xml -f input_flows.txt \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/flowrouter/flowrouter.sh sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/flowrouter/flowrouter.sh --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/flowrouter/flowrouter.sh 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/flowrouter/flowrouter.sh 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1 @@ +$SUMO_HOME/tools/detector/flowrouter.py -n input_net.net.xml -d input_detectors.det.xml -f input_flows.txt \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/flowrouter/input_detectors.det.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/flowrouter/input_detectors.det.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/flowrouter/input_detectors.det.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/flowrouter/input_detectors.det.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/flowrouter/input_flows.txt sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/flowrouter/input_flows.txt --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/flowrouter/input_flows.txt 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/flowrouter/input_flows.txt 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,36 @@ +Detector;Time;qPKW +1;0;26 +2;0;16 +4;0;15 +6;0;61 +9;0;249 +13;0;49 +15;0;47 +17;0;26 +19;0;212 +21;0;62 +23;0;0 +25;0;204 +28;0;1 +32;0;337 +33;0;69 +34;0;0 +35;0;1 +36;0;303 +39;0;76 +46;0;15 +47;0;97 +48;0;281 +49;0;249 +50;0;119 +51;0;22 +53;0;2 +54;0;0 +57;0;0 +60;0;21 +61;0;5 +62;0;43 +63;0;13 +64;0;56 +65;0;2 +66;0;0 diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/flowrouter/input_net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/flowrouter/input_net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/flowrouter/input_net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/flowrouter/input_net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,381 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/traceExporter/fcd.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/traceExporter/fcd.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/traceExporter/fcd.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/traceExporter/fcd.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,497 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/traceExporter/input_routes.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/traceExporter/input_routes.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/traceExporter/input_routes.rou.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/traceExporter/input_routes.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,9 @@ + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/traceExporter/net.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/traceExporter/net.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/traceExporter/net.net.xml 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/traceExporter/net.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,339 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/traceExporter/traceExporter.bat sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/traceExporter/traceExporter.bat --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/traceExporter/traceExporter.bat 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/traceExporter/traceExporter.bat 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1 @@ +%SUMO_HOME%/tools/traceExporter.py -i fcd.xml -n net.net.xml --ns2mobility-output mobilityfile.tcl \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/traceExporter/traceExporter.sh sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/traceExporter/traceExporter.sh --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/examples/tools/traceExporter/traceExporter.sh 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/examples/tools/traceExporter/traceExporter.sh 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1 @@ +$SUMO_HOME/tools/traceExporter.py -i fcd.xml -n net.net.xml --ns2mobility-output mobilityfile.tcl \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/city_mobil/agentManager.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/city_mobil/agentManager.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/city_mobil/agentManager.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/city_mobil/agentManager.py 2015-04-17 00:20:29.000000000 +0000 @@ -4,26 +4,34 @@ @author Michael Behrisch @author Daniel Krajzewicz @date 2008-10-09 -@version $Id: agentManager.py 11671 2012-01-07 20:14:30Z behrisch $ +@version $Id: agentManager.py 18096 2015-03-17 09:50:59Z behrisch $ Control the CityMobil parking lot with a multi agent system. -SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -Copyright (C) 2008-2012 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import vehicleControl, statistics +import vehicleControl +import statistics from constants import * + class PersonAgent: + def __init__(self, id): self.id = id - + def startRequest(self, source, target, cybers): minCost = INFINITY minCar = None for car in cybers: - cost = car.request(self, source, target) + cost = car.request(self, source, target) if (cost < minCost): if minCar: minCar.reject(self) @@ -33,18 +41,22 @@ car.reject(self) minCar.accept(self) + class Task: + def __init__(self, person, source, target, estCost): self.person = person self.source = source self.target = target self.estCost = estCost self.startStep = None - + def __repr__(self): return "<%s %s %s %s>" % (self.person.id, self.source, self.target, self.startStep) + class CyberAgent: + def __init__(self, id): self.id = id self.load = 0 @@ -55,7 +67,7 @@ self.totalEstimatedCost = 0 self.position = None self.broken = False - + def request(self, person, source, target): if self.broken: estCost = INFINITY @@ -74,7 +86,6 @@ def reject(self, person): del self.pending[person] - def _findNextTarget(self, wait): minTarget = "z" @@ -95,7 +106,7 @@ if task.source < minDownstreamSource and task.source > edge: minDownstreamSource = task.source if minDownstreamTarget != "z": - minTarget = minDownstreamTarget + minTarget = minDownstreamTarget elif minDownstreamSource < minTarget: minTarget = minDownstreamSource elif minTarget < edge and minSource < minTarget: @@ -119,12 +130,13 @@ statistics.personUnloaded(task.person.id, step) self.load -= 1 wait += WAIT_PER_PERSON - self.costMatrix[(task.source, task.target)] = step - task.startStep + self.costMatrix[ + (task.source, task.target)] = step - task.startStep self.totalEstimatedCost -= task.estCost else: running.append(task) self.running = running - if self.load < vehicleControl.getCapacity(): + if self.load < vehicleControl.getCapacity(): tasks = [] for task in self.tasks: if task.source == self.position and self.load < vehicleControl.getCapacity(): @@ -146,6 +158,7 @@ for task in tasks: task.person.startRequest(task.source, task.target, cybers) + class AgentManager(vehicleControl.Manager): def __init__(self): @@ -161,7 +174,7 @@ def cyberCarArrived(self, vehicleID, edge): if vehicleID in self.agents: - cyberCar = self.agents[vehicleID] + cyberCar = self.agents[vehicleID] else: cyberCar = CyberAgent(vehicleID) self.agents[vehicleID] = cyberCar diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/city_mobil/constants.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/city_mobil/constants.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/city_mobil/constants.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/city_mobil/constants.py 2015-04-17 00:20:29.000000000 +0000 @@ -4,22 +4,28 @@ @author Michael Behrisch @author Daniel Krajzewicz @date 2008-07-21 -@version $Id: constants.py 13875 2013-05-03 21:18:53Z behrisch $ +@version $Id: constants.py 18096 2015-03-17 09:50:59Z behrisch $ Defining constants for the CityMobil parking lot. -SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -Copyright (C) 2008-2012 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os, sys +import os +import sys INFINITY = 1e400 PREFIX = "park" DOUBLE_ROWS = 8 ROW_DIST = 35 -STOP_POS = ROW_DIST-12 +STOP_POS = ROW_DIST - 12 SLOTS_PER_ROW = 10 SLOT_WIDTH = 5 SLOT_LENGTH = 9 @@ -34,8 +40,9 @@ OCCUPATION_PROBABILITY = 0.5 BREAK_DELAY = 1200 -PORT = 8813 -SUMO_HOME = os.path.realpath(os.environ.get("SUMO_HOME", os.path.join(os.path.dirname(__file__), "..", "..", "..", ".."))) +PORT = 8883 +SUMO_HOME = os.path.realpath(os.environ.get( + "SUMO_HOME", os.path.join(os.path.dirname(__file__), "..", "..", "..", ".."))) sys.path.append(os.path.join(SUMO_HOME, "tools")) try: from sumolib import checkBinary diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/city_mobil/createNet.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/city_mobil/createNet.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/city_mobil/createNet.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/city_mobil/createNet.py 2015-04-17 00:20:29.000000000 +0000 @@ -5,16 +5,22 @@ @author Michael Behrisch @author Daniel Krajzewicz @date 2008-07-04 -@version $Id: createNet.py 12358 2012-06-04 19:14:57Z behrisch $ +@version $Id: createNet.py 18096 2015-03-17 09:50:59Z behrisch $ Create the XML input files for the generation of the SUMO network of the CityMobil parking lot. -SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -Copyright (C) 2008-2012 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os, random +import os +import random from constants import * occupied = 0 @@ -29,70 +35,90 @@ """ % (CYBER_LENGTH, CYBER_SPEED) -#streets +# streets nodeID = "main-0" -print >> nodes, '' -print >> nodes, '' % nodeID +print >> nodes, '' +print >> nodes, '' % nodeID print >> edges, '' % nodeID for row in range(DOUBLE_ROWS): - nextNodeID = "main%s-%s" % (row, row+1) + nextNodeID = "main%s-%s" % (row, row + 1) if row + 1 == DOUBLE_ROWS: - nextNodeID = "main%s-" % row - x = (row+1) * ROW_DIST - print >> nodes, '' % (nextNodeID, x) - print >> edges, '' % (row, nodeID, nextNodeID) - nodeID = nextNodeID -print >> nodes, '' % (x+100) + nextNodeID = "main%s-" % row + x = (row + 1) * ROW_DIST + print >> nodes, '' % (nextNodeID, x) + print >> edges, '' % ( + row, nodeID, nextNodeID) + nodeID = nextNodeID +print >> nodes, '' % (x + 100) print >> edges, '' % nodeID -roads = ["road-0"] -for row in range(DOUBLE_ROWS-1): - roads.append("road%s-%s" % (row, row+1)) -roads.append("road%s-" % (row+1)) +roads = ["road-0"] +for row in range(DOUBLE_ROWS - 1): + roads.append("road%s-%s" % (row, row + 1)) +roads.append("road%s-" % (row + 1)) for idx, road in enumerate(roads): nodeID = road.replace("road", "main") for slot in range(SLOTS_PER_ROW): partID = "%s-%s" % (road, slot) - print >> nodes, '' % (partID, idx*ROW_DIST, (slot+1)*SLOT_WIDTH) - print >> edges, '' % (partID, nodeID, partID) - print >> edges, '' % (partID, partID, nodeID) + print >> nodes, '' % ( + partID, idx * ROW_DIST, (slot + 1) * SLOT_WIDTH) + print >> edges, '' % ( + partID, nodeID, partID) + print >> edges, '' % ( + partID, partID, nodeID) nodeID = "%st" % partID for row in range(DOUBLE_ROWS): for slot in range(SLOTS_PER_ROW): slotID = "slot%s-%sl" % (row, slot) source = "%s-%st" % (roads[row], slot) - print >> nodes, '' % (slotID, row*ROW_DIST+SLOT_LENGTH, (slot+1)*SLOT_WIDTH) - print >> edges, '' % (slotID, source, slotID) - print >> edges, '' % (slotID, slotID, source) + print >> nodes, '' % ( + slotID, row * ROW_DIST + SLOT_LENGTH, (slot + 1) * SLOT_WIDTH) + print >> edges, '' % ( + slotID, source, slotID) + print >> edges, '' % ( + slotID, slotID, source) slotID = "slot%s-%sr" % (row, slot) - source = "%s-%st" % (roads[row+1], slot) - print >> nodes, '' % (slotID, (row+1)*ROW_DIST-SLOT_LENGTH, (slot+1)*SLOT_WIDTH) - print >> edges, '' % (slotID, source, slotID) - print >> edges, '' % (slotID, slotID, source) -#footpaths -y = (SLOTS_PER_ROW+1) * SLOT_WIDTH + source = "%s-%st" % (roads[row + 1], slot) + print >> nodes, '' % ( + slotID, (row + 1) * ROW_DIST - SLOT_LENGTH, (slot + 1) * SLOT_WIDTH) + print >> edges, '' % ( + slotID, source, slotID) + print >> edges, '' % ( + slotID, slotID, source) +# footpaths +y = (SLOTS_PER_ROW + 1) * SLOT_WIDTH print >> nodes, '' % y print >> edges, '' for row in range(DOUBLE_ROWS): nodeID = "foot%s" % row - x = row * ROW_DIST + ROW_DIST/2 - print >> nodes, '' % (nodeID, x, y) + x = row * ROW_DIST + ROW_DIST / 2 + print >> nodes, '' % (nodeID, x, y) if row > 0: - edgeID = "footmain%sto%s" % (row-1, row) - print >> edges, '' % (edgeID, row-1, row) + edgeID = "footmain%sto%s" % (row - 1, row) + print >> edges, '' % ( + edgeID, row - 1, row) for slot in reversed(range(SLOTS_PER_ROW)): slotID = "foot%s-%s" % (row, slot) - print >> nodes, '' % (slotID, x, (slot+1)*SLOT_WIDTH) - print >> edges, '' % (nodeID, slot, nodeID, slotID) - print >> edges, '' % (nodeID, slot, slotID, nodeID) - print >> nodes, '' % (slotID, x+SLOT_FOOT_LENGTH, (slot+1)*SLOT_WIDTH) - print >> edges, '' % (slotID, slotID, slotID) - print >> edges, '' % (slotID, slotID, slotID) - print >> nodes, '' % (slotID, x-SLOT_FOOT_LENGTH, (slot+1)*SLOT_WIDTH) - print >> edges, '' % (slotID, slotID, slotID) - print >> edges, '' % (slotID, slotID, slotID) + print >> nodes, '' % ( + slotID, x, (slot + 1) * SLOT_WIDTH) + print >> edges, '' % ( + nodeID, slot, nodeID, slotID) + print >> edges, '' % ( + nodeID, slot, slotID, nodeID) + print >> nodes, '' % ( + slotID, x + SLOT_FOOT_LENGTH, (slot + 1) * SLOT_WIDTH) + print >> edges, '' % ( + slotID, slotID, slotID) + print >> edges, '' % ( + slotID, slotID, slotID) + print >> nodes, '' % ( + slotID, x - SLOT_FOOT_LENGTH, (slot + 1) * SLOT_WIDTH) + print >> edges, '' % ( + slotID, slotID, slotID) + print >> edges, '' % ( + slotID, slotID, slotID) nodeID = slotID - vSlot = slotID.replace("foot", "slot") - if random.uniform(0,1) < OCCUPATION_PROBABILITY: + vSlot = slotID.replace("foot", "slot") + if random.uniform(0, 1) < OCCUPATION_PROBABILITY: occupied += 1 print >> routes, """\ @@ -103,7 +129,7 @@ """ % (slotID, CAR_CAPACITY, slotID, slotID) - if random.uniform(0,1) < OCCUPATION_PROBABILITY: + if random.uniform(0, 1) < OCCUPATION_PROBABILITY: occupied += 1 print >> routes, """\ @@ -114,37 +140,42 @@ """ % (slotID, CAR_CAPACITY, slotID, slotID) -x = DOUBLE_ROWS * ROW_DIST + ROW_DIST/2 -print >> nodes, '' % (DOUBLE_ROWS, x, y) -edgeID = "footmain%sto%s" % (DOUBLE_ROWS-1, DOUBLE_ROWS) -print >> edges, '' % (edgeID, DOUBLE_ROWS-1, DOUBLE_ROWS) -print >> nodes, '' % (x+100, y) -print >> edges, '' % DOUBLE_ROWS -print >> nodes, '' % (x+100, y-10) +x = DOUBLE_ROWS * ROW_DIST + ROW_DIST / 2 +print >> nodes, '' % (DOUBLE_ROWS, x, y) +edgeID = "footmain%sto%s" % (DOUBLE_ROWS - 1, DOUBLE_ROWS) +print >> edges, '' % ( + edgeID, DOUBLE_ROWS - 1, DOUBLE_ROWS) +print >> nodes, '' % (x + 100, y) +print >> edges, '' % DOUBLE_ROWS +print >> nodes, '' % (x + 100, y - 10) print >> edges, '' % DOUBLE_ROWS -#cybercar (automated bus) -y = (SLOTS_PER_ROW+3) * SLOT_WIDTH +# cybercar (automated bus) +y = (SLOTS_PER_ROW + 3) * SLOT_WIDTH print >> nodes, '' % y -print >> edges, '' -print >> edges, '' -for row in range(DOUBLE_ROWS+1): +print >> edges, '' +print >> edges, '' +for row in range(DOUBLE_ROWS + 1): nodeID = "cyber%s" % row - x = row * ROW_DIST + ROW_DIST/2 - print >> nodes, '' % (nodeID, x, y) + x = row * ROW_DIST + ROW_DIST / 2 + print >> nodes, '' % (nodeID, x, y) if row > 0: - edgeID = "cyber%sto%s" % (row-1, row) - print >> edges, '' % (edgeID, row-1, row) - print >> edges, '' % (edgeID, row, row-1) + edgeID = "cyber%sto%s" % (row - 1, row) + print >> edges, '' % ( + edgeID, row - 1, row) + print >> edges, '' % ( + edgeID, row, row - 1) if row < DOUBLE_ROWS: - print >> connections, '' % (edgeID, row, row+1) - print >> connections, '' % (row, row+1, edgeID) + print >> connections, '' % ( + edgeID, row, row + 1) + print >> connections, '' % ( + row, row + 1, edgeID) else: print >> connections, '' % edgeID print >> connections, '' % edgeID -print >> nodes, '' % (x+100, y) -print >> edges, '' % row -print >> edges, '' % row +print >> nodes, '' % (x + 100, y) +print >> edges, '' % row +print >> edges, '' % row print >> nodes, "" @@ -154,7 +185,8 @@ print >> connections, "" connections.close() -os.system("%s --no-internal-links -n %s.nod.xml -e %s.edg.xml -x %s.con.xml -o %s.net.xml" % (NETCONVERT, PREFIX, PREFIX, PREFIX, PREFIX)) +os.system("%s --no-internal-links -n %s.nod.xml -e %s.edg.xml -x %s.con.xml -o %s.net.xml" % + (NETCONVERT, PREFIX, PREFIX, PREFIX, PREFIX)) numBusses = TOTAL_CAPACITY / BUS_CAPACITY print >> routes, """ @@ -174,13 +206,15 @@ stops = open("%s.add.xml" % PREFIX, "w") print >> stops, "" for row in range(DOUBLE_ROWS): - edgeID = "cyber%sto%s" % (row, row+1) + edgeID = "cyber%sto%s" % (row, row + 1) print >> stops, ' > stops, 'startPos="%s" endPos="%s"/>' % (STOP_POS-2*CYBER_LENGTH-1, STOP_POS) + print >> stops, 'startPos="%s" endPos="%s"/>' % ( + STOP_POS - 2 * CYBER_LENGTH - 1, STOP_POS) for edge in ["cyberin", "cyberout"]: print >> stops, ' > stops, 'startPos="%s" endPos="%s"/>' % (90-2*CYBER_LENGTH-1, 90) -print >> stops, ' ' + print >> stops, 'startPos="%s" endPos="%s"/>' % ( + 90 - 2 * CYBER_LENGTH - 1, 90) +print >> stops, ' ' print >> stops, "" stops.close() @@ -193,11 +227,11 @@ if occupied < totalSlots: print >> routes, """ - """ % (period, totalSlots-occupied) + """ % (period, totalSlots - occupied) if occupied > 0: print >> routes, """ - """ % (period, occupied*CAR_CAPACITY) + """ % (period, occupied * CAR_CAPACITY) print >> routes, "" routes.close() diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/city_mobil/runner.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/city_mobil/runner.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/city_mobil/runner.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/city_mobil/runner.py 2015-04-17 00:20:29.000000000 +0000 @@ -4,19 +4,27 @@ @author Michael Behrisch @author Daniel Krajzewicz @date 2011-10-28 -@version $Id: runner.py 12898 2012-10-26 08:58:14Z behrisch $ +@version $Id: runner.py 18096 2015-03-17 09:50:59Z behrisch $ This script is a test runner for the CityMobil scenario. -SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -Copyright (C) 2011-2012 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os, sys +import os +import sys import shutil -import vehicleControl, simpleManager, agentManager +import vehicleControl +import simpleManager +import agentManager # build/check network import createNet @@ -24,5 +32,7 @@ vehicleControl.init(simpleManager.SimpleManager(), True) # perform agent scenario vehicleControl.init(agentManager.AgentManager(), True) -try: shutil.copy("all-the-results.txt", "../result2") -except: print "Missing 'all-the-results.txt'" +try: + shutil.copy("all-the-results.txt", "../result2") +except: + print "Missing 'all-the-results.txt'" diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/city_mobil/simpleManager.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/city_mobil/simpleManager.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/city_mobil/simpleManager.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/city_mobil/simpleManager.py 2015-04-17 00:20:29.000000000 +0000 @@ -5,17 +5,24 @@ @author Michael Behrisch @author Daniel Krajzewicz @date 2008-10-09 -@version $Id: simpleManager.py 11671 2012-01-07 20:14:30Z behrisch $ +@version $Id: simpleManager.py 18096 2015-03-17 09:50:59Z behrisch $ Control the CityMobil parking lot with a simple first come first serve approach. -SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -Copyright (C) 2008-2012 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import vehicleControl, statistics +import vehicleControl +import statistics from constants import * + class SimpleManager(vehicleControl.Manager): def __init__(self): @@ -49,8 +56,9 @@ row = -1 else: row = int(edge[5]) - if row < DOUBLE_ROWS-1: - vehicleControl.stopAt(vehicleID, "cyber%sto%s" % (row+1, row+2)) + if row < DOUBLE_ROWS - 1: + vehicleControl.stopAt( + vehicleID, "cyber%sto%s" % (row + 1, row + 2)) else: vehicleControl.stopAt(vehicleID, "cyberout") self.cyberCarLoad[vehicleID] = load diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/city_mobil/statistics.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/city_mobil/statistics.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/city_mobil/statistics.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/city_mobil/statistics.py 2015-04-17 00:20:29.000000000 +0000 @@ -4,18 +4,25 @@ @author Michael Behrisch @author Daniel Krajzewicz @date 2008-10-17 -@version $Id: statistics.py 12898 2012-10-26 08:58:14Z behrisch $ +@version $Id: statistics.py 18096 2015-03-17 09:50:59Z behrisch $ Collecting statistics for the CityMobil parking lot -SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -Copyright (C) 2008-2012 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ persons = {} personsRunning = 0 + class Person: + def __init__(self, id, source, target, step): self.id = id self.source = source @@ -24,22 +31,27 @@ self.depart = None self.arrive = None + def personArrived(personID, edge, target, step): global personsRunning persons[personID] = Person(personID, edge, target, step) personsRunning += 1 + def personLoaded(personID, step): persons[personID].depart = step + def personUnloaded(personID, step): global personsRunning persons[personID].arrive = step personsRunning -= 1 + def evaluate(forTest=False): try: - import numpy, math + import numpy + import math except ImportError: print "No numpy available, skipping statistics" return @@ -47,23 +59,23 @@ routeTimes = {} for person in persons.itervalues(): waitTimes.append(person.depart - person.waitStart) - route = (person.source, person.target) + route = (person.source, person.target) if not route in routeTimes: - routeTimes[route] = [] - routeTimes[route].append(person.arrive - person.depart) + routeTimes[route] = [] + routeTimes[route].append(person.arrive - person.depart) waitArray = numpy.array(waitTimes) if forTest: print "waiting time (max, mean, dev):", waitArray.max() < 1000, waitArray.mean() < 1000, math.sqrt(waitArray.var()) < 100 else: print "waiting time (max, mean, dev):", waitArray.max(), waitArray.mean(), math.sqrt(waitArray.var()) - + for route, times in sorted(routeTimes.iteritems()): timeArray = numpy.array(times) if forTest: print route, timeArray.max() < 1000, timeArray.mean() < 1000, math.sqrt(timeArray.var()) < 100 - else: + else: print route, timeArray.max(), timeArray.mean(), math.sqrt(timeArray.var()) - + co2 = 0. for line in open("aggregated.xml"): if "cyber" in line: @@ -71,10 +83,10 @@ if pos >= 9: endpos = line.find('"', pos) co2 += float(line[pos:endpos]) - + if forTest: print "CO2:", co2 < 10000000 - else: + else: print "CO2:", co2 if __name__ == "__main__": @@ -109,8 +121,10 @@ rdev.append(float(line.split()[-1])) stats.close() figure() - errorbar(demand, simpleWaitMean, simpleWaitDev, lw=2, ms=10, fmt='o', label='standard bus scenario') - errorbar(demand, agentWaitMean, agentWaitDev, lw=2, ms=10, color="red", fmt='o', label='agent controlled cyber cars') + errorbar(demand, simpleWaitMean, simpleWaitDev, lw=2, + ms=10, fmt='o', label='standard bus scenario') + errorbar(demand, agentWaitMean, agentWaitDev, lw=2, ms=10, + color="red", fmt='o', label='agent controlled cyber cars') xlim(0, 50) ylim(0, 3300) xlabel('Repeater interval (s)') @@ -119,8 +133,10 @@ legend(numpoints=1) savefig("waitingtime.png") figure() - errorbar(demand, simpleRouteMean, simpleRouteDev, lw=2, ms=10, fmt='o', label='standard bus scenario') - errorbar(demand, agentRouteMean, agentRouteDev, lw=2, ms=10, color="red", fmt='o', label='agent controlled cyber cars') + errorbar(demand, simpleRouteMean, simpleRouteDev, lw=2, + ms=10, fmt='o', label='standard bus scenario') + errorbar(demand, agentRouteMean, agentRouteDev, lw=2, ms=10, + color="red", fmt='o', label='agent controlled cyber cars') xlim(0, 50) ylim(0, 300) xlabel('Repeater interval (s)') diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/city_mobil/vehicleControl.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/city_mobil/vehicleControl.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/city_mobil/vehicleControl.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/city_mobil/vehicleControl.py 2015-04-17 00:20:29.000000000 +0000 @@ -5,34 +5,48 @@ @author Daniel Krajzewicz @author Lena Kalleske @date 2008-07-21 -@version $Id: vehicleControl.py 13875 2013-05-03 21:18:53Z behrisch $ +@version $Id: vehicleControl.py 18096 2015-03-17 09:50:59Z behrisch $ Control the CityMobil parking lot via TraCI. -SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -Copyright (C) 2008-2012 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import subprocess, random, sys, os +import subprocess +import random +import sys +import os from optparse import OptionParser -from constants import * # sys.path is modified here +from constants import * # sys.path is modified here import traci import traci.constants as tc import statistics + class Manager: + def personArrived(self, vehicleID, edge, target): raise NotImplementedError + def cyberCarArrived(self, vehicleID, edge): raise NotImplementedError + def cyberCarBroken(self, vehicleID, edge): pass + def setNewTargets(self): pass + class Status: def __init__(self, edge, pos): @@ -47,9 +61,10 @@ def __repr__(self): return "%s,%s" % (self.edge, self.pos) + class Setting: step = 0 - manager = None + manager = None verbose = False cyber = False @@ -59,6 +74,7 @@ persons = {} waiting = {} + def init(manager, forTest=False): optParser = OptionParser() optParser.add_option("-v", "--verbose", action="store_true", dest="verbose", @@ -78,7 +94,8 @@ sumoConfig = "%s%02i.sumocfg" % (PREFIX, options.demand) if options.cyber: sumoConfig = "%s%02i_cyber.sumocfg" % (PREFIX, options.demand) - sumoProcess = subprocess.Popen([sumoExe, sumoConfig], stdout=sys.stdout, stderr=sys.stderr) + sumoProcess = subprocess.Popen( + [sumoExe, sumoConfig], stdout=sys.stdout, stderr=sys.stderr) traci.init(PORT) traci.simulation.subscribe() setting.manager = manager @@ -93,17 +110,21 @@ traci.close() sumoProcess.wait() + def getCapacity(): if setting.cyber: return CYBER_CAPACITY return BUS_CAPACITY + def getStep(): return setting.step + def getPosition(vehicleID): return vehicleStatus[vehicleID].edge + def stopAt(vehicleID, edge, pos=None): if pos == None: pos = STOP_POS @@ -118,6 +139,7 @@ vehicleStatus[vehicleID].target = edge vehicleStatus[vehicleID].targetPos = pos + def leaveStop(vehicleID, newTarget=None, delay=0.): v = vehicleStatus[vehicleID] if newTarget: @@ -127,6 +149,7 @@ v.targetPos = None v.parking = False + def _rerouteCar(vehicleID): slotEdge = "" for rowIdx in range(DOUBLE_ROWS): @@ -135,20 +158,23 @@ slotEdge = "slot%s-%s%s" % (rowIdx, idx, dir) if not slotEdge in occupancy: occupancy[slotEdge] = vehicleID - stopAt(vehicleID, slotEdge, SLOT_LENGTH-5.) + stopAt(vehicleID, slotEdge, SLOT_LENGTH - 5.) return + def _reroutePersons(edge): if edge in persons: for person in persons[edge]: if not vehicleStatus[person].slot: row = int(edge[4]) - targetEdge = "footmain%sto%s" % (row, row+1) - traci.vehicle.setStop(person, edge.replace("slot", "-foot"), 1., 0, 0.) + targetEdge = "footmain%sto%s" % (row, row + 1) + traci.vehicle.setStop( + person, edge.replace("slot", "-foot"), 1., 0, 0.) stopAt(person, targetEdge) vehicleStatus[person].parking = False vehicleStatus[person].slot = edge + def _checkInitialPositions(vehicleID, edge, pos): if vehicleID in vehicleStatus: vehicleStatus[vehicleID].edge = edge @@ -162,17 +188,18 @@ elif edge == "footfairin": stopAt(vehicleID, "footmainout") elif "foot" in edge: - traci.vehicle.setStop(vehicleID, "-"+edge) + traci.vehicle.setStop(vehicleID, "-" + edge) parkEdge = edge.replace("foot", "slot") if not parkEdge in persons: persons[parkEdge] = [] persons[parkEdge].append(vehicleID) vehicleStatus[vehicleID].parking = True elif edge.startswith("slot"): - stopAt(vehicleID, edge, SLOT_LENGTH-5.) + stopAt(vehicleID, edge, SLOT_LENGTH - 5.) occupancy[edge] = vehicleID _reroutePersons(edge) + def doStep(): setting.step += 1 if setting.verbose: @@ -180,8 +207,10 @@ traci.simulationStep() moveNodes = [] for veh, subs in traci.vehicle.getSubscriptionResults().iteritems(): - moveNodes.append((veh, subs[tc.VAR_ROAD_ID], subs[tc.VAR_LANEPOSITION])) - departed = traci.simulation.getSubscriptionResults()[tc.VAR_DEPARTED_VEHICLES_IDS] + moveNodes.append( + (veh, subs[tc.VAR_ROAD_ID], subs[tc.VAR_LANEPOSITION])) + departed = traci.simulation.getSubscriptionResults( + )[tc.VAR_DEPARTED_VEHICLES_IDS] for v in departed: traci.vehicle.subscribe(v) subs = traci.vehicle.getSubscriptionResults(v) @@ -195,7 +224,7 @@ target = "footmainout" if edge == "footmainout": row = random.randrange(0, DOUBLE_ROWS) - target = "footmain%sto%s" % (row, row+1) + target = "footmain%sto%s" % (row, row + 1) statistics.personArrived(vehicleID, edge, target, setting.step) setting.manager.personArrived(vehicleID, edge, target) if edge.startswith("cyber"): diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/hello/data/hello.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/hello/data/hello.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/hello/data/hello.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/hello/data/hello.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/hello/data/hello.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/hello/data/hello.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/hello/data/hello.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/hello/data/hello.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/hello/data/hello.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/hello/data/hello.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/hello/data/hello.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/hello/data/hello.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,17 +1,17 @@ - - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/hello/data/hello.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/hello/data/hello.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/hello/data/hello.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/hello/data/hello.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/hello/data/hello.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/hello/data/hello.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/hello/data/hello.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/hello/data/hello.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/hello/data/hello.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/hello/data/hello.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/hello/data/hello.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/hello/data/hello.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/hello/runner.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/hello/runner.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/hello/runner.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/hello/runner.py 2015-04-17 00:20:29.000000000 +0000 @@ -4,34 +4,48 @@ @author Daniel Krajzewicz @author Michael Behrisch @date 2007-10-25 -@version $Id: runner.py 14221 2013-06-27 11:24:18Z behrisch $ +@version $Id: runner.py 18096 2015-03-17 09:50:59Z behrisch $ This script is a test runner for the "Hello SUMO" Tutorial. -SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -Copyright (C) 2008-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os,subprocess,sys,shutil +import os +import subprocess +import sys +import shutil try: - sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', "tools")) # tutorial in tests - sys.path.append(os.path.join(os.environ.get("SUMO_HOME", os.path.join(os.path.dirname(__file__), "..", "..", "..")), "tools")) # tutorial in docs + sys.path.append(os.path.join(os.path.dirname( + __file__), '..', '..', '..', '..', "tools")) # tutorial in tests + sys.path.append(os.path.join(os.environ.get("SUMO_HOME", os.path.join( + os.path.dirname(__file__), "..", "..", "..")), "tools")) # tutorial in docs from sumolib import checkBinary -except ImportError: - sys.exit("please declare environment variable 'SUMO_HOME' as the root directory of your sumo installation (it should contain folders 'bin', 'tools' and 'docs')") +except ImportError: + sys.exit( + "please declare environment variable 'SUMO_HOME' as the root directory of your sumo installation (it should contain folders 'bin', 'tools' and 'docs')") netconvertBinary = checkBinary('netconvert') sumoBinary = checkBinary('sumo') # build/check network -retcode = subprocess.call([netconvertBinary, "-c", "data/hello.netccfg"], stdout=sys.stdout, stderr=sys.stderr) -try: shutil.copy("data/hello.net.xml", "net.net.xml") -except: print "Missing 'hello.net.xml'" +retcode = subprocess.call( + [netconvertBinary, "-c", "data/hello.netccfg"], stdout=sys.stdout, stderr=sys.stderr) +try: + shutil.copy("data/hello.net.xml", "net.net.xml") +except: + print "Missing 'hello.net.xml'" print ">> Netbuilding closed with status %s" % retcode sys.stdout.flush() # run simulation -retcode = subprocess.call([sumoBinary, "-c", "data/hello.sumocfg","--no-step-log"], stdout=sys.stdout, stderr=sys.stderr) +retcode = subprocess.call( + [sumoBinary, "-c", "data/hello.sumocfg", "--no-step-log"], stdout=sys.stdout, stderr=sys.stderr) print ">> Simulation closed with status %s" % retcode sys.stdout.flush() - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/osm_activitygen/eichstaett.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/osm_activitygen/eichstaett.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/osm_activitygen/eichstaett.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/osm_activitygen/eichstaett.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -3,7 +3,7 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.add.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.add.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.add.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.add.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.rou.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.rou.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.rou.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.rou.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.typ.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.typ.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.typ.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/circular.typ.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/output_file.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/output_file.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/output_file.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/output_file.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/output_socket.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/output_socket.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/data/output_socket.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/data/output_socket.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/runner.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/runner.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/output_parsing/runner.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/output_parsing/runner.py 2015-04-17 00:20:29.000000000 +0000 @@ -3,32 +3,46 @@ @file runner.py @author Michael Behrisch @date 2012-12-09 -@version $Id: runner.py 13146 2012-12-10 12:01:07Z behrisch $ +@version $Id: runner.py 18096 2015-03-17 09:50:59Z behrisch $ This script is a test runner for the output_parsing tutorial. -SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -Copyright (C) 2008-2012 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os,subprocess,sys,time +import os +import subprocess +import sys +import time import shutil -sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', "tools")) -sys.path.append(os.path.join(os.environ.get("SUMO_HOME", os.path.join(os.path.dirname(__file__), "..", "..", "..")), "tools")) +sys.path.append( + os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', "tools")) +sys.path.append(os.path.join(os.environ.get("SUMO_HOME", os.path.join( + os.path.dirname(__file__), "..", "..", "..")), "tools")) from sumolib import checkBinary netconvertBinary = checkBinary('netconvert') sumoBinary = checkBinary('sumo') # build/check network -retcode = subprocess.call([netconvertBinary, "-c", "data/circular.netccfg"], stdout=sys.stdout, stderr=sys.stderr) -try: shutil.copy("data/circular.net.xml", "net.net.xml") -except: print "Missing 'circular.net.xml'" +retcode = subprocess.call( + [netconvertBinary, "-c", "data/circular.netccfg"], stdout=sys.stdout, stderr=sys.stderr) +try: + shutil.copy("data/circular.net.xml", "net.net.xml") +except: + print "Missing 'circular.net.xml'" print ">> Netbuilding closed with status %s" % retcode sys.stdout.flush() # run simulation -retcode = subprocess.call([sumoBinary, "-c", "data/output_file.sumocfg","--no-step-log"], stdout=sys.stdout, stderr=sys.stderr) +retcode = subprocess.call( + [sumoBinary, "-c", "data/output_file.sumocfg", "--no-step-log"], stdout=sys.stdout, stderr=sys.stderr) print ">> Simulation closed with status %s" % retcode sys.stdout.flush() diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.con.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.con.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.con.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.con.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,19 +1,19 @@ - - + - - - - - - + + - - - - - - - + + + - - - - - - + + - - - - - - - + + + - - - - + + - - - - - - - + + + - - - - - - - + + + - - - - - - - + + + - + + + - - - - + - - - - + - + - - - - - - - + + + - - - - - - + + - - - - - - - + + + - - - - - - + + - - - - - - - + + + - + + - - - - + - + - - - - - - - + + + - - - - + + - - - - - - - + + + - - - - - - + + - - - + - - - - - - + + - - - + - - - + - - - - - - + + - - - + - - - - - - + + @@ -389,7 +299,7 @@ - + @@ -397,7 +307,7 @@ - + @@ -405,7 +315,7 @@ - + @@ -422,7 +332,7 @@ - + @@ -430,7 +340,7 @@ - + @@ -438,7 +348,7 @@ - + @@ -455,28 +365,28 @@ - + - + - + - + @@ -487,163 +397,163 @@ - - - - - + + + + + - + - + - + - + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - - + + - - + + - - - + + + - + - + - - + + - - + + - - + + - - + + - - - + + + - + - - + + - + - - + + - - + + - + - - + + - + - + - - + + - + - - + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/quickstart/data/quickstart.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/quickstart/runner.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/quickstart/runner.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/quickstart/runner.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/quickstart/runner.py 2015-04-17 00:20:29.000000000 +0000 @@ -4,33 +4,46 @@ @author Daniel Krajzewicz @author Michael Behrisch @date 2011-09-25 -@version $Id: runner.py 11671 2012-01-07 20:14:30Z behrisch $ +@version $Id: runner.py 18096 2015-03-17 09:50:59Z behrisch $ This script is a test runner for the quickstart tutorial. -SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -Copyright (C) 2008-2012 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os,subprocess,sys,time +import os +import subprocess +import sys +import time import shutil -sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', "tools")) -sys.path.append(os.path.join(os.environ.get("SUMO_HOME", os.path.join(os.path.dirname(__file__), "..", "..", "..")), "tools")) +sys.path.append( + os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', "tools")) +sys.path.append(os.path.join(os.environ.get("SUMO_HOME", os.path.join( + os.path.dirname(__file__), "..", "..", "..")), "tools")) from sumolib import checkBinary netconvertBinary = checkBinary('netconvert') sumoBinary = checkBinary('sumo') # build/check network -retcode = subprocess.call([netconvertBinary, "-c", "data/quickstart.netccfg"], stdout=sys.stdout, stderr=sys.stderr) -try: shutil.copy("data/quickstart.net.xml", "net.net.xml") -except: print "Missing 'quickstart.net.xml'" +retcode = subprocess.call( + [netconvertBinary, "-c", "data/quickstart.netccfg"], stdout=sys.stdout, stderr=sys.stderr) +try: + shutil.copy("data/quickstart.net.xml", "net.net.xml") +except: + print "Missing 'quickstart.net.xml'" print ">> Netbuilding closed with status %s" % retcode sys.stdout.flush() # run simulation -retcode = subprocess.call([sumoBinary, "-c", "data/quickstart.sumocfg","--no-step-log"], stdout=sys.stdout, stderr=sys.stderr) +retcode = subprocess.call( + [sumoBinary, "-c", "data/quickstart.sumocfg", "--no-step-log"], stdout=sys.stdout, stderr=sys.stderr) print ">> Simulation closed with status %s" % retcode sys.stdout.flush() - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/analyzeData.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/analyzeData.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/analyzeData.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/analyzeData.py 2015-04-17 00:20:29.000000000 +0000 @@ -1,16 +1,38 @@ +""" +@file analyzeData.py +@author Daniel Krajzewicz +@author Laura Bieker +@date 2011-09-30 +@version $Id: analyzeData.py 18096 2015-03-17 09:50:59Z behrisch $ + + +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. +""" + import sys import os import math import numpy as np + def getAttr(line, which): beg = line.find(which) beg = line.find('"', beg) - end = line.find('"', beg+1) - return line[beg+1:end] + end = line.find('"', beg + 1) + return line[beg + 1:end] # this is from here: http://code.activestate.com/recipes/389639 + + class Ddict(dict): + def __init__(self, default=None): self.default = default @@ -23,104 +45,104 @@ # os.getcwd() # os.chdir() -f = open(sys.argv[1],'r') +f = open(sys.argv[1], 'r') data = f.readlines() f.close() -dd = Ddict( lambda: Ddict( lambda: 0)) +dd = Ddict(lambda: Ddict(lambda: 0)) # f1 = open('raw-results.txt','w') -f1 = open('tmp.txt','w') +f1 = open('tmp.txt', 'w') -for i in range(1,len(data)): - if data[i].find('0: - print >> f1,tt,lane,nn,ll[9],ll[11],ll[13],ll[15] - dd[itt][lane] = nn +for i in range(1, len(data)): + if data[i].find(' 0: + print >> f1, tt, lane, nn, ll[9], ll[11], ll[13], ll[15] + dd[itt][lane] = nn f1.close() maxLanes = 0 dt2OneHour = 6.0 for t in dd.iterkeys(): - if len(dd[t])>maxLanes: - maxLanes = len(dd[t]) - -tVec = np.zeros( len(dd), dtype=int) -QVec = np.zeros( len(dd), dtype=int) -xVec = np.zeros( (len(dd), maxLanes), dtype=float) -qVec = np.zeros( (len(dd), maxLanes), dtype=float) + if len(dd[t]) > maxLanes: + maxLanes = len(dd[t]) + +tVec = np.zeros(len(dd), dtype=int) +QVec = np.zeros(len(dd), dtype=int) +xVec = np.zeros((len(dd), maxLanes), dtype=float) +qVec = np.zeros((len(dd), maxLanes), dtype=float) vecIndx = 0 -f = open('lane-shares.txt','w') -#for t,v in dd.items(): +f = open('lane-shares.txt', 'w') +# for t,v in dd.items(): for t in sorted(dd.iterkeys()): -# qTot = math.fsum(dd[t]) - qTot = sum(dd[t].values()) - nrm = 0.0 - if qTot: - nrm = 1.0/qTot - s = repr(t) + ' ' + repr(qTot) + ' ' - tVec[vecIndx] = t - QVec[vecIndx] = dt2OneHour*qTot - for lane in range(maxLanes): - share = 0.0 - if dd[t].has_key(lane): - share = nrm*dd[t][lane] - s = s + repr(share) + ' ' - xVec[vecIndx,lane] = share - qVec[vecIndx,lane] = dt2OneHour*dd[t][lane] + # qTot = math.fsum(dd[t]) + qTot = sum(dd[t].values()) + nrm = 0.0 + if qTot: + nrm = 1.0 / qTot + s = repr(t) + ' ' + repr(qTot) + ' ' + tVec[vecIndx] = t + QVec[vecIndx] = dt2OneHour * qTot + for lane in range(maxLanes): + share = 0.0 + if dd[t].has_key(lane): + share = nrm * dd[t][lane] + s = s + repr(share) + ' ' + xVec[vecIndx, lane] = share + qVec[vecIndx, lane] = dt2OneHour * dd[t][lane] # print >> f,t,qTot,lane,share - vecIndx += 1 - print >> f, s + vecIndx += 1 + print >> f, s f.close() try: - import matplotlib.pyplot as plt - plt.rcParams['xtick.direction'] = 'out' - plt.rcParams['ytick.direction'] = 'out' -# y = - n = len(qVec) - for lane in range(maxLanes): - desc = 'lane: ' + repr(lane) - plt.plot(tVec, qVec[range(n),lane], label=desc) + import matplotlib.pyplot as plt + plt.rcParams['xtick.direction'] = 'out' + plt.rcParams['ytick.direction'] = 'out' +# y = + n = len(qVec) + for lane in range(maxLanes): + desc = 'lane: ' + repr(lane) + plt.plot(tVec, qVec[range(n), lane], label=desc) # plt.plot(tVec, qVec[range(n),0], 'r-',tVec, qVec[range(n),1], 'g-',tVec, qVec[range(n),2], 'b-') # plt.plot(tVec, QVec, 'r-') - plt.ylabel('lane flows') - plt.xlabel('time [s]') - plt.legend() - bname = 'flows-over-time-' + repr(maxLanes) - plt.savefig(bname+'.eps') - plt.savefig(bname+'.pdf') - plt.savefig(bname+'.png') - plt.savefig(bname+'.svg') + plt.ylabel('lane flows') + plt.xlabel('time [s]') + plt.legend() + bname = 'flows-over-time-' + repr(maxLanes) + plt.savefig(bname + '.eps') + plt.savefig(bname + '.pdf') + plt.savefig(bname + '.png') + plt.savefig(bname + '.svg') # try: # import pyemf # plt.savefig('shares-over-time.emf') # except : -# print '# no emf support' +# print '# no emf support' # plt.show() - plt.close() -# ## next plot: - for lane in range(maxLanes): - desc = 'lane: ' + repr(lane) - plt.plot(QVec, xVec[range(n),lane], 'o', markersize=10, label=desc) + plt.close() +# next plot: + for lane in range(maxLanes): + desc = 'lane: ' + repr(lane) + plt.plot(QVec, xVec[range(n), lane], 'o', markersize=10, label=desc) # plt.plot(tVec, qVec[range(n),0], 'r-',tVec, qVec[range(n),1], 'g-',tVec, qVec[range(n),2], 'b-') # plt.plot(tVec, QVec, 'r-') - plt.ylabel('lane shares') - plt.xlabel('total flow [veh/h]') - plt.legend() - bname = 'shares-vs-flow-' + repr(maxLanes) - plt.savefig(bname+'.eps') - plt.savefig(bname+'.pdf') - plt.savefig(bname+'.png') - plt.savefig(bname+'.svg') + plt.ylabel('lane shares') + plt.xlabel('total flow [veh/h]') + plt.legend() + bname = 'shares-vs-flow-' + repr(maxLanes) + plt.savefig(bname + '.eps') + plt.savefig(bname + '.pdf') + plt.savefig(bname + '.png') + plt.savefig(bname + '.svg') # plt.show() - plt.close() + plt.close() except ImportError: - print 'no matplotlib, falling back to gnuplot' - os.system('gnuplot do-some-plots.gnu') + print 'no matplotlib, falling back to gnuplot' + os.system('gnuplot do-some-plots.gnu') diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/input_det.add.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/input_det.add.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/input_det.add.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/input_det.add.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/input_vss.add.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/input_vss.add.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/input_vss.add.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/input_vss.add.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,3 +1,3 @@ - + \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/spd-road.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/spd-road.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/spd-road.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/san_pablo_dam/data/spd-road.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,4 +1,4 @@ - + @@ -9,7 +9,6 @@ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/san_pablo_dam/runner.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/san_pablo_dam/runner.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/san_pablo_dam/runner.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/san_pablo_dam/runner.py 2015-04-17 00:20:29.000000000 +0000 @@ -4,23 +4,32 @@ @author Daniel Krajzewicz @author Michael Behrisch @date 2007-10-25 -@version $Id: runner.py 13124 2012-12-03 12:42:52Z behrisch $ +@version $Id: runner.py 18096 2015-03-17 09:50:59Z behrisch $ This script is a test runner for the San Pablo Dam scenario. -SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -Copyright (C) 2008-2012 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os,subprocess,sys +import os +import subprocess +import sys import shutil from scipy.optimize import fmin_cobyla -sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', "tools")) +sys.path.append( + os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', "tools")) from sumolib import checkBinary import validate + def buildVSS(obs7file, obs8file, vss): t7Times = validate.readTimes(obs7file) t8Times = validate.readTimes(obs8file) @@ -30,33 +39,38 @@ lObs8 = 337.5 print >> fp, '' for i, t7 in enumerate(t7Times): - v = lObs8/(t8Times[i] - t7) - if i != len(t7Times)-1 and t7 != t7Times[i+1]: + v = lObs8 / (t8Times[i] - t7) + if i != len(t7Times) - 1 and t7 != t7Times[i + 1]: print >> fp, ' ' % (t7, v) print >> fp, '' fp.close() + def genDemand(inputFile, outputFile): t1Times = validate.readTimes(inputFile) fRou = open(outputFile, 'w') fRou.write('\n') fRou.write(' \n') for vehID, t in enumerate(t1Times): - print >> fRou, ' ' % (t, vehID) + print >> fRou, ' ' % ( + t, vehID) print >> fRou, '' fRou.close() -# definition of gof() function to be given to fmin_cobyla() or fmin() +# definition of gof() function to be given to fmin_cobyla() or fmin() + + def gof(p): - para = {'vMax': p[0], 'aMax': p[1], 'bMax': p[2], 'lCar': p[3], 'sigA': p[4], 'tTau': p[5]} + para = {'vMax': p[0], 'aMax': p[1], 'bMax': p[2], + 'lCar': p[3], 'sigA': p[4], 'tTau': p[5]} print '# simulation with:', for k, v in para.items(): - print "%s:%.3f" % (k,v), + print "%s:%.3f" % (k, v), print fType = open('data/input_types.add.xml', 'w') fType.write(('\n \n') % para) + ' length="%(lCar)s" minGap="2.5" maxSpeed="%(vMax)s"' + + ' sigma="%(sigA)s" tau="%(tTau)s" />\n') % para) fType.close() result = validate.validate(checkBinary('sumo')) print '#### yields rmse: %.4f' % result @@ -65,31 +79,41 @@ return result # defining all the constraints -def conVmax(params): # vMax < 25 + + +def conVmax(params): # vMax < 25 return 25.0 - params[0] -def conTtau(params): # tTau > 1.1 + +def conTtau(params): # tTau > 1.1 return params[5] - 1.1 -def conSigA(params): # sigA > 0.1 + +def conSigA(params): # sigA > 0.1 return params[4] - 0.1 -def conSigA2(params): # sigA < 1.0 + +def conSigA2(params): # sigA < 1.0 return 1.0 - params[4] -def conAmax(params): # aMax > 0.1 + +def conAmax(params): # aMax > 0.1 return params[1] - 0.1 netconvertBinary = checkBinary('netconvert') # build/check network -retcode = subprocess.call([netconvertBinary, "-n", "data/spd-road.nod.xml", "-e", "data/spd-road.edg.xml", "-o", "data/spd-road.net.xml","-v"], stdout=sys.stdout, stderr=sys.stderr) -try: shutil.copy("data/spd-road.net.xml", "net.net.xml") -except: print "Missing 'spd-road.net.xml'" +retcode = subprocess.call([netconvertBinary, "-n", "data/spd-road.nod.xml", "-e", + "data/spd-road.edg.xml", "-o", "data/spd-road.net.xml", "-v"], stdout=sys.stdout, stderr=sys.stderr) +try: + shutil.copy("data/spd-road.net.xml", "net.net.xml") +except: + print "Missing 'spd-road.net.xml'" print ">> Netbuilding closed with status %s" % retcode sys.stdout.flush() # build/check vss -buildVSS('data/obstimes_1_7.txt', 'data/obstimes_1_8.txt', 'data/spd-road.vss.xml') +buildVSS('data/obstimes_1_7.txt', + 'data/obstimes_1_8.txt', 'data/spd-road.vss.xml') shutil.copy("data/spd-road.vss.xml", "vss.xml") sys.stdout.flush() genDemand('data/obstimes_1_1.txt', 'data/spd-road.rou.xml') @@ -97,9 +121,10 @@ # perform calibration fpLog = open('results.csv', 'w') params = [22.0, 2.0, 2.0, 5.0, 0.5, 1.5] -# call to (unconstrained) Nelder Mead; does not work correctly, because +# call to (unconstrained) Nelder Mead; does not work correctly, because # method very often stumples over unrealistic input parameters (like tTau<1), # which causes SUMO to behave strangely. # fmin(gof, params) -fmin_cobyla(gof, params, [conVmax, conAmax, conTtau, conSigA, conSigA2], rhoend=1.0e-4) +fmin_cobyla( + gof, params, [conVmax, conAmax, conTtau, conSigA, conSigA2], rhoend=1.0e-4) fpLog.close() diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/san_pablo_dam/validate.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/san_pablo_dam/validate.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/san_pablo_dam/validate.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/san_pablo_dam/validate.py 2015-04-17 00:20:29.000000000 +0000 @@ -1,61 +1,86 @@ -import sys, math, subprocess +""" +@file validate.py +@author Michael Behrisch +@date 2012-01-21 +@version $Id: validate.py 18096 2015-03-17 09:50:59Z behrisch $ + + +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. +""" + +import sys +import math +import subprocess dDay = 1 obsTimes = {} verbose = False - + + def readTimes(obsfile): times = [] for line in open(obsfile): ll = line.split(':') if ll: - times.append(3600*int(ll[0]) + 60*int(ll[1]) + int(float(ll[2]))) + times.append( + 3600 * int(ll[0]) + 60 * int(ll[1]) + int(float(ll[2]))) return times + def parseObsTimes(): - for i in range (0,9): - obsTimes[i] = [] - for i in range(1,8): - if dDay==1 and i==5: + for i in range(0, 9): + obsTimes[i] = [] + for i in range(1, 8): + if dDay == 1 and i == 5: continue - if dDay==2 and i==6: + if dDay == 2 and i == 6: continue obsTimes[i] = readTimes('data/obstimes_%s_%s.txt' % (dDay, i)) # convert obsTimes[][] into travel-times: - for i in range(1,8): + for i in range(1, 8): ni = len(obsTimes[i]) - if ni == len(obsTimes[i+1]) and ni > 100: + if ni == len(obsTimes[i + 1]) and ni > 100: for j in range(ni): - obsTimes[i][j] = obsTimes[i+1][j] - obsTimes[i][j] + obsTimes[i][j] = obsTimes[i + 1][j] - obsTimes[i][j] + def validate(sumoBinary): - retcode = subprocess.call([sumoBinary, "-c", "data/spd-road.sumocfg"], stdout=sys.stdout, stderr=sys.stderr) + retcode = subprocess.call( + [sumoBinary, "-c", "data/spd-road.sumocfg"], stdout=sys.stdout, stderr=sys.stderr) sys.stdout.flush() sys.stderr.flush() # analyzing the results... # read the empirical times simTimes = {} - for i in range (0,9): - simTimes[i] = [] + for i in range(0, 9): + simTimes[i] = [] # read the simulated times - obs2Nr = {'obs1': 1, 'obs2': 2, 'obs3': 3, 'obs4': 4, 'obs5': 5, 'obs6': 6, 'obs7': 7} + obs2Nr = {'obs1': 1, 'obs2': 2, 'obs3': 3, + 'obs4': 4, 'obs5': 5, 'obs6': 6, 'obs7': 7} for line in open('data/detector.xml'): - if line.find(' 0: simTimes[iObs].append(float(ll[1])) # convert simTimes[][] into travel-times: - for i in range(1,8): + for i in range(1, 8): ni = len(simTimes[i]) - if ni == len(simTimes[i+1]) and ni>100: + if ni == len(simTimes[i + 1]) and ni > 100: for j in range(ni): - simTimes[i][j] = simTimes[i+1][j] - simTimes[i][j] + simTimes[i][j] = simTimes[i + 1][j] - simTimes[i][j] # compute final statistics err = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] @@ -63,18 +88,18 @@ errAll = 0.0 cntAll = 0 if verbose: - f = open('data/sumo-obs-error.txt','w') - for i in range(1,7): - if len(obsTimes[i])<=100 or len(obsTimes[i+1])<=100: + f = open('data/sumo-obs-error.txt', 'w') + for i in range(1, 7): + if len(obsTimes[i]) <= 100 or len(obsTimes[i + 1]) <= 100: continue if len(obsTimes[i]) == len(simTimes[i]): tmp = 0.0 for o, s in zip(obsTimes[i], simTimes[i]): d = o - s - tmp += d*d - err[i] = math.sqrt(tmp/len(obsTimes[i])) + tmp += d * d + err[i] = math.sqrt(tmp / len(obsTimes[i])) if verbose: - print >> f, "%s %s" %(i, err[i]) + print >> f, "%s %s" % (i, err[i]) errAll += err[i] cntAll += 1 if verbose: @@ -87,19 +112,19 @@ if verbose: c = open('data/compare-tt.csv', 'w') c.write('# indx;') - for i in range(1,7): - if len(obsTimes[i])>100 and len(obsTimes[i+1])>100: - c.write('obs%s;sim%s;' % (i,i)) + for i in range(1, 7): + if len(obsTimes[i]) > 100 and len(obsTimes[i + 1]) > 100: + c.write('obs%s;sim%s;' % (i, i)) c.write('\n') # then the data, of course on the ones which are useable for line in range(len(simTimes[1])): - c.write(repr(line)+';') - for i in range(1,7): - if len(obsTimes[i])>100 and len(obsTimes[i+1])>100: + c.write(repr(line) + ';') + for i in range(1, 7): + if len(obsTimes[i]) > 100 and len(obsTimes[i + 1]) > 100: ttObs = int(obsTimes[i][line]) ttSim = int(simTimes[i][line]) - c.write(repr(ttObs)+';'+repr(ttSim)+';') + c.write(repr(ttObs) + ';' + repr(ttSim) + ';') c.write('\n') c.close() - return errAll/cntAll + return errAll / cntAll diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.con.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.con.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.con.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.con.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.edg.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.edg.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.edg.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.edg.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.netccfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.netccfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.netccfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.netccfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.net.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.net.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.net.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.net.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,18 +1,18 @@ - - + @@ -261,28 +261,28 @@ - + - + - + - + - + - + - + - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.nod.xml sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.nod.xml --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.nod.xml 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.nod.xml 2015-04-17 00:20:29.000000000 +0000 @@ -1,5 +1,5 @@ - + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.sumocfg sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.sumocfg --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.sumocfg 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/data/cross.sumocfg 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ - + @@ -17,8 +17,4 @@ - - - - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/embedded.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/embedded.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/embedded.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/embedded.py 2015-04-17 00:20:29.000000000 +0000 @@ -4,18 +4,27 @@ @author Lena Kalleske @author Daniel Krajzewicz @author Michael Behrisch +@author Jakob Erdmann @date 2009-03-26 -@version $Id: embedded.py 14233 2013-06-28 12:47:25Z behrisch $ +@version $Id: embedded.py 18096 2015-03-17 09:50:59Z behrisch $ Tutorial for traffic light control via the TraCI interface. -SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -Copyright (C) 2009-2013 DLR/TS, Germany -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2009-2015 DLR/TS, Germany + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os, sys, subprocess -# the embedded python does not add the current dir to the python path, so we need to do it +import os +import sys +import subprocess +# the embedded python does not add the current dir to the python path, so +# we need to do it sys.path.append(os.path.dirname(__file__)) import runner @@ -40,7 +49,6 @@ # call sumo with the request to run this very same script again in the internal interpreter # when this happens, the method traci.isEmbedded() in line 23 will evaluate to true # and then the run method will be called - retCode = subprocess.call([sumoBinary, "-c", "data/cross.sumocfg", - "--remote-port", "0", "--python-script", __file__], + retCode = subprocess.call([sumoBinary, "-c", "data/cross.sumocfg", "--python-script", __file__], stdout=sys.stdout, stderr=sys.stderr) sys.exit(retCode) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/runner.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/runner.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/docs/tutorial/traci_tls/runner.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/docs/tutorial/traci_tls/runner.py 2015-04-17 00:20:29.000000000 +0000 @@ -4,47 +4,59 @@ @author Lena Kalleske @author Daniel Krajzewicz @author Michael Behrisch +@author Jakob Erdmann @date 2009-03-26 -@version $Id: runner.py 14247 2013-07-01 11:56:51Z namdre $ +@version $Id: runner.py 18096 2015-03-17 09:50:59Z behrisch $ Tutorial for traffic light control via the TraCI interface. -SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -Copyright (C) 2009-2012 DLR/TS, Germany -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2009-2015 DLR/TS, Germany + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os, sys +import os +import sys import optparse import subprocess import random # we need to import python modules from the $SUMO_HOME/tools directory try: - sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', "tools")) # tutorial in tests - sys.path.append(os.path.join(os.environ.get("SUMO_HOME", os.path.join(os.path.dirname(__file__), "..", "..", "..")), "tools")) # tutorial in docs + sys.path.append(os.path.join(os.path.dirname( + __file__), '..', '..', '..', '..', "tools")) # tutorial in tests + sys.path.append(os.path.join(os.environ.get("SUMO_HOME", os.path.join( + os.path.dirname(__file__), "..", "..", "..")), "tools")) # tutorial in docs from sumolib import checkBinary except ImportError: - sys.exit("please declare environment variable 'SUMO_HOME' as the root directory of your sumo installation (it should contain folders 'bin', 'tools' and 'docs')") + sys.exit( + "please declare environment variable 'SUMO_HOME' as the root directory of your sumo installation (it should contain folders 'bin', 'tools' and 'docs')") import traci # the port used for communicating with your sumo instance -PORT = 8813 +PORT = 8873 -NSGREEN = "GrGr" +NSGREEN = "GrGr" NSYELLOW = "yryr" -WEGREEN = "rGrG" +WEGREEN = "rGrG" WEYELLOW = "ryry" -PROGRAM = [WEYELLOW,WEYELLOW,WEYELLOW,NSGREEN,NSGREEN,NSGREEN,NSGREEN,NSGREEN,NSGREEN,NSGREEN,NSGREEN,NSYELLOW,NSYELLOW,WEGREEN] +PROGRAM = [WEYELLOW, WEYELLOW, WEYELLOW, NSGREEN, NSGREEN, NSGREEN, + NSGREEN, NSGREEN, NSGREEN, NSGREEN, NSGREEN, NSYELLOW, NSYELLOW, WEGREEN] + def generate_routefile(): - random.seed(42) # make tests reproducible - N = 3600 # number of time steps + random.seed(42) # make tests reproducible + N = 3600 # number of time steps # demand per second from different directions - pWE = 1./10 - pEW = 1./11 - pNS = 1./30 + pWE = 1. / 10 + pEW = 1. / 11 + pNS = 1. / 30 with open("data/cross.rou.xml", "w") as routes: print >> routes, """ @@ -56,39 +68,56 @@ lastVeh = 0 vehNr = 0 for i in range(N): - if random.uniform(0,1) < pWE: - print >> routes, ' ' % (vehNr, i) + if random.uniform(0, 1) < pWE: + print >> routes, ' ' % ( + vehNr, i) vehNr += 1 lastVeh = i - if random.uniform(0,1) < pEW: - print >> routes, ' ' % (vehNr, i) + if random.uniform(0, 1) < pEW: + print >> routes, ' ' % ( + vehNr, i) vehNr += 1 lastVeh = i - if random.uniform(0,1) < pNS: - print >> routes, ' ' % (vehNr, i) + if random.uniform(0, 1) < pNS: + print >> routes, ' ' % ( + vehNr, i) vehNr += 1 lastVeh = i print >> routes, "" + def run(): """execute the TraCI control loop""" traci.init(PORT) - programPointer = len(PROGRAM)-1 + programPointer = len(PROGRAM) - 1 step = 0 while traci.simulation.getMinExpectedNumber() > 0: traci.simulationStep() - programPointer = min(programPointer+1, len(PROGRAM)-1) - no = traci.inductionloop.getLastStepVehicleNumber("0") - if no > 0: - programPointer = (0 if programPointer == len(PROGRAM)-1 else 3) - traci.trafficlights.setRedYellowGreenState("0", PROGRAM[programPointer]) + programPointer = min(programPointer + 1, len(PROGRAM) - 1) + numPriorityVehicles = traci.inductionloop.getLastStepVehicleNumber("0") + if numPriorityVehicles > 0: + if programPointer == len(PROGRAM) - 1: + # we are in the WEGREEN phase. start the priority phase + # sequence + programPointer = 0 + elif PROGRAM[programPointer] != WEYELLOW: + # horizontal traffic is already stopped. restart priority phase + # sequence at green + programPointer = 3 + else: + # we are in the WEYELLOW phase. continue sequence + pass + traci.trafficlights.setRedYellowGreenState( + "0", PROGRAM[programPointer]) step += 1 traci.close() sys.stdout.flush() + def get_options(): optParser = optparse.OptionParser() - optParser.add_option("--nogui", action="store_true", default=False, help="run the commandline version of sumo") + optParser.add_option("--nogui", action="store_true", + default=False, help="run the commandline version of sumo") options, args = optParser.parse_args() return options @@ -109,6 +138,7 @@ # this is the normal way of using traci. sumo is started as a # subprocess and then the python script connects and runs - sumoProcess = subprocess.Popen([sumoBinary, "-c", "data/cross.sumocfg", "--tripinfo-output", "tripinfo.xml"], stdout=sys.stdout, stderr=sys.stderr) + sumoProcess = subprocess.Popen([sumoBinary, "-c", "data/cross.sumocfg", "--tripinfo-output", + "tripinfo.xml", "--remote-port", str(PORT)], stdout=sys.stdout, stderr=sys.stderr) run() sumoProcess.wait() diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/ltmain.sh sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/ltmain.sh --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/ltmain.sh 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/ltmain.sh 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,9 @@ -# libtool (GNU libtool) 2.4 +# libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -41,6 +41,7 @@ # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) +# --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages @@ -69,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4 +# $progname: (GNU libtool) 2.4.2 # automake: $automake_version # autoconf: $autoconf_version # @@ -79,9 +80,9 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4 +VERSION=2.4.2 TIMESTAMP="" -package_revision=1.3293 +package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -136,15 +137,10 @@ : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="grep -E"} -: ${FGREP="grep -F"} -: ${GREP="grep"} -: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} @@ -387,7 +383,7 @@ ;; *) save_IFS="$IFS" - IFS=: + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break @@ -771,8 +767,8 @@ s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } @@ -1052,6 +1048,7 @@ opt_help=false opt_help_all=false opt_silent=: +opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false @@ -1120,6 +1117,10 @@ opt_silent=false func_append preserve_args " $opt" ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" @@ -2059,7 +2060,7 @@ *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -3201,11 +3202,13 @@ # Set up the ranlib parameters. oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -3470,7 +3473,7 @@ # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; @@ -3982,14 +3985,17 @@ # launches target application with the remaining arguments. func_exec_program () { - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac func_exec_program_core \${1+\"\$@\"} } @@ -5057,9 +5063,15 @@ { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF @@ -5643,7 +5655,8 @@ continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6147,7 +6160,8 @@ lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -6831,7 +6845,7 @@ test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -7316,6 +7330,7 @@ # which has an extra 1 added just for fun # case $version_type in + # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result @@ -7432,7 +7447,7 @@ versuffix="$major.$revision" ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" @@ -8020,6 +8035,11 @@ # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= @@ -8050,7 +8070,7 @@ elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) func_apped perm_rpath " $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi done @@ -8058,11 +8078,7 @@ if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. @@ -9152,6 +9168,8 @@ esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" @@ -9261,7 +9279,8 @@ *.la) func_basename "$deplib" name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -2,7 +2,7 @@ EXTRA_DIST = README ChangeLog AUTHORS COPYING INSTALL NEWS sumo.doxyconf -doc: pydoc doxygen wikidump +doc: pydoc doxygen userdoc pydoc: rm -rf docs/pydoc @@ -17,8 +17,8 @@ mkdir docs/doxygen doxygen sumo.doxyconf &> doxygen.log -wikidump: - cd docs/wiki && ../../tools/build/buildHTMLDocs.py && cp *.png *.css docs +userdoc: + tools/build/buildHTMLDocs.py -o docs/userdoc -i docs/wiki/index.html -r $(VERSION) && cp docs/wiki/*.png docs/wiki/*.css docs/userdoc man: rm -rf docs/man @@ -38,15 +38,17 @@ dist-hook: cd $(srcdir) ; \ if test -d tests; then \ - for f in `find build tools tests/complex/tutorial -name .svn -prune -o -type d -print`; do mkdir -p $(abs_distdir)/$$f; done ; \ + for f in `find build data tools tests/complex/tutorial -name .svn -prune -o -type d -print`; do mkdir -p $(abs_distdir)/$$f; done ; \ mkdir -p $(abs_distdir)/docs ; \ find tests/complex/tutorial -regex ".*\.\(xml\|txt\|sumocfg\|netccfg\|py\)" -print0 | xargs -0 cp -v --parents --target-directory $(abs_distdir) ; \ mv -v ${abs_distdir}/tests/complex/tutorial $(abs_distdir)/docs ; \ rm -rf $(abs_distdir)/tests ; \ tests/extractTest.py -i -f tests/examples.txt -o $(abs_distdir)/docs ; \ - find build -regex ".*\.\(vcproj\|vsprops\|vcxproj\|vcxproj\.filters\|props\|sln\|spec\)" -print0 | xargs -0 cp --parents --target-directory $(abs_distdir) ; \ + find build -regex ".*\.\(vcxproj\|vcxproj\.filters\|props\|sln\|spec\)" -print0 | xargs -0 cp --parents --target-directory $(abs_distdir) ; \ + find data -regex ".*\.\(xsd\|xml\|csv\|veh\)" -print0 | xargs -0 cp --parents --target-directory $(abs_distdir) ; \ ( svn export --force tools $(distdir)/tools && cd $(distdir) && find tools -type f > ../tools_filelist; true ) ; \ xargs cp --parents --target-directory $(abs_distdir) < tools_filelist ; \ + find $(abs_distdir)/tools -name "*.jar" | xargs rm ; \ cp tools_filelist $(abs_distdir) ; \ fi; @@ -54,13 +56,11 @@ cd $(srcdir) $(am__remove_distdir) mkdir -p $(distdir)/docs - cp -r docs/wiki/docs $(distdir)/docs/userdoc find tests/complex/tutorial -regex ".*\.\(xml\|txt\|sumocfg\|netccfg\|py\)" -print0 | xargs -0 cp --parents --target-directory $(distdir) mv $(distdir)/tests/complex/tutorial $(distdir)/docs rmdir $(distdir)/tests/complex rmdir $(distdir)/tests - svn export docs/internet/xsd $(distdir)/docs/xsd - cp -r docs/pydoc docs/doxygen $(distdir)/docs + cp -r docs/pydoc docs/doxygen docs/userdoc $(distdir)/docs tests/extractTest.py -i -f tests/examples.txt -o $(distdir)/docs tar -czf $(PACKAGE)-doc-$(VERSION).tar.gz $(distdir) rm -f $(PACKAGE)-doc-$(VERSION).zip @@ -75,17 +75,32 @@ tar -czf $(PACKAGE)-tests-$(VERSION).tar.gz $(distdir) $(am__remove_distdir) -dist-complete: dist dist-doc dist-tests +dist-complete: dist dist-doc dist-tests traas traci4j trafficmodeler mv $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-src-$(VERSION).tar.gz mv $(PACKAGE)-$(VERSION).zip $(PACKAGE)-src-$(VERSION).zip tar -xzf $(PACKAGE)-doc-$(VERSION).tar.gz $(distdir) tar -xzf $(PACKAGE)-tests-$(VERSION).tar.gz $(distdir) tar -xzf $(PACKAGE)-src-$(VERSION).tar.gz $(distdir) + find tools bin -name "*.jar" | xargs cp --parents --target-directory $(distdir) tar -czf $(PACKAGE)-all-$(VERSION).tar.gz $(distdir) + rm -f $(PACKAGE)-all-$(VERSION).zip + zip -r $(PACKAGE)-all-$(VERSION).zip $(distdir) $(am__remove_distdir) examples: - tests/extractTest.py -f tests/examples.txt + tests/extractTest.py -x -f tests/examples.txt + +traas: + ant -f tools/contributed/traas/build.xml clean release + cp tools/contributed/traas/dist/TraaS.jar bin + +traci4j: + ant -f tools/contributed/traci4j/build.xml clean build deploy + cp tools/contributed/traci4j/*.jar bin + +trafficmodeler: + cd tools/contributed/trafficmodeler && ./build.sh + cp tools/contributed/trafficmodeler/jar/*.jar bin sumo$(EXEEXT) netconvert$(EXEEXT) \ netgenerate$(EXEEXT) duarouter$(EXEEXT) \ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,10 +79,10 @@ host_triplet = @host@ target_triplet = @target@ subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ - ChangeLog INSTALL NEWS config.guess config.sub depcomp \ - install-sh ltmain.sh missing +DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) COPYING \ + config.guess config.sub depcomp install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -49,30 +93,72 @@ CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -100,13 +186,17 @@ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).zip GZIP_ENV = --best +DIST_TARGETS = dist-gzip dist-zip distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -133,9 +223,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -146,10 +240,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -248,7 +338,7 @@ all: all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -293,22 +383,25 @@ -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -323,57 +416,12 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -389,12 +437,7 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -406,15 +449,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -423,9 +462,31 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) @@ -461,13 +522,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -499,37 +557,35 @@ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -540,8 +596,8 @@ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -551,9 +607,9 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ @@ -561,6 +617,7 @@ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -584,13 +641,21 @@ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -621,10 +686,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -706,27 +776,27 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-generic \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip distcheck distclean \ + distclean-generic distclean-libtool distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am -doc: pydoc doxygen wikidump +doc: pydoc doxygen userdoc pydoc: rm -rf docs/pydoc @@ -741,8 +811,8 @@ mkdir docs/doxygen doxygen sumo.doxyconf &> doxygen.log -wikidump: - cd docs/wiki && ../../tools/build/buildHTMLDocs.py && cp *.png *.css docs +userdoc: + tools/build/buildHTMLDocs.py -o docs/userdoc -i docs/wiki/index.html -r $(VERSION) && cp docs/wiki/*.png docs/wiki/*.css docs/userdoc man: rm -rf docs/man @@ -762,15 +832,17 @@ dist-hook: cd $(srcdir) ; \ if test -d tests; then \ - for f in `find build tools tests/complex/tutorial -name .svn -prune -o -type d -print`; do mkdir -p $(abs_distdir)/$$f; done ; \ + for f in `find build data tools tests/complex/tutorial -name .svn -prune -o -type d -print`; do mkdir -p $(abs_distdir)/$$f; done ; \ mkdir -p $(abs_distdir)/docs ; \ find tests/complex/tutorial -regex ".*\.\(xml\|txt\|sumocfg\|netccfg\|py\)" -print0 | xargs -0 cp -v --parents --target-directory $(abs_distdir) ; \ mv -v ${abs_distdir}/tests/complex/tutorial $(abs_distdir)/docs ; \ rm -rf $(abs_distdir)/tests ; \ tests/extractTest.py -i -f tests/examples.txt -o $(abs_distdir)/docs ; \ - find build -regex ".*\.\(vcproj\|vsprops\|vcxproj\|vcxproj\.filters\|props\|sln\|spec\)" -print0 | xargs -0 cp --parents --target-directory $(abs_distdir) ; \ + find build -regex ".*\.\(vcxproj\|vcxproj\.filters\|props\|sln\|spec\)" -print0 | xargs -0 cp --parents --target-directory $(abs_distdir) ; \ + find data -regex ".*\.\(xsd\|xml\|csv\|veh\)" -print0 | xargs -0 cp --parents --target-directory $(abs_distdir) ; \ ( svn export --force tools $(distdir)/tools && cd $(distdir) && find tools -type f > ../tools_filelist; true ) ; \ xargs cp --parents --target-directory $(abs_distdir) < tools_filelist ; \ + find $(abs_distdir)/tools -name "*.jar" | xargs rm ; \ cp tools_filelist $(abs_distdir) ; \ fi; @@ -778,13 +850,11 @@ cd $(srcdir) $(am__remove_distdir) mkdir -p $(distdir)/docs - cp -r docs/wiki/docs $(distdir)/docs/userdoc find tests/complex/tutorial -regex ".*\.\(xml\|txt\|sumocfg\|netccfg\|py\)" -print0 | xargs -0 cp --parents --target-directory $(distdir) mv $(distdir)/tests/complex/tutorial $(distdir)/docs rmdir $(distdir)/tests/complex rmdir $(distdir)/tests - svn export docs/internet/xsd $(distdir)/docs/xsd - cp -r docs/pydoc docs/doxygen $(distdir)/docs + cp -r docs/pydoc docs/doxygen docs/userdoc $(distdir)/docs tests/extractTest.py -i -f tests/examples.txt -o $(distdir)/docs tar -czf $(PACKAGE)-doc-$(VERSION).tar.gz $(distdir) rm -f $(PACKAGE)-doc-$(VERSION).zip @@ -799,17 +869,32 @@ tar -czf $(PACKAGE)-tests-$(VERSION).tar.gz $(distdir) $(am__remove_distdir) -dist-complete: dist dist-doc dist-tests +dist-complete: dist dist-doc dist-tests traas traci4j trafficmodeler mv $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-src-$(VERSION).tar.gz mv $(PACKAGE)-$(VERSION).zip $(PACKAGE)-src-$(VERSION).zip tar -xzf $(PACKAGE)-doc-$(VERSION).tar.gz $(distdir) tar -xzf $(PACKAGE)-tests-$(VERSION).tar.gz $(distdir) tar -xzf $(PACKAGE)-src-$(VERSION).tar.gz $(distdir) + find tools bin -name "*.jar" | xargs cp --parents --target-directory $(distdir) tar -czf $(PACKAGE)-all-$(VERSION).tar.gz $(distdir) + rm -f $(PACKAGE)-all-$(VERSION).zip + zip -r $(PACKAGE)-all-$(VERSION).zip $(distdir) $(am__remove_distdir) examples: - tests/extractTest.py -f tests/examples.txt + tests/extractTest.py -x -f tests/examples.txt + +traas: + ant -f tools/contributed/traas/build.xml clean release + cp tools/contributed/traas/dist/TraaS.jar bin + +traci4j: + ant -f tools/contributed/traci4j/build.xml clean build deploy + cp tools/contributed/traci4j/*.jar bin + +trafficmodeler: + cd tools/contributed/trafficmodeler && ./build.sh + cp tools/contributed/trafficmodeler/jar/*.jar bin sumo$(EXEEXT) netconvert$(EXEEXT) \ netgenerate$(EXEEXT) duarouter$(EXEEXT) \ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGActivities.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGActivities.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGActivities.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGActivities.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,14 +3,15 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGActivities.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGActivities.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Main class that manages activities taken in account and generates the // inhabitants' trip list. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGActivities.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGActivities.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGActivities.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGActivities.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,13 @@ /// @author Daniel Krajzewicz /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGActivities.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGActivities.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Main class that manages activities taken in account and generates the // inhabitants' trip list. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGActivity.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGActivity.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGActivity.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGActivity.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,13 @@ /// @author Daniel Krajzewicz /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGActivity.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGActivity.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Parent object for all activities. Derived classes generate trips for each // household. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGActivity.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGActivity.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGActivity.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGActivity.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,14 +3,15 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGActivity.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGActivity.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Parent object for all activities. Derived classes generate trips for each // household. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGFreeTime.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGFreeTime.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGFreeTime.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGFreeTime.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,14 +3,15 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGFreeTime.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGFreeTime.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Generates trips related to after-work activities // like visiting the family or party. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGFreeTime.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGFreeTime.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGFreeTime.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGFreeTime.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,14 +3,15 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGFreeTime.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGFreeTime.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Generates trips related to after-work activities // like visiting the family or party. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGTrip.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGTrip.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGTrip.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGTrip.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,15 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Jakob Erdmann +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGTrip.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGTrip.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Class containing all information of a given trip (car, bus) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -39,7 +41,7 @@ // method definitions // =========================================================================== bool -AGTrip::operator <(AGTrip& trip) { +AGTrip::operator <(const AGTrip& trip) const { if (getDay() < trip.getDay()) { return true; } @@ -51,7 +53,7 @@ } void -AGTrip::print() { +AGTrip::print() const { std::cout << "Trip: " << std::endl; std::cout << "\t-From= "; myFrom.print(); @@ -84,13 +86,13 @@ } } -std::list* -AGTrip::getPassed() { +const std::list* +AGTrip::getPassed() const { return &myPassBy; } -std::string -AGTrip::getType() { +const std::string& +AGTrip::getType() const { return myType; } @@ -100,38 +102,33 @@ } AGPosition -AGTrip::getDep() { +AGTrip::getDep() const { return myFrom; } AGPosition -AGTrip::getArr() { +AGTrip::getArr() const { return myTo; } int -AGTrip::getTime() { +AGTrip::getTime() const { return myDepTime; } int -AGTrip::getTimeTrip(SUMOReal secPerKm) { +AGTrip::getTimeTrip(SUMOReal secPerKm) const { SUMOReal dist = 0; std::list positions; positions.push_back(myFrom); - std::list::iterator it; + std::list::const_iterator it; for (it = myPassBy.begin(); it != myPassBy.end(); ++it) { positions.push_back(*it); } positions.push_back(myTo); - bool firstPass = true; - AGPosition* temp; - for (it = positions.begin(); it != positions.end(); ++it) { - if (firstPass) { - temp = &*it; - continue; - } + const AGPosition* temp = &positions.front(); + for (it = positions.begin(), ++it; it != positions.end(); ++it) { dist += temp->distanceTo(*it); temp = &*it; } @@ -139,12 +136,12 @@ } int -AGTrip::getArrTime(SUMOReal secPerKm) { +AGTrip::getArrTime(SUMOReal secPerKm) const { return myDepTime + getTimeTrip(secPerKm); } int -AGTrip::getRideBackArrTime(SUMOReal secPerKm) { +AGTrip::getRideBackArrTime(SUMOReal secPerKm) const { return getArrTime(secPerKm) + (int)(secPerKm * myTo.distanceTo(myFrom) / 1000.0); } @@ -154,12 +151,12 @@ } int -AGTrip::estimateDepTime(int arrTime, SUMOReal secPerKm) { +AGTrip::estimateDepTime(int arrTime, SUMOReal secPerKm) const { return arrTime - getTimeTrip(secPerKm); } -std::string -AGTrip::getVehicleName() { +const std::string& +AGTrip::getVehicleName() const { return myVehicle; } @@ -179,12 +176,12 @@ } bool -AGTrip::isDaily() { +AGTrip::isDaily() const { return (myDay == 0); } int -AGTrip::getDay() { +AGTrip::getDay() const { return myDay; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGTrip.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGTrip.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGTrip.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGTrip.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,15 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Jakob Erdmann +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGTrip.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGTrip.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Class containing all information of a given trip (car, bus) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -79,53 +81,53 @@ myVehicle(v), myType("default"), myDay(day) {}; - void print(); - bool operator<(AGTrip& trip); + void print() const; + bool operator<(const AGTrip& trip) const; void addLayOver(AGPosition by); void addLayOver(AGTrip& trip); void addLayOverWithoutDestination(AGTrip& trip); - AGPosition getDep(); - AGPosition getArr(); - int getTime(); + AGPosition getDep() const; + AGPosition getArr() const; + int getTime() const; void setDepTime(int time); - std::string getVehicleName(); + const std::string& getVehicleName() const; void setVehicleName(std::string name); void setArr(AGPosition arrival); void setDep(AGPosition departure); - int getDay(); + int getDay() const; void setDay(int day); - std::string getType(); + const std::string& getType() const; void setType(std::string type); - std::list* getPassed(); + const std::list* getPassed() const; /** * returns the time regarding the departure time * going through the different points and coming back to the initial position * given the time to make one kilometer */ - int getRideBackArrTime(SUMOReal secPerKm); + int getRideBackArrTime(SUMOReal secPerKm) const; /** * returns the estimated arrival time * given the time to make one kilometer */ - int getArrTime(SUMOReal secPerKm); + int getArrTime(SUMOReal secPerKm) const; /** * gives the time in seconds for the trip * given a speed in seconds per kilometer (in city, not car speed * but time needed to make a distance in the city) */ - int getTimeTrip(SUMOReal secPerKm); + int getTimeTrip(SUMOReal secPerKm) const; /** * estimate the departure time needed for a given arrival time * and a speed in seconds per kilometer */ - int estimateDepTime(int arrTime, SUMOReal secPerKm); + int estimateDepTime(int arrTime, SUMOReal secPerKm) const; /** * returns whether this is a daily trip or a one day trip */ - bool isDaily(); + bool isDaily() const; private: AGPosition myFrom; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGWorkAndSchool.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGWorkAndSchool.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGWorkAndSchool.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGWorkAndSchool.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGWorkAndSchool.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGWorkAndSchool.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Generates trips to work and to school /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -154,6 +154,10 @@ bool AGWorkAndSchool::carsToTrips() { + // check if the starting edge allows cars + if (!myHousehold->getPosition().getStreet().allows(SVC_PASSENGER)) { + return false; + } std::list::const_iterator itDriA; std::list::const_iterator itCar = myHousehold->getCars().begin(); for (itDriA = personsDrivingCars.begin(); itDriA != personsDrivingCars.end(); ++itDriA) { @@ -161,6 +165,10 @@ if (itCar == myHousehold->getCars().end()) { return false; } + // check if the destination edge allows cars + if (!itDriA->getWorkPosition().getPosition().getStreet().allows(SVC_PASSENGER)) { + return false; + } AGTrip trip(myHousehold->getPosition(), itDriA->getWorkPosition().getPosition(), *itCar, depHour(myHousehold->getPosition(), itDriA->getWorkPosition().getPosition(), itDriA->getWorkPosition().getOpening())); ++itCar; tempTrip.push_back(trip); @@ -280,8 +288,8 @@ if (itAccT->getRideBackArrTime(this->timePerKm) < itDriT->getTime()) { //there is enough time to accompany people and go back home before going to work itAccT->setVehicleName(itDriT->getVehicleName()); - itAccT->addLayOver(itAccT->getArr()); //final destination is the last accompaniment stop: not the destination of the course - itAccT->setArr(myHousehold->getPosition()); //final destination of the whole trip: home + itAccT->addLayOver(itAccT->getArr());//final destination is the last accompaniment stop: not the destination of the course + itAccT->setArr(myHousehold->getPosition());//final destination of the whole trip: home myPartialActivityTrips.push_back(*itAccT); alreadyDone = true; } else { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGWorkAndSchool.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGWorkAndSchool.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/AGWorkAndSchool.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/AGWorkAndSchool.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGWorkAndSchool.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGWorkAndSchool.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Generates trips to work and to school /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activities/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activities/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/activitygen/activities -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,36 +92,96 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libagactivities_a_AR = $(AR) $(ARFLAGS) libagactivities_a_LIBADD = am_libagactivities_a_OBJECTS = AGActivities.$(OBJEXT) AGTrip.$(OBJEXT) \ AGActivity.$(OBJEXT) AGWorkAndSchool.$(OBJEXT) \ AGFreeTime.$(OBJEXT) libagactivities_a_OBJECTS = $(am_libagactivities_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libagactivities_a_SOURCES) DIST_SOURCES = $(libagactivities_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -85,6 +190,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -111,9 +217,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -124,10 +234,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -265,10 +371,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libagactivities.a: $(libagactivities_a_OBJECTS) $(libagactivities_a_DEPENDENCIES) - -rm -f libagactivities.a - $(libagactivities_a_AR) libagactivities.a $(libagactivities_a_OBJECTS) $(libagactivities_a_LIBADD) - $(RANLIB) libagactivities.a + +libagactivities.a: $(libagactivities_a_OBJECTS) $(libagactivities_a_DEPENDENCIES) $(EXTRA_libagactivities_a_DEPENDENCIES) + $(AM_V_at)-rm -f libagactivities.a + $(AM_V_AR)$(libagactivities_a_AR) libagactivities.a $(libagactivities_a_OBJECTS) $(libagactivities_a_LIBADD) + $(AM_V_at)$(RANLIB) libagactivities.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -283,25 +390,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGWorkAndSchool.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -309,26 +416,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -340,15 +436,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -357,6 +449,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -405,10 +512,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -493,18 +605,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activitygen_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activitygen_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/activitygen_main.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/activitygen_main.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Jul 2010 -/// @version $Id: activitygen_main.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: activitygen_main.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Main object of the ActivityGen application /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -54,6 +54,7 @@ #include #include #include +#include //ActivityGen #include "AGFrame.h" #include "AGActivityGen.h" @@ -69,32 +70,41 @@ // =========================================================================== /// Loads the network -void loadNet(RONet& toFill, ROAbstractEdgeBuilder& eb) { +void +loadNet(RONet& toFill, ROAbstractEdgeBuilder& eb) { OptionsCont& oc = OptionsCont::getOptions(); std::string file = oc.getString("net-file"); if (file == "") { throw ProcessError("Missing definition of network to load!"); } - if (!FileHelpers::exists(file)) { - throw ProcessError("The network file '" + file - + "' could not be found."); + if (!FileHelpers::isReadable(file)) { + throw ProcessError("The network file '" + file + "' could not be accessed."); } PROGRESS_BEGIN_MESSAGE("Loading net"); RONetHandler handler(toFill, eb); handler.setFileName(file); - if (!XMLSubSys::runParser(handler, file)) { + if (!XMLSubSys::runParser(handler, file, true)) { PROGRESS_FAILED_MESSAGE(); throw ProcessError(); } else { PROGRESS_DONE_MESSAGE(); } + if (!deprecatedVehicleClassesSeen.empty()) { + WRITE_WARNING("Deprecated vehicle classes '" + toString(deprecatedVehicleClassesSeen) + "' in input network."); + deprecatedVehicleClassesSeen.clear(); + } } -/****************************************************************************/ -int main(int argc, char* argv[]) { - int ret = 0; +int +main(int argc, char* argv[]) { OptionsCont& oc = OptionsCont::getOptions(); + // give some application descriptions + oc.setApplicationDescription( + "Generates routes of persons throughout a day for the microscopic road traffic simulation SUMO."); + oc.setApplicationName("activitygen", "SUMO activitygen Version " + getBuildName(VERSION_STRING)); + oc.addCopyrightNotice("Copyright (C) 2010-2012 Technische Universitaet Muenchen"); + int ret = 0; RONet* net = 0; try { // Initialise subsystems and process options @@ -105,13 +115,13 @@ SystemFrame::close(); return 0; } - XMLSubSys::setValidation(oc.getBool("xml-validation")); + XMLSubSys::setValidation(oc.getString("xml-validation"), oc.getString("xml-validation.net")); MsgHandler::initOutputOptions(); RandHelper::initRandGlobal(); // Load network net = new RONet(); - RODUAEdgeBuilder builder(oc.getBool("weights.expand"), oc.getBool("weights.interpolate")); + AGStreet::Builder builder; loadNet(*net, builder); WRITE_MESSAGE("Loaded " + toString(net->getEdgeNo()) + " edges."); if (oc.getBool("debug")) { @@ -119,7 +129,7 @@ } std::string statFile = oc.getString("stat-file"); - std::string routeFile = oc.getString("output-file"); + OutputDevice::createDeviceByOption("output-file", "routes", "routes_file.xsd"); AGTime duration(1, 0, 0); AGTime begin(0); AGTime end(0); @@ -132,7 +142,7 @@ if (oc.isSet("end")) { end.addSeconds(oc.getInt("end") % 86400); } - AGActivityGen actiGen(statFile, routeFile, net); + AGActivityGen actiGen(statFile, OutputDevice::getDevice(oc.getString("output-file")), net); actiGen.importInfoCity(); actiGen.makeActivityTrips(duration.getDay(), begin.getTime(), end.getTime()); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGActivityGen.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGActivityGen.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGActivityGen.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGActivityGen.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGActivityGen.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGActivityGen.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Main class that handles City, Activities and Trips /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -98,7 +99,7 @@ } bool -AGActivityGen::timeTripValidation(AGTrip trip) { +AGActivityGen::timeTripValidation(const AGTrip& trip) const { if (trip.getDay() > durationInDays + 1) { return false; } @@ -122,7 +123,7 @@ } void -AGActivityGen::varDepTime(AGTrip& trip) { +AGActivityGen::varDepTime(AGTrip& trip) const { if (trip.getType() != "default") { return; } @@ -139,6 +140,7 @@ } } + void AGActivityGen::generateOutputFile(std::list& trips) { AGActivityTripWriter atw(outputFile); @@ -178,8 +180,6 @@ } else { std::cout << "No real trips were generated" << std::endl; } - //END TEST - atw.writeOutputFile(); } void @@ -220,7 +220,7 @@ expTrips.push_back(tr); } //else - // std::cout << "trop tard 1 pour " << tr.getVehicleName() << " " << tr.getTime() << " day: " << tr.getDay() << std::endl; + //std::cout << "trop tard 1 pour " << tr.getVehicleName() << " " << tr.getTime() << " day: " << tr.getDay() << std::endl; } } else { AGTrip tr(it->getDep(), it->getArr(), it->getVehicleName(), it->getTime(), it->getDay()); @@ -239,7 +239,7 @@ expTrips.push_back(tr); } //else - // std::cout << "trop tard 2 pour " << tr.getVehicleName() << " " << tr.getTime() << " day: " << tr.getDay() << std::endl; + //std::cout << "trop tard 2 pour " << tr.getVehicleName() << " " << tr.getTime() << " day: " << tr.getDay() << std::endl; } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGActivityGen.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGActivityGen.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGActivityGen.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGActivityGen.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGActivityGen.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGActivityGen.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Main class that handles City, Activities and Trips /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -28,15 +29,21 @@ // =========================================================================== // included modules // =========================================================================== -#include -#include -#include -#include +#ifdef _MSC_VER +#include +#else +#include +#endif + #include "city/AGCity.h" -#include "activities/AGTrip.h" -#include "activities/AGActivities.h" -#include "city/AGStreet.h" -#include "city/AGPosition.h" + + +// =========================================================================== +// class declarations +// =========================================================================== +class OutputDevice; +class RONet; +class AGTrip; // =========================================================================== @@ -55,7 +62,7 @@ * @param[in] output xml file in which we'll write the routes generated * @param[in] net network of the city */ - AGActivityGen(std::string input, std::string output, RONet* net) : + AGActivityGen(std::string input, OutputDevice& output, RONet* net) : inputFile(input), outputFile(output), net(net), @@ -84,8 +91,10 @@ void makeActivityTrips(int days = 1, int beginTime = 0, int endTime = 0); protected: - // @brief xml files: statistics on the city and generated routes - std::string inputFile, outputFile; + // @brief xml file statistics on the city and generated routes + std::string inputFile; + /// @brief The generated routes + OutputDevice& outputFile; // @brief network of the city RONet* net; //Activities activities; @@ -102,7 +111,7 @@ * @returns whether the trip is compatible with the time boundaries or not. * for this begin, end and duration of the simulation must be defined */ - bool timeTripValidation(AGTrip); + bool timeTripValidation(const AGTrip& trip) const; /** * @brief generate the output file (trips or routes) using a trip list * @@ -114,7 +123,7 @@ * * @param[in] trip on which a random (normally distributed) variation will be tried */ - void varDepTime(AGTrip& trip); + void varDepTime(AGTrip& trip) const; private: /// @brief invalidated assignment operator diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGActivityGenHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGActivityGenHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGActivityGenHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGActivityGenHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGActivityGenHandler.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: AGActivityGenHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The handler for parsing the statistics file. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -55,7 +55,6 @@ #include #endif // CHECK_MEMORY_LEAKS -using namespace std; // =========================================================================== // method definitions @@ -129,7 +128,7 @@ default: break; } - } catch (const exception& e) { + } catch (const std::exception& e) { throw ProcessError(e.what()); } } @@ -148,7 +147,7 @@ myCity.statData.maxFootDistance = attrs.getOpt(AGEN_ATTR_MAX_FOOT_DIST, 0, ok, 300.0); myCity.statData.incomingTraffic = attrs.getOpt(AGEN_ATTR_IN_TRAFFIC, 0, ok, 0); myCity.statData.outgoingTraffic = attrs.getOpt(AGEN_ATTR_OUT_TRAFFIC, 0, ok, 0); - } catch (const exception& e) { + } catch (const std::exception& e) { WRITE_ERROR("Error while parsing the element " + SUMOXMLDefinitions::Tags.getString(AGEN_TAG_GENERAL) + ": " + e.what()); @@ -158,14 +157,14 @@ void AGActivityGenHandler::parseParameters(const SUMOSAXAttributes& attrs) { - try { + try { bool ok; myCity.statData.carPreference = attrs.getOpt(AGEN_ATTR_CARPREF, 0, ok, 0.0); myCity.statData.speedTimePerKm = attrs.getOpt(AGEN_ATTR_CITYSPEED, 0, ok, 360.0); myCity.statData.freeTimeActivityRate = attrs.getOpt(AGEN_ATTR_FREETIMERATE, 0, ok, 0.15); myCity.statData.uniformRandomTrafficRate = attrs.getOpt(AGEN_ATTR_UNI_RAND_TRAFFIC, 0, ok, 0.0); myCity.statData.departureVariation = attrs.getOpt(AGEN_ATTR_DEP_VARIATION, 0, ok, 0.0); - } catch (const exception& e) { + } catch (const std::exception& e) { WRITE_ERROR("Error while parsing the element " + SUMOXMLDefinitions::Tags.getString(AGEN_TAG_PARAM) + ": " + e.what()); @@ -186,16 +185,15 @@ work = attrs.getFloat(AGEN_ATTR_OUT_WORKPOSITION); } std::string eid = attrs.getString(SUMO_ATTR_EDGE); - ROEdge* e = net->getEdge(eid); - if (e == 0) { + AGStreet* street = dynamic_cast(net->getEdge(eid)); + if (street == 0) { WRITE_ERROR("Edge '" + eid + "' is not known."); return; } - - AGStreet str(e, pop, work); - myCity.streets.push_back(str); - - } catch (const exception& e) { + street->setPopulation(pop * street->getLength()); + street->setWorkplaceNumber(work * street->getLength()); + myCity.streets.push_back(street); + } catch (const std::exception& e) { WRITE_ERROR("Error while parsing the element " + SUMOXMLDefinitions::Tags.getString(AGEN_TAG_STREET) + ": " + e.what()); @@ -206,14 +204,14 @@ void AGActivityGenHandler::parseCityGates(const SUMOSAXAttributes& attrs) { try { - string edge = attrs.getString(SUMO_ATTR_EDGE); + std::string edge = attrs.getString(SUMO_ATTR_EDGE); SUMOReal positionOnEdge = attrs.getFloat(SUMO_ATTR_POSITION); AGPosition posi(myCity.getStreet(edge), positionOnEdge); myCity.statData.incoming[(int)myCity.cityGates.size()] = attrs.getFloat(AGEN_ATTR_INCOMING); myCity.statData.outgoing[(int)myCity.cityGates.size()] = attrs.getFloat(AGEN_ATTR_OUTGOING); myCity.cityGates.push_back(posi); - } catch (const exception& e) { + } catch (const std::exception& e) { WRITE_ERROR("Error while parsing the element " + SUMOXMLDefinitions::Tags.getString(AGEN_TAG_CITYGATES) + ": " + e.what()); @@ -232,7 +230,7 @@ try { myCity.statData.beginWorkHours[attrs.getInt(AGEN_ATTR_HOUR)] = attrs.getFloat(AGEN_ATTR_PROP); - } catch (const exception& e) { + } catch (const std::exception& e) { WRITE_ERROR("Error while parsing the element " + SUMOXMLDefinitions::Tags.getString(AGEN_TAG_OPENING) + ": " + e.what()); @@ -247,7 +245,7 @@ try { myCity.statData.endWorkHours[attrs.getInt(AGEN_ATTR_HOUR)] = attrs.getFloat(AGEN_ATTR_PROP); - } catch (const exception& e) { + } catch (const std::exception& e) { WRITE_ERROR("Error while parsing the element " + SUMOXMLDefinitions::Tags.getString(AGEN_TAG_CLOSING) + ": " + e.what()); @@ -264,7 +262,7 @@ void AGActivityGenHandler::parseSchool(const SUMOSAXAttributes& attrs) { try { - string edge = attrs.getString(SUMO_ATTR_EDGE); + std::string edge = attrs.getString(SUMO_ATTR_EDGE); SUMOReal positionOnEdge = attrs.getFloat(SUMO_ATTR_POSITION); AGPosition posi(myCity.getStreet(edge), positionOnEdge); int beginAge = attrs.getInt(AGEN_ATTR_BEGINAGE); @@ -275,7 +273,7 @@ AGSchool sch(capacity, posi, beginAge, endAge, openingHour, closingHour); myCity.schools.push_back(sch); - } catch (const exception& e) { + } catch (const std::exception& e) { WRITE_ERROR("Error while parsing the element " + SUMOXMLDefinitions::Tags.getString(AGEN_TAG_SCHOOL) + ": " + e.what()); @@ -286,13 +284,13 @@ void AGActivityGenHandler::parseBusStation(const SUMOSAXAttributes& attrs) { try { - string edge = attrs.getString(SUMO_ATTR_EDGE); + std::string edge = attrs.getString(SUMO_ATTR_EDGE); SUMOReal positionOnEdge = attrs.getFloat(SUMO_ATTR_POSITION); int id = attrs.getInt(SUMO_ATTR_ID); AGPosition posi(myCity.getStreet(edge), positionOnEdge); myCity.statData.busStations.insert(std::pair(id, posi)); - } catch (const exception& e) { + } catch (const std::exception& e) { WRITE_ERROR("Error while parsing the element " + SUMOXMLDefinitions::Tags.getString(AGEN_TAG_BUSSTATION) + ": " + e.what()); @@ -309,7 +307,7 @@ myCity.busLines.push_front(busL); currentBusLine = &*myCity.busLines.begin(); - } catch (const exception& e) { + } catch (const std::exception& e) { WRITE_ERROR("Error while parsing the element " + SUMOXMLDefinitions::Tags.getString(AGEN_TAG_BUSLINE) + ": " + e.what()); @@ -345,7 +343,7 @@ currentBusLine->locateRevStation(myCity.statData.busStations.find(refID)->second); } - } catch (const exception& e) { + } catch (const std::exception& e) { WRITE_ERROR("Error while parsing the element " + SUMOXMLDefinitions::Tags.getString(AGEN_TAG_STATION) + ": " + e.what()); @@ -365,7 +363,7 @@ int rateB = attrs.getInt(AGEN_ATTR_RATE); currentBusLine->generateBuses(beginB, endB, rateB); - } catch (const exception& e) { + } catch (const std::exception& e) { WRITE_ERROR("Error while parsing the element " + SUMOXMLDefinitions::Tags.getString(AGEN_TAG_FREQUENCY) + ": " + e.what()); @@ -388,7 +386,7 @@ myCity.statData.population[endAge] = attrs.getInt(AGEN_ATTR_PEOPLENBR); } - } catch (const exception& e) { + } catch (const std::exception& e) { WRITE_ERROR("Error while parsing the element " + SUMOXMLDefinitions::Tags.getString(AGEN_TAG_BRACKET) + ": " + e.what()); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGActivityGenHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGActivityGenHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGActivityGenHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGActivityGenHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGActivityGenHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGActivityGenHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The handler for parsing the statistics file. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGActivityTripWriter.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGActivityTripWriter.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGActivityTripWriter.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGActivityTripWriter.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGActivityTripWriter.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGActivityTripWriter.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Class for writing Trip objects in a SUMO-route file. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -32,6 +32,9 @@ #include #endif +#include +#include +#include "activities/AGTrip.h" #include "city/AGStreet.h" #include "AGActivityTripWriter.h" @@ -39,56 +42,49 @@ // =========================================================================== // method definitions // =========================================================================== -void -AGActivityTripWriter::initialize() { - routes << "" << std::endl << std::endl; - routes << "" << std::endl; - vtypes(); +AGActivityTripWriter::AGActivityTripWriter(OutputDevice& file) : myTripOutput(file) { + myTripOutput.openTag(SUMO_TAG_VTYPE) + .writeAttr(SUMO_ATTR_ID, "default") + .writeAttr(SUMO_ATTR_VCLASS, "passenger") + .writeAttr(SUMO_ATTR_COLOR, RGBColor::RED).closeTag(); + myTripOutput.openTag(SUMO_TAG_VTYPE) + .writeAttr(SUMO_ATTR_ID, "random") + .writeAttr(SUMO_ATTR_VCLASS, "passenger") + .writeAttr(SUMO_ATTR_COLOR, RGBColor::BLUE).closeTag(); + myTripOutput.openTag(SUMO_TAG_VTYPE) + .writeAttr(SUMO_ATTR_ID, "bus") + .writeAttr(SUMO_ATTR_VCLASS, "bus") + .writeAttr(SUMO_ATTR_COLOR, RGBColor::GREEN).closeTag(); + myTripOutput.lf(); } -void -AGActivityTripWriter::vtypes() { - routes << " " << std::endl; - routes << " " << std::endl; - routes << " " << std::endl << std::endl; - - colors["default"] = "1,0,0"; - colors["bus"] = "0,1,0"; - colors["random"] = "0,0,1"; -} void -AGActivityTripWriter::addTrip(AGTrip trip) { - std::list::iterator it; +AGActivityTripWriter::addTrip(const AGTrip& trip) { int time = (trip.getDay() - 1) * 86400 + trip.getTime(); - //the vehicle: - routes << " " << std::endl; - - //the route - routes << " begin(); it != trip.getPassed()->end(); ++it) { - routes << " " << it->getStreet().getName(); + myTripOutput.openTag(SUMO_TAG_TRIP) + .writeAttr(SUMO_ATTR_ID, trip.getVehicleName()) + .writeAttr(SUMO_ATTR_TYPE, trip.getType()) + .writeAttr(SUMO_ATTR_DEPART, time) + .writeAttr(SUMO_ATTR_DEPARTPOS, trip.getDep().getPosition()) + .writeAttr(SUMO_ATTR_ARRIVALPOS, trip.getArr().getPosition()) + .writeAttr(SUMO_ATTR_ARRIVALSPEED, 0.) + .writeAttr(SUMO_ATTR_FROM, trip.getDep().getStreet().getID()); + + if (!trip.getPassed()->empty()) { + std::ostringstream oss; + for (std::list::const_iterator it = trip.getPassed()->begin(); it != trip.getPassed()->end(); ++it) { + if (it != trip.getPassed()->begin()) { + oss << " "; + } + oss << it->getStreet().getID(); + } + myTripOutput.writeAttr(SUMO_ATTR_VIA, oss.str()); } - routes << " " << trip.getArr().getStreet().getName(); - routes << "\"/>" << std::endl; - - routes << " " << std::endl; + myTripOutput.writeAttr(SUMO_ATTR_TO, trip.getArr().getStreet().getID()); + myTripOutput.closeTag(); } -void -AGActivityTripWriter::writeOutputFile() { - routes << "" << std::endl; - routes.close(); -} /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGActivityTripWriter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGActivityTripWriter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGActivityTripWriter.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGActivityTripWriter.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGActivityTripWriter.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGActivityTripWriter.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Class for writing Trip objects in a SUMO-route file. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -34,11 +35,11 @@ #include #endif -#include "activities/AGTrip.h" -#include -#include -#include -#include +// =========================================================================== +// class declarations +// =========================================================================== +class OutputDevice; +class AGTrip; // =========================================================================== @@ -46,22 +47,20 @@ // =========================================================================== class AGActivityTripWriter { public: - AGActivityTripWriter(std::string file) : - fileName(file), - routes(file.c_str()) { - initialize(); - } - - void initialize(); - void addTrip(AGTrip trip); - void writeOutputFile(); + AGActivityTripWriter(OutputDevice& file); + + void addTrip(const AGTrip& trip); private: - std::string fileName; - std::ofstream routes; - std::map colors; + OutputDevice& myTripOutput; + +private: + /// @brief Invalidated copy constructor. + AGActivityTripWriter(const AGActivityTripWriter&); + + /// @brief Invalidated assignment operator. + AGActivityTripWriter& operator=(const AGActivityTripWriter&); - void vtypes(); }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGFrame.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGFrame.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGFrame.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGFrame.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mo, 13 Sept 2010 -/// @version $Id: AGFrame.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGFrame.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Configuration of the options of ActivityGen /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -38,6 +38,7 @@ #endif #include "AGFrame.h" +#include #include #include #include @@ -50,16 +51,11 @@ // =========================================================================== void AGFrame::fillOptions() { OptionsCont& oc = OptionsCont::getOptions(); - // give some application descriptions - oc.setApplicationDescription( - "Generates routes of persons throughout a day for the microscopic road traffic simulation SUMO."); - oc.setApplicationName("activitygen", "SUMO activitygen Version " + (std::string)VERSION_STRING); - oc.addCopyrightNotice("Copyright (C) 2010-2011 Technische Universitaet Muenchen"); // Options handling oc.addCallExample("--net-file .net.xml --stat-file .stat.xml --output .rou.xml --rand", - "generate a route file from a stats file on a given net using arbitrary random seed"); + "generate a trips file from a stats file on a given net using arbitrary random seed"); oc.addCallExample("--net-file .net.xml --stat-file .stat.xml --output .rou.xml --duration-d ", - "generate a route file from a stats file on a given net for numerous days (with fixed random seed)"); + "generate a trips file from a stats file on a given net for numerous days (with fixed random seed)"); // Add categories and insert the standard options SystemFrame::addConfigurationOptions(oc); @@ -73,14 +69,14 @@ // Insert options oc.doRegister("net-file", 'n', new Option_FileName()); oc.addSynonyme("net-file", "net"); - oc.addDescription("net-file", "Input", "Use FILE as SUMO-network to route on"); + oc.addDescription("net-file", "Input", "Use FILE as SUMO-network to create trips for"); oc.doRegister("stat-file", 's', new Option_FileName()); oc.addDescription("stat-file", "Input", "Loads the SUMO-statistics FILE"); oc.doRegister("output-file", 'o', new Option_FileName()); oc.addSynonyme("output-file", "output", true); - oc.addDescription("output-file", "Output", "Write generated routes to FILE"); + oc.addDescription("output-file", "Output", "Write generated trips to FILE"); oc.doRegister("debug", new Option_Bool(false)); oc.addDescription("debug", "Report", @@ -96,15 +92,6 @@ oc.doRegister("duration-d", new Option_Integer()); oc.addDescription("duration-d", "Time", "Sets the duration of the simulation in days"); - - // Options needed by the router - oc.doRegister("weights.interpolate", new Option_Bool(false)); - oc.addSynonyme("weights.interpolate", "interpolate", true); - oc.addDescription("weights.interpolate", "Processing", "Interpolate edge weights at interval boundaries"); - - oc.doRegister("weights.expand", new Option_Bool(false)); - oc.addSynonyme("weights.expand", "expand-weights", true); - oc.addDescription("weights.expand", "Processing", "Expand weights behind the simulation's end"); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGFrame.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGFrame.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/AGFrame.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/AGFrame.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Walter Bamberger /// @author Daniel Krajzewicz /// @date Mon, 13 Sept 2010 -/// @version $Id: AGFrame.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGFrame.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Configuration of the options of ActivityGen /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGAdult.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGAdult.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGAdult.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGAdult.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Piotr Woznica /// @author Walter Bamberger /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGAdult.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGAdult.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Person in working age: can be linked to a work position. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGAdult.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGAdult.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGAdult.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGAdult.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Piotr Woznica /// @author Walter Bamberger /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGAdult.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGAdult.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Person in working age: can be linked to a work position. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGBus.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGBus.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGBus.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGBus.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGBus.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGBus.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A bus driving in the city /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -55,7 +55,7 @@ } void -AGBus::print() { +AGBus::print() const { std::cout << "- Bus:" << " name=" << name << " depTime=" << departureTime << std::endl; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGBus.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGBus.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGBus.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGBus.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGBus.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGBus.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A bus driving in the city /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -50,7 +50,7 @@ void setName(std::string name); int getDeparture(); std::string getName(); - void print(); + void print() const; private: std::string name; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGBusLine.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGBusLine.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGBusLine.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGBusLine.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGBusLine.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGBusLine.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Bus line of the city: contains all the buses of this line /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -45,7 +45,7 @@ #include "AGTime.h" #include -#define PAUSE_TIME 15 //time (in minutes) a bus waits before going in the opposite direction. +#define PAUSE_TIME 15 //time (in minutes) a bus waits before going in the opposite direction. // =========================================================================== @@ -59,10 +59,10 @@ void AGBusLine::setBusNames() { busNbr = 0; - std::list::iterator it1 = buses.begin(); //iterator on buses in the first direction - std::list::iterator it2 = revBuses.begin(); //iterator on buses in the second direction + std::list::iterator it1 = buses.begin(); //iterator on buses in the first direction + std::list::iterator it2 = revBuses.begin(); //iterator on buses in the second direction - std::list > drivingBuses1, drivingBuses2; //buses on the road or in the parking of the corresponding end: int: the time of availability + std::list > drivingBuses1, drivingBuses2; //buses on the road or in the parking of the corresponding end: int: the time of availability while (it1 != buses.end() && it2 != revBuses.end()) { if (it1->getDeparture() > it2->getDeparture()) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGBusLine.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGBusLine.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGBusLine.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGBusLine.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGBusLine.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGBusLine.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Bus line of the city: contains all the buses of this line /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGCar.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGCar.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGCar.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGCar.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGCar.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGCar.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Cars owned by people of the city: included in households. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGCar.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGCar.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGCar.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGCar.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGCar.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGCar.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Cars owned by people of the city: included in households. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGChild.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGChild.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGChild.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGChild.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,14 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @author Walter Bamberger +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGChild.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGChild.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Person in age to go to school: linked to a school object /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -44,7 +45,7 @@ // method definitions // =========================================================================== void -AGChild::print() { +AGChild::print() const { std::cout << "- Child: Age=" << age << " School=" << school << std::endl; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGChild.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGChild.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGChild.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGChild.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGChild.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGChild.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Person in age to go to school: linked to a school object /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -49,7 +50,7 @@ AGChild(int age) : AGPerson(age), school(NULL) {}; - void print(); + void print() const; bool setSchool(AGSchool* school); /** * @param schools: school vector from City object diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGCity.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGCity.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGCity.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGCity.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,14 +4,15 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @author Walter Bamberger +/// @author Jakob Erdmann /// @date July 2010 -/// @version $Id: AGCity.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGCity.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // City class that contains all other objects of the city: in particular // streets, households, bus lines, work positions and school /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -60,11 +61,11 @@ } SUMOReal pop = 0, work = 0; - std::vector::iterator it; + std::vector::iterator it; for (it = streets.begin(); it != streets.end(); ++it) { - pop += it->getPopulation(); - work += it->getWorkplaceNumber(); + pop += (*it)->getPopulation(); + work += (*it)->getWorkplaceNumber(); } statData.factorInhabitants = (SUMOReal)statData.inhabitants / pop; //can be improved with other input data @@ -78,38 +79,38 @@ statData.factorWorkPositions = neededWorkPositionsInCity / (SUMOReal) work; for (it = streets.begin(); it != streets.end(); ++it) { - it->setPopulation(it->getPopulation() * statData.factorInhabitants); - it->setWorkplaceNumber(it->getWorkplaceNumber() * statData.factorWorkPositions); + (*it)->setPopulation((*it)->getPopulation() * statData.factorInhabitants); + (*it)->setWorkplaceNumber((*it)->getWorkplaceNumber() * statData.factorWorkPositions); //it->print(); } //completing streets from edges of the network not handled/present in STAT file (no population no work position) std::map::const_iterator itE; - std::vector::iterator itS; + std::vector::iterator itS; for (itE = net->getEdgeMap().begin(); itE != net->getEdgeMap().end(); ++itE) { for (itS = streets.begin(); itS != streets.end(); ++itS) { - if (itS->getName() == itE->second->getID()) { + if (*itS == itE->second) { break; } } //if this edge isn't represented by a street - if (itS == streets.end()) { - streets.push_back(AGStreet(itE->second)); + if (itS == streets.end() && itE->second->getType() != ROEdge::ET_INTERNAL) { + streets.push_back(static_cast(itE->second)); } } } void AGCity::generateWorkPositions() { - std::vector::iterator it; + std::vector::iterator it; int workPositionCounter = 0; try { for (it = streets.begin(); it != streets.end(); ++it) { //std::cout << "number of work positions in street: " << it->getWorkplaceNumber() << std::endl; - for (int i = 0; i < it->getWorkplaceNumber(); ++i) { - workPositions.push_back(AGWorkPosition(&statData, *it)); + for (int i = 0; i < (*it)->getWorkplaceNumber(); ++i) { + workPositions.push_back(AGWorkPosition(&statData, **it)); ++workPositionCounter; } } @@ -166,7 +167,7 @@ void AGCity::generatePopulation() { - std::vector::iterator it; + std::vector::iterator it; SUMOReal people = 0; nbrCars = 0; unsigned int idHouseholds = 0; @@ -195,11 +196,11 @@ } } for (it = streets.begin(); it != streets.end(); ++it) { - people += it->getPopulation(); + people += (*it)->getPopulation(); while (people > 0 && idHouseholds < (unsigned int)numAdults.size()) { size_t i = RandHelper::rand(numAdults.size() - idHouseholds); ++idHouseholds; - households.push_back(AGHousehold(&*it, this, idHouseholds)); + households.push_back(AGHousehold(*it, this, idHouseholds)); households.back().generatePeople(abs(numAdults[i]), numChilds[i], numAdults[i] < 0); //&statData //households.back().generateCars(statData.carRate); people -= households.back().getPeopleNbr(); @@ -276,11 +277,11 @@ /*ofstream fichier("test.txt", ios::app); // ouverture en écriture avec effacement du fichier ouvert if(fichier) { - fichier << "===> WARNING: Not enough school places in the city for all children..." << std::endl; - fichier.close(); + fichier << "===> WARNING: Not enough school places in the city for all children..." << std::endl; + fichier.close(); } else - cerr << "Impossible d'ouvrir le fichier !" << std::endl;*/ + cerr << "Impossible d'ouvrir le fichier !" << std::endl;*/ //std::cout << "===> WARNING: Not enough school places in the city for all children..." << std::endl; } @@ -360,7 +361,12 @@ } // new rate: the rate on the people that have'nt any car yet: // nR = (R * Drivers - AlreadyCars) / (Drivers - AlreadyCars) - SUMOReal newRate = (statData.carRate * statData.getPeopleOlderThan(statData.limitAgeChildren) - statData.hhFarFromPT) / (statData.getPeopleOlderThan(statData.limitAgeChildren) - statData.hhFarFromPT); + SUMOReal newRate = statData.carRate * statData.getPeopleOlderThan(statData.limitAgeChildren) - statData.hhFarFromPT; + if (statData.getPeopleOlderThan(statData.limitAgeChildren) == statData.hhFarFromPT) { + newRate = 0.; + } else { + newRate /= statData.getPeopleOlderThan(statData.limitAgeChildren) - statData.hhFarFromPT; + } //std::cout << " - " << newRate << std::endl; if (newRate < 0 || newRate >= 1) { newRate = 0; @@ -398,10 +404,10 @@ std::cout << "first completed in getStreet() of City: Consolidation of data not needed in ActivityGen any more" << std::endl; } //rest of the function - std::vector::iterator it = streets.begin(); + std::vector::iterator it = streets.begin(); while (it != streets.end()) { - if (it->getName() == edge) { - return *it; + if ((*it)->getID() == edge) { + return **it; } ++it; } @@ -414,7 +420,7 @@ if (streets.empty()) { throw(std::runtime_error("No street found in this city")); } - return streets[RandHelper::rand(streets.size())]; + return *streets[RandHelper::rand(streets.size())]; } /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGCity.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGCity.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGCity.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGCity.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,14 +3,15 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGCity.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGCity.h 18095 2015-03-17 09:39:00Z behrisch $ /// // City class that contains all other objects of the city: in particular // streets, households, bus lines, work positions and schools /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -85,7 +86,7 @@ const AGStreet& getRandomStreet(); AGDataAndStatistics& statData; - std::vector streets; + std::vector streets; std::vector workPositions; std::list schools; std::list busLines; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGDataAndStatistics.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGDataAndStatistics.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGDataAndStatistics.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGDataAndStatistics.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,13 +5,13 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGDataAndStatistics.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGDataAndStatistics.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Contains various data, statistical values and functions from input used // by various objects /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGDataAndStatistics.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGDataAndStatistics.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGDataAndStatistics.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGDataAndStatistics.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,13 +5,13 @@ /// @author Jakob Erdmann /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGDataAndStatistics.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGDataAndStatistics.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Contains various data, statistical values and functions from input used // by various objects /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -50,8 +50,8 @@ /** * parameters */ - SUMOReal speedTimePerKm; //number of seconds for one km - SUMOReal carPreference; //prob. to choose the car (compared to the bus) + SUMOReal speedTimePerKm; //number of seconds for one km + SUMOReal carPreference; //prob. to choose the car (compared to the bus) /** * from General element from XML file. @@ -70,12 +70,12 @@ SUMOReal uniformRandomTrafficRate; SUMOReal departureVariation; - std::map beginWorkHours; // (number only used in term of PROPORTION: it should be normalized) - std::map endWorkHours; // (number only used in term of PROPORTION: it should be normalized) - std::map busStations; // + std::map beginWorkHours; // (number only used in term of PROPORTION: it should be normalized) + std::map endWorkHours; // (number only used in term of PROPORTION: it should be normalized) + std::map busStations; // //std::map schoolCapacity; - std::map population; // (number only used in term of PROPORTION: it should be normalized) - //std::map childrenAccompagniment; // + std::map population; // (number only used in term of PROPORTION: it should be normalized) + //std::map childrenAccompagniment; // /** * number of incoming or outgoing people through the given city gates * PROPORTION: it should be normalized diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGHousehold.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGHousehold.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGHousehold.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGHousehold.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,13 +5,13 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGHousehold.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGHousehold.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A household contains the people and cars of the city: roughly represents // families with their address, cars, adults and possibly children /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGHousehold.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGHousehold.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGHousehold.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGHousehold.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,14 +3,15 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGHousehold.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGHousehold.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A household contains the people and cars of the city: roughly represents // families with their address, cars, adults and possibly children /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -122,7 +123,6 @@ private: AGCity* myCity; AGPosition myLocation; - int myNumberOfCars; int myId; private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGPerson.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGPerson.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGPerson.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGPerson.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Piotr Woznica /// @author Walter Bamberger /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGPerson.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGPerson.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Parent object of every person, contains age and any natural characteristic /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -38,35 +39,25 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace std; - - -// =========================================================================== // method definitions // =========================================================================== AGPerson::AGPerson(int age) : age(age) {} -/****************************************************************************/ AGPerson::~AGPerson() {} -/****************************************************************************/ void AGPerson::print() const { - cout << "- Person: Age=" << age << endl; + std::cout << "- Person: Age=" << age << std::endl; } -/****************************************************************************/ int AGPerson::getAge() const { return age; } -/****************************************************************************/ bool AGPerson::decide(SUMOReal proba) const { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGPerson.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGPerson.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGPerson.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGPerson.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Walter Bamberger /// @author Daniel Krajzewicz /// @date July 2010 -/// @version $Id: AGPerson.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGPerson.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Parent object of every person, contains age and any natural characteristic /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGPosition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGPosition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGPosition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGPosition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGPosition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGPosition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // References a street of the city and defines a position in this street /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -125,8 +125,8 @@ Position AGPosition::compute2dPosition() const { // P = From + pos*(To - From) = pos*To + (1-pos)*From - Position From = street->edge->getFromNode()->getPosition(); - Position To = street->edge->getToNode()->getPosition(); + Position From = street->getFromNode()->getPosition(); + Position To = street->getToNode()->getPosition(); Position position2d(To); position2d.sub(From); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGPosition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGPosition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGPosition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGPosition.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGPosition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGPosition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // References a street of the city and defines a position in this street /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGSchool.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGSchool.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGSchool.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGSchool.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGSchool.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGSchool.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Correspond to given ages and referenced by children. Has a precise location. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -42,7 +42,7 @@ // method definitions // =========================================================================== void -AGSchool::print() { +AGSchool::print() const { std::cout << "- school: " << " placeNbr=" << capacity << " hours=[" << opening << ";" << closing << "] ages=[" << beginAge << ";" << endAge << "]" << std::endl; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGSchool.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGSchool.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGSchool.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGSchool.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGSchool.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGSchool.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Correspond to given ages and referenced by children. Has a precise location. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -51,7 +51,7 @@ location(pos), opening(open), closing(close) {}; - void print(); + void print() const; int getPlaces(); bool addNewChild(); bool removeChild(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGStreet.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGStreet.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGStreet.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGStreet.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Piotr Woznica /// @author Walter Bamberger /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGStreet.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGStreet.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Represents a SUMO edge and contains people and work densities /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -40,52 +41,45 @@ // =========================================================================== // method definitions // =========================================================================== -AGStreet::AGStreet(const ROEdge* edge, SUMOReal popDensity, SUMOReal workDensity) : - edge(edge) { - pop = popDensity * edge->getLength(); - work = workDensity * edge->getLength(); +AGStreet::AGStreet(const std::string& id, RONode* from, RONode* to, unsigned int index, const int priority) : + ROEdge(id, from, to, index, priority), myPopulation(0.), myNumWorkplaces(0.) { } void AGStreet::print() const { - std::cout << "- AGStreet: Name=" << edge->getID() << " Length=" << edge->getLength() << " pop=" << pop << " work=" << work << std::endl; -} - - -SUMOReal -AGStreet::getLength() const { - return edge->getLength(); -} - - -const std::string& -AGStreet::getName() const { - return edge->getID(); + std::cout << "- AGStreet: Name=" << getID() << " Length=" << getLength() << " pop=" << myPopulation << " work=" << myNumWorkplaces << std::endl; } SUMOReal AGStreet::getPopulation() const { - return pop; + return myPopulation; } void AGStreet::setPopulation(const SUMOReal population) { - pop = population; + myPopulation = population; } SUMOReal AGStreet::getWorkplaceNumber() const { - return work; + return myNumWorkplaces; } void AGStreet::setWorkplaceNumber(const SUMOReal workPositions) { - work = workPositions; + myNumWorkplaces = workPositions; } + +bool +AGStreet::allows(const SUMOVehicleClass vclass) const { + return (getPermissions() & vclass) == vclass; +} + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGStreet.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGStreet.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGStreet.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGStreet.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Piotr Woznica /// @author Walter Bamberger /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGStreet.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGStreet.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Represents a SUMO edge and contains people and work densities /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ @@ -35,12 +36,14 @@ #endif #include +#include +#include +#include // =========================================================================== // class declarations // =========================================================================== -class ROEdge; class AGPosition; @@ -54,21 +57,24 @@ * AGStreet represents a street in the city. It contains all model relevant * properties and is associated with a ROEdge of the routing network. */ -class AGStreet { +class AGStreet : public ROEdge { public: - AGStreet(const ROEdge* edge, SUMOReal popD = 0, SUMOReal workD = 0); + class Builder : public ROAbstractEdgeBuilder { + public: + /** @brief Builds an edge with the given name + * + * @param[in] name The name of the edge + * @param[in] from The node the edge begins at + * @param[in] to The node the edge ends at + * @param[in] priority The edge priority (road class) + * @return A proper instance of the named edge + */ + ROEdge* buildEdge(const std::string& name, RONode* from, RONode* to, const int priority) { + return new AGStreet(name, from, to, getNextIndex(), priority); + } + }; - /** @brief Provides the length of this edge. - * - * @return the length of this edge - */ - SUMOReal getLength() const; - - /** @brief Provides the id of this edge. - * - * @return the id of this edge - */ - const std::string& getName() const; + AGStreet(const std::string& id, RONode* from, RONode* to, unsigned int index, const int priority); /** @brief Provides the number of persons living in this street. * @@ -99,12 +105,16 @@ */ void print() const; -private: - friend class AGPosition; + /** @brief Returns whether the given vehicle class is allowed on this street. + * + * @param[in] vclass the class (passenger or bus) in question + * @return whether it is allowed on any of the lanes + */ + bool allows(const SUMOVehicleClass vclass) const; - const ROEdge* edge; - SUMOReal pop; - SUMOReal work; +private: + SUMOReal myPopulation; + SUMOReal myNumWorkplaces; }; #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGTime.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGTime.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGTime.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGTime.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGTime.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGTime.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Time manager: able to manipulate the time using Sumo's format (seconds) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGTime.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGTime.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGTime.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGTime.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date July 2010 -/// @version $Id: AGTime.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGTime.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Time manager: able to manipulate the time using Sumo's format (seconds) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGWorkPosition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGWorkPosition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGWorkPosition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGWorkPosition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGWorkPosition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGWorkPosition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Location and schedules of a work position: linked with one adult /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGWorkPosition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGWorkPosition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/AGWorkPosition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/AGWorkPosition.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Piotr Woznica /// @author Daniel Krajzewicz /// @author Walter Bamberger +/// @author Michael Behrisch /// @date July 2010 -/// @version $Id: AGWorkPosition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AGWorkPosition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Location and schedules of a work position: linked with one adult /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors // activitygen module // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/) /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/city/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/city/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/activitygen/city -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,6 +92,10 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libagcity_a_AR = $(AR) $(ARFLAGS) libagcity_a_LIBADD = am_libagcity_a_OBJECTS = AGTime.$(OBJEXT) AGCity.$(OBJEXT) \ @@ -56,30 +105,86 @@ AGChild.$(OBJEXT) AGDataAndStatistics.$(OBJEXT) \ AGCar.$(OBJEXT) libagcity_a_OBJECTS = $(am_libagcity_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libagcity_a_SOURCES) DIST_SOURCES = $(libagcity_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -88,6 +193,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -114,9 +220,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -127,10 +237,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -277,10 +383,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libagcity.a: $(libagcity_a_OBJECTS) $(libagcity_a_DEPENDENCIES) - -rm -f libagcity.a - $(libagcity_a_AR) libagcity.a $(libagcity_a_OBJECTS) $(libagcity_a_LIBADD) - $(RANLIB) libagcity.a + +libagcity.a: $(libagcity_a_OBJECTS) $(libagcity_a_DEPENDENCIES) $(EXTRA_libagcity_a_DEPENDENCIES) + $(AM_V_at)-rm -f libagcity.a + $(AM_V_AR)$(libagcity_a_AR) libagcity.a $(libagcity_a_OBJECTS) $(libagcity_a_LIBADD) + $(AM_V_at)$(RANLIB) libagcity.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -304,25 +411,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AGWorkPosition.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -330,26 +437,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -361,15 +457,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -378,6 +470,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -426,10 +533,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -514,18 +626,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -8,10 +8,12 @@ COMMON_LIBS = ../utils/options/liboptions.a \ ../utils/xml/libxml.a \ +../utils/vehicle/libvehicle.a \ ../utils/common/libcommon.a \ ../utils/importio/libimportio.a \ ../utils/iodevices/libiodevices.a \ ../utils/geom/libgeom.a \ +../utils/emissions/libemissions.a \ ../foreign/tcpip/libtcpip.a \ $(MEM_LIBS) \ $(XERCES_LIBS) @@ -30,4 +32,4 @@ ../duarouter/RODUAEdgeBuilder.o \ ../duarouter/RODUAFrame.o \ ../router/librouter.a \ -$(COMMON_LIBS) +$(COMMON_LIBS) $(FOX_LDFLAGS) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/activitygen/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/activitygen/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -37,7 +81,8 @@ target_triplet = @target@ bin_PROGRAMS = activitygen$(EXEEXT) subdir = src/activitygen -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -54,53 +99,114 @@ activitygen_OBJECTS = $(am_activitygen_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = ../utils/options/liboptions.a \ - ../utils/xml/libxml.a ../utils/common/libcommon.a \ - ../utils/importio/libimportio.a \ + ../utils/xml/libxml.a ../utils/vehicle/libvehicle.a \ + ../utils/common/libcommon.a ../utils/importio/libimportio.a \ ../utils/iodevices/libiodevices.a ../utils/geom/libgeom.a \ - ../foreign/tcpip/libtcpip.a $(MEM_LIBS) $(am__DEPENDENCIES_1) + ../utils/emissions/libemissions.a ../foreign/tcpip/libtcpip.a \ + $(MEM_LIBS) $(am__DEPENDENCIES_1) activitygen_DEPENDENCIES = ./activities/libagactivities.a \ ./city/libagcity.a ../duarouter/RODUAEdgeBuilder.o \ ../duarouter/RODUAFrame.o ../router/librouter.a \ - $(am__DEPENDENCIES_2) -activitygen_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +activitygen_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(activitygen_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(activitygen_SOURCES) DIST_SOURCES = $(activitygen_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -135,6 +241,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -161,9 +268,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -174,10 +285,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -275,10 +382,12 @@ @CHECK_MEMORY_LEAKS_TRUE@MEM_LIBS = ../foreign/nvwa/libnvwa.a COMMON_LIBS = ../utils/options/liboptions.a \ ../utils/xml/libxml.a \ +../utils/vehicle/libvehicle.a \ ../utils/common/libcommon.a \ ../utils/importio/libimportio.a \ ../utils/iodevices/libiodevices.a \ ../utils/geom/libgeom.a \ +../utils/emissions/libemissions.a \ ../foreign/tcpip/libtcpip.a \ $(MEM_LIBS) \ $(XERCES_LIBS) @@ -295,7 +404,7 @@ ../duarouter/RODUAEdgeBuilder.o \ ../duarouter/RODUAFrame.o \ ../router/librouter.a \ -$(COMMON_LIBS) +$(COMMON_LIBS) $(FOX_LDFLAGS) all: all-recursive @@ -333,14 +442,19 @@ $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -361,7 +475,8 @@ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -374,9 +489,10 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -activitygen$(EXEEXT): $(activitygen_OBJECTS) $(activitygen_DEPENDENCIES) + +activitygen$(EXEEXT): $(activitygen_OBJECTS) $(activitygen_DEPENDENCIES) $(EXTRA_activitygen_DEPENDENCIES) @rm -f activitygen$(EXEEXT) - $(activitygen_LINK) $(activitygen_OBJECTS) $(activitygen_LDADD) $(LIBS) + $(AM_V_CXXLD)$(activitygen_LINK) $(activitygen_OBJECTS) $(activitygen_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -391,25 +507,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activitygen_main.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -418,22 +534,25 @@ -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -448,57 +567,12 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -514,12 +588,7 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -531,15 +600,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -548,6 +613,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -584,13 +664,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -628,10 +705,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -713,24 +795,22 @@ uninstall-am: uninstall-binPROGRAMS -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-binPROGRAMS +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-binPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/config.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/config.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/config.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/config.h 2015-04-17 00:20:29.000000000 +0000 @@ -32,7 +32,10 @@ #define HAVE_FLOAT_H 1 /* Define to 1 if you have the `floor' function. */ -/* #undef HAVE_FLOOR */ +#define HAVE_FLOOR 1 + +/* defined if FOX is available */ +#define HAVE_FOX 1 /* defined if GDAL is available */ #define HAVE_GDAL 1 @@ -43,12 +46,6 @@ /* Define to 1 if you have the `gettimeofday' function. */ #define HAVE_GETTIMEOFDAY 1 -/* Define to 1 if you have the header file. */ -#define HAVE_GL_GLU_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_GL_GL_H 1 - /* Define to 1 if you want junction internal lanes */ #define HAVE_INTERNAL_LANES 1 @@ -78,13 +75,13 @@ /* #undef HAVE_OSG */ /* Define to 1 if you have the `pow' function. */ -/* #undef HAVE_POW */ +#define HAVE_POW 1 /* defined if PROJ is available */ #define HAVE_PROJ 1 /* defined if python is available */ -/* #undef HAVE_PYTHON */ +#define HAVE_PYTHON 1 /* Define to 1 if you have the `select' function. */ #define HAVE_SELECT 1 @@ -93,7 +90,7 @@ #define HAVE_SOCKET 1 /* Define to 1 if you have the `sqrt' function. */ -/* #undef HAVE_SQRT */ +#define HAVE_SQRT 1 /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ @@ -145,7 +142,7 @@ #define HAVE_WCHAR_H 1 /* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 +/* #undef HAVE__BOOL */ /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ @@ -162,7 +159,7 @@ /* #undef NO_TRACI */ /* defines the epsilon to use on general floating point comparison */ -#define NUMERICAL_EPS 0.001 +#define NUMERICAL_EPS (SUMOReal)0.001 /* defines the number of digits after the comma in output */ #define OUTPUT_ACCURACY 2 @@ -177,7 +174,7 @@ #define PACKAGE_NAME "sumo" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "sumo 0.18.0" +#define PACKAGE_STRING "sumo 0.23.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "sumo" @@ -186,10 +183,10 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.18.0" +#define PACKAGE_VERSION "0.23.0" /* defines the epsilon to use on position comparison */ -#define POSITION_EPS 0.1 +#define POSITION_EPS (SUMOReal)0.1 /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void @@ -212,7 +209,7 @@ /* #undef STACK_DIRECTION */ /* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 +/* #undef STDC_HEADERS */ /* defines the type for very long integers */ #define SUMOLong long long int @@ -227,7 +224,7 @@ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ -#define VERSION "0.18.0" +#define VERSION "0.23.0" /* Defined if auto-generated version.h is unavailable. */ /* #undef VERSION_STRING */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/config.h.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/config.h.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/config.h.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/config.h.in 2015-04-17 00:20:29.000000000 +0000 @@ -33,6 +33,9 @@ /* Define to 1 if you have the `floor' function. */ #undef HAVE_FLOOR +/* defined if FOX is available */ +#undef HAVE_FOX + /* defined if GDAL is available */ #undef HAVE_GDAL @@ -42,12 +45,6 @@ /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY -/* Define to 1 if you have the header file. */ -#undef HAVE_GL_GLU_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GL_GL_H - /* Define to 1 if you want junction internal lanes */ #undef HAVE_INTERNAL_LANES diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/dfrouter_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/dfrouter_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/dfrouter_main.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/dfrouter_main.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -7,12 +7,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Thu, 16.03.2006 -/// @version $Id: dfrouter_main.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: dfrouter_main.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Main for the DFROUTER /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -86,7 +86,7 @@ // read definitions stored in XML-format std::vector files = oc.getStringVector("detector-files"); for (std::vector::const_iterator fileIt = files.begin(); fileIt != files.end(); ++fileIt) { - if (!FileHelpers::exists(*fileIt)) { + if (!FileHelpers::isReadable(*fileIt)) { throw ProcessError("Could not open detector file '" + *fileIt + "'"); } PROGRESS_BEGIN_MESSAGE("Loading detector definitions from '" + *fileIt + "'"); @@ -113,7 +113,7 @@ // check whether the file exists std::vector files = oc.getStringVector("measure-files"); for (std::vector::const_iterator fileIt = files.begin(); fileIt != files.end(); ++fileIt) { - if (!FileHelpers::exists(*fileIt)) { + if (!FileHelpers::isReadable(*fileIt)) { throw ProcessError("The measure-file '" + *fileIt + "' can not be opened."); } // parse @@ -160,9 +160,8 @@ if (!detectors.detectorsHaveRoutes() || oc.getBool("revalidate-routes") || oc.getBool("guess-empty-flows")) { PROGRESS_BEGIN_MESSAGE("Computing routes"); optNet->buildRoutes(detectors, - oc.getBool("all-end-follower"), oc.getBool("keep-unfinished-routes"), - oc.getBool("routes-for-all"), !oc.getBool("keep-longer-routes"), - oc.getInt("max-search-depth")); + oc.getBool("keep-unfinished-routes"), oc.getBool("routes-for-all"), + !oc.getBool("keep-longer-routes"), oc.getInt("max-search-depth")); PROGRESS_DONE_MESSAGE(); } } @@ -265,7 +264,7 @@ OptionsCont& oc = OptionsCont::getOptions(); // give some application descriptions oc.setApplicationDescription("Builds vehicle routes for SUMO using detector values."); - oc.setApplicationName("dfrouter", "SUMO dfrouter Version " + (std::string)VERSION_STRING); + oc.setApplicationName("dfrouter", "SUMO dfrouter Version " + getBuildName(VERSION_STRING)); int ret = 0; RODFNet* net = 0; RODFDetectorCon* detectors = 0; @@ -279,7 +278,7 @@ SystemFrame::close(); return 0; } - XMLSubSys::setValidation(oc.getBool("xml-validation")); + XMLSubSys::setValidation(oc.getString("xml-validation"), oc.getString("xml-validation.net")); MsgHandler::initOutputOptions(); if (!RODFFrame::checkOptions()) { throw ProcessError(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -17,10 +17,12 @@ dfrouter_LDADD = ../router/librouter.a \ ../utils/options/liboptions.a \ ../utils/xml/libxml.a \ +../utils/vehicle/libvehicle.a \ ../utils/common/libcommon.a \ ../utils/importio/libimportio.a \ ../utils/iodevices/libiodevices.a \ ../utils/geom/libgeom.a \ +../utils/emissions/libemissions.a \ ../foreign/tcpip/libtcpip.a \ $(MEM_LIBS) \ --l$(LIB_XERCES) +-l$(LIB_XERCES) $(FOX_LDFLAGS) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -37,7 +81,8 @@ target_triplet = @target@ bin_PROGRAMS = dfrouter$(EXEEXT) subdir = src/dfrouter -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -55,38 +100,97 @@ RODFEdgeBuilder.$(OBJEXT) RODFEdge.$(OBJEXT) \ RODFFrame.$(OBJEXT) dfrouter_OBJECTS = $(am_dfrouter_OBJECTS) +am__DEPENDENCIES_1 = dfrouter_DEPENDENCIES = ../router/librouter.a \ ../utils/options/liboptions.a ../utils/xml/libxml.a \ - ../utils/common/libcommon.a ../utils/importio/libimportio.a \ + ../utils/vehicle/libvehicle.a ../utils/common/libcommon.a \ + ../utils/importio/libimportio.a \ ../utils/iodevices/libiodevices.a ../utils/geom/libgeom.a \ - ../foreign/tcpip/libtcpip.a $(MEM_LIBS) -dfrouter_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + ../utils/emissions/libemissions.a ../foreign/tcpip/libtcpip.a \ + $(MEM_LIBS) $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +dfrouter_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(dfrouter_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(dfrouter_SOURCES) DIST_SOURCES = $(dfrouter_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -95,6 +199,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -121,9 +226,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -134,10 +243,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -244,13 +349,15 @@ dfrouter_LDADD = ../router/librouter.a \ ../utils/options/liboptions.a \ ../utils/xml/libxml.a \ +../utils/vehicle/libvehicle.a \ ../utils/common/libcommon.a \ ../utils/importio/libimportio.a \ ../utils/iodevices/libiodevices.a \ ../utils/geom/libgeom.a \ +../utils/emissions/libemissions.a \ ../foreign/tcpip/libtcpip.a \ $(MEM_LIBS) \ --l$(LIB_XERCES) +-l$(LIB_XERCES) $(FOX_LDFLAGS) all: all-am @@ -288,14 +395,19 @@ $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -316,7 +428,8 @@ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -329,9 +442,10 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -dfrouter$(EXEEXT): $(dfrouter_OBJECTS) $(dfrouter_DEPENDENCIES) + +dfrouter$(EXEEXT): $(dfrouter_OBJECTS) $(dfrouter_DEPENDENCIES) $(EXTRA_dfrouter_DEPENDENCIES) @rm -f dfrouter$(EXEEXT) - $(dfrouter_LINK) $(dfrouter_OBJECTS) $(dfrouter_LDADD) $(LIBS) + $(AM_V_CXXLD)$(dfrouter_LINK) $(dfrouter_OBJECTS) $(dfrouter_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -351,25 +465,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfrouter_main.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -377,26 +491,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -408,15 +511,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -425,6 +524,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -476,10 +590,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -563,19 +682,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetector.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetector.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetector.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetector.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,13 +6,14 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @author Laura Bieker +/// @author Melanie Knocke /// @date Thu, 16.03.2006 -/// @version $Id: RODFDetector.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFDetector.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Class representing a detector within the DFROUTER /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -90,7 +91,7 @@ RODFDetector::computeDistanceFactor(const RODFRouteDesc& rd) const { SUMOReal distance = rd.edges2Pass[0]->getFromNode()->getPosition().distanceTo(rd.edges2Pass.back()->getToNode()->getPosition()); SUMOReal length = 0; - for (std::vector::const_iterator i = rd.edges2Pass.begin(); i != rd.edges2Pass.end(); ++i) { + for (ROEdgeVector::const_iterator i = rd.edges2Pass.begin(); i != rd.edges2Pass.end(); ++i) { length += (*i)->getLength(); } return (distance / length); @@ -107,23 +108,50 @@ // compute edges to determine split probabilities const std::vector& routes = myRoutes->get(); std::vector nextDetEdges; + std::set preSplitEdges; for (std::vector::const_iterator i = routes.begin(); i != routes.end(); ++i) { const RODFRouteDesc& rd = *i; bool hadSplit = false; - bool hadDetectorAfterSplit = false; - for (std::vector::const_iterator j = rd.edges2Pass.begin(); !hadDetectorAfterSplit && j != rd.edges2Pass.end(); ++j) { - if (hadSplit && !hadDetectorAfterSplit && net->hasDetector(*j)) { - hadDetectorAfterSplit = true; + for (ROEdgeVector::const_iterator j = rd.edges2Pass.begin(); j != rd.edges2Pass.end(); ++j) { + if (hadSplit && net->hasDetector(*j)) { if (find(nextDetEdges.begin(), nextDetEdges.end(), *j) == nextDetEdges.end()) { nextDetEdges.push_back(static_cast(*j)); } myRoute2Edge[rd.routename] = static_cast(*j); + break; + } + if (!hadSplit) { + preSplitEdges.insert(*j); } - if ((*j)->getNoFollowing() > 1) { + if ((*j)->getNumSuccessors() > 1) { hadSplit = true; } } } + std::map inFlows; + if (OptionsCont::getOptions().getBool("respect-concurrent-inflows")) { + for (std::vector::const_iterator i = nextDetEdges.begin(); i != nextDetEdges.end(); ++i) { + std::set seen(preSplitEdges); + ROEdgeVector pending; + pending.push_back(*i); + seen.insert(*i); + while (!pending.empty()) { + ROEdge* e = pending.back(); + pending.pop_back(); + for (ROEdgeVector::const_iterator it = e->getPredecessors().begin(); it != e->getPredecessors().end(); it++) { + ROEdge* e2 = *it; + if (e2->getNumSuccessors() == 1 && seen.count(e2) == 0) { + if (net->hasDetector(e2)) { + inFlows[*i] += detectors.getAggFlowFor(e2, 0, 0, flows); + } else { + pending.push_back(e2); + } + seen.insert(e2); + } + } + } + } + } // compute the probabilities to use a certain direction int index = 0; for (SUMOTime time = startTime; time < endTime; time += stepOffset, ++index) { @@ -131,7 +159,7 @@ SUMOReal overallProb = 0; // retrieve the probabilities for (std::vector::const_iterator i = nextDetEdges.begin(); i != nextDetEdges.end(); ++i) { - SUMOReal flow = detectors.getAggFlowFor(*i, time, 60, flows); + SUMOReal flow = detectors.getAggFlowFor(*i, time, 60, flows) - inFlows[*i]; overallProb += flow; mySplitProbabilities[index][*i] = flow; } @@ -165,22 +193,32 @@ size_t index = 0; for (std::vector::iterator ri = descs.begin(); ri != descs.end(); ++ri, index++) { SUMOReal prob = 1.; - for (std::vector::iterator j = (*ri).edges2Pass.begin(); j != (*ri).edges2Pass.end() && prob > 0; ++j) { + for (ROEdgeVector::iterator j = (*ri).edges2Pass.begin(); j != (*ri).edges2Pass.end() && prob > 0;) { if (!net.hasDetector(*j)) { + ++j; continue; } const RODFDetector& det = detectors.getAnyDetectorForEdge(static_cast(*j)); const std::vector >& probs = det.getSplitProbabilities(); if (probs.size() == 0) { prob = 0; + ++j; continue; } const std::map& tprobs = probs[(time - startTime) / stepOffset]; + RODFEdge* splitEdge = 0; for (std::map::const_iterator k = tprobs.begin(); k != tprobs.end(); ++k) { if (find(j, (*ri).edges2Pass.end(), (*k).first) != (*ri).edges2Pass.end()) { prob *= (*k).second; + splitEdge = (*k).first; + break; } } + if (splitEdge != 0) { + j = find(j, (*ri).edges2Pass.end(), splitEdge); + } else { + ++j; + } } into[time]->add(prob, index); (*ri).overallProb = prob; @@ -196,24 +234,24 @@ void -RODFDetector::addPriorDetector(RODFDetector* det) { - myPriorDetectors.push_back(det); +RODFDetector::addPriorDetector(const RODFDetector* det) { + myPriorDetectors.insert(det); } void -RODFDetector::addFollowingDetector(RODFDetector* det) { - myFollowingDetectors.push_back(det); +RODFDetector::addFollowingDetector(const RODFDetector* det) { + myFollowingDetectors.insert(det); } -const std::vector& +const std::set& RODFDetector::getPriorDetectors() const { return myPriorDetectors; } -const std::vector& +const std::set& RODFDetector::getFollowerDetectors() const { return myFollowingDetectors; } @@ -297,12 +335,15 @@ for (size_t car = 0; car < carNo; ++car) { // get the vehicle parameter SUMOReal v = -1; + std::string vtype; int destIndex = destDist != 0 && destDist->getOverallProb() > 0 ? (int) destDist->get() : -1; if (srcFD.isLKW >= 1) { srcFD.isLKW = srcFD.isLKW - (SUMOReal) 1.; v = srcFD.vLKW; + vtype = "LKW"; } else { v = srcFD.vPKW; + vtype = "PKW"; } // compute insertion speed if (v <= 0 || v > 250) { @@ -320,6 +361,9 @@ } else { out.writeAttr(SUMO_ATTR_ID, "calibrator_" + myID + "_" + toString(ctime)); } + if (oc.getBool("vtype")) { + out.writeAttr(SUMO_ATTR_TYPE, vtype); + } out.writeAttr(SUMO_ATTR_DEPART, time2string(ctime)); if (oc.isSet("departlane")) { out.writeNonEmptyAttr(SUMO_ATTR_DEPARTLANE, oc.getString("departlane")); @@ -561,6 +605,12 @@ } +RODFDetector& +RODFDetectorCon::getModifiableDetector(const std::string& id) const { + return *(myDetectorMap.find(id)->second); +} + + bool RODFDetectorCon::knows(const std::string& id) const { return myDetectorMap.find(id) != myDetectorMap.end(); @@ -582,7 +632,7 @@ } // OutputDevice& out = OutputDevice::getDevice(file); - out.writeXMLHeader("additional"); + out.writeXMLHeader("additional", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/additional_file.xsd\""); for (std::vector::const_iterator i = myDetectors.begin(); i != myDetectors.end(); ++i) { RODFDetector* det = *i; // get file name for values (emitter/calibrator definition) @@ -624,7 +674,7 @@ RODFDetectorCon::writeEmitterPOIs(const std::string& file, const RODFDetectorFlows& flows) { OutputDevice& out = OutputDevice::getDevice(file); - out.writeXMLHeader("additional"); + out.writeXMLHeader("additional", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/additional_file.xsd\""); for (std::vector::const_iterator i = myDetectors.begin(); i != myDetectors.end(); ++i) { RODFDetector* det = *i; SUMOReal flow = flows.getFlowSumSecure(det->getID()); @@ -703,7 +753,7 @@ SUMOTime startTime, SUMOTime endTime, SUMOTime stepOffset) { OutputDevice& out = OutputDevice::getDevice(file); - out.writeXMLHeader("additional"); + out.writeXMLHeader("additional", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/additional_file.xsd\""); for (std::vector::const_iterator i = myDetectors.begin(); i != myDetectors.end(); ++i) { RODFDetector* det = *i; // write the declaration into the file @@ -721,7 +771,7 @@ void RODFDetectorCon::writeEndRerouterDetectors(const std::string& file) { OutputDevice& out = OutputDevice::getDevice(file); - out.writeXMLHeader("additional"); + out.writeXMLHeader("additional", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/additional_file.xsd\""); for (std::vector::const_iterator i = myDetectors.begin(); i != myDetectors.end(); ++i) { RODFDetector* det = *i; // write the declaration into the file @@ -797,41 +847,42 @@ // routes must be built (we have ensured this in main) // detector followers/prior must be build (we have ensured this in main) // - bool changed = true; - while (changed) { - for (std::vector::const_iterator i = myDetectors.begin(); i != myDetectors.end(); ++i) { - RODFDetector* det = *i; - const std::vector& prior = det->getPriorDetectors(); - const std::vector& follower = det->getFollowerDetectors(); - size_t noFollowerWithRoutes = 0; - size_t noPriorWithRoutes = 0; - // count occurences of detectors with/without routes - std::vector::const_iterator j; - for (j = prior.begin(); j != prior.end(); ++j) { - if (flows.knows((*j)->getID())) { - ++noPriorWithRoutes; - } - } - assert(noPriorWithRoutes <= prior.size()); - for (j = follower.begin(); j != follower.end(); ++j) { - if (flows.knows((*j)->getID())) { - ++noFollowerWithRoutes; - } - } - assert(noFollowerWithRoutes <= follower.size()); - - // do not process detectors which have no routes - if (!flows.knows(det->getID())) { - continue; - } - - // plain case: some of the following detectors have no routes - if (noFollowerWithRoutes == follower.size()) { - // the number of vehicles is the sum of all vehicles on prior - continue; + for (std::vector::const_iterator i = myDetectors.begin(); i != myDetectors.end(); ++i) { + RODFDetector* det = *i; + const std::set& prior = det->getPriorDetectors(); + const std::set& follower = det->getFollowerDetectors(); + size_t noFollowerWithRoutes = 0; + size_t noPriorWithRoutes = 0; + // count occurences of detectors with/without routes + std::set::const_iterator j; + for (j = prior.begin(); j != prior.end(); ++j) { + if (flows.knows((*j)->getID())) { + ++noPriorWithRoutes; + } + } + for (j = follower.begin(); j != follower.end(); ++j) { + if (flows.knows((*j)->getID())) { + ++noFollowerWithRoutes; } + } + // do not process detectors which have no routes + if (!flows.knows(det->getID())) { + continue; + } + + // plain case: all of the prior detectors have routes + if (noPriorWithRoutes == prior.size()) { + // the number of vehicles is the sum of all vehicles on prior + continue; } + + // plain case: all of the follower detectors have routes + if (noFollowerWithRoutes == follower.size()) { + // the number of vehicles is the sum of all vehicles on follower + continue; + } + } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetectorFlow.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetectorFlow.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetectorFlow.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetectorFlow.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Eric Nicolay /// @author Michael Behrisch +/// @author Melanie Knocke /// @date Thu, 16.03.2006 -/// @version $Id: RODFDetectorFlow.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFDetectorFlow.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Storage for flows within the DFROUTER /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -79,10 +80,8 @@ ofd.vLKW = ofd.vLKW + fd.vLKW; //!!! mean value? ofd.vPKW = ofd.vPKW + fd.vPKW; //!!! mean value? } - if (ofd.qLKW != 0 && ofd.qPKW != 0) { - ofd.fLKW = ofd.qLKW / ofd.qPKW; - } else if (ofd.qPKW != 0) { - ofd.fLKW = 0; + if (ofd.qPKW != 0) { + ofd.fLKW = ofd.qLKW / (ofd.qLKW + ofd.qPKW); } else { ofd.fLKW = 1; ofd.isLKW = 1; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetectorFlow.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetectorFlow.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetectorFlow.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetectorFlow.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Eric Nicolay /// @author Michael Behrisch /// @date Thu, 16.03.2006 -/// @version $Id: RODFDetectorFlow.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFDetectorFlow.h 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetector.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetector.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetector.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetector.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Eric Nicolay /// @author Michael Behrisch /// @date Thu, 16.03.2006 -/// @version $Id: RODFDetector.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFDetector.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Class representing a detector within the DFROUTER /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -157,10 +158,10 @@ void addRoutes(RODFRouteCont* routes); bool hasRoutes() const; const std::vector& getRouteVector() const; - void addPriorDetector(RODFDetector* det); - void addFollowingDetector(RODFDetector* det); - const std::vector& getPriorDetectors() const; - const std::vector& getFollowerDetectors() const; + void addPriorDetector(const RODFDetector* det); + void addFollowingDetector(const RODFDetector* det); + const std::set& getPriorDetectors() const; + const std::set& getFollowerDetectors() const; /// @name Writing methods @@ -204,7 +205,7 @@ SUMOReal myPosition; RODFDetectorType myType; RODFRouteCont* myRoutes; - std::vector myPriorDetectors, myFollowingDetectors; + std::set myPriorDetectors, myFollowingDetectors; std::vector > mySplitProbabilities; std::map myRoute2Edge; @@ -237,6 +238,7 @@ void saveRoutes(const std::string& file) const; const RODFDetector& getDetector(const std::string& id) const; + RODFDetector& getModifiableDetector(const std::string& id) const; const RODFDetector& getAnyDetectorForEdge(const RODFEdge* const edge) const; bool knows(const std::string& id) const; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetectorHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetectorHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetectorHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetectorHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Thu, 16.03.2006 -/// @version $Id: RODFDetectorHandler.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFDetectorHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A handler for loading detector descriptions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetectorHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetectorHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetectorHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetectorHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Thu, 16.03.2006 -/// @version $Id: RODFDetectorHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFDetectorHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetFlowLoader.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetFlowLoader.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetFlowLoader.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetFlowLoader.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Thu, 16.03.2006 -/// @version $Id: RODFDetFlowLoader.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFDetFlowLoader.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A loader for detector flows /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -79,14 +79,16 @@ if (!myDetectorContainer.knows(detName)) { continue; } - const SUMOTime time = TplConvert::_2int((myLineHandler.get("time").c_str())) * myTimeScale - myTimeOffset; - if (time < myStartTime || time > myEndTime) { + const SUMOReal parsedTime = TplConvert::_2SUMOReal((myLineHandler.get("time").c_str())) * myTimeScale - myTimeOffset; + // parsing as float to handle values which would cause int overflow + if (parsedTime < myStartTime || parsedTime >= myEndTime) { if (!myHaveWarnedAboutOverridingBoundaries) { myHaveWarnedAboutOverridingBoundaries = true; WRITE_WARNING("At least one value lies beyond given time boundaries."); } continue; } + const SUMOTime time = (SUMOTime)(parsedTime + .5); FlowDef fd; fd.isLKW = 0; fd.qPKW = TplConvert::_2SUMOReal(myLineHandler.get("qpkw").c_str()); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetFlowLoader.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetFlowLoader.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFDetFlowLoader.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFDetFlowLoader.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Eric Nicolay /// @author Michael Behrisch /// @date Thu, 16.03.2006 -/// @version $Id: RODFDetFlowLoader.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFDetFlowLoader.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A loader for detector flows /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFEdgeBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFEdgeBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFEdgeBuilder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFEdgeBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Eric Nicolay /// @author Michael Behrisch +/// @author Yun-Pang Floetteroed /// @date Thu, 16.03.2006 -/// @version $Id: RODFEdgeBuilder.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFEdgeBuilder.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Interface for building instances of dfrouter-edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFEdgeBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFEdgeBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFEdgeBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFEdgeBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Eric Nicolay /// @author Michael Behrisch +/// @author Yun-Pang Floetteroed /// @date Thu, 16.03.2006 -/// @version $Id: RODFEdgeBuilder.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFEdgeBuilder.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Interface for building instances of dfrouter-edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFEdge.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFEdge.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFEdge.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFEdge.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,15 @@ /// @file RODFEdge.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann +/// @author Yun-Pang Floetteroed /// @date Thu, 16.03.2006 -/// @version $Id: RODFEdge.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFEdge.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // An edge within the DFROUTER /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFEdge.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFEdge.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFEdge.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFEdge.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file RODFEdge.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Yun-Pang Floetteroed /// @date Thu, 16.03.2006 -/// @version $Id: RODFEdge.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFEdge.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An edge within the DFROUTER /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFFrame.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFFrame.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFFrame.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFFrame.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,14 @@ /// @author Eric Nicolay /// @author Jakob Erdmann /// @author Michael Behrisch +/// @author Melanie Knocke /// @date Thu, 16.03.2006 -/// @version $Id: RODFFrame.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFFrame.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for df-routing /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -106,6 +107,9 @@ oc.doRegister("emitters-output", new Option_FileName()); oc.addDescription("emitters-output", "Output", "Saves emitter definitions for source detectors to FILE"); + oc.doRegister("vtype", new Option_Bool(false)); + oc.addDescription("vtype", "Output", "Add vehicle types to the emitters file (PKW, LKW)"); + oc.doRegister("emitters-poi-output", new Option_FileName()); // !!! describe oc.addDescription("emitters-poi-output", "Output", "Saves emitter positions as pois to FILE"); @@ -125,8 +129,8 @@ // register processing options // to guess empty flows - oc.doRegister("guess-empty-flows", new Option_Bool(false)); // !!! describe - oc.addDescription("guess-empty-flows", "Processing", ""); + oc.doRegister("guess-empty-flows", new Option_Bool(false)); + oc.addDescription("guess-empty-flows", "Processing", "Derive missing flow values from upstream or downstream (not working!)"); // for guessing source/sink detectors oc.doRegister("highway-mode", 'h', new Option_Bool(false)); // !!! describe @@ -144,9 +148,6 @@ oc.doRegister("revalidate-routes", new Option_Bool(false)); oc.addDescription("revalidate-routes", "Processing", "Recomputes routes even if given"); - oc.doRegister("all-end-follower", new Option_Bool(false)); - oc.addDescription("all-end-follower", "Processing", "Continues routes till the first street after a sink"); - oc.doRegister("keep-unfinished-routes", new Option_Bool(false)); oc.addSynonyme("keep-unfinished-routes", "keep-unfound-ends", true); oc.addDescription("keep-unfinished-routes", "Processing", "Keeps routes even if they have exhausted max-search-depth"); @@ -170,7 +171,7 @@ oc.doRegister("min-route-length", new Option_Float(-1)); oc.addSynonyme("min-route-length", "min-dist", true); oc.addSynonyme("min-route-length", "min-distance", true); - oc.addDescription("min-route-length", "Processing", "Minimum distance in meters between start and end node of every route."); + oc.addDescription("min-route-length", "Processing", "Minimum distance in meters between start and end node of every route"); // flow reading oc.doRegister("time-factor", new Option_String("60", "TIME")); @@ -200,6 +201,9 @@ oc.doRegister("strict-sources", new Option_Bool(false)); // !!!undescribed oc.addDescription("strict-sources", "Processing", ""); + oc.doRegister("respect-concurrent-inflows", new Option_Bool(false)); + oc.addDescription("respect-concurrent-inflows", "Processing", "Try to determine further inflows to an inbetween detector when computing split probabilities"); + /* disabled, see ticket #521 oc.doRegister("join-lanes", new Option_Bool(false)); oc.addSynonyme("join-lanes", "mesosim", true); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFFrame.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFFrame.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFFrame.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFFrame.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Eric Nicolay /// @author Michael Behrisch /// @date Thu, 16.03.2006 -/// @version $Id: RODFFrame.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFFrame.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for df-routing /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFNet.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFNet.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFNet.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFNet.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Thu, 16.03.2006 -/// @version $Id: RODFNet.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFNet.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A DFROUTER-network /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -70,10 +70,9 @@ const std::map& edges = getEdgeMap(); for (std::map::const_iterator rit = edges.begin(); rit != edges.end(); ++rit) { ROEdge* ce = (*rit).second; - unsigned int i = 0; - unsigned int length_size = ce->getNoFollowing(); - for (i = 0; i < length_size; i++) { - ROEdge* help = ce->getFollower(i); + const ROEdgeVector& successors = ce->getSuccessors(); + for (ROEdgeVector::const_iterator it = successors.begin(); it != successors.end(); ++it) { + ROEdge* help = *it; if (find(myDisallowedEdges.begin(), myDisallowedEdges.end(), help->getID()) != myDisallowedEdges.end()) { // edges in sinks will not be used continue; @@ -84,12 +83,12 @@ } // add the connection help->ce to myApproachingEdges if (myApproachingEdges.find(help) == myApproachingEdges.end()) { - myApproachingEdges[help] = std::vector(); + myApproachingEdges[help] = ROEdgeVector(); } myApproachingEdges[help].push_back(ce); // add the connection ce->help to myApproachingEdges if (myApproachedEdges.find(ce) == myApproachedEdges.end()) { - myApproachedEdges[ce] = std::vector(); + myApproachedEdges[ce] = ROEdgeVector(); } myApproachedEdges[ce].push_back(help); } @@ -187,15 +186,15 @@ RODFNet::computeRoutesFor(ROEdge* edge, RODFRouteDesc& base, int /*no*/, bool keepUnfoundEnds, bool keepShortestOnly, - std::vector& /*visited*/, + ROEdgeVector& /*visited*/, const RODFDetector& det, RODFRouteCont& into, const RODFDetectorCon& detectors, int maxFollowingLength, - std::vector& seen) const { + ROEdgeVector& seen) const { std::vector unfoundEnds; std::priority_queue, DFRouteDescByTimeComperator> toSolve; - std::map > dets2Follow; - dets2Follow[edge] = std::vector(); + std::map dets2Follow; + dets2Follow[edge] = ROEdgeVector(); base.passedNo = 0; SUMOReal minDist = OptionsCont::getOptions().getFloat("min-route-length"); toSolve.push(base); @@ -205,9 +204,9 @@ ROEdge* last = *(current.edges2Pass.end() - 1); if (hasDetector(last)) { if (dets2Follow.find(last) == dets2Follow.end()) { - dets2Follow[last] = std::vector(); + dets2Follow[last] = ROEdgeVector(); } - for (std::vector::reverse_iterator i = current.edges2Pass.rbegin() + 1; i != current.edges2Pass.rend(); ++i) { + for (ROEdgeVector::reverse_iterator i = current.edges2Pass.rbegin() + 1; i != current.edges2Pass.rend(); ++i) { if (hasDetector(*i)) { dets2Follow[*i].push_back(last); break; @@ -292,7 +291,7 @@ } } // ... else: loop over the next edges - const std::vector& appr = myApproachedEdges.find(last)->second; + const ROEdgeVector& appr = myApproachedEdges.find(last)->second; bool hadOne = false; for (size_t i = 0; i < appr.size(); i++) { if (find(current.edges2Pass.begin(), current.edges2Pass.end(), appr[i]) != current.edges2Pass.end()) { @@ -321,13 +320,14 @@ // if (!keepUnfoundEnds) { std::vector::iterator i; - std::vector lastDetEdges; + ConstROEdgeVector lastDetEdges; for (i = unfoundEnds.begin(); i != unfoundEnds.end(); ++i) { if (find(lastDetEdges.begin(), lastDetEdges.end(), (*i).lastDetectorEdge) == lastDetEdges.end()) { lastDetEdges.push_back((*i).lastDetectorEdge); } else { bool ok = into.removeRouteDesc(*i); assert(ok); + UNUSED_PARAMETER(ok); // ony used for assertion } } } else { @@ -342,8 +342,7 @@ void -RODFNet::buildRoutes(RODFDetectorCon& detcont, bool allEndFollower, - bool keepUnfoundEnds, bool includeInBetween, +RODFNet::buildRoutes(RODFDetectorCon& detcont, bool keepUnfoundEnds, bool includeInBetween, bool keepShortestOnly, int maxFollowingLength) const { // build needed information first buildDetectorEdgeDependencies(detcont); @@ -357,7 +356,7 @@ (*i)->addRoutes(new RODFRouteCont(*doneEdges[e])); continue; } - std::vector seen; + ROEdgeVector seen; RODFRouteCont* routes = new RODFRouteCont(); doneEdges[e] = routes; RODFRouteDesc rd; @@ -371,13 +370,10 @@ rd.overallProb = 0; - std::vector visited; + ROEdgeVector visited; visited.push_back(e); computeRoutesFor(e, rd, 0, keepUnfoundEnds, keepShortestOnly, visited, **i, *routes, detcont, maxFollowingLength, seen); - if (allEndFollower) { - routes->addAllEndFollower(); - } //!!!routes->removeIllegal(illegals); (*i)->addRoutes(routes); @@ -390,8 +386,8 @@ SUMOReal duration = mrd.duration_2; SUMOReal distance = mrd.distance; // go through each route's edges - std::vector::const_iterator routeend = mrd.edges2Pass.end(); - for (std::vector::const_iterator k = mrd.edges2Pass.begin(); k != routeend; ++k) { + ROEdgeVector::const_iterator routeend = mrd.edges2Pass.end(); + for (ROEdgeVector::const_iterator k = mrd.edges2Pass.begin(); k != routeend; ++k) { // check whether any detectors lies on the current edge if (myDetectorsOnEdges.find(*k) == myDetectorsOnEdges.end()) { duration -= (*k)->getLength() / (*k)->getSpeed(); @@ -446,7 +442,7 @@ // lets find preceding detectors and rebuild the flows if possible WRITE_WARNING("Detector '" + detector->getID() + "' has no flows.\n Trying to rebuild."); // go back and collect flows - std::vector previous; + ROEdgeVector previous; { std::vector missing; IterationEdge ie; @@ -457,8 +453,8 @@ while (!missing.empty() && !maxDepthReached) { IterationEdge last = missing.back(); missing.pop_back(); - std::vector approaching = myApproachingEdges[last.edge]; - for (std::vector::const_iterator j = approaching.begin(); j != approaching.end(); ++j) { + ROEdgeVector approaching = myApproachingEdges[last.edge]; + for (ROEdgeVector::const_iterator j = approaching.begin(); j != approaching.end(); ++j) { if (hasDetector(*j)) { previous.push_back(*j); } else { @@ -477,10 +473,10 @@ } // Edges with previous detectors are now in "previous"; // compute following - std::vector latter; + ROEdgeVector latter; { std::vector missing; - for (std::vector::const_iterator k = previous.begin(); k != previous.end(); ++k) { + for (ROEdgeVector::const_iterator k = previous.begin(); k != previous.end(); ++k) { IterationEdge ie; ie.depth = 0; ie.edge = *k; @@ -490,8 +486,8 @@ while (!missing.empty() && !maxDepthReached) { IterationEdge last = missing.back(); missing.pop_back(); - std::vector approached = myApproachedEdges[last.edge]; - for (std::vector::const_iterator j = approached.begin(); j != approached.end(); ++j) { + ROEdgeVector approached = myApproachedEdges[last.edge]; + for (ROEdgeVector::const_iterator j = approached.begin(); j != approached.end(); ++j) { if (*j == getDetectorEdge(*detector)) { continue; } @@ -528,7 +524,7 @@ // collect incoming { // !! time difference is missing - for (std::vector::iterator i = previous.begin(); i != previous.end(); ++i) { + for (ROEdgeVector::iterator i = previous.begin(); i != previous.end(); ++i) { const std::vector& flows = static_cast(*i)->getFlows(); if (flows.size() != 0) { const FlowDef& srcFD = flows[index]; @@ -549,7 +545,7 @@ outFlow.vPKW = 0; { // !! time difference is missing - for (std::vector::iterator i = latter.begin(); i != latter.end(); ++i) { + for (ROEdgeVector::iterator i = latter.begin(); i != latter.end(); ++i) { const std::vector& flows = static_cast(*i)->getFlows(); if (flows.size() != 0) { const FlowDef& srcFD = flows[index]; @@ -686,28 +682,28 @@ bool RODFNet::isSource(const RODFDetector& det, const RODFDetectorCon& detectors, bool strict) const { - std::vector seen; + ROEdgeVector seen; return isSource(det, getDetectorEdge(det), seen, detectors, strict); } bool RODFNet::isFalseSource(const RODFDetector& det, const RODFDetectorCon& detectors) const { - std::vector seen; + ROEdgeVector seen; return isFalseSource(det, getDetectorEdge(det), seen, detectors); } bool RODFNet::isDestination(const RODFDetector& det, const RODFDetectorCon& detectors) const { - std::vector seen; + ROEdgeVector seen; return isDestination(det, getDetectorEdge(det), seen, detectors); } bool RODFNet::isSource(const RODFDetector& det, ROEdge* edge, - std::vector& seen, + ROEdgeVector& seen, const RODFDetectorCon& detectors, bool strict) const { if (seen.size() == 1000) { // !!! @@ -749,7 +745,7 @@ } // the next is a hack for the A100 scenario... // We have to look into further edges herein edges - const std::vector& appr = myApproachingEdges.find(edge)->second; + const ROEdgeVector& appr = myApproachingEdges.find(edge)->second; size_t noOk = 0; size_t noFalse = 0; size_t noSkipped = 0; @@ -783,7 +779,7 @@ } // let's check the edges in front - const std::vector& appr = myApproachingEdges.find(edge)->second; + const ROEdgeVector& appr = myApproachingEdges.find(edge)->second; size_t noOk = 0; size_t noFalse = 0; size_t noSkipped = 0; @@ -809,7 +805,7 @@ bool -RODFNet::isDestination(const RODFDetector& det, ROEdge* edge, std::vector& seen, +RODFNet::isDestination(const RODFDetector& det, ROEdge* edge, ROEdgeVector& seen, const RODFDetectorCon& detectors) const { if (seen.size() == 1000) { // !!! WRITE_WARNING("Quitting checking for being a destination for detector '" + det.getID() + "' due to seen edge limit."); @@ -868,7 +864,7 @@ myDetectorEdges.find(det.getID())->second != edge) { return false; } - const std::vector& appr = myApproachedEdges.find(edge)->second; + const ROEdgeVector& appr = myApproachedEdges.find(edge)->second; bool isall = true; size_t no = 0; seen.push_back(edge); @@ -885,7 +881,7 @@ } bool -RODFNet::isFalseSource(const RODFDetector& det, ROEdge* edge, std::vector& seen, +RODFNet::isFalseSource(const RODFDetector& det, ROEdge* edge, ROEdgeVector& seen, const RODFDetectorCon& detectors) const { if (seen.size() == 1000) { // !!! WRITE_WARNING("Quitting checking for being a false source for detector '" + det.getID() + "' due to seen edge limit."); @@ -918,7 +914,7 @@ return false; } - const std::vector& appr = myApproachedEdges.find(edge)->second; + const ROEdgeVector& appr = myApproachedEdges.find(edge)->second; bool isall = false; for (size_t i = 0; i < appr.size() && !isall; i++) { //printf("checking %s->\n", appr[i].c_str()); @@ -1024,27 +1020,27 @@ { const std::vector& detNames = myDetectorsOnEdges.find((*i).second)->second; for (std::vector::const_iterator j = detNames.begin(); j != detNames.end(); ++j) { - last.push_back((RODFDetector*) &detectors.getDetector(*j)); + last.push_back(&detectors.getModifiableDetector(*j)); } } // iterate over the current detector's routes const std::vector& routes = det.getRouteVector(); for (std::vector::const_iterator j = routes.begin(); j != routes.end(); ++j) { - const std::vector& edges2Pass = (*j).edges2Pass; - for (std::vector::const_iterator k = edges2Pass.begin() + 1; k != edges2Pass.end(); ++k) { + const ROEdgeVector& edges2Pass = (*j).edges2Pass; + for (ROEdgeVector::const_iterator k = edges2Pass.begin() + 1; k != edges2Pass.end(); ++k) { if (myDetectorsOnEdges.find(*k) != myDetectorsOnEdges.end()) { const std::vector& detNames = myDetectorsOnEdges.find(*k)->second; // ok, consecutive detector found for (std::vector::iterator l = last.begin(); l != last.end(); ++l) { // mark as follower of current for (std::vector::const_iterator m = detNames.begin(); m != detNames.end(); ++m) { - ((RODFDetector*) &detectors.getDetector(*m))->addPriorDetector((RODFDetector*) & (*l)); - (*l)->addFollowingDetector((RODFDetector*) &detectors.getDetector(*m)); + detectors.getModifiableDetector(*m).addPriorDetector(*l); + (*l)->addFollowingDetector(&detectors.getDetector(*m)); } } last.clear(); for (std::vector::const_iterator m = detNames.begin(); m != detNames.end(); ++m) { - last.push_back((RODFDetector*) &detectors.getDetector(*m)); + last.push_back(&detectors.getModifiableDetector(*m)); } } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFNet.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFNet.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFNet.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFNet.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Eric Nicolay /// @author Michael Behrisch /// @date Thu, 16.03.2006 -/// @version $Id: RODFNet.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFNet.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A DFROUTER-network /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -64,8 +64,7 @@ void computeTypes(RODFDetectorCon& dets, bool sourcesStrict) const; - void buildRoutes(RODFDetectorCon& det, bool allEndFollower, - bool keepUnfoundEnds, bool includeInBetween, + void buildRoutes(RODFDetectorCon& det, bool keepUnfoundEnds, bool includeInBetween, bool keepShortestOnly, int maxFollowingLength) const; SUMOReal getAbsPos(const RODFDetector& det) const; @@ -105,20 +104,20 @@ ROEdge* getDetectorEdge(const RODFDetector& det) const; bool isSource(const RODFDetector& det, ROEdge* edge, - std::vector& seen, const RODFDetectorCon& detectors, + ROEdgeVector& seen, const RODFDetectorCon& detectors, bool strict) const; bool isFalseSource(const RODFDetector& det, ROEdge* edge, - std::vector& seen, const RODFDetectorCon& detectors) const; - bool isDestination(const RODFDetector& det, ROEdge* edge, std::vector& seen, + ROEdgeVector& seen, const RODFDetectorCon& detectors) const; + bool isDestination(const RODFDetector& det, ROEdge* edge, ROEdgeVector& seen, const RODFDetectorCon& detectors) const; void computeRoutesFor(ROEdge* edge, RODFRouteDesc& base, int no, bool keepUnfoundEnds, bool keepShortestOnly, - std::vector& visited, const RODFDetector& det, + ROEdgeVector& visited, const RODFDetector& det, RODFRouteCont& into, const RODFDetectorCon& detectors, int maxFollowingLength, - std::vector& seen) const; + ROEdgeVector& seen) const; void buildDetectorEdgeDependencies(RODFDetectorCon& dets) const; @@ -159,10 +158,10 @@ }; /// @brief Map of edge name->list of names of this edge approaching edges - std::map > myApproachingEdges; + std::map myApproachingEdges; /// @brief Map of edge name->list of names of edges approached by this edge - std::map > myApproachedEdges; + std::map myApproachedEdges; mutable std::map, idComp> myDetectorsOnEdges; mutable std::map myDetectorEdges; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFRouteCont.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFRouteCont.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFRouteCont.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFRouteCont.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Laura Bieker /// @author Michael Behrisch /// @date Thu, 16.03.2006 -/// @version $Id: RODFRouteCont.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFRouteCont.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A container for routes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -91,7 +91,7 @@ assert(desc.edges2Pass.size() >= 1); out.openTag(SUMO_TAG_ROUTE).writeAttr(SUMO_ATTR_ID, prependix + desc.routename); out << " edges=\""; - for (std::vector::const_iterator k = desc.edges2Pass.begin(); k != desc.edges2Pass.end(); k++) { + for (ROEdgeVector::const_iterator k = desc.edges2Pass.begin(); k != desc.edges2Pass.end(); k++) { if (k != desc.edges2Pass.begin()) { out << ' '; } @@ -112,13 +112,13 @@ void -RODFRouteCont::removeIllegal(const std::vector >& illegals) { +RODFRouteCont::removeIllegal(const std::vector& illegals) { for (std::vector::iterator i = myRoutes.begin(); i != myRoutes.end();) { RODFRouteDesc& desc = *i; bool remove = false; - for (std::vector >::const_iterator j = illegals.begin(); !remove && j != illegals.end(); ++j) { + for (std::vector::const_iterator j = illegals.begin(); !remove && j != illegals.end(); ++j) { int noFound = 0; - for (std::vector::const_iterator k = (*j).begin(); !remove && k != (*j).end(); ++k) { + for (ROEdgeVector::const_iterator k = (*j).begin(); !remove && k != (*j).end(); ++k) { if (find(desc.edges2Pass.begin(), desc.edges2Pass.end(), *k) != desc.edges2Pass.end()) { noFound++; if (noFound > 1) { @@ -136,27 +136,6 @@ } -void -RODFRouteCont::addAllEndFollower() { - std::vector newRoutes; - for (std::vector::iterator i = myRoutes.begin(); i != myRoutes.end(); ++i) { - RODFRouteDesc& desc = *i; - ROEdge* last = *(desc.edges2Pass.end() - 1); - if (last->getNoFollowing() == 0) { - newRoutes.push_back(desc); - continue; - } - for (unsigned int j = 0; j < last->getNoFollowing(); ++j) { - RODFRouteDesc ndesc(desc); - ndesc.edges2Pass.push_back(last->getFollower(j)); - setID(ndesc); - newRoutes.push_back(ndesc); - } - } - myRoutes = newRoutes; -} - - void RODFRouteCont::setID(RODFRouteDesc& desc) const { std::pair c(desc.edges2Pass[0], desc.edges2Pass.back()); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFRouteCont.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFRouteCont.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFRouteCont.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFRouteCont.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Thu, 16.03.2006 -/// @version $Id: RODFRouteCont.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFRouteCont.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A container for routes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -130,12 +130,7 @@ * @param[in] illegals List of edge combinations that shall not be passed * @todo Not used, yet */ - void removeIllegal(const std::vector >& illegals); - - - /** @brief All routes are replaced by their versions extended by follower edges - */ - void addAllEndFollower(); + void removeIllegal(const std::vector& illegals); protected: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFRouteDesc.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFRouteDesc.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/dfrouter/RODFRouteDesc.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/dfrouter/RODFRouteDesc.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Thu, 16.03.2006 -/// @version $Id: RODFRouteDesc.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODFRouteDesc.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A route within the DFROUTER /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -42,6 +42,7 @@ class ROEdge; class RODFDetector; +typedef std::vector ROEdgeVector; // =========================================================================== // struct definitions @@ -52,7 +53,7 @@ */ struct RODFRouteDesc { /// @brief The edges the route is made of - std::vector edges2Pass; + ROEdgeVector edges2Pass; /// @brief The name of the route std::string routename; SUMOReal duration_2; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/duarouter/duarouter_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/duarouter/duarouter_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/duarouter/duarouter_main.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/duarouter/duarouter_main.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Thu, 06 Jun 2002 -/// @version $Id: duarouter_main.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: duarouter_main.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Main for DUAROUTER /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -44,10 +44,12 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "RODUAEdgeBuilder.h" #include #include @@ -62,12 +64,6 @@ #include "RODUAFrame.h" #include -#ifdef HAVE_INTERNAL // catchall for internal stuff -#include -#include -#include -#endif // have HAVE_INTERNAL - #ifdef CHECK_MEMORY_LEAKS #include #endif // CHECK_MEMORY_LEAKS @@ -123,46 +119,39 @@ if (measure == "traveltime") { if (routingAlgorithm == "dijkstra") { if (net.hasRestrictions()) { - router = new DijkstraRouterTT_Direct >( - net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTime); + router = new DijkstraRouterTT >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic); } else { - router = new DijkstraRouterTT_Direct >( - net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTime); + router = new DijkstraRouterTT >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic); } } else if (routingAlgorithm == "astar") { if (net.hasRestrictions()) { - router = new AStarRouterTT_Direct >( - net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTime); + router = new AStarRouter >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic); } else { - router = new AStarRouterTT_Direct >( - net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTime); + router = new AStarRouter >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic); } -#ifdef HAVE_INTERNAL // catchall for internal stuff } else if (routingAlgorithm == "bulkstar") { if (net.hasRestrictions()) { - router = new BulkStarRouterTT >( - net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTime, &ROEdge::getMinimumTravelTime); + router = new BulkStarRouter >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic, &ROEdge::getMinimumTravelTime); } else { - router = new BulkStarRouterTT >( - net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTime, &ROEdge::getMinimumTravelTime); + router = new BulkStarRouter >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic, &ROEdge::getMinimumTravelTime); } - } else if (routingAlgorithm == "CH") { - // defaultVehicle is only in constructor and may be safely deleted - // it is mainly needed for its maximum speed. @todo XXX make this configurable - ROVehicle defaultVehicle(SUMOVehicleParameter(), 0, net.getVehicleTypeSecure(DEFAULT_VTYPE_ID)); - const SUMOTime begin = string2time(oc.getString("begin")); const SUMOTime weightPeriod = (oc.isSet("weight-files") ? string2time(oc.getString("weight-period")) : std::numeric_limits::max()); if (net.hasRestrictions()) { router = new CHRouter >( - net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTime, &defaultVehicle, begin, weightPeriod, true); + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic, SVC_IGNORING, weightPeriod, true); } else { router = new CHRouter >( - net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTime, &defaultVehicle, begin, weightPeriod, false); + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic, SVC_IGNORING, weightPeriod, false); } - } else if (routingAlgorithm == "CHWrapper") { const SUMOTime begin = string2time(oc.getString("begin")); const SUMOTime weightPeriod = (oc.isSet("weight-files") ? @@ -170,60 +159,51 @@ std::numeric_limits::max()); router = new CHRouterWrapper >( - net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTime, begin, weightPeriod); - -#endif // have HAVE_INTERNAL + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic, begin, weightPeriod); } else { throw ProcessError("Unknown routing Algorithm '" + routingAlgorithm + "'!"); } - } else { - DijkstraRouterEffort_Direct >::Operation op; + DijkstraRouterEffort >::Operation op; if (measure == "CO") { - op = &ROEdge::getCOEffort; + op = &ROEdge::getEmissionEffort; } else if (measure == "CO2") { - op = &ROEdge::getCO2Effort; + op = &ROEdge::getEmissionEffort; } else if (measure == "PMx") { - op = &ROEdge::getPMxEffort; + op = &ROEdge::getEmissionEffort; } else if (measure == "HC") { - op = &ROEdge::getHCEffort; + op = &ROEdge::getEmissionEffort; } else if (measure == "NOx") { - op = &ROEdge::getNOxEffort; + op = &ROEdge::getEmissionEffort; } else if (measure == "fuel") { - op = &ROEdge::getFuelEffort; + op = &ROEdge::getEmissionEffort; } else if (measure == "noise") { op = &ROEdge::getNoiseEffort; } else { - net.closeOutput(); throw ProcessError("Unknown measure (weight attribute '" + measure + "')!"); } if (net.hasRestrictions()) { - router = new DijkstraRouterEffort_Direct >( - net.getEdgeNo(), oc.getBool("ignore-errors"), op, &ROEdge::getTravelTime); + router = new DijkstraRouterEffort >( + net.getEdgeNo(), oc.getBool("ignore-errors"), op, &ROEdge::getTravelTimeStatic); } else { - router = new DijkstraRouterEffort_Direct >( - net.getEdgeNo(), oc.getBool("ignore-errors"), op, &ROEdge::getTravelTime); + router = new DijkstraRouterEffort >( + net.getEdgeNo(), oc.getBool("ignore-errors"), op, &ROEdge::getTravelTimeStatic); } } net.openOutput(filename, altFilename, oc.getString("vtype-output")); // process route definitions try { if (routingAlgorithm == "bulkstar") { -#ifdef HAVE_INTERNAL // catchall for internal stuff // need to load all routes for spatial aggregation loader.processAllRoutesWithBulkRouter(string2time(oc.getString("begin")), string2time(oc.getString("end")), net, *router); -#endif } else { - loader.processRoutes(string2time(oc.getString("begin")), string2time(oc.getString("end")), net, *router); + loader.processRoutes(string2time(oc.getString("begin")), string2time(oc.getString("end")), + string2time(oc.getString("route-steps")), net, *router); } // end the processing - net.closeOutput(); - delete router; - ROCostCalculator::cleanup(); + net.cleanup(router); } catch (ProcessError&) { - net.closeOutput(); - delete router; - ROCostCalculator::cleanup(); + net.cleanup(router); throw; } } @@ -237,7 +217,7 @@ OptionsCont& oc = OptionsCont::getOptions(); // give some application descriptions oc.setApplicationDescription("Shortest path router and DUE computer for the microscopic road traffic simulation SUMO."); - oc.setApplicationName("duarouter", "SUMO duarouter Version " + (std::string)VERSION_STRING); + oc.setApplicationName("duarouter", "SUMO duarouter Version " + getBuildName(VERSION_STRING)); int ret = 0; RONet* net = 0; try { @@ -248,7 +228,7 @@ SystemFrame::close(); return 0; } - XMLSubSys::setValidation(oc.getBool("xml-validation")); + XMLSubSys::setValidation(oc.getString("xml-validation"), oc.getString("xml-validation.net")); MsgHandler::initOutputOptions(); if (!RODUAFrame::checkOptions()) { throw ProcessError(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/duarouter/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/duarouter/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/duarouter/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/duarouter/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -13,10 +13,12 @@ duarouter_LDADD = ../router/librouter.a \ ../utils/options/liboptions.a \ ../utils/xml/libxml.a \ +../utils/vehicle/libvehicle.a \ ../utils/common/libcommon.a \ ../utils/importio/libimportio.a \ ../utils/iodevices/libiodevices.a \ ../utils/geom/libgeom.a \ +../utils/emissions/libemissions.a \ ../foreign/tcpip/libtcpip.a \ $(MEM_LIBS) \ --l$(LIB_XERCES) +-l$(LIB_XERCES) $(FOX_LDFLAGS) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/duarouter/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/duarouter/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/duarouter/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/duarouter/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -37,7 +81,8 @@ target_triplet = @target@ bin_PROGRAMS = duarouter$(EXEEXT) subdir = src/duarouter -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -51,38 +96,97 @@ am_duarouter_OBJECTS = duarouter_main.$(OBJEXT) \ RODUAEdgeBuilder.$(OBJEXT) RODUAFrame.$(OBJEXT) duarouter_OBJECTS = $(am_duarouter_OBJECTS) +am__DEPENDENCIES_1 = duarouter_DEPENDENCIES = ../router/librouter.a \ ../utils/options/liboptions.a ../utils/xml/libxml.a \ - ../utils/common/libcommon.a ../utils/importio/libimportio.a \ + ../utils/vehicle/libvehicle.a ../utils/common/libcommon.a \ + ../utils/importio/libimportio.a \ ../utils/iodevices/libiodevices.a ../utils/geom/libgeom.a \ - ../foreign/tcpip/libtcpip.a $(MEM_LIBS) -duarouter_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + ../utils/emissions/libemissions.a ../foreign/tcpip/libtcpip.a \ + $(MEM_LIBS) $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +duarouter_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(duarouter_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(duarouter_SOURCES) DIST_SOURCES = $(duarouter_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -91,6 +195,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -117,9 +222,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -130,10 +239,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -236,13 +341,15 @@ duarouter_LDADD = ../router/librouter.a \ ../utils/options/liboptions.a \ ../utils/xml/libxml.a \ +../utils/vehicle/libvehicle.a \ ../utils/common/libcommon.a \ ../utils/importio/libimportio.a \ ../utils/iodevices/libiodevices.a \ ../utils/geom/libgeom.a \ +../utils/emissions/libemissions.a \ ../foreign/tcpip/libtcpip.a \ $(MEM_LIBS) \ --l$(LIB_XERCES) +-l$(LIB_XERCES) $(FOX_LDFLAGS) all: all-am @@ -280,14 +387,19 @@ $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -308,7 +420,8 @@ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -321,9 +434,10 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -duarouter$(EXEEXT): $(duarouter_OBJECTS) $(duarouter_DEPENDENCIES) + +duarouter$(EXEEXT): $(duarouter_OBJECTS) $(duarouter_DEPENDENCIES) $(EXTRA_duarouter_DEPENDENCIES) @rm -f duarouter$(EXEEXT) - $(duarouter_LINK) $(duarouter_OBJECTS) $(duarouter_LDADD) $(LIBS) + $(AM_V_CXXLD)$(duarouter_LINK) $(duarouter_OBJECTS) $(duarouter_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -336,25 +450,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/duarouter_main.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -362,26 +476,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -393,15 +496,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -410,6 +509,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -461,10 +575,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -548,19 +667,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/duarouter/RODUAEdgeBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/duarouter/RODUAEdgeBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/duarouter/RODUAEdgeBuilder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/duarouter/RODUAEdgeBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,15 @@ /// @file RODUAEdgeBuilder.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann +/// @author Yun-Pang Floetteroed /// @date Tue, 20 Jan 2004 -/// @version $Id: RODUAEdgeBuilder.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODUAEdgeBuilder.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Interface for building instances of duarouter-edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/duarouter/RODUAEdgeBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/duarouter/RODUAEdgeBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/duarouter/RODUAEdgeBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/duarouter/RODUAEdgeBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,15 @@ /// @file RODUAEdgeBuilder.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann +/// @author Yun-Pang Floetteroed /// @date Tue, 20 Jan 2004 -/// @version $Id: RODUAEdgeBuilder.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODUAEdgeBuilder.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Interface for building instances of duarouter-edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/duarouter/RODUAFrame.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/duarouter/RODUAFrame.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/duarouter/RODUAFrame.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/duarouter/RODUAFrame.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: RODUAFrame.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODUAFrame.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for dua-routing /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -42,7 +42,7 @@ #include #include #include -#include +#include #ifdef CHECK_MEMORY_LEAKS #include @@ -118,8 +118,11 @@ oc.doRegister("skip-new-routes", new Option_Bool(false)); oc.addDescription("skip-new-routes", "Processing", "Only reuse routes from input, do not calculate new ones"); - oc.doRegister("logit", new Option_Bool(false)); - oc.addDescription("logit", "Processing", "Use c-logit model"); + oc.doRegister("logit", new Option_Bool(false)); // deprecated + oc.addDescription("logit", "Processing", "Use c-logit model (deprecated in favor of --route-choice-method logit)"); + + oc.doRegister("route-choice-method", new Option_String("gawron")); + oc.addDescription("route-choice-method", "Processing", "Choose a route choice method: gawron, logit, or lohse"); oc.doRegister("logit.beta", new Option_Float(SUMOReal(-1))); oc.addSynonyme("logit.beta", "lBeta", true); @@ -172,6 +175,16 @@ WRITE_ERROR("Routing algorithm '" + oc.getString("routing-algorithm") + "' does not support weight-attribute '" + oc.getString("weight-attribute") + "'."); return false; } + + if (oc.getString("route-choice-method") != "gawron" && oc.getString("route-choice-method") != "logit") { + WRITE_ERROR("Invalid route choice method '" + oc.getString("route-choice-method") + "'."); + return false; + } + + if (oc.getBool("logit")) { + WRITE_WARNING("The --logit option is deprecated, please use --route-choice-method logit."); + oc.set("route-choice-method", "logit"); + } return ok; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/duarouter/RODUAFrame.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/duarouter/RODUAFrame.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/duarouter/RODUAFrame.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/duarouter/RODUAFrame.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: RODUAFrame.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RODUAFrame.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for dua-routing /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/additional.txt sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/additional.txt --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/additional.txt 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/additional.txt 2015-04-17 00:20:29.000000000 +0000 @@ -3,7 +3,7 @@ - nvwa Memory checks library Used Version: 0.8.2 - Modifications: unused files removed + Modifications: unused files removed, added compile guard to debug_new.cpp Original Page: http://sourceforge.net/projects/nvwa - Mersenne Twister Random Number Generator @@ -29,3 +29,15 @@ Used version: unknown Modifications: syntactic sugar for gcc compilation; different footprint for "Search" due to a different callback Original Page: http://www.superliminal.com/sources/RTreeTemplate.zip + +- EulerSpiral + Approximating curves + Used version: unknown + Modifications: fixing warnings (removing unused variables, initializing variables); relicensed under LGPL, see license file + Original page: http://www.lems.brown.edu/vision/researchAreas/EulerSpiral/ + +- gl2ps + Printing screenshots as ps or pdf files + Used version: 1.3.8 + Modifications: fixing warnings (casting, initializing variables), adding NOMINMAX define before windows.h include + Original page: http://www.geuz.org/gl2ps/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/eulerspiral/euler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/eulerspiral/euler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/eulerspiral/euler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/eulerspiral/euler.h 2015-04-17 00:20:29.000000000 +0000 @@ -111,7 +111,8 @@ class EulerSpiralLookupTable { private: - int NN; //size of the lookup tables (NNxNN) or number of data points between -pi and pi + // following line commented out to make clang compiler happy, MB 14.06.2014 + //int NN; //size of the lookup tables (NNxNN) or number of data points between -pi and pi double* _theta; //lookup the theta value corresponding to the index NN long double _dt; //delta theta diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/eulerspiral/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/eulerspiral/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/eulerspiral/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/eulerspiral/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/foreign/eulerspiral -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,34 +92,94 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libeulerspiral_a_AR = $(AR) $(ARFLAGS) libeulerspiral_a_LIBADD = am_libeulerspiral_a_OBJECTS = BiArc.$(OBJEXT) euler.$(OBJEXT) libeulerspiral_a_OBJECTS = $(am_libeulerspiral_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libeulerspiral_a_SOURCES) DIST_SOURCES = $(libeulerspiral_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -83,6 +188,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -109,9 +215,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -122,10 +232,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -261,10 +367,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libeulerspiral.a: $(libeulerspiral_a_OBJECTS) $(libeulerspiral_a_DEPENDENCIES) - -rm -f libeulerspiral.a - $(libeulerspiral_a_AR) libeulerspiral.a $(libeulerspiral_a_OBJECTS) $(libeulerspiral_a_LIBADD) - $(RANLIB) libeulerspiral.a + +libeulerspiral.a: $(libeulerspiral_a_OBJECTS) $(libeulerspiral_a_DEPENDENCIES) $(EXTRA_libeulerspiral_a_DEPENDENCIES) + $(AM_V_at)-rm -f libeulerspiral.a + $(AM_V_AR)$(libeulerspiral_a_AR) libeulerspiral.a $(libeulerspiral_a_OBJECTS) $(libeulerspiral_a_LIBADD) + $(AM_V_at)$(RANLIB) libeulerspiral.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -276,25 +383,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/euler.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -302,26 +409,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -333,15 +429,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -350,6 +442,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -398,10 +505,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -486,18 +598,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/gl2ps/gl2ps.c sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/gl2ps/gl2ps.c --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/gl2ps/gl2ps.c 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/gl2ps/gl2ps.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,6082 +0,0 @@ -/* - * GL2PS, an OpenGL to PostScript Printing Library - * Copyright (C) 1999-2011 C. Geuzaine - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of either: - * - * a) the GNU Library General Public License as published by the Free - * Software Foundation, either version 2 of the License, or (at your - * option) any later version; or - * - * b) the GL2PS License as published by Christophe Geuzaine, either - * version 2 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either - * the GNU Library General Public License or the GL2PS License for - * more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library in the file named "COPYING.LGPL"; - * if not, write to the Free Software Foundation, Inc., 675 Mass Ave, - * Cambridge, MA 02139, USA. - * - * You should have received a copy of the GL2PS License with this - * library in the file named "COPYING.GL2PS"; if not, I will be glad - * to provide one. - * - * For the latest info about gl2ps and a full list of contributors, - * see http://www.geuz.org/gl2ps/. - * - * Please report all bugs and problems to . - */ - -#include "gl2ps.h" - -#include -#include -#include -#include -#include -#include - -#if defined(GL2PS_HAVE_ZLIB) -#include -#endif - -#if defined(GL2PS_HAVE_LIBPNG) -#include -#endif - -#ifndef M_PI -#define M_PI 3.1415926535897932384626433832795 -#endif - - -/********************************************************************* - * - * Private definitions, data structures and prototypes - * - *********************************************************************/ - -/* Magic numbers (assuming that the order of magnitude of window - coordinates is 10^3) */ - -#define GL2PS_EPSILON 5.0e-3F -#define GL2PS_ZSCALE 1000.0F -#define GL2PS_ZOFFSET 5.0e-2F -#define GL2PS_ZOFFSET_LARGE 20.0F -#define GL2PS_ZERO(arg) (fabs(arg) < 1.e-20) - -/* Primitive types */ - -#define GL2PS_NO_TYPE -1 -#define GL2PS_TEXT 1 -#define GL2PS_POINT 2 -#define GL2PS_LINE 3 -#define GL2PS_QUADRANGLE 4 -#define GL2PS_TRIANGLE 5 -#define GL2PS_PIXMAP 6 -#define GL2PS_IMAGEMAP 7 -#define GL2PS_IMAGEMAP_WRITTEN 8 -#define GL2PS_IMAGEMAP_VISIBLE 9 -#define GL2PS_SPECIAL 10 - -/* BSP tree primitive comparison */ - -#define GL2PS_COINCIDENT 1 -#define GL2PS_IN_FRONT_OF 2 -#define GL2PS_IN_BACK_OF 3 -#define GL2PS_SPANNING 4 - -/* 2D BSP tree primitive comparison */ - -#define GL2PS_POINT_COINCIDENT 0 -#define GL2PS_POINT_INFRONT 1 -#define GL2PS_POINT_BACK 2 - -/* Internal feedback buffer pass-through tokens */ - -#define GL2PS_BEGIN_OFFSET_TOKEN 1 -#define GL2PS_END_OFFSET_TOKEN 2 -#define GL2PS_BEGIN_BOUNDARY_TOKEN 3 -#define GL2PS_END_BOUNDARY_TOKEN 4 -#define GL2PS_BEGIN_STIPPLE_TOKEN 5 -#define GL2PS_END_STIPPLE_TOKEN 6 -#define GL2PS_POINT_SIZE_TOKEN 7 -#define GL2PS_LINE_WIDTH_TOKEN 8 -#define GL2PS_BEGIN_BLEND_TOKEN 9 -#define GL2PS_END_BLEND_TOKEN 10 -#define GL2PS_SRC_BLEND_TOKEN 11 -#define GL2PS_DST_BLEND_TOKEN 12 -#define GL2PS_IMAGEMAP_TOKEN 13 -#define GL2PS_DRAW_PIXELS_TOKEN 14 -#define GL2PS_TEXT_TOKEN 15 - -typedef enum { - T_UNDEFINED = -1, - T_CONST_COLOR = 1, - T_VAR_COLOR = 1<<1, - T_ALPHA_1 = 1<<2, - T_ALPHA_LESS_1 = 1<<3, - T_VAR_ALPHA = 1<<4 -} GL2PS_TRIANGLE_PROPERTY; - -typedef GLfloat GL2PSxyz[3]; -typedef GLfloat GL2PSplane[4]; - -typedef struct _GL2PSbsptree2d GL2PSbsptree2d; - -struct _GL2PSbsptree2d { - GL2PSplane plane; - GL2PSbsptree2d *front, *back; -}; - -typedef struct { - GLint nmax, size, incr, n; - char *array; -} GL2PSlist; - -typedef struct _GL2PSbsptree GL2PSbsptree; - -struct _GL2PSbsptree { - GL2PSplane plane; - GL2PSlist *primitives; - GL2PSbsptree *front, *back; -}; - -typedef struct { - GL2PSxyz xyz; - GL2PSrgba rgba; -} GL2PSvertex; - -typedef struct { - GL2PSvertex vertex[3]; - int prop; -} GL2PStriangle; - -typedef struct { - GLshort fontsize; - char *str, *fontname; - /* Note: for a 'special' string, 'alignment' holds the format - (PostScript, PDF, etc.) of the special string */ - GLint alignment; - GLfloat angle; -} GL2PSstring; - -typedef struct { - GLsizei width, height; - /* Note: for an imagemap, 'type' indicates if it has already been - written to the file or not, and 'format' indicates if it is - visible or not */ - GLenum format, type; - GLfloat zoom_x, zoom_y; - GLfloat *pixels; -} GL2PSimage; - -typedef struct _GL2PSimagemap GL2PSimagemap; - -struct _GL2PSimagemap { - GL2PSimage *image; - GL2PSimagemap *next; -}; - -typedef struct { - GLshort type, numverts; - GLushort pattern; - char boundary, offset, culled; - GLint factor; - GLfloat width; - GL2PSvertex *verts; - union { - GL2PSstring *text; - GL2PSimage *image; - } data; -} GL2PSprimitive; - -typedef struct { -#if defined(GL2PS_HAVE_ZLIB) - Bytef *dest, *src, *start; - uLongf destLen, srcLen; -#else - int dummy; -#endif -} GL2PScompress; - -typedef struct{ - GL2PSlist* ptrlist; - int gsno, fontno, imno, shno, maskshno, trgroupno; - int gsobjno, fontobjno, imobjno, shobjno, maskshobjno, trgroupobjno; -} GL2PSpdfgroup; - -typedef struct { - /* General */ - GLint format, sort, options, colorsize, colormode, buffersize; - char *title, *producer, *filename; - GLboolean boundary, blending; - GLfloat *feedback, offset[2], lastlinewidth; - GLint viewport[4], blendfunc[2], lastfactor; - GL2PSrgba *colormap, lastrgba, threshold, bgcolor; - GLushort lastpattern; - GL2PSvertex lastvertex; - GL2PSlist *primitives, *auxprimitives; - FILE *stream; - GL2PScompress *compress; - GLboolean header; - - /* BSP-specific */ - GLint maxbestroot; - - /* Occlusion culling-specific */ - GLboolean zerosurfacearea; - GL2PSbsptree2d *imagetree; - GL2PSprimitive *primitivetoadd; - - /* PDF-specific */ - int streamlength; - GL2PSlist *pdfprimlist, *pdfgrouplist; - int *xreflist; - int objects_stack; /* available objects */ - int extgs_stack; /* graphics state object number */ - int font_stack; /* font object number */ - int im_stack; /* image object number */ - int trgroupobjects_stack; /* xobject numbers */ - int shader_stack; /* shader object numbers */ - int mshader_stack; /* mask shader object numbers */ - - /* for image map list */ - GL2PSimagemap *imagemap_head; - GL2PSimagemap *imagemap_tail; -} GL2PScontext; - -typedef struct { - void (*printHeader)(void); - void (*printFooter)(void); - void (*beginViewport)(GLint viewport[4]); - GLint (*endViewport)(void); - void (*printPrimitive)(void *data); - void (*printFinalPrimitive)(void); - const char *file_extension; - const char *description; -} GL2PSbackend; - -/* The gl2ps context. gl2ps is not thread safe (we should create a - local GL2PScontext during gl2psBeginPage) */ - -static GL2PScontext *gl2ps = NULL; - -/* Need to forward-declare this one */ - -static GLint gl2psPrintPrimitives(void); - -/********************************************************************* - * - * Utility routines - * - *********************************************************************/ - -static void gl2psMsg(GLint level, const char *fmt, ...) -{ - va_list args; - - if(!(gl2ps->options & GL2PS_SILENT)){ - switch(level){ - case GL2PS_INFO : fprintf(stderr, "GL2PS info: "); break; - case GL2PS_WARNING : fprintf(stderr, "GL2PS warning: "); break; - case GL2PS_ERROR : fprintf(stderr, "GL2PS error: "); break; - } - va_start(args, fmt); - vfprintf(stderr, fmt, args); - va_end(args); - fprintf(stderr, "\n"); - } - /* if(level == GL2PS_ERROR) exit(1); */ -} - -static void *gl2psMalloc(size_t size) -{ - void *ptr; - - if(!size) return NULL; - ptr = malloc(size); - if(!ptr){ - gl2psMsg(GL2PS_ERROR, "Couldn't allocate requested memory"); - return NULL; - } - return ptr; -} - -static void *gl2psRealloc(void *ptr, size_t size) -{ - void *orig = ptr; - if(!size) return NULL; - ptr = realloc(orig, size); - if(!ptr){ - gl2psMsg(GL2PS_ERROR, "Couldn't reallocate requested memory"); - free(orig); - return NULL; - } - return ptr; -} - -static void gl2psFree(void *ptr) -{ - if(!ptr) return; - free(ptr); -} - -static int gl2psWriteBigEndian(unsigned long data, int bytes) -{ - int i; - int size = sizeof(unsigned long); - for(i = 1; i <= bytes; ++i){ - fputc(0xff & (data >> (size - i) * 8), gl2ps->stream); - } - return bytes; -} - -/* zlib compression helper routines */ - -#if defined(GL2PS_HAVE_ZLIB) - -static void gl2psSetupCompress(void) -{ - gl2ps->compress = (GL2PScompress*)gl2psMalloc(sizeof(GL2PScompress)); - gl2ps->compress->src = NULL; - gl2ps->compress->start = NULL; - gl2ps->compress->dest = NULL; - gl2ps->compress->srcLen = 0; - gl2ps->compress->destLen = 0; -} - -static void gl2psFreeCompress(void) -{ - if(!gl2ps->compress) - return; - gl2psFree(gl2ps->compress->start); - gl2psFree(gl2ps->compress->dest); - gl2ps->compress->src = NULL; - gl2ps->compress->start = NULL; - gl2ps->compress->dest = NULL; - gl2ps->compress->srcLen = 0; - gl2ps->compress->destLen = 0; -} - -static int gl2psAllocCompress(unsigned int srcsize) -{ - gl2psFreeCompress(); - - if(!gl2ps->compress || !srcsize) - return GL2PS_ERROR; - - gl2ps->compress->srcLen = srcsize; - gl2ps->compress->destLen = (int)ceil(1.001 * gl2ps->compress->srcLen + 12); - gl2ps->compress->src = (Bytef*)gl2psMalloc(gl2ps->compress->srcLen); - gl2ps->compress->start = gl2ps->compress->src; - gl2ps->compress->dest = (Bytef*)gl2psMalloc(gl2ps->compress->destLen); - - return GL2PS_SUCCESS; -} - -static void *gl2psReallocCompress(unsigned int srcsize) -{ - if(!gl2ps->compress || !srcsize) - return NULL; - - if(srcsize < gl2ps->compress->srcLen) - return gl2ps->compress->start; - - gl2ps->compress->srcLen = srcsize; - gl2ps->compress->destLen = (int)ceil(1.001 * gl2ps->compress->srcLen + 12); - gl2ps->compress->src = (Bytef*)gl2psRealloc(gl2ps->compress->src, - gl2ps->compress->srcLen); - gl2ps->compress->start = gl2ps->compress->src; - gl2ps->compress->dest = (Bytef*)gl2psRealloc(gl2ps->compress->dest, - gl2ps->compress->destLen); - - return gl2ps->compress->start; -} - -static int gl2psWriteBigEndianCompress(unsigned long data, int bytes) -{ - int i; - int size = sizeof(unsigned long); - for(i = 1; i <= bytes; ++i){ - *gl2ps->compress->src = (Bytef)(0xff & (data >> (size-i) * 8)); - ++gl2ps->compress->src; - } - return bytes; -} - -static int gl2psDeflate(void) -{ - /* For compatibility with older zlib versions, we use compress(...) - instead of compress2(..., Z_BEST_COMPRESSION) */ - return compress(gl2ps->compress->dest, &gl2ps->compress->destLen, - gl2ps->compress->start, gl2ps->compress->srcLen); -} - -#endif - -static int gl2psPrintf(const char* fmt, ...) -{ - int ret; - va_list args; - -#if defined(GL2PS_HAVE_ZLIB) - unsigned int oldsize = 0; - static char buf[1000]; - if(gl2ps->options & GL2PS_COMPRESS){ - va_start(args, fmt); - ret = vsprintf(buf, fmt, args); - va_end(args); - oldsize = gl2ps->compress->srcLen; - gl2ps->compress->start = (Bytef*)gl2psReallocCompress(oldsize + ret); - memcpy(gl2ps->compress->start+oldsize, buf, ret); - ret = 0; - } - else{ -#endif - va_start(args, fmt); - ret = vfprintf(gl2ps->stream, fmt, args); - va_end(args); -#if defined(GL2PS_HAVE_ZLIB) - } -#endif - return ret; -} - -static void gl2psPrintGzipHeader(void) -{ -#if defined(GL2PS_HAVE_ZLIB) - char tmp[10] = {'\x1f', '\x8b', /* magic numbers: 0x1f, 0x8b */ - 8, /* compression method: Z_DEFLATED */ - 0, /* flags */ - 0, 0, 0, 0, /* time */ - 2, /* extra flags: max compression */ - '\x03'}; /* OS code: 0x03 (Unix) */ - - if(gl2ps->options & GL2PS_COMPRESS){ - gl2psSetupCompress(); - /* add the gzip file header */ - fwrite(tmp, 10, 1, gl2ps->stream); - } -#endif -} - -static void gl2psPrintGzipFooter(void) -{ -#if defined(GL2PS_HAVE_ZLIB) - int n; - uLong crc, len; - char tmp[8]; - - if(gl2ps->options & GL2PS_COMPRESS){ - if(Z_OK != gl2psDeflate()){ - gl2psMsg(GL2PS_ERROR, "Zlib deflate error"); - } - else{ - /* determine the length of the header in the zlib stream */ - n = 2; /* CMF+FLG */ - if(gl2ps->compress->dest[1] & (1<<5)){ - n += 4; /* DICTID */ - } - /* write the data, without the zlib header and footer */ - fwrite(gl2ps->compress->dest+n, gl2ps->compress->destLen-(n+4), - 1, gl2ps->stream); - /* add the gzip file footer */ - crc = crc32(0L, gl2ps->compress->start, gl2ps->compress->srcLen); - for(n = 0; n < 4; ++n){ - tmp[n] = (char)(crc & 0xff); - crc >>= 8; - } - len = gl2ps->compress->srcLen; - for(n = 4; n < 8; ++n){ - tmp[n] = (char)(len & 0xff); - len >>= 8; - } - fwrite(tmp, 8, 1, gl2ps->stream); - } - gl2psFreeCompress(); - gl2psFree(gl2ps->compress); - gl2ps->compress = NULL; - } -#endif -} - -/* The list handling routines */ - -static void gl2psListRealloc(GL2PSlist *list, GLint n) -{ - if(!list){ - gl2psMsg(GL2PS_ERROR, "Cannot reallocate NULL list"); - return; - } - if(n <= 0) return; - if(!list->array){ - list->nmax = n; - list->array = (char*)gl2psMalloc(list->nmax * list->size); - } - else{ - if(n > list->nmax){ - list->nmax = ((n - 1) / list->incr + 1) * list->incr; - list->array = (char*)gl2psRealloc(list->array, - list->nmax * list->size); - } - } -} - -static GL2PSlist *gl2psListCreate(GLint n, GLint incr, GLint size) -{ - GL2PSlist *list; - - if(n < 0) n = 0; - if(incr <= 0) incr = 1; - list = (GL2PSlist*)gl2psMalloc(sizeof(GL2PSlist)); - list->nmax = 0; - list->incr = incr; - list->size = size; - list->n = 0; - list->array = NULL; - gl2psListRealloc(list, n); - return list; -} - -static void gl2psListReset(GL2PSlist *list) -{ - if(!list) return; - list->n = 0; -} - -static void gl2psListDelete(GL2PSlist *list) -{ - if(!list) return; - gl2psFree(list->array); - gl2psFree(list); -} - -static void gl2psListAdd(GL2PSlist *list, void *data) -{ - if(!list){ - gl2psMsg(GL2PS_ERROR, "Cannot add into unallocated list"); - return; - } - list->n++; - gl2psListRealloc(list, list->n); - memcpy(&list->array[(list->n - 1) * list->size], data, list->size); -} - -static int gl2psListNbr(GL2PSlist *list) -{ - if(!list) - return 0; - return list->n; -} - -static void *gl2psListPointer(GL2PSlist *list, GLint index) -{ - if(!list){ - gl2psMsg(GL2PS_ERROR, "Cannot point into unallocated list"); - return NULL; - } - if((index < 0) || (index >= list->n)){ - gl2psMsg(GL2PS_ERROR, "Wrong list index in gl2psListPointer"); - return NULL; - } - return &list->array[index * list->size]; -} - -static void gl2psListSort(GL2PSlist *list, - int (*fcmp)(const void *a, const void *b)) -{ - if(!list) - return; - qsort(list->array, list->n, list->size, fcmp); -} - -static void gl2psListAction(GL2PSlist *list, void (*action)(void *data)) -{ - GLint i; - - for(i = 0; i < gl2psListNbr(list); i++){ - (*action)(gl2psListPointer(list, i)); - } -} - -static void gl2psListActionInverse(GL2PSlist *list, void (*action)(void *data)) -{ - GLint i; - - for(i = gl2psListNbr(list); i > 0; i--){ - (*action)(gl2psListPointer(list, i-1)); - } -} - -#if defined(GL2PS_HAVE_LIBPNG) - -static void gl2psListRead(GL2PSlist *list, int index, void *data) -{ - if((index < 0) || (index >= list->n)) - gl2psMsg(GL2PS_ERROR, "Wrong list index in gl2psListRead"); - memcpy(data, &list->array[index * list->size], list->size); -} - -static void gl2psEncodeBase64Block(unsigned char in[3], unsigned char out[4], int len) -{ - static const char cb64[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - - out[0] = cb64[ in[0] >> 2 ]; - out[1] = cb64[ ((in[0] & 0x03) << 4) | ((in[1] & 0xf0) >> 4) ]; - out[2] = (len > 1) ? cb64[ ((in[1] & 0x0f) << 2) | ((in[2] & 0xc0) >> 6) ] : '='; - out[3] = (len > 2) ? cb64[ in[2] & 0x3f ] : '='; -} - -static void gl2psListEncodeBase64(GL2PSlist *list) -{ - unsigned char *buffer, in[3], out[4]; - int i, n, index, len; - - n = list->n * list->size; - buffer = (unsigned char*)gl2psMalloc(n * sizeof(unsigned char)); - memcpy(buffer, list->array, n * sizeof(unsigned char)); - gl2psListReset(list); - - index = 0; - while(index < n) { - len = 0; - for(i = 0; i < 3; i++) { - if(index < n){ - in[i] = buffer[index]; - len++; - } - else{ - in[i] = 0; - } - index++; - } - if(len) { - gl2psEncodeBase64Block(in, out, len); - for(i = 0; i < 4; i++) - gl2psListAdd(list, &out[i]); - } - } - gl2psFree(buffer); -} - -#endif - -/* Helpers for rgba colors */ - -static GLboolean gl2psSameColor(GL2PSrgba rgba1, GL2PSrgba rgba2) -{ - if(!GL2PS_ZERO(rgba1[0] - rgba2[0]) || - !GL2PS_ZERO(rgba1[1] - rgba2[1]) || - !GL2PS_ZERO(rgba1[2] - rgba2[2])) - return GL_FALSE; - return GL_TRUE; -} - -static GLboolean gl2psVertsSameColor(const GL2PSprimitive *prim) -{ - int i; - - for(i = 1; i < prim->numverts; i++){ - if(!gl2psSameColor(prim->verts[0].rgba, prim->verts[i].rgba)){ - return GL_FALSE; - } - } - return GL_TRUE; -} - -static GLboolean gl2psSameColorThreshold(int n, GL2PSrgba rgba[], - GL2PSrgba threshold) -{ - int i; - - if(n < 2) return GL_TRUE; - - for(i = 1; i < n; i++){ - if(fabs(rgba[0][0] - rgba[i][0]) > threshold[0] || - fabs(rgba[0][1] - rgba[i][1]) > threshold[1] || - fabs(rgba[0][2] - rgba[i][2]) > threshold[2]) - return GL_FALSE; - } - - return GL_TRUE; -} - -static void gl2psSetLastColor(GL2PSrgba rgba) -{ - int i; - for(i = 0; i < 3; ++i){ - gl2ps->lastrgba[i] = rgba[i]; - } -} - -static GLfloat gl2psGetRGB(GL2PSimage *im, GLuint x, GLuint y, - GLfloat *red, GLfloat *green, GLfloat *blue) -{ - - GLsizei width = im->width; - GLsizei height = im->height; - GLfloat *pixels = im->pixels; - GLfloat *pimag; - - /* OpenGL image is from down to up, PS image is up to down */ - switch(im->format){ - case GL_RGBA: - pimag = pixels + 4 * (width * (height - 1 - y) + x); - break; - case GL_RGB: - default: - pimag = pixels + 3 * (width * (height - 1 - y) + x); - break; - } - *red = *pimag; pimag++; - *green = *pimag; pimag++; - *blue = *pimag; pimag++; - - return (im->format == GL_RGBA) ? *pimag : 1.0F; -} - -/* Helper routines for pixmaps */ - -static GL2PSimage *gl2psCopyPixmap(GL2PSimage *im) -{ - int size; - GL2PSimage *image = (GL2PSimage*)gl2psMalloc(sizeof(GL2PSimage)); - - image->width = im->width; - image->height = im->height; - image->format = im->format; - image->type = im->type; - image->zoom_x = im->zoom_x; - image->zoom_y = im->zoom_y; - - switch(image->format){ - case GL_RGBA: - size = image->height * image->width * 4 * sizeof(GLfloat); - break; - case GL_RGB: - default: - size = image->height * image->width * 3 * sizeof(GLfloat); - break; - } - - image->pixels = (GLfloat*)gl2psMalloc(size); - memcpy(image->pixels, im->pixels, size); - - return image; -} - -static void gl2psFreePixmap(GL2PSimage *im) -{ - if(!im) - return; - gl2psFree(im->pixels); - gl2psFree(im); -} - -#if defined(GL2PS_HAVE_LIBPNG) - -#if !defined(png_jmpbuf) -# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) -#endif - -static void gl2psUserWritePNG(png_structp png_ptr, png_bytep data, png_size_t length) -{ - unsigned int i; - GL2PSlist *png = (GL2PSlist*)png_get_io_ptr(png_ptr); - for(i = 0; i < length; i++) - gl2psListAdd(png, &data[i]); -} - -static void gl2psUserFlushPNG(png_structp png_ptr) -{ - (void) png_ptr; /* not used */ -} - -static void gl2psConvertPixmapToPNG(GL2PSimage *pixmap, GL2PSlist *png) -{ - png_structp png_ptr; - png_infop info_ptr; - unsigned char *row_data; - GLfloat dr, dg, db; - int row, col; - - if(!(png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL))) - return; - - if(!(info_ptr = png_create_info_struct(png_ptr))){ - png_destroy_write_struct(&png_ptr, NULL); - return; - } - - if(setjmp(png_jmpbuf(png_ptr))) { - png_destroy_write_struct(&png_ptr, &info_ptr); - return; - } - - png_set_write_fn(png_ptr, (void *)png, gl2psUserWritePNG, gl2psUserFlushPNG); - png_set_compression_level(png_ptr, Z_DEFAULT_COMPRESSION); - png_set_IHDR(png_ptr, info_ptr, pixmap->width, pixmap->height, 8, - PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, - PNG_FILTER_TYPE_BASE); - png_write_info(png_ptr, info_ptr); - - row_data = (unsigned char*)gl2psMalloc(3 * pixmap->width * sizeof(unsigned char)); - for(row = 0; row < pixmap->height; row++){ - for(col = 0; col < pixmap->width; col++){ - gl2psGetRGB(pixmap, col, row, &dr, &dg, &db); - row_data[3*col] = (unsigned char)(255. * dr); - row_data[3*col+1] = (unsigned char)(255. * dg); - row_data[3*col+2] = (unsigned char)(255. * db); - } - png_write_row(png_ptr, (png_bytep)row_data); - } - gl2psFree(row_data); - - png_write_end(png_ptr, info_ptr); - png_destroy_write_struct(&png_ptr, &info_ptr); -} - -#endif - -/* Helper routines for text strings */ - -static GLint gl2psAddText(GLint type, const char *str, const char *fontname, - GLshort fontsize, GLint alignment, GLfloat angle) -{ - GLfloat pos[4]; - GL2PSprimitive *prim; - GLboolean valid; - - if(!gl2ps || !str || !fontname) return GL2PS_UNINITIALIZED; - - if(gl2ps->options & GL2PS_NO_TEXT) return GL2PS_SUCCESS; - - glGetBooleanv(GL_CURRENT_RASTER_POSITION_VALID, &valid); - if(GL_FALSE == valid) return GL2PS_SUCCESS; /* the primitive is culled */ - - glGetFloatv(GL_CURRENT_RASTER_POSITION, pos); - - prim = (GL2PSprimitive*)gl2psMalloc(sizeof(GL2PSprimitive)); - prim->type = (GLshort)type; - prim->boundary = 0; - prim->numverts = 1; - prim->verts = (GL2PSvertex*)gl2psMalloc(sizeof(GL2PSvertex)); - prim->verts[0].xyz[0] = pos[0]; - prim->verts[0].xyz[1] = pos[1]; - prim->verts[0].xyz[2] = pos[2]; - prim->culled = 0; - prim->offset = 0; - prim->pattern = 0; - prim->factor = 0; - prim->width = 1; - glGetFloatv(GL_CURRENT_RASTER_COLOR, prim->verts[0].rgba); - prim->data.text = (GL2PSstring*)gl2psMalloc(sizeof(GL2PSstring)); - prim->data.text->str = (char*)gl2psMalloc((strlen(str)+1)*sizeof(char)); - strcpy(prim->data.text->str, str); - prim->data.text->fontname = (char*)gl2psMalloc((strlen(fontname)+1)*sizeof(char)); - strcpy(prim->data.text->fontname, fontname); - prim->data.text->fontsize = fontsize; - prim->data.text->alignment = alignment; - prim->data.text->angle = angle; - - gl2psListAdd(gl2ps->auxprimitives, &prim); - glPassThrough(GL2PS_TEXT_TOKEN); - - return GL2PS_SUCCESS; -} - -static GL2PSstring *gl2psCopyText(GL2PSstring *t) -{ - GL2PSstring *text = (GL2PSstring*)gl2psMalloc(sizeof(GL2PSstring)); - text->str = (char*)gl2psMalloc((strlen(t->str)+1)*sizeof(char)); - strcpy(text->str, t->str); - text->fontname = (char*)gl2psMalloc((strlen(t->fontname)+1)*sizeof(char)); - strcpy(text->fontname, t->fontname); - text->fontsize = t->fontsize; - text->alignment = t->alignment; - text->angle = t->angle; - - return text; -} - -static void gl2psFreeText(GL2PSstring *text) -{ - if(!text) - return; - gl2psFree(text->str); - gl2psFree(text->fontname); - gl2psFree(text); -} - -/* Helpers for blending modes */ - -static GLboolean gl2psSupportedBlendMode(GLenum sfactor, GLenum dfactor) -{ - /* returns TRUE if gl2ps supports the argument combination: only two - blending modes have been implemented so far */ - - if( (sfactor == GL_SRC_ALPHA && dfactor == GL_ONE_MINUS_SRC_ALPHA) || - (sfactor == GL_ONE && dfactor == GL_ZERO) ) - return GL_TRUE; - return GL_FALSE; -} - -static void gl2psAdaptVertexForBlending(GL2PSvertex *v) -{ - /* Transforms vertex depending on the actual blending function - - currently the vertex v is considered as source vertex and his - alpha value is changed to 1.0 if source blending GL_ONE is - active. This might be extended in the future */ - - if(!v || !gl2ps) - return; - - if(gl2ps->options & GL2PS_NO_BLENDING || !gl2ps->blending){ - v->rgba[3] = 1.0F; - return; - } - - switch(gl2ps->blendfunc[0]){ - case GL_ONE: - v->rgba[3] = 1.0F; - break; - default: - break; - } -} - -static void gl2psAssignTriangleProperties(GL2PStriangle *t) -{ - /* int i; */ - - t->prop = T_VAR_COLOR; - - /* Uncommenting the following lines activates an even more fine - grained distinction between triangle types - please don't delete, - a remarkable amount of PDF handling code inside this file depends - on it if activated */ - /* - t->prop = T_CONST_COLOR; - for(i = 0; i < 3; ++i){ - if(!GL2PS_ZERO(t->vertex[0].rgba[i] - t->vertex[1].rgba[i]) || - !GL2PS_ZERO(t->vertex[1].rgba[i] - t->vertex[2].rgba[i])){ - t->prop = T_VAR_COLOR; - break; - } - } - */ - - if(!GL2PS_ZERO(t->vertex[0].rgba[3] - t->vertex[1].rgba[3]) || - !GL2PS_ZERO(t->vertex[1].rgba[3] - t->vertex[2].rgba[3])){ - t->prop |= T_VAR_ALPHA; - } - else{ - if(t->vertex[0].rgba[3] < 1) - t->prop |= T_ALPHA_LESS_1; - else - t->prop |= T_ALPHA_1; - } -} - -static void gl2psFillTriangleFromPrimitive(GL2PStriangle *t, GL2PSprimitive *p, - GLboolean assignprops) -{ - t->vertex[0] = p->verts[0]; - t->vertex[1] = p->verts[1]; - t->vertex[2] = p->verts[2]; - if(GL_TRUE == assignprops) - gl2psAssignTriangleProperties(t); -} - -static void gl2psInitTriangle(GL2PStriangle *t) -{ - int i; - GL2PSvertex vertex = { {-1.0F, -1.0F, -1.0F}, {-1.0F, -1.0F, -1.0F, -1.0F} }; - for(i = 0; i < 3; i++) - t->vertex[i] = vertex; - t->prop = T_UNDEFINED; -} - -/* Miscellaneous helper routines */ - -static GL2PSprimitive *gl2psCopyPrimitive(GL2PSprimitive *p) -{ - GL2PSprimitive *prim; - - if(!p){ - gl2psMsg(GL2PS_ERROR, "Trying to copy an empty primitive"); - return NULL; - } - - prim = (GL2PSprimitive*)gl2psMalloc(sizeof(GL2PSprimitive)); - - prim->type = p->type; - prim->numverts = p->numverts; - prim->boundary = p->boundary; - prim->offset = p->offset; - prim->pattern = p->pattern; - prim->factor = p->factor; - prim->culled = p->culled; - prim->width = p->width; - prim->verts = (GL2PSvertex*)gl2psMalloc(p->numverts*sizeof(GL2PSvertex)); - memcpy(prim->verts, p->verts, p->numverts * sizeof(GL2PSvertex)); - - switch(prim->type){ - case GL2PS_PIXMAP : - prim->data.image = gl2psCopyPixmap(p->data.image); - break; - case GL2PS_TEXT : - case GL2PS_SPECIAL : - prim->data.text = gl2psCopyText(p->data.text); - break; - default: - break; - } - - return prim; -} - -static GLboolean gl2psSamePosition(GL2PSxyz p1, GL2PSxyz p2) -{ - if(!GL2PS_ZERO(p1[0] - p2[0]) || - !GL2PS_ZERO(p1[1] - p2[1]) || - !GL2PS_ZERO(p1[2] - p2[2])) - return GL_FALSE; - return GL_TRUE; -} - -/********************************************************************* - * - * 3D sorting routines - * - *********************************************************************/ - -static GLfloat gl2psComparePointPlane(GL2PSxyz point, GL2PSplane plane) -{ - return (plane[0] * point[0] + - plane[1] * point[1] + - plane[2] * point[2] + - plane[3]); -} - -static GLfloat gl2psPsca(GLfloat *a, GLfloat *b) -{ - return (a[0]*b[0] + a[1]*b[1] + a[2]*b[2]); -} - -static void gl2psPvec(GLfloat *a, GLfloat *b, GLfloat *c) -{ - c[0] = a[1]*b[2] - a[2]*b[1]; - c[1] = a[2]*b[0] - a[0]*b[2]; - c[2] = a[0]*b[1] - a[1]*b[0]; -} - -static GLfloat gl2psNorm(GLfloat *a) -{ - return (GLfloat)sqrt(a[0]*a[0] + a[1]*a[1] + a[2]*a[2]); -} - -static void gl2psGetNormal(GLfloat *a, GLfloat *b, GLfloat *c) -{ - GLfloat norm; - - gl2psPvec(a, b, c); - if(!GL2PS_ZERO(norm = gl2psNorm(c))){ - c[0] = c[0] / norm; - c[1] = c[1] / norm; - c[2] = c[2] / norm; - } - else{ - /* The plane is still wrong despite our tests in gl2psGetPlane. - Let's return a dummy value for now (this is a hack: we should - do more intelligent tests in GetPlane) */ - c[0] = c[1] = 0.0F; - c[2] = 1.0F; - } -} - -static void gl2psGetPlane(GL2PSprimitive *prim, GL2PSplane plane) -{ - GL2PSxyz v = {0.0F, 0.0F, 0.0F}, w = {0.0F, 0.0F, 0.0F}; - - switch(prim->type){ - case GL2PS_TRIANGLE : - case GL2PS_QUADRANGLE : - v[0] = prim->verts[1].xyz[0] - prim->verts[0].xyz[0]; - v[1] = prim->verts[1].xyz[1] - prim->verts[0].xyz[1]; - v[2] = prim->verts[1].xyz[2] - prim->verts[0].xyz[2]; - w[0] = prim->verts[2].xyz[0] - prim->verts[0].xyz[0]; - w[1] = prim->verts[2].xyz[1] - prim->verts[0].xyz[1]; - w[2] = prim->verts[2].xyz[2] - prim->verts[0].xyz[2]; - if((GL2PS_ZERO(v[0]) && GL2PS_ZERO(v[1]) && GL2PS_ZERO(v[2])) || - (GL2PS_ZERO(w[0]) && GL2PS_ZERO(w[1]) && GL2PS_ZERO(w[2]))){ - plane[0] = plane[1] = 0.0F; - plane[2] = 1.0F; - plane[3] = -prim->verts[0].xyz[2]; - } - else{ - gl2psGetNormal(v, w, plane); - plane[3] = - - plane[0] * prim->verts[0].xyz[0] - - plane[1] * prim->verts[0].xyz[1] - - plane[2] * prim->verts[0].xyz[2]; - } - break; - case GL2PS_LINE : - v[0] = prim->verts[1].xyz[0] - prim->verts[0].xyz[0]; - v[1] = prim->verts[1].xyz[1] - prim->verts[0].xyz[1]; - v[2] = prim->verts[1].xyz[2] - prim->verts[0].xyz[2]; - if(GL2PS_ZERO(v[0]) && GL2PS_ZERO(v[1]) && GL2PS_ZERO(v[2])){ - plane[0] = plane[1] = 0.0F; - plane[2] = 1.0F; - plane[3] = -prim->verts[0].xyz[2]; - } - else{ - if(GL2PS_ZERO(v[0])) w[0] = 1.0F; - else if(GL2PS_ZERO(v[1])) w[1] = 1.0F; - else w[2] = 1.0F; - gl2psGetNormal(v, w, plane); - plane[3] = - - plane[0] * prim->verts[0].xyz[0] - - plane[1] * prim->verts[0].xyz[1] - - plane[2] * prim->verts[0].xyz[2]; - } - break; - case GL2PS_POINT : - case GL2PS_PIXMAP : - case GL2PS_TEXT : - case GL2PS_SPECIAL : - case GL2PS_IMAGEMAP: - plane[0] = plane[1] = 0.0F; - plane[2] = 1.0F; - plane[3] = -prim->verts[0].xyz[2]; - break; - default : - gl2psMsg(GL2PS_ERROR, "Unknown primitive type in BSP tree"); - plane[0] = plane[1] = plane[3] = 0.0F; - plane[2] = 1.0F; - break; - } -} - -static void gl2psCutEdge(GL2PSvertex *a, GL2PSvertex *b, GL2PSplane plane, - GL2PSvertex *c) -{ - GL2PSxyz v; - GLfloat sect, psca; - - v[0] = b->xyz[0] - a->xyz[0]; - v[1] = b->xyz[1] - a->xyz[1]; - v[2] = b->xyz[2] - a->xyz[2]; - - if(!GL2PS_ZERO(psca = gl2psPsca(plane, v))) - sect = -gl2psComparePointPlane(a->xyz, plane) / psca; - else - sect = 0.0F; - - c->xyz[0] = a->xyz[0] + v[0] * sect; - c->xyz[1] = a->xyz[1] + v[1] * sect; - c->xyz[2] = a->xyz[2] + v[2] * sect; - - c->rgba[0] = (1 - sect) * a->rgba[0] + sect * b->rgba[0]; - c->rgba[1] = (1 - sect) * a->rgba[1] + sect * b->rgba[1]; - c->rgba[2] = (1 - sect) * a->rgba[2] + sect * b->rgba[2]; - c->rgba[3] = (1 - sect) * a->rgba[3] + sect * b->rgba[3]; -} - -static void gl2psCreateSplitPrimitive(GL2PSprimitive *parent, GL2PSplane plane, - GL2PSprimitive *child, GLshort numverts, - GLshort *index0, GLshort *index1) -{ - GLshort i; - - if(parent->type == GL2PS_IMAGEMAP){ - child->type = GL2PS_IMAGEMAP; - child->data.image = parent->data.image; - } - else{ - if(numverts > 4){ - gl2psMsg(GL2PS_WARNING, "%d vertices in polygon", numverts); - numverts = 4; - } - switch(numverts){ - case 1 : child->type = GL2PS_POINT; break; - case 2 : child->type = GL2PS_LINE; break; - case 3 : child->type = GL2PS_TRIANGLE; break; - case 4 : child->type = GL2PS_QUADRANGLE; break; - default: child->type = GL2PS_NO_TYPE; break; - } - } - - child->boundary = 0; /* FIXME: not done! */ - child->culled = parent->culled; - child->offset = parent->offset; - child->pattern = parent->pattern; - child->factor = parent->factor; - child->width = parent->width; - child->numverts = numverts; - child->verts = (GL2PSvertex*)gl2psMalloc(numverts * sizeof(GL2PSvertex)); - - for(i = 0; i < numverts; i++){ - if(index1[i] < 0){ - child->verts[i] = parent->verts[index0[i]]; - } - else{ - gl2psCutEdge(&parent->verts[index0[i]], &parent->verts[index1[i]], - plane, &child->verts[i]); - } - } -} - -static void gl2psAddIndex(GLshort *index0, GLshort *index1, GLshort *nb, - GLshort i, GLshort j) -{ - GLint k; - - for(k = 0; k < *nb; k++){ - if((index0[k] == i && index1[k] == j) || - (index1[k] == i && index0[k] == j)) return; - } - index0[*nb] = i; - index1[*nb] = j; - (*nb)++; -} - -static GLshort gl2psGetIndex(GLshort i, GLshort num) -{ - return (i < num - 1) ? i + 1 : 0; -} - -static GLint gl2psTestSplitPrimitive(GL2PSprimitive *prim, GL2PSplane plane) -{ - GLint type = GL2PS_COINCIDENT; - GLshort i, j; - GLfloat d[5]; - - for(i = 0; i < prim->numverts; i++){ - d[i] = gl2psComparePointPlane(prim->verts[i].xyz, plane); - } - - if(prim->numverts < 2){ - return 0; - } - else{ - for(i = 0; i < prim->numverts; i++){ - j = gl2psGetIndex(i, prim->numverts); - if(d[j] > GL2PS_EPSILON){ - if(type == GL2PS_COINCIDENT) type = GL2PS_IN_BACK_OF; - else if(type != GL2PS_IN_BACK_OF) return 1; - if(d[i] < -GL2PS_EPSILON) return 1; - } - else if(d[j] < -GL2PS_EPSILON){ - if(type == GL2PS_COINCIDENT) type = GL2PS_IN_FRONT_OF; - else if(type != GL2PS_IN_FRONT_OF) return 1; - if(d[i] > GL2PS_EPSILON) return 1; - } - } - } - return 0; -} - -static GLint gl2psSplitPrimitive(GL2PSprimitive *prim, GL2PSplane plane, - GL2PSprimitive **front, GL2PSprimitive **back) -{ - GLshort i, j, in = 0, out = 0, in0[5], in1[5], out0[5], out1[5]; - GLint type; - GLfloat d[5]; - - type = GL2PS_COINCIDENT; - - for(i = 0; i < prim->numverts; i++){ - d[i] = gl2psComparePointPlane(prim->verts[i].xyz, plane); - } - - switch(prim->type){ - case GL2PS_POINT : - if(d[0] > GL2PS_EPSILON) type = GL2PS_IN_BACK_OF; - else if(d[0] < -GL2PS_EPSILON) type = GL2PS_IN_FRONT_OF; - else type = GL2PS_COINCIDENT; - break; - default : - for(i = 0; i < prim->numverts; i++){ - j = gl2psGetIndex(i, prim->numverts); - if(d[j] > GL2PS_EPSILON){ - if(type == GL2PS_COINCIDENT) type = GL2PS_IN_BACK_OF; - else if(type != GL2PS_IN_BACK_OF) type = GL2PS_SPANNING; - if(d[i] < -GL2PS_EPSILON){ - gl2psAddIndex(in0, in1, &in, i, j); - gl2psAddIndex(out0, out1, &out, i, j); - type = GL2PS_SPANNING; - } - gl2psAddIndex(out0, out1, &out, j, -1); - } - else if(d[j] < -GL2PS_EPSILON){ - if(type == GL2PS_COINCIDENT) type = GL2PS_IN_FRONT_OF; - else if(type != GL2PS_IN_FRONT_OF) type = GL2PS_SPANNING; - if(d[i] > GL2PS_EPSILON){ - gl2psAddIndex(in0, in1, &in, i, j); - gl2psAddIndex(out0, out1, &out, i, j); - type = GL2PS_SPANNING; - } - gl2psAddIndex(in0, in1, &in, j, -1); - } - else{ - gl2psAddIndex(in0, in1, &in, j, -1); - gl2psAddIndex(out0, out1, &out, j, -1); - } - } - break; - } - - if(type == GL2PS_SPANNING){ - *back = (GL2PSprimitive*)gl2psMalloc(sizeof(GL2PSprimitive)); - *front = (GL2PSprimitive*)gl2psMalloc(sizeof(GL2PSprimitive)); - gl2psCreateSplitPrimitive(prim, plane, *back, out, out0, out1); - gl2psCreateSplitPrimitive(prim, plane, *front, in, in0, in1); - } - - return type; -} - -static void gl2psDivideQuad(GL2PSprimitive *quad, - GL2PSprimitive **t1, GL2PSprimitive **t2) -{ - *t1 = (GL2PSprimitive*)gl2psMalloc(sizeof(GL2PSprimitive)); - *t2 = (GL2PSprimitive*)gl2psMalloc(sizeof(GL2PSprimitive)); - (*t1)->type = (*t2)->type = GL2PS_TRIANGLE; - (*t1)->numverts = (*t2)->numverts = 3; - (*t1)->culled = (*t2)->culled = quad->culled; - (*t1)->offset = (*t2)->offset = quad->offset; - (*t1)->pattern = (*t2)->pattern = quad->pattern; - (*t1)->factor = (*t2)->factor = quad->factor; - (*t1)->width = (*t2)->width = quad->width; - (*t1)->verts = (GL2PSvertex*)gl2psMalloc(3 * sizeof(GL2PSvertex)); - (*t2)->verts = (GL2PSvertex*)gl2psMalloc(3 * sizeof(GL2PSvertex)); - (*t1)->verts[0] = quad->verts[0]; - (*t1)->verts[1] = quad->verts[1]; - (*t1)->verts[2] = quad->verts[2]; - (*t1)->boundary = ((quad->boundary & 1) ? 1 : 0) | ((quad->boundary & 2) ? 2 : 0); - (*t2)->verts[0] = quad->verts[0]; - (*t2)->verts[1] = quad->verts[2]; - (*t2)->verts[2] = quad->verts[3]; - (*t2)->boundary = ((quad->boundary & 4) ? 2 : 0) | ((quad->boundary & 8) ? 4 : 0); -} - -static int gl2psCompareDepth(const void *a, const void *b) -{ - const GL2PSprimitive *q, *w; - GLfloat dq = 0.0F, dw = 0.0F, diff; - int i; - - q = *(const GL2PSprimitive* const*)a; - w = *(const GL2PSprimitive* const*)b; - - for(i = 0; i < q->numverts; i++){ - dq += q->verts[i].xyz[2]; - } - dq /= (GLfloat)q->numverts; - - for(i = 0; i < w->numverts; i++){ - dw += w->verts[i].xyz[2]; - } - dw /= (GLfloat)w->numverts; - - diff = dq - dw; - if(diff > 0.){ - return -1; - } - else if(diff < 0.){ - return 1; - } - else{ - return 0; - } -} - -static int gl2psTrianglesFirst(const void *a, const void *b) -{ - const GL2PSprimitive *q, *w; - - q = *(const GL2PSprimitive* const*)a; - w = *(const GL2PSprimitive* const*)b; - return (q->type < w->type ? 1 : -1); -} - -static GLint gl2psFindRoot(GL2PSlist *primitives, GL2PSprimitive **root) -{ - GLint i, j, count, best = 1000000, index = 0; - GL2PSprimitive *prim1, *prim2; - GL2PSplane plane; - GLint maxp; - - if(!gl2psListNbr(primitives)){ - gl2psMsg(GL2PS_ERROR, "Cannot fint root in empty primitive list"); - return 0; - } - - *root = *(GL2PSprimitive**)gl2psListPointer(primitives, 0); - - if(gl2ps->options & GL2PS_BEST_ROOT){ - maxp = gl2psListNbr(primitives); - if(maxp > gl2ps->maxbestroot){ - maxp = gl2ps->maxbestroot; - } - for(i = 0; i < maxp; i++){ - prim1 = *(GL2PSprimitive**)gl2psListPointer(primitives, i); - gl2psGetPlane(prim1, plane); - count = 0; - for(j = 0; j < gl2psListNbr(primitives); j++){ - if(j != i){ - prim2 = *(GL2PSprimitive**)gl2psListPointer(primitives, j); - count += gl2psTestSplitPrimitive(prim2, plane); - } - if(count > best) break; - } - if(count < best){ - best = count; - index = i; - *root = prim1; - if(!count) return index; - } - } - /* if(index) gl2psMsg(GL2PS_INFO, "GL2PS_BEST_ROOT was worth it: %d", index); */ - return index; - } - else{ - return 0; - } -} - -static void gl2psFreeImagemap(GL2PSimagemap *list) -{ - GL2PSimagemap *next; - while(list != NULL){ - next = list->next; - gl2psFree(list->image->pixels); - gl2psFree(list->image); - gl2psFree(list); - list = next; - } -} - -static void gl2psFreePrimitive(void *data) -{ - GL2PSprimitive *q; - - q = *(GL2PSprimitive**)data; - gl2psFree(q->verts); - if(q->type == GL2PS_TEXT || q->type == GL2PS_SPECIAL){ - gl2psFreeText(q->data.text); - } - else if(q->type == GL2PS_PIXMAP){ - gl2psFreePixmap(q->data.image); - } - gl2psFree(q); -} - -static void gl2psAddPrimitiveInList(GL2PSprimitive *prim, GL2PSlist *list) -{ - GL2PSprimitive *t1, *t2; - - if(prim->type != GL2PS_QUADRANGLE){ - gl2psListAdd(list, &prim); - } - else{ - gl2psDivideQuad(prim, &t1, &t2); - gl2psListAdd(list, &t1); - gl2psListAdd(list, &t2); - gl2psFreePrimitive(&prim); - } - -} - -static void gl2psFreeBspTree(GL2PSbsptree **tree) -{ - if(*tree){ - if((*tree)->back) gl2psFreeBspTree(&(*tree)->back); - if((*tree)->primitives){ - gl2psListAction((*tree)->primitives, gl2psFreePrimitive); - gl2psListDelete((*tree)->primitives); - } - if((*tree)->front) gl2psFreeBspTree(&(*tree)->front); - gl2psFree(*tree); - *tree = NULL; - } -} - -static GLboolean gl2psGreater(GLfloat f1, GLfloat f2) -{ - if(f1 > f2) return GL_TRUE; - else return GL_FALSE; -} - -static GLboolean gl2psLess(GLfloat f1, GLfloat f2) -{ - if(f1 < f2) return GL_TRUE; - else return GL_FALSE; -} - -static void gl2psBuildBspTree(GL2PSbsptree *tree, GL2PSlist *primitives) -{ - GL2PSprimitive *prim, *frontprim = NULL, *backprim = NULL; - GL2PSlist *frontlist, *backlist; - GLint i, index; - - tree->front = NULL; - tree->back = NULL; - tree->primitives = gl2psListCreate(1, 2, sizeof(GL2PSprimitive*)); - index = gl2psFindRoot(primitives, &prim); - gl2psGetPlane(prim, tree->plane); - gl2psAddPrimitiveInList(prim, tree->primitives); - - frontlist = gl2psListCreate(1, 2, sizeof(GL2PSprimitive*)); - backlist = gl2psListCreate(1, 2, sizeof(GL2PSprimitive*)); - - for(i = 0; i < gl2psListNbr(primitives); i++){ - if(i != index){ - prim = *(GL2PSprimitive**)gl2psListPointer(primitives,i); - switch(gl2psSplitPrimitive(prim, tree->plane, &frontprim, &backprim)){ - case GL2PS_COINCIDENT: - gl2psAddPrimitiveInList(prim, tree->primitives); - break; - case GL2PS_IN_BACK_OF: - gl2psAddPrimitiveInList(prim, backlist); - break; - case GL2PS_IN_FRONT_OF: - gl2psAddPrimitiveInList(prim, frontlist); - break; - case GL2PS_SPANNING: - gl2psAddPrimitiveInList(backprim, backlist); - gl2psAddPrimitiveInList(frontprim, frontlist); - gl2psFreePrimitive(&prim); - break; - } - } - } - - if(gl2psListNbr(tree->primitives)){ - gl2psListSort(tree->primitives, gl2psTrianglesFirst); - } - - if(gl2psListNbr(frontlist)){ - gl2psListSort(frontlist, gl2psTrianglesFirst); - tree->front = (GL2PSbsptree*)gl2psMalloc(sizeof(GL2PSbsptree)); - gl2psBuildBspTree(tree->front, frontlist); - } - else{ - gl2psListDelete(frontlist); - } - - if(gl2psListNbr(backlist)){ - gl2psListSort(backlist, gl2psTrianglesFirst); - tree->back = (GL2PSbsptree*)gl2psMalloc(sizeof(GL2PSbsptree)); - gl2psBuildBspTree(tree->back, backlist); - } - else{ - gl2psListDelete(backlist); - } - - gl2psListDelete(primitives); -} - -static void gl2psTraverseBspTree(GL2PSbsptree *tree, GL2PSxyz eye, GLfloat epsilon, - GLboolean (*compare)(GLfloat f1, GLfloat f2), - void (*action)(void *data), int inverse) -{ - GLfloat result; - - if(!tree) return; - - result = gl2psComparePointPlane(eye, tree->plane); - - if(GL_TRUE == compare(result, epsilon)){ - gl2psTraverseBspTree(tree->back, eye, epsilon, compare, action, inverse); - if(inverse){ - gl2psListActionInverse(tree->primitives, action); - } - else{ - gl2psListAction(tree->primitives, action); - } - gl2psTraverseBspTree(tree->front, eye, epsilon, compare, action, inverse); - } - else if(GL_TRUE == compare(-epsilon, result)){ - gl2psTraverseBspTree(tree->front, eye, epsilon, compare, action, inverse); - if(inverse){ - gl2psListActionInverse(tree->primitives, action); - } - else{ - gl2psListAction(tree->primitives, action); - } - gl2psTraverseBspTree(tree->back, eye, epsilon, compare, action, inverse); - } - else{ - gl2psTraverseBspTree(tree->front, eye, epsilon, compare, action, inverse); - gl2psTraverseBspTree(tree->back, eye, epsilon, compare, action, inverse); - } -} - -static void gl2psRescaleAndOffset(void) -{ - GL2PSprimitive *prim; - GLfloat minZ, maxZ, rangeZ, scaleZ; - GLfloat factor, units, area, dZ, dZdX, dZdY, maxdZ; - int i, j; - - if(!gl2psListNbr(gl2ps->primitives)) - return; - - /* get z-buffer range */ - prim = *(GL2PSprimitive**)gl2psListPointer(gl2ps->primitives, 0); - minZ = maxZ = prim->verts[0].xyz[2]; - for(i = 1; i < prim->numverts; i++){ - if(prim->verts[i].xyz[2] < minZ) minZ = prim->verts[i].xyz[2]; - if(prim->verts[i].xyz[2] > maxZ) maxZ = prim->verts[i].xyz[2]; - } - for(i = 1; i < gl2psListNbr(gl2ps->primitives); i++){ - prim = *(GL2PSprimitive**)gl2psListPointer(gl2ps->primitives, i); - for(j = 0; j < prim->numverts; j++){ - if(prim->verts[j].xyz[2] < minZ) minZ = prim->verts[j].xyz[2]; - if(prim->verts[j].xyz[2] > maxZ) maxZ = prim->verts[j].xyz[2]; - } - } - rangeZ = (maxZ - minZ); - - /* rescale z-buffer coordinate in [0,GL2PS_ZSCALE], to make it of - the same order of magnitude as the x and y coordinates */ - scaleZ = GL2PS_ZERO(rangeZ) ? GL2PS_ZSCALE : (GL2PS_ZSCALE / rangeZ); - /* avoid precision loss (we use floats!) */ - if(scaleZ > 100000.F) scaleZ = 100000.F; - - /* apply offsets */ - for(i = 0; i < gl2psListNbr(gl2ps->primitives); i++){ - prim = *(GL2PSprimitive**)gl2psListPointer(gl2ps->primitives, i); - for(j = 0; j < prim->numverts; j++){ - prim->verts[j].xyz[2] = (prim->verts[j].xyz[2] - minZ) * scaleZ; - } - if((gl2ps->options & GL2PS_SIMPLE_LINE_OFFSET) && - (prim->type == GL2PS_LINE)){ - if(gl2ps->sort == GL2PS_SIMPLE_SORT){ - prim->verts[0].xyz[2] -= GL2PS_ZOFFSET_LARGE; - prim->verts[1].xyz[2] -= GL2PS_ZOFFSET_LARGE; - } - else{ - prim->verts[0].xyz[2] -= GL2PS_ZOFFSET; - prim->verts[1].xyz[2] -= GL2PS_ZOFFSET; - } - } - else if(prim->offset && (prim->type == GL2PS_TRIANGLE)){ - factor = gl2ps->offset[0]; - units = gl2ps->offset[1]; - area = - (prim->verts[1].xyz[0] - prim->verts[0].xyz[0]) * - (prim->verts[2].xyz[1] - prim->verts[1].xyz[1]) - - (prim->verts[2].xyz[0] - prim->verts[1].xyz[0]) * - (prim->verts[1].xyz[1] - prim->verts[0].xyz[1]); - if(!GL2PS_ZERO(area)){ - dZdX = - ((prim->verts[2].xyz[1] - prim->verts[1].xyz[1]) * - (prim->verts[1].xyz[2] - prim->verts[0].xyz[2]) - - (prim->verts[1].xyz[1] - prim->verts[0].xyz[1]) * - (prim->verts[2].xyz[2] - prim->verts[1].xyz[2])) / area; - dZdY = - ((prim->verts[1].xyz[0] - prim->verts[0].xyz[0]) * - (prim->verts[2].xyz[2] - prim->verts[1].xyz[2]) - - (prim->verts[2].xyz[0] - prim->verts[1].xyz[0]) * - (prim->verts[1].xyz[2] - prim->verts[0].xyz[2])) / area; - maxdZ = (GLfloat)sqrt(dZdX * dZdX + dZdY * dZdY); - } - else{ - maxdZ = 0.0F; - } - dZ = factor * maxdZ + units; - prim->verts[0].xyz[2] += dZ; - prim->verts[1].xyz[2] += dZ; - prim->verts[2].xyz[2] += dZ; - } - } -} - -/********************************************************************* - * - * 2D sorting routines (for occlusion culling) - * - *********************************************************************/ - -static GLint gl2psGetPlaneFromPoints(GL2PSxyz a, GL2PSxyz b, GL2PSplane plane) -{ - GLfloat n; - - plane[0] = b[1] - a[1]; - plane[1] = a[0] - b[0]; - n = (GLfloat)sqrt(plane[0]*plane[0] + plane[1]*plane[1]); - plane[2] = 0.0F; - if(!GL2PS_ZERO(n)){ - plane[0] /= n; - plane[1] /= n; - plane[3] = -plane[0]*a[0]-plane[1]*a[1]; - return 1; - } - else{ - plane[0] = -1.0F; - plane[1] = 0.0F; - plane[3] = a[0]; - return 0; - } -} - -static void gl2psFreeBspImageTree(GL2PSbsptree2d **tree) -{ - if(*tree){ - if((*tree)->back) gl2psFreeBspImageTree(&(*tree)->back); - if((*tree)->front) gl2psFreeBspImageTree(&(*tree)->front); - gl2psFree(*tree); - *tree = NULL; - } -} - -static GLint gl2psCheckPoint(GL2PSxyz point, GL2PSplane plane) -{ - GLfloat pt_dis; - - pt_dis = gl2psComparePointPlane(point, plane); - if(pt_dis > GL2PS_EPSILON) return GL2PS_POINT_INFRONT; - else if(pt_dis < -GL2PS_EPSILON) return GL2PS_POINT_BACK; - else return GL2PS_POINT_COINCIDENT; -} - -static void gl2psAddPlanesInBspTreeImage(GL2PSprimitive *prim, - GL2PSbsptree2d **tree) -{ - GLint ret = 0; - GLint i; - GLint offset = 0; - GL2PSbsptree2d *head = NULL, *cur = NULL; - - if((*tree == NULL) && (prim->numverts > 2)){ - /* don't cull if transparent - for(i = 0; i < prim->numverts - 1; i++) - if(prim->verts[i].rgba[3] < 1.0F) return; - */ - head = (GL2PSbsptree2d*)gl2psMalloc(sizeof(GL2PSbsptree2d)); - for(i = 0; i < prim->numverts-1; i++){ - if(!gl2psGetPlaneFromPoints(prim->verts[i].xyz, - prim->verts[i+1].xyz, - head->plane)){ - if(prim->numverts-i > 3){ - offset++; - } - else{ - gl2psFree(head); - return; - } - } - else{ - break; - } - } - head->back = NULL; - head->front = NULL; - for(i = 2+offset; i < prim->numverts; i++){ - ret = gl2psCheckPoint(prim->verts[i].xyz, head->plane); - if(ret != GL2PS_POINT_COINCIDENT) break; - } - switch(ret){ - case GL2PS_POINT_INFRONT : - cur = head; - for(i = 1+offset; i < prim->numverts-1; i++){ - if(cur->front == NULL){ - cur->front = (GL2PSbsptree2d*)gl2psMalloc(sizeof(GL2PSbsptree2d)); - } - if(gl2psGetPlaneFromPoints(prim->verts[i].xyz, - prim->verts[i+1].xyz, - cur->front->plane)){ - cur = cur->front; - cur->front = NULL; - cur->back = NULL; - } - } - if(cur->front == NULL){ - cur->front = (GL2PSbsptree2d*)gl2psMalloc(sizeof(GL2PSbsptree2d)); - } - if(gl2psGetPlaneFromPoints(prim->verts[i].xyz, - prim->verts[offset].xyz, - cur->front->plane)){ - cur->front->front = NULL; - cur->front->back = NULL; - } - else{ - gl2psFree(cur->front); - cur->front = NULL; - } - break; - case GL2PS_POINT_BACK : - for(i = 0; i < 4; i++){ - head->plane[i] = -head->plane[i]; - } - cur = head; - for(i = 1+offset; i < prim->numverts-1; i++){ - if(cur->front == NULL){ - cur->front = (GL2PSbsptree2d*)gl2psMalloc(sizeof(GL2PSbsptree2d)); - } - if(gl2psGetPlaneFromPoints(prim->verts[i+1].xyz, - prim->verts[i].xyz, - cur->front->plane)){ - cur = cur->front; - cur->front = NULL; - cur->back = NULL; - } - } - if(cur->front == NULL){ - cur->front = (GL2PSbsptree2d*)gl2psMalloc(sizeof(GL2PSbsptree2d)); - } - if(gl2psGetPlaneFromPoints(prim->verts[offset].xyz, - prim->verts[i].xyz, - cur->front->plane)){ - cur->front->front = NULL; - cur->front->back = NULL; - } - else{ - gl2psFree(cur->front); - cur->front = NULL; - } - break; - default: - gl2psFree(head); - return; - } - (*tree) = head; - } -} - -static GLint gl2psCheckPrimitive(GL2PSprimitive *prim, GL2PSplane plane) -{ - GLint i; - GLint pos; - - pos = gl2psCheckPoint(prim->verts[0].xyz, plane); - for(i = 1; i < prim->numverts; i++){ - pos |= gl2psCheckPoint(prim->verts[i].xyz, plane); - if(pos == (GL2PS_POINT_INFRONT | GL2PS_POINT_BACK)) return GL2PS_SPANNING; - } - if(pos & GL2PS_POINT_INFRONT) return GL2PS_IN_FRONT_OF; - else if(pos & GL2PS_POINT_BACK) return GL2PS_IN_BACK_OF; - else return GL2PS_COINCIDENT; -} - -static GL2PSprimitive *gl2psCreateSplitPrimitive2D(GL2PSprimitive *parent, - GLshort numverts, - GL2PSvertex *vertx) -{ - GLint i; - GL2PSprimitive *child = (GL2PSprimitive*)gl2psMalloc(sizeof(GL2PSprimitive)); - - if(parent->type == GL2PS_IMAGEMAP){ - child->type = GL2PS_IMAGEMAP; - child->data.image = parent->data.image; - } - else { - switch(numverts){ - case 1 : child->type = GL2PS_POINT; break; - case 2 : child->type = GL2PS_LINE; break; - case 3 : child->type = GL2PS_TRIANGLE; break; - case 4 : child->type = GL2PS_QUADRANGLE; break; - default: child->type = GL2PS_NO_TYPE; break; /* FIXME */ - } - } - child->boundary = 0; /* FIXME: not done! */ - child->culled = parent->culled; - child->offset = parent->offset; - child->pattern = parent->pattern; - child->factor = parent->factor; - child->width = parent->width; - child->numverts = numverts; - child->verts = (GL2PSvertex*)gl2psMalloc(numverts * sizeof(GL2PSvertex)); - for(i = 0; i < numverts; i++){ - child->verts[i] = vertx[i]; - } - return child; -} - -static void gl2psSplitPrimitive2D(GL2PSprimitive *prim, - GL2PSplane plane, - GL2PSprimitive **front, - GL2PSprimitive **back) -{ - /* cur will hold the position of the current vertex - prev will hold the position of the previous vertex - prev0 will hold the position of the vertex number 0 - v1 and v2 represent the current and previous vertices, respectively - flag is set if the current vertex should be checked against the plane */ - GLint cur = -1, prev = -1, i, v1 = 0, v2 = 0, flag = 1, prev0 = -1; - - /* list of vertices that will go in front and back primitive */ - GL2PSvertex *front_list = NULL, *back_list = NULL; - - /* number of vertices in front and back list */ - GLshort front_count = 0, back_count = 0; - - for(i = 0; i <= prim->numverts; i++){ - v1 = i; - if(v1 == prim->numverts){ - if(prim->numverts < 3) break; - v1 = 0; - v2 = prim->numverts - 1; - cur = prev0; - } - else if(flag){ - cur = gl2psCheckPoint(prim->verts[v1].xyz, plane); - if(i == 0){ - prev0 = cur; - } - } - if(((prev == -1) || (prev == cur) || (prev == 0) || (cur == 0)) && - (i < prim->numverts)){ - if(cur == GL2PS_POINT_INFRONT){ - front_count++; - front_list = (GL2PSvertex*)gl2psRealloc(front_list, - sizeof(GL2PSvertex)*front_count); - front_list[front_count-1] = prim->verts[v1]; - } - else if(cur == GL2PS_POINT_BACK){ - back_count++; - back_list = (GL2PSvertex*)gl2psRealloc(back_list, - sizeof(GL2PSvertex)*back_count); - back_list[back_count-1] = prim->verts[v1]; - } - else{ - front_count++; - front_list = (GL2PSvertex*)gl2psRealloc(front_list, - sizeof(GL2PSvertex)*front_count); - front_list[front_count-1] = prim->verts[v1]; - back_count++; - back_list = (GL2PSvertex*)gl2psRealloc(back_list, - sizeof(GL2PSvertex)*back_count); - back_list[back_count-1] = prim->verts[v1]; - } - flag = 1; - } - else if((prev != cur) && (cur != 0) && (prev != 0)){ - if(v1 != 0){ - v2 = v1-1; - i--; - } - front_count++; - front_list = (GL2PSvertex*)gl2psRealloc(front_list, - sizeof(GL2PSvertex)*front_count); - gl2psCutEdge(&prim->verts[v2], &prim->verts[v1], - plane, &front_list[front_count-1]); - back_count++; - back_list = (GL2PSvertex*)gl2psRealloc(back_list, - sizeof(GL2PSvertex)*back_count); - back_list[back_count-1] = front_list[front_count-1]; - flag = 0; - } - prev = cur; - } - *front = gl2psCreateSplitPrimitive2D(prim, front_count, front_list); - *back = gl2psCreateSplitPrimitive2D(prim, back_count, back_list); - gl2psFree(front_list); - gl2psFree(back_list); -} - -static GLint gl2psAddInBspImageTree(GL2PSprimitive *prim, GL2PSbsptree2d **tree) -{ - GLint ret = 0; - GL2PSprimitive *frontprim = NULL, *backprim = NULL; - - /* FIXME: until we consider the actual extent of text strings and - pixmaps, never cull them. Otherwise the whole string/pixmap gets - culled as soon as the reference point is hidden */ - if(prim->type == GL2PS_PIXMAP || - prim->type == GL2PS_TEXT || - prim->type == GL2PS_SPECIAL){ - return 1; - } - - if(*tree == NULL){ - if((prim->type != GL2PS_IMAGEMAP) && (GL_FALSE == gl2ps->zerosurfacearea)){ - gl2psAddPlanesInBspTreeImage(gl2ps->primitivetoadd, tree); - } - return 1; - } - else{ - switch(gl2psCheckPrimitive(prim, (*tree)->plane)){ - case GL2PS_IN_BACK_OF: return gl2psAddInBspImageTree(prim, &(*tree)->back); - case GL2PS_IN_FRONT_OF: - if((*tree)->front != NULL) return gl2psAddInBspImageTree(prim, &(*tree)->front); - else return 0; - case GL2PS_SPANNING: - gl2psSplitPrimitive2D(prim, (*tree)->plane, &frontprim, &backprim); - ret = gl2psAddInBspImageTree(backprim, &(*tree)->back); - if((*tree)->front != NULL){ - if(gl2psAddInBspImageTree(frontprim, &(*tree)->front)){ - ret = 1; - } - } - gl2psFree(frontprim->verts); - gl2psFree(frontprim); - gl2psFree(backprim->verts); - gl2psFree(backprim); - return ret; - case GL2PS_COINCIDENT: - if((*tree)->back != NULL){ - gl2ps->zerosurfacearea = GL_TRUE; - ret = gl2psAddInBspImageTree(prim, &(*tree)->back); - gl2ps->zerosurfacearea = GL_FALSE; - if(ret) return ret; - } - if((*tree)->front != NULL){ - gl2ps->zerosurfacearea = GL_TRUE; - ret = gl2psAddInBspImageTree(prim, &(*tree)->front); - gl2ps->zerosurfacearea = GL_FALSE; - if(ret) return ret; - } - if(prim->type == GL2PS_LINE) return 1; - else return 0; - } - } - return 0; -} - -static void gl2psAddInImageTree(void *data) -{ - GL2PSprimitive *prim = *(GL2PSprimitive **)data; - gl2ps->primitivetoadd = prim; - if(prim->type == GL2PS_IMAGEMAP && prim->data.image->format == GL2PS_IMAGEMAP_VISIBLE){ - prim->culled = 1; - } - else if(!gl2psAddInBspImageTree(prim, &gl2ps->imagetree)){ - prim->culled = 1; - } - else if(prim->type == GL2PS_IMAGEMAP){ - prim->data.image->format = GL2PS_IMAGEMAP_VISIBLE; - } -} - -/* Boundary construction */ - -static void gl2psAddBoundaryInList(GL2PSprimitive *prim, GL2PSlist *list) -{ - GL2PSprimitive *b; - GLshort i; - GL2PSxyz c; - - c[0] = c[1] = c[2] = 0.0F; - for(i = 0; i < prim->numverts; i++){ - c[0] += prim->verts[i].xyz[0]; - c[1] += prim->verts[i].xyz[1]; - } - c[0] /= prim->numverts; - c[1] /= prim->numverts; - - for(i = 0; i < prim->numverts; i++){ - if(prim->boundary & (GLint)pow(2., i)){ - b = (GL2PSprimitive*)gl2psMalloc(sizeof(GL2PSprimitive)); - b->type = GL2PS_LINE; - b->offset = prim->offset; - b->pattern = prim->pattern; - b->factor = prim->factor; - b->culled = prim->culled; - b->width = prim->width; - b->boundary = 0; - b->numverts = 2; - b->verts = (GL2PSvertex*)gl2psMalloc(2 * sizeof(GL2PSvertex)); - -#if 0 /* FIXME: need to work on boundary offset... */ - v[0] = c[0] - prim->verts[i].xyz[0]; - v[1] = c[1] - prim->verts[i].xyz[1]; - v[2] = 0.0F; - norm = gl2psNorm(v); - v[0] /= norm; - v[1] /= norm; - b->verts[0].xyz[0] = prim->verts[i].xyz[0] +0.1*v[0]; - b->verts[0].xyz[1] = prim->verts[i].xyz[1] +0.1*v[1]; - b->verts[0].xyz[2] = prim->verts[i].xyz[2]; - v[0] = c[0] - prim->verts[gl2psGetIndex(i, prim->numverts)].xyz[0]; - v[1] = c[1] - prim->verts[gl2psGetIndex(i, prim->numverts)].xyz[1]; - norm = gl2psNorm(v); - v[0] /= norm; - v[1] /= norm; - b->verts[1].xyz[0] = prim->verts[gl2psGetIndex(i, prim->numverts)].xyz[0] +0.1*v[0]; - b->verts[1].xyz[1] = prim->verts[gl2psGetIndex(i, prim->numverts)].xyz[1] +0.1*v[1]; - b->verts[1].xyz[2] = prim->verts[gl2psGetIndex(i, prim->numverts)].xyz[2]; -#else - b->verts[0].xyz[0] = prim->verts[i].xyz[0]; - b->verts[0].xyz[1] = prim->verts[i].xyz[1]; - b->verts[0].xyz[2] = prim->verts[i].xyz[2]; - b->verts[1].xyz[0] = prim->verts[gl2psGetIndex(i, prim->numverts)].xyz[0]; - b->verts[1].xyz[1] = prim->verts[gl2psGetIndex(i, prim->numverts)].xyz[1]; - b->verts[1].xyz[2] = prim->verts[gl2psGetIndex(i, prim->numverts)].xyz[2]; -#endif - - b->verts[0].rgba[0] = 0.0F; - b->verts[0].rgba[1] = 0.0F; - b->verts[0].rgba[2] = 0.0F; - b->verts[0].rgba[3] = 0.0F; - b->verts[1].rgba[0] = 0.0F; - b->verts[1].rgba[1] = 0.0F; - b->verts[1].rgba[2] = 0.0F; - b->verts[1].rgba[3] = 0.0F; - gl2psListAdd(list, &b); - } - } - -} - -static void gl2psBuildPolygonBoundary(GL2PSbsptree *tree) -{ - GLint i; - GL2PSprimitive *prim; - - if(!tree) return; - gl2psBuildPolygonBoundary(tree->back); - for(i = 0; i < gl2psListNbr(tree->primitives); i++){ - prim = *(GL2PSprimitive**)gl2psListPointer(tree->primitives, i); - if(prim->boundary) gl2psAddBoundaryInList(prim, tree->primitives); - } - gl2psBuildPolygonBoundary(tree->front); -} - -/********************************************************************* - * - * Feedback buffer parser - * - *********************************************************************/ - -static void gl2psAddPolyPrimitive(GLshort type, GLshort numverts, - GL2PSvertex *verts, GLint offset, - GLushort pattern, GLint factor, - GLfloat width, char boundary) -{ - GL2PSprimitive *prim; - - prim = (GL2PSprimitive*)gl2psMalloc(sizeof(GL2PSprimitive)); - prim->type = type; - prim->numverts = numverts; - prim->verts = (GL2PSvertex*)gl2psMalloc(numverts * sizeof(GL2PSvertex)); - memcpy(prim->verts, verts, numverts * sizeof(GL2PSvertex)); - prim->boundary = boundary; - prim->offset = (char)offset; - prim->pattern = pattern; - prim->factor = factor; - prim->width = width; - prim->culled = 0; - - /* FIXME: here we should have an option to split stretched - tris/quads to enhance SIMPLE_SORT */ - - gl2psListAdd(gl2ps->primitives, &prim); -} - -static GLint gl2psGetVertex(GL2PSvertex *v, GLfloat *p) -{ - GLint i; - - v->xyz[0] = p[0]; - v->xyz[1] = p[1]; - v->xyz[2] = p[2]; - - if(gl2ps->colormode == GL_COLOR_INDEX && gl2ps->colorsize > 0){ - i = (GLint)(p[3] + 0.5); - v->rgba[0] = gl2ps->colormap[i][0]; - v->rgba[1] = gl2ps->colormap[i][1]; - v->rgba[2] = gl2ps->colormap[i][2]; - v->rgba[3] = gl2ps->colormap[i][3]; - return 4; - } - else{ - v->rgba[0] = p[3]; - v->rgba[1] = p[4]; - v->rgba[2] = p[5]; - v->rgba[3] = p[6]; - return 7; - } -} - -static void gl2psParseFeedbackBuffer(GLint used) -{ - char flag; - GLushort pattern = 0; - GLboolean boundary; - GLint i, sizeoffloat, count, v, vtot, offset = 0, factor = 0, auxindex = 0; - GLfloat lwidth = 1.0F, psize = 1.0F; - GLfloat *current; - GL2PSvertex vertices[3]; - GL2PSprimitive *prim; - GL2PSimagemap *node; - - current = gl2ps->feedback; - boundary = gl2ps->boundary = GL_FALSE; - - while(used > 0){ - - if(GL_TRUE == boundary) gl2ps->boundary = GL_TRUE; - - switch((GLint)*current){ - case GL_POINT_TOKEN : - current ++; - used --; - i = gl2psGetVertex(&vertices[0], current); - current += i; - used -= i; - gl2psAddPolyPrimitive(GL2PS_POINT, 1, vertices, 0, - pattern, factor, psize, 0); - break; - case GL_LINE_TOKEN : - case GL_LINE_RESET_TOKEN : - current ++; - used --; - i = gl2psGetVertex(&vertices[0], current); - current += i; - used -= i; - i = gl2psGetVertex(&vertices[1], current); - current += i; - used -= i; - gl2psAddPolyPrimitive(GL2PS_LINE, 2, vertices, 0, - pattern, factor, lwidth, 0); - break; - case GL_POLYGON_TOKEN : - count = (GLint)current[1]; - current += 2; - used -= 2; - v = vtot = 0; - while(count > 0 && used > 0){ - i = gl2psGetVertex(&vertices[v], current); - gl2psAdaptVertexForBlending(&vertices[v]); - current += i; - used -= i; - count --; - vtot++; - if(v == 2){ - if(GL_TRUE == boundary){ - if(!count && vtot == 2) flag = 1|2|4; - else if(!count) flag = 2|4; - else if(vtot == 2) flag = 1|2; - else flag = 2; - } - else - flag = 0; - gl2psAddPolyPrimitive(GL2PS_TRIANGLE, 3, vertices, offset, - pattern, factor, 1, flag); - vertices[1] = vertices[2]; - } - else - v ++; - } - break; - case GL_BITMAP_TOKEN : - case GL_DRAW_PIXEL_TOKEN : - case GL_COPY_PIXEL_TOKEN : - current ++; - used --; - i = gl2psGetVertex(&vertices[0], current); - current += i; - used -= i; - break; - case GL_PASS_THROUGH_TOKEN : - switch((GLint)current[1]){ - case GL2PS_BEGIN_OFFSET_TOKEN : offset = 1; break; - case GL2PS_END_OFFSET_TOKEN : offset = 0; break; - case GL2PS_BEGIN_BOUNDARY_TOKEN : boundary = GL_TRUE; break; - case GL2PS_END_BOUNDARY_TOKEN : boundary = GL_FALSE; break; - case GL2PS_END_STIPPLE_TOKEN : pattern = 0; factor = 0; break; - case GL2PS_BEGIN_BLEND_TOKEN : gl2ps->blending = GL_TRUE; break; - case GL2PS_END_BLEND_TOKEN : gl2ps->blending = GL_FALSE; break; - case GL2PS_BEGIN_STIPPLE_TOKEN : - current += 2; - used -= 2; - pattern = (GLushort)current[1]; - current += 2; - used -= 2; - factor = (GLint)current[1]; - break; - case GL2PS_SRC_BLEND_TOKEN : - current += 2; - used -= 2; - gl2ps->blendfunc[0] = (GLint)current[1]; - break; - case GL2PS_DST_BLEND_TOKEN : - current += 2; - used -= 2; - gl2ps->blendfunc[1] = (GLint)current[1]; - break; - case GL2PS_POINT_SIZE_TOKEN : - current += 2; - used -= 2; - psize = current[1]; - break; - case GL2PS_LINE_WIDTH_TOKEN : - current += 2; - used -= 2; - lwidth = current[1]; - break; - case GL2PS_IMAGEMAP_TOKEN : - prim = (GL2PSprimitive *)gl2psMalloc(sizeof(GL2PSprimitive)); - prim->type = GL2PS_IMAGEMAP; - prim->boundary = 0; - prim->numverts = 4; - prim->verts = (GL2PSvertex *)gl2psMalloc(4 * sizeof(GL2PSvertex)); - prim->culled = 0; - prim->offset = 0; - prim->pattern = 0; - prim->factor = 0; - prim->width = 1; - - node = (GL2PSimagemap*)gl2psMalloc(sizeof(GL2PSimagemap)); - node->image = (GL2PSimage*)gl2psMalloc(sizeof(GL2PSimage)); - node->image->type = 0; - node->image->format = 0; - node->image->zoom_x = 1.0F; - node->image->zoom_y = 1.0F; - node->next = NULL; - - if(gl2ps->imagemap_head == NULL) - gl2ps->imagemap_head = node; - else - gl2ps->imagemap_tail->next = node; - gl2ps->imagemap_tail = node; - prim->data.image = node->image; - - current += 2; used -= 2; - i = gl2psGetVertex(&prim->verts[0], ¤t[1]); - current += i; used -= i; - - node->image->width = (GLint)current[2]; - current += 2; used -= 2; - node->image->height = (GLint)current[2]; - prim->verts[0].xyz[0] = prim->verts[0].xyz[0] - (int)(node->image->width / 2) + 0.5F; - prim->verts[0].xyz[1] = prim->verts[0].xyz[1] - (int)(node->image->height / 2) + 0.5F; - for(i = 1; i < 4; i++){ - for(v = 0; v < 3; v++){ - prim->verts[i].xyz[v] = prim->verts[0].xyz[v]; - prim->verts[i].rgba[v] = prim->verts[0].rgba[v]; - } - prim->verts[i].rgba[v] = prim->verts[0].rgba[v]; - } - prim->verts[1].xyz[0] = prim->verts[1].xyz[0] + node->image->width; - prim->verts[2].xyz[0] = prim->verts[1].xyz[0]; - prim->verts[2].xyz[1] = prim->verts[2].xyz[1] + node->image->height; - prim->verts[3].xyz[1] = prim->verts[2].xyz[1]; - - sizeoffloat = sizeof(GLfloat); - v = 2 * sizeoffloat; - vtot = node->image->height + node->image->height * - ((node->image->width - 1) / 8); - node->image->pixels = (GLfloat*)gl2psMalloc(v + vtot); - node->image->pixels[0] = prim->verts[0].xyz[0]; - node->image->pixels[1] = prim->verts[0].xyz[1]; - - for(i = 0; i < vtot; i += sizeoffloat){ - current += 2; used -= 2; - if((vtot - i) >= 4) - memcpy(&(((char*)(node->image->pixels))[i + v]), &(current[2]), sizeoffloat); - else - memcpy(&(((char*)(node->image->pixels))[i + v]), &(current[2]), vtot - i); - } - current++; used--; - gl2psListAdd(gl2ps->primitives, &prim); - break; - case GL2PS_DRAW_PIXELS_TOKEN : - case GL2PS_TEXT_TOKEN : - if(auxindex < gl2psListNbr(gl2ps->auxprimitives)) - gl2psListAdd(gl2ps->primitives, - gl2psListPointer(gl2ps->auxprimitives, auxindex++)); - else - gl2psMsg(GL2PS_ERROR, "Wrong number of auxiliary tokens in buffer"); - break; - } - current += 2; - used -= 2; - break; - default : - gl2psMsg(GL2PS_WARNING, "Unknown token in buffer"); - current ++; - used --; - break; - } - } - - gl2psListReset(gl2ps->auxprimitives); -} - -/********************************************************************* - * - * PostScript routines - * - *********************************************************************/ - -static void gl2psWriteByte(unsigned char byte) -{ - unsigned char h = byte / 16; - unsigned char l = byte % 16; - gl2psPrintf("%x%x", h, l); -} - -static void gl2psPrintPostScriptPixmap(GLfloat x, GLfloat y, GL2PSimage *im) -{ - GLuint nbhex, nbyte, nrgb, nbits; - GLuint row, col, ibyte, icase; - GLfloat dr, dg, db, fgrey; - unsigned char red = 0, green = 0, blue = 0, b, grey; - GLuint width = (GLuint)im->width; - GLuint height = (GLuint)im->height; - - /* FIXME: should we define an option for these? Or just keep the - 8-bit per component case? */ - int greyscale = 0; /* set to 1 to output greyscale image */ - int nbit = 8; /* number of bits per color compoment (2, 4 or 8) */ - - if((width <= 0) || (height <= 0)) return; - - gl2psPrintf("gsave\n"); - gl2psPrintf("%.2f %.2f translate\n", x, y); - gl2psPrintf("%.2f %.2f scale\n", width * im->zoom_x, height * im->zoom_y); - - if(greyscale){ /* greyscale */ - gl2psPrintf("/picstr %d string def\n", width); - gl2psPrintf("%d %d %d\n", width, height, 8); - gl2psPrintf("[ %d 0 0 -%d 0 %d ]\n", width, height, height); - gl2psPrintf("{ currentfile picstr readhexstring pop }\n"); - gl2psPrintf("image\n"); - for(row = 0; row < height; row++){ - for(col = 0; col < width; col++){ - gl2psGetRGB(im, col, row, &dr, &dg, &db); - fgrey = (0.30F * dr + 0.59F * dg + 0.11F * db); - grey = (unsigned char)(255. * fgrey); - gl2psWriteByte(grey); - } - gl2psPrintf("\n"); - } - nbhex = width * height * 2; - gl2psPrintf("%%%% nbhex digit :%d\n", nbhex); - } - else if(nbit == 2){ /* color, 2 bits for r and g and b; rgbs following each other */ - nrgb = width * 3; - nbits = nrgb * nbit; - nbyte = nbits / 8; - if((nbyte * 8) != nbits) nbyte++; - gl2psPrintf("/rgbstr %d string def\n", nbyte); - gl2psPrintf("%d %d %d\n", width, height, nbit); - gl2psPrintf("[ %d 0 0 -%d 0 %d ]\n", width, height, height); - gl2psPrintf("{ currentfile rgbstr readhexstring pop }\n"); - gl2psPrintf("false 3\n"); - gl2psPrintf("colorimage\n"); - for(row = 0; row < height; row++){ - icase = 1; - col = 0; - b = 0; - for(ibyte = 0; ibyte < nbyte; ibyte++){ - if(icase == 1) { - if(col < width) { - gl2psGetRGB(im, col, row, &dr, &dg, &db); - } - else { - dr = dg = db = 0; - } - col++; - red = (unsigned char)(3. * dr); - green = (unsigned char)(3. * dg); - blue = (unsigned char)(3. * db); - b = red; - b = (b<<2) + green; - b = (b<<2) + blue; - if(col < width) { - gl2psGetRGB(im, col, row, &dr, &dg, &db); - } - else { - dr = dg = db = 0; - } - col++; - red = (unsigned char)(3. * dr); - green = (unsigned char)(3. * dg); - blue = (unsigned char)(3. * db); - b = (b<<2) + red; - gl2psWriteByte(b); - b = 0; - icase++; - } - else if(icase == 2) { - b = green; - b = (b<<2) + blue; - if(col < width) { - gl2psGetRGB(im, col, row, &dr, &dg, &db); - } - else { - dr = dg = db = 0; - } - col++; - red = (unsigned char)(3. * dr); - green = (unsigned char)(3. * dg); - blue = (unsigned char)(3. * db); - b = (b<<2) + red; - b = (b<<2) + green; - gl2psWriteByte(b); - b = 0; - icase++; - } - else if(icase == 3) { - b = blue; - if(col < width) { - gl2psGetRGB(im, col, row, &dr, &dg, &db); - } - else { - dr = dg = db = 0; - } - col++; - red = (unsigned char)(3. * dr); - green = (unsigned char)(3. * dg); - blue = (unsigned char)(3. * db); - b = (b<<2) + red; - b = (b<<2) + green; - b = (b<<2) + blue; - gl2psWriteByte(b); - b = 0; - icase = 1; - } - } - gl2psPrintf("\n"); - } - } - else if(nbit == 4){ /* color, 4 bits for r and g and b; rgbs following each other */ - nrgb = width * 3; - nbits = nrgb * nbit; - nbyte = nbits / 8; - if((nbyte * 8) != nbits) nbyte++; - gl2psPrintf("/rgbstr %d string def\n", nbyte); - gl2psPrintf("%d %d %d\n", width, height, nbit); - gl2psPrintf("[ %d 0 0 -%d 0 %d ]\n", width, height, height); - gl2psPrintf("{ currentfile rgbstr readhexstring pop }\n"); - gl2psPrintf("false 3\n"); - gl2psPrintf("colorimage\n"); - for(row = 0; row < height; row++){ - col = 0; - icase = 1; - for(ibyte = 0; ibyte < nbyte; ibyte++){ - if(icase == 1) { - if(col < width) { - gl2psGetRGB(im, col, row, &dr, &dg, &db); - } - else { - dr = dg = db = 0; - } - col++; - red = (unsigned char)(15. * dr); - green = (unsigned char)(15. * dg); - gl2psPrintf("%x%x", red, green); - icase++; - } - else if(icase == 2) { - blue = (unsigned char)(15. * db); - if(col < width) { - gl2psGetRGB(im, col, row, &dr, &dg, &db); - } - else { - dr = dg = db = 0; - } - col++; - red = (unsigned char)(15. * dr); - gl2psPrintf("%x%x", blue, red); - icase++; - } - else if(icase == 3) { - green = (unsigned char)(15. * dg); - blue = (unsigned char)(15. * db); - gl2psPrintf("%x%x", green, blue); - icase = 1; - } - } - gl2psPrintf("\n"); - } - } - else{ /* 8 bit for r and g and b */ - nbyte = width * 3; - gl2psPrintf("/rgbstr %d string def\n", nbyte); - gl2psPrintf("%d %d %d\n", width, height, 8); - gl2psPrintf("[ %d 0 0 -%d 0 %d ]\n", width, height, height); - gl2psPrintf("{ currentfile rgbstr readhexstring pop }\n"); - gl2psPrintf("false 3\n"); - gl2psPrintf("colorimage\n"); - for(row = 0; row < height; row++){ - for(col = 0; col < width; col++){ - gl2psGetRGB(im, col, row, &dr, &dg, &db); - red = (unsigned char)(255. * dr); - gl2psWriteByte(red); - green = (unsigned char)(255. * dg); - gl2psWriteByte(green); - blue = (unsigned char)(255. * db); - gl2psWriteByte(blue); - } - gl2psPrintf("\n"); - } - } - - gl2psPrintf("grestore\n"); -} - -static void gl2psPrintPostScriptImagemap(GLfloat x, GLfloat y, - GLsizei width, GLsizei height, - const unsigned char *imagemap){ - int i, size; - - if((width <= 0) || (height <= 0)) return; - - size = height + height * (width - 1) / 8; - - gl2psPrintf("gsave\n"); - gl2psPrintf("%.2f %.2f translate\n", x, y); - gl2psPrintf("%d %d scale\n%d %d\ntrue\n", width, height,width, height); - gl2psPrintf("[ %d 0 0 -%d 0 %d ] {<", width, height); - for(i = 0; i < size; i++){ - gl2psWriteByte(*imagemap); - imagemap++; - } - gl2psPrintf(">} imagemask\ngrestore\n"); -} - -static void gl2psPrintPostScriptHeader(void) -{ - time_t now; - - /* Since compression is not part of the PostScript standard, - compressed PostScript files are just gzipped PostScript files - ("ps.gz" or "eps.gz") */ - gl2psPrintGzipHeader(); - - time(&now); - - if(gl2ps->format == GL2PS_PS){ - gl2psPrintf("%%!PS-Adobe-3.0\n"); - } - else{ - gl2psPrintf("%%!PS-Adobe-3.0 EPSF-3.0\n"); - } - - gl2psPrintf("%%%%Title: %s\n" - "%%%%Creator: GL2PS %d.%d.%d%s, %s\n" - "%%%%For: %s\n" - "%%%%CreationDate: %s" - "%%%%LanguageLevel: 3\n" - "%%%%DocumentData: Clean7Bit\n" - "%%%%Pages: 1\n", - gl2ps->title, GL2PS_MAJOR_VERSION, GL2PS_MINOR_VERSION, - GL2PS_PATCH_VERSION, GL2PS_EXTRA_VERSION, GL2PS_COPYRIGHT, - gl2ps->producer, ctime(&now)); - - if(gl2ps->format == GL2PS_PS){ - gl2psPrintf("%%%%Orientation: %s\n" - "%%%%DocumentMedia: Default %d %d 0 () ()\n", - (gl2ps->options & GL2PS_LANDSCAPE) ? "Landscape" : "Portrait", - (gl2ps->options & GL2PS_LANDSCAPE) ? (int)gl2ps->viewport[3] : - (int)gl2ps->viewport[2], - (gl2ps->options & GL2PS_LANDSCAPE) ? (int)gl2ps->viewport[2] : - (int)gl2ps->viewport[3]); - } - - gl2psPrintf("%%%%BoundingBox: %d %d %d %d\n" - "%%%%EndComments\n", - (gl2ps->options & GL2PS_LANDSCAPE) ? (int)gl2ps->viewport[1] : - (int)gl2ps->viewport[0], - (gl2ps->options & GL2PS_LANDSCAPE) ? (int)gl2ps->viewport[0] : - (int)gl2ps->viewport[1], - (gl2ps->options & GL2PS_LANDSCAPE) ? (int)gl2ps->viewport[3] : - (int)gl2ps->viewport[2], - (gl2ps->options & GL2PS_LANDSCAPE) ? (int)gl2ps->viewport[2] : - (int)gl2ps->viewport[3]); - - /* RGB color: r g b C (replace C by G in output to change from rgb to gray) - Grayscale: r g b G - Font choose: size fontname FC - Text string: (string) x y size fontname S?? - Rotated text string: (string) angle x y size fontname S??R - Point primitive: x y size P - Line width: width W - Line start: x y LS - Line joining last point: x y L - Line end: x y LE - Flat-shaded triangle: x3 y3 x2 y2 x1 y1 T - Smooth-shaded triangle: x3 y3 r3 g3 b3 x2 y2 r2 g2 b2 x1 y1 r1 g1 b1 ST */ - - gl2psPrintf("%%%%BeginProlog\n" - "/gl2psdict 64 dict def gl2psdict begin\n" - "0 setlinecap 0 setlinejoin\n" - "/tryPS3shading %s def %% set to false to force subdivision\n" - "/rThreshold %g def %% red component subdivision threshold\n" - "/gThreshold %g def %% green component subdivision threshold\n" - "/bThreshold %g def %% blue component subdivision threshold\n", - (gl2ps->options & GL2PS_NO_PS3_SHADING) ? "false" : "true", - gl2ps->threshold[0], gl2ps->threshold[1], gl2ps->threshold[2]); - - gl2psPrintf("/BD { bind def } bind def\n" - "/C { setrgbcolor } BD\n" - "/G { 0.082 mul exch 0.6094 mul add exch 0.3086 mul add neg 1.0 add setgray } BD\n" - "/W { setlinewidth } BD\n"); - - gl2psPrintf("/FC { findfont exch /SH exch def SH scalefont setfont } BD\n" - "/SW { dup stringwidth pop } BD\n" - "/S { FC moveto show } BD\n" - "/SBC{ FC moveto SW -2 div 0 rmoveto show } BD\n" - "/SBR{ FC moveto SW neg 0 rmoveto show } BD\n" - "/SCL{ FC moveto 0 SH -2 div rmoveto show } BD\n" - "/SCC{ FC moveto SW -2 div SH -2 div rmoveto show } BD\n" - "/SCR{ FC moveto SW neg SH -2 div rmoveto show } BD\n" - "/STL{ FC moveto 0 SH neg rmoveto show } BD\n" - "/STC{ FC moveto SW -2 div SH neg rmoveto show } BD\n" - "/STR{ FC moveto SW neg SH neg rmoveto show } BD\n"); - - /* rotated text routines: same nameanem with R appended */ - - gl2psPrintf("/FCT { FC translate 0 0 } BD\n" - "/SR { gsave FCT moveto rotate show grestore } BD\n" - "/SBCR{ gsave FCT moveto rotate SW -2 div 0 rmoveto show grestore } BD\n" - "/SBRR{ gsave FCT moveto rotate SW neg 0 rmoveto show grestore } BD\n" - "/SCLR{ gsave FCT moveto rotate 0 SH -2 div rmoveto show grestore} BD\n"); - gl2psPrintf("/SCCR{ gsave FCT moveto rotate SW -2 div SH -2 div rmoveto show grestore} BD\n" - "/SCRR{ gsave FCT moveto rotate SW neg SH -2 div rmoveto show grestore} BD\n" - "/STLR{ gsave FCT moveto rotate 0 SH neg rmoveto show grestore } BD\n" - "/STCR{ gsave FCT moveto rotate SW -2 div SH neg rmoveto show grestore } BD\n" - "/STRR{ gsave FCT moveto rotate SW neg SH neg rmoveto show grestore } BD\n"); - - gl2psPrintf("/P { newpath 0.0 360.0 arc closepath fill } BD\n" - "/LS { newpath moveto } BD\n" - "/L { lineto } BD\n" - "/LE { lineto stroke } BD\n" - "/T { newpath moveto lineto lineto closepath fill } BD\n"); - - /* Smooth-shaded triangle with PostScript level 3 shfill operator: - x3 y3 r3 g3 b3 x2 y2 r2 g2 b2 x1 y1 r1 g1 b1 STshfill */ - - gl2psPrintf("/STshfill {\n" - " /b1 exch def /g1 exch def /r1 exch def /y1 exch def /x1 exch def\n" - " /b2 exch def /g2 exch def /r2 exch def /y2 exch def /x2 exch def\n" - " /b3 exch def /g3 exch def /r3 exch def /y3 exch def /x3 exch def\n" - " gsave << /ShadingType 4 /ColorSpace [/DeviceRGB]\n" - " /DataSource [ 0 x1 y1 r1 g1 b1 0 x2 y2 r2 g2 b2 0 x3 y3 r3 g3 b3 ] >>\n" - " shfill grestore } BD\n"); - - /* Flat-shaded triangle with middle color: - x3 y3 r3 g3 b3 x2 y2 r2 g2 b2 x1 y1 r1 g1 b1 Tm */ - - gl2psPrintf(/* stack : x3 y3 r3 g3 b3 x2 y2 r2 g2 b2 x1 y1 r1 g1 b1 */ - "/Tm { 3 -1 roll 8 -1 roll 13 -1 roll add add 3 div\n" /* r = (r1+r2+r3)/3 */ - /* stack : x3 y3 g3 b3 x2 y2 g2 b2 x1 y1 g1 b1 r */ - " 3 -1 roll 7 -1 roll 11 -1 roll add add 3 div\n" /* g = (g1+g2+g3)/3 */ - /* stack : x3 y3 b3 x2 y2 b2 x1 y1 b1 r g b */ - " 3 -1 roll 6 -1 roll 9 -1 roll add add 3 div" /* b = (b1+b2+b3)/3 */ - /* stack : x3 y3 x2 y2 x1 y1 r g b */ - " C T } BD\n"); - - /* Split triangle in four sub-triangles (at sides middle points) and call the - STnoshfill procedure on each, interpolating the colors in RGB space: - x3 y3 r3 g3 b3 x2 y2 r2 g2 b2 x1 y1 r1 g1 b1 STsplit - (in procedure comments key: (Vi) = xi yi ri gi bi) */ - - gl2psPrintf("/STsplit {\n" - " 4 index 15 index add 0.5 mul\n" /* x13 = (x1+x3)/2 */ - " 4 index 15 index add 0.5 mul\n" /* y13 = (y1+y3)/2 */ - " 4 index 15 index add 0.5 mul\n" /* r13 = (r1+r3)/2 */ - " 4 index 15 index add 0.5 mul\n" /* g13 = (g1+g3)/2 */ - " 4 index 15 index add 0.5 mul\n" /* b13 = (b1+b3)/2 */ - " 5 copy 5 copy 25 15 roll\n"); - - /* at his point, stack = (V3) (V13) (V13) (V13) (V2) (V1) */ - - gl2psPrintf(" 9 index 30 index add 0.5 mul\n" /* x23 = (x2+x3)/2 */ - " 9 index 30 index add 0.5 mul\n" /* y23 = (y2+y3)/2 */ - " 9 index 30 index add 0.5 mul\n" /* r23 = (r2+r3)/2 */ - " 9 index 30 index add 0.5 mul\n" /* g23 = (g2+g3)/2 */ - " 9 index 30 index add 0.5 mul\n" /* b23 = (b2+b3)/2 */ - " 5 copy 5 copy 35 5 roll 25 5 roll 15 5 roll\n"); - - /* stack = (V3) (V13) (V23) (V13) (V23) (V13) (V23) (V2) (V1) */ - - gl2psPrintf(" 4 index 10 index add 0.5 mul\n" /* x12 = (x1+x2)/2 */ - " 4 index 10 index add 0.5 mul\n" /* y12 = (y1+y2)/2 */ - " 4 index 10 index add 0.5 mul\n" /* r12 = (r1+r2)/2 */ - " 4 index 10 index add 0.5 mul\n" /* g12 = (g1+g2)/2 */ - " 4 index 10 index add 0.5 mul\n" /* b12 = (b1+b2)/2 */ - " 5 copy 5 copy 40 5 roll 25 5 roll 15 5 roll 25 5 roll\n"); - - /* stack = (V3) (V13) (V23) (V13) (V12) (V23) (V13) (V1) (V12) (V23) (V12) (V2) */ - - gl2psPrintf(" STnoshfill STnoshfill STnoshfill STnoshfill } BD\n"); - - /* Gouraud shaded triangle using recursive subdivision until the difference - between corner colors does not exceed the thresholds: - x3 y3 r3 g3 b3 x2 y2 r2 g2 b2 x1 y1 r1 g1 b1 STnoshfill */ - - gl2psPrintf("/STnoshfill {\n" - " 2 index 8 index sub abs rThreshold gt\n" /* |r1-r2|>rth */ - " { STsplit }\n" - " { 1 index 7 index sub abs gThreshold gt\n" /* |g1-g2|>gth */ - " { STsplit }\n" - " { dup 6 index sub abs bThreshold gt\n" /* |b1-b2|>bth */ - " { STsplit }\n" - " { 2 index 13 index sub abs rThreshold gt\n" /* |r1-r3|>rht */ - " { STsplit }\n" - " { 1 index 12 index sub abs gThreshold gt\n" /* |g1-g3|>gth */ - " { STsplit }\n" - " { dup 11 index sub abs bThreshold gt\n" /* |b1-b3|>bth */ - " { STsplit }\n" - " { 7 index 13 index sub abs rThreshold gt\n"); /* |r2-r3|>rht */ - gl2psPrintf(" { STsplit }\n" - " { 6 index 12 index sub abs gThreshold gt\n" /* |g2-g3|>gth */ - " { STsplit }\n" - " { 5 index 11 index sub abs bThreshold gt\n" /* |b2-b3|>bth */ - " { STsplit }\n" - " { Tm }\n" /* all colors sufficiently similar */ - " ifelse }\n" - " ifelse }\n" - " ifelse }\n" - " ifelse }\n" - " ifelse }\n" - " ifelse }\n" - " ifelse }\n" - " ifelse }\n" - " ifelse } BD\n"); - - gl2psPrintf("tryPS3shading\n" - "{ /shfill where\n" - " { /ST { STshfill } BD }\n" - " { /ST { STnoshfill } BD }\n" - " ifelse }\n" - "{ /ST { STnoshfill } BD }\n" - "ifelse\n"); - - gl2psPrintf("end\n" - "%%%%EndProlog\n" - "%%%%BeginSetup\n" - "/DeviceRGB setcolorspace\n" - "gl2psdict begin\n" - "%%%%EndSetup\n" - "%%%%Page: 1 1\n" - "%%%%BeginPageSetup\n"); - - if(gl2ps->options & GL2PS_LANDSCAPE){ - gl2psPrintf("%d 0 translate 90 rotate\n", - (int)gl2ps->viewport[3]); - } - - gl2psPrintf("%%%%EndPageSetup\n" - "mark\n" - "gsave\n" - "1.0 1.0 scale\n"); - - if(gl2ps->options & GL2PS_DRAW_BACKGROUND){ - gl2psPrintf("%g %g %g C\n" - "newpath %d %d moveto %d %d lineto %d %d lineto %d %d lineto\n" - "closepath fill\n", - gl2ps->bgcolor[0], gl2ps->bgcolor[1], gl2ps->bgcolor[2], - (int)gl2ps->viewport[0], (int)gl2ps->viewport[1], (int)gl2ps->viewport[2], - (int)gl2ps->viewport[1], (int)gl2ps->viewport[2], (int)gl2ps->viewport[3], - (int)gl2ps->viewport[0], (int)gl2ps->viewport[3]); - } -} - -static void gl2psPrintPostScriptColor(GL2PSrgba rgba) -{ - if(!gl2psSameColor(gl2ps->lastrgba, rgba)){ - gl2psSetLastColor(rgba); - gl2psPrintf("%g %g %g C\n", rgba[0], rgba[1], rgba[2]); - } -} - -static void gl2psResetPostScriptColor(void) -{ - gl2ps->lastrgba[0] = gl2ps->lastrgba[1] = gl2ps->lastrgba[2] = -1.; -} - -static void gl2psEndPostScriptLine(void) -{ - int i; - if(gl2ps->lastvertex.rgba[0] >= 0.){ - gl2psPrintf("%g %g LE\n", gl2ps->lastvertex.xyz[0], gl2ps->lastvertex.xyz[1]); - for(i = 0; i < 3; i++) - gl2ps->lastvertex.xyz[i] = -1.; - for(i = 0; i < 4; i++) - gl2ps->lastvertex.rgba[i] = -1.; - } -} - -static void gl2psParseStipplePattern(GLushort pattern, GLint factor, - int *nb, int array[10]) -{ - int i, n; - int on[8] = {0, 0, 0, 0, 0, 0, 0, 0}; - int off[8] = {0, 0, 0, 0, 0, 0, 0, 0}; - char tmp[16]; - - /* extract the 16 bits from the OpenGL stipple pattern */ - for(n = 15; n >= 0; n--){ - tmp[n] = (char)(pattern & 0x01); - pattern >>= 1; - } - /* compute the on/off pixel sequence */ - n = 0; - for(i = 0; i < 8; i++){ - while(n < 16 && !tmp[n]){ off[i]++; n++; } - while(n < 16 && tmp[n]){ on[i]++; n++; } - if(n >= 15){ i++; break; } - } - - /* store the on/off array from right to left, starting with off - pixels. The PostScript specification allows for at most 11 - elements in the on/off array, so we limit ourselves to 5 on/off - couples (our longest possible array is thus [on4 off4 on3 off3 - on2 off2 on1 off1 on0 off0]) */ - *nb = 0; - for(n = i - 1; n >= 0; n--){ - array[(*nb)++] = factor * on[n]; - array[(*nb)++] = factor * off[n]; - if(*nb == 10) break; - } -} - -static int gl2psPrintPostScriptDash(GLushort pattern, GLint factor, const char *str) -{ - int len = 0, i, n, array[10]; - - if(pattern == gl2ps->lastpattern && factor == gl2ps->lastfactor) - return 0; - - gl2ps->lastpattern = pattern; - gl2ps->lastfactor = factor; - - if(!pattern || !factor){ - /* solid line */ - len += gl2psPrintf("[] 0 %s\n", str); - } - else{ - gl2psParseStipplePattern(pattern, factor, &n, array); - len += gl2psPrintf("["); - for(i = 0; i < n; i++){ - if(i) len += gl2psPrintf(" "); - len += gl2psPrintf("%d", array[i]); - } - len += gl2psPrintf("] 0 %s\n", str); - } - - return len; -} - -static void gl2psPrintPostScriptPrimitive(void *data) -{ - int newline; - GL2PSprimitive *prim; - - prim = *(GL2PSprimitive**)data; - - if((gl2ps->options & GL2PS_OCCLUSION_CULL) && prim->culled) return; - - /* Every effort is made to draw lines as connected segments (i.e., - using a single PostScript path): this is the only way to get nice - line joins and to not restart the stippling for every line - segment. So if the primitive to print is not a line we must first - finish the current line (if any): */ - if(prim->type != GL2PS_LINE) gl2psEndPostScriptLine(); - - switch(prim->type){ - case GL2PS_POINT : - gl2psPrintPostScriptColor(prim->verts[0].rgba); - gl2psPrintf("%g %g %g P\n", - prim->verts[0].xyz[0], prim->verts[0].xyz[1], 0.5 * prim->width); - break; - case GL2PS_LINE : - if(!gl2psSamePosition(gl2ps->lastvertex.xyz, prim->verts[0].xyz) || - !gl2psSameColor(gl2ps->lastrgba, prim->verts[0].rgba) || - gl2ps->lastlinewidth != prim->width || - gl2ps->lastpattern != prim->pattern || - gl2ps->lastfactor != prim->factor){ - /* End the current line if the new segment does not start where - the last one ended, or if the color, the width or the - stippling have changed (multi-stroking lines with changing - colors is necessary until we use /shfill for lines; - unfortunately this means that at the moment we can screw up - line stippling for smooth-shaded lines) */ - gl2psEndPostScriptLine(); - newline = 1; - } - else{ - newline = 0; - } - if(gl2ps->lastlinewidth != prim->width){ - gl2ps->lastlinewidth = prim->width; - gl2psPrintf("%g W\n", gl2ps->lastlinewidth); - } - gl2psPrintPostScriptDash(prim->pattern, prim->factor, "setdash"); - gl2psPrintPostScriptColor(prim->verts[0].rgba); - gl2psPrintf("%g %g %s\n", prim->verts[0].xyz[0], prim->verts[0].xyz[1], - newline ? "LS" : "L"); - gl2ps->lastvertex = prim->verts[1]; - break; - case GL2PS_TRIANGLE : - if(!gl2psVertsSameColor(prim)){ - gl2psResetPostScriptColor(); - gl2psPrintf("%g %g %g %g %g %g %g %g %g %g %g %g %g %g %g ST\n", - prim->verts[2].xyz[0], prim->verts[2].xyz[1], - prim->verts[2].rgba[0], prim->verts[2].rgba[1], - prim->verts[2].rgba[2], prim->verts[1].xyz[0], - prim->verts[1].xyz[1], prim->verts[1].rgba[0], - prim->verts[1].rgba[1], prim->verts[1].rgba[2], - prim->verts[0].xyz[0], prim->verts[0].xyz[1], - prim->verts[0].rgba[0], prim->verts[0].rgba[1], - prim->verts[0].rgba[2]); - } - else{ - gl2psPrintPostScriptColor(prim->verts[0].rgba); - gl2psPrintf("%g %g %g %g %g %g T\n", - prim->verts[2].xyz[0], prim->verts[2].xyz[1], - prim->verts[1].xyz[0], prim->verts[1].xyz[1], - prim->verts[0].xyz[0], prim->verts[0].xyz[1]); - } - break; - case GL2PS_QUADRANGLE : - gl2psMsg(GL2PS_WARNING, "There should not be any quad left to print"); - break; - case GL2PS_PIXMAP : - gl2psPrintPostScriptPixmap(prim->verts[0].xyz[0], prim->verts[0].xyz[1], - prim->data.image); - break; - case GL2PS_IMAGEMAP : - if(prim->data.image->type != GL2PS_IMAGEMAP_WRITTEN){ - gl2psPrintPostScriptColor(prim->verts[0].rgba); - gl2psPrintPostScriptImagemap(prim->data.image->pixels[0], - prim->data.image->pixels[1], - prim->data.image->width, prim->data.image->height, - (const unsigned char*)(&(prim->data.image->pixels[2]))); - prim->data.image->type = GL2PS_IMAGEMAP_WRITTEN; - } - break; - case GL2PS_TEXT : - gl2psPrintPostScriptColor(prim->verts[0].rgba); - gl2psPrintf("(%s) ", prim->data.text->str); - if(prim->data.text->angle) - gl2psPrintf("%g ", prim->data.text->angle); - gl2psPrintf("%g %g %d /%s ", - prim->verts[0].xyz[0], prim->verts[0].xyz[1], - prim->data.text->fontsize, prim->data.text->fontname); - switch(prim->data.text->alignment){ - case GL2PS_TEXT_C: - gl2psPrintf(prim->data.text->angle ? "SCCR\n" : "SCC\n"); - break; - case GL2PS_TEXT_CL: - gl2psPrintf(prim->data.text->angle ? "SCLR\n" : "SCL\n"); - break; - case GL2PS_TEXT_CR: - gl2psPrintf(prim->data.text->angle ? "SCRR\n" : "SCR\n"); - break; - case GL2PS_TEXT_B: - gl2psPrintf(prim->data.text->angle ? "SBCR\n" : "SBC\n"); - break; - case GL2PS_TEXT_BR: - gl2psPrintf(prim->data.text->angle ? "SBRR\n" : "SBR\n"); - break; - case GL2PS_TEXT_T: - gl2psPrintf(prim->data.text->angle ? "STCR\n" : "STC\n"); - break; - case GL2PS_TEXT_TL: - gl2psPrintf(prim->data.text->angle ? "STLR\n" : "STL\n"); - break; - case GL2PS_TEXT_TR: - gl2psPrintf(prim->data.text->angle ? "STRR\n" : "STR\n"); - break; - case GL2PS_TEXT_BL: - default: - gl2psPrintf(prim->data.text->angle ? "SR\n" : "S\n"); - break; - } - break; - case GL2PS_SPECIAL : - /* alignment contains the format for which the special output text - is intended */ - if(prim->data.text->alignment == GL2PS_PS || - prim->data.text->alignment == GL2PS_EPS) - gl2psPrintf("%s\n", prim->data.text->str); - break; - default : - break; - } -} - -static void gl2psPrintPostScriptFooter(void) -{ - gl2psPrintf("grestore\n" - "showpage\n" - "cleartomark\n" - "%%%%PageTrailer\n" - "%%%%Trailer\n" - "end\n" - "%%%%EOF\n"); - - gl2psPrintGzipFooter(); -} - -static void gl2psPrintPostScriptBeginViewport(GLint viewport[4]) -{ - GLint index; - GLfloat rgba[4]; - int x = viewport[0], y = viewport[1], w = viewport[2], h = viewport[3]; - - glRenderMode(GL_FEEDBACK); - - if(gl2ps->header){ - gl2psPrintPostScriptHeader(); - gl2ps->header = GL_FALSE; - } - - gl2psPrintf("gsave\n" - "1.0 1.0 scale\n"); - - if(gl2ps->options & GL2PS_DRAW_BACKGROUND){ - if(gl2ps->colormode == GL_RGBA || gl2ps->colorsize == 0){ - glGetFloatv(GL_COLOR_CLEAR_VALUE, rgba); - } - else{ - glGetIntegerv(GL_INDEX_CLEAR_VALUE, &index); - rgba[0] = gl2ps->colormap[index][0]; - rgba[1] = gl2ps->colormap[index][1]; - rgba[2] = gl2ps->colormap[index][2]; - rgba[3] = 1.0F; - } - gl2psPrintf("%g %g %g C\n" - "newpath %d %d moveto %d %d lineto %d %d lineto %d %d lineto\n" - "closepath fill\n", - rgba[0], rgba[1], rgba[2], - x, y, x+w, y, x+w, y+h, x, y+h); - } - - gl2psPrintf("newpath %d %d moveto %d %d lineto %d %d lineto %d %d lineto\n" - "closepath clip\n", - x, y, x+w, y, x+w, y+h, x, y+h); - -} - -static GLint gl2psPrintPostScriptEndViewport(void) -{ - GLint res; - - res = gl2psPrintPrimitives(); - gl2psPrintf("grestore\n"); - return res; -} - -static void gl2psPrintPostScriptFinalPrimitive(void) -{ - /* End any remaining line, if any */ - gl2psEndPostScriptLine(); -} - -/* definition of the PostScript and Encapsulated PostScript backends */ - -static GL2PSbackend gl2psPS = { - gl2psPrintPostScriptHeader, - gl2psPrintPostScriptFooter, - gl2psPrintPostScriptBeginViewport, - gl2psPrintPostScriptEndViewport, - gl2psPrintPostScriptPrimitive, - gl2psPrintPostScriptFinalPrimitive, - "ps", - "Postscript" -}; - -static GL2PSbackend gl2psEPS = { - gl2psPrintPostScriptHeader, - gl2psPrintPostScriptFooter, - gl2psPrintPostScriptBeginViewport, - gl2psPrintPostScriptEndViewport, - gl2psPrintPostScriptPrimitive, - gl2psPrintPostScriptFinalPrimitive, - "eps", - "Encapsulated Postscript" -}; - -/********************************************************************* - * - * LaTeX routines - * - *********************************************************************/ - -static void gl2psPrintTeXHeader(void) -{ - char name[256]; - time_t now; - int i; - - if(gl2ps->filename && strlen(gl2ps->filename) < 256){ - for(i = (int)strlen(gl2ps->filename) - 1; i >= 0; i--){ - if(gl2ps->filename[i] == '.'){ - strncpy(name, gl2ps->filename, i); - name[i] = '\0'; - break; - } - } - if(i <= 0) strcpy(name, gl2ps->filename); - } - else{ - strcpy(name, "untitled"); - } - - time(&now); - - fprintf(gl2ps->stream, - "%% Title: %s\n" - "%% Creator: GL2PS %d.%d.%d%s, %s\n" - "%% For: %s\n" - "%% CreationDate: %s", - gl2ps->title, GL2PS_MAJOR_VERSION, GL2PS_MINOR_VERSION, - GL2PS_PATCH_VERSION, GL2PS_EXTRA_VERSION, GL2PS_COPYRIGHT, - gl2ps->producer, ctime(&now)); - - fprintf(gl2ps->stream, - "\\setlength{\\unitlength}{1pt}\n" - "\\begin{picture}(0,0)\n" - "\\includegraphics{%s}\n" - "\\end{picture}%%\n" - "%s\\begin{picture}(%d,%d)(0,0)\n", - name, (gl2ps->options & GL2PS_LANDSCAPE) ? "\\rotatebox{90}{" : "", - (int)gl2ps->viewport[2], (int)gl2ps->viewport[3]); -} - -static void gl2psPrintTeXPrimitive(void *data) -{ - GL2PSprimitive *prim; - - prim = *(GL2PSprimitive**)data; - - switch(prim->type){ - case GL2PS_TEXT : - fprintf(gl2ps->stream, "\\fontsize{%d}{0}\n\\selectfont", - prim->data.text->fontsize); - fprintf(gl2ps->stream, "\\put(%g,%g)", - prim->verts[0].xyz[0], prim->verts[0].xyz[1]); - if(prim->data.text->angle) - fprintf(gl2ps->stream, "{\\rotatebox{%g}", prim->data.text->angle); - fprintf(gl2ps->stream, "{\\makebox(0,0)"); - switch(prim->data.text->alignment){ - case GL2PS_TEXT_C: - fprintf(gl2ps->stream, "{"); - break; - case GL2PS_TEXT_CL: - fprintf(gl2ps->stream, "[l]{"); - break; - case GL2PS_TEXT_CR: - fprintf(gl2ps->stream, "[r]{"); - break; - case GL2PS_TEXT_B: - fprintf(gl2ps->stream, "[b]{"); - break; - case GL2PS_TEXT_BR: - fprintf(gl2ps->stream, "[br]{"); - break; - case GL2PS_TEXT_T: - fprintf(gl2ps->stream, "[t]{"); - break; - case GL2PS_TEXT_TL: - fprintf(gl2ps->stream, "[tl]{"); - break; - case GL2PS_TEXT_TR: - fprintf(gl2ps->stream, "[tr]{"); - break; - case GL2PS_TEXT_BL: - default: - fprintf(gl2ps->stream, "[bl]{"); - break; - } - fprintf(gl2ps->stream, "\\textcolor[rgb]{%g,%g,%g}{{%s}}", - prim->verts[0].rgba[0], prim->verts[0].rgba[1], prim->verts[0].rgba[2], - prim->data.text->str); - if(prim->data.text->angle) - fprintf(gl2ps->stream, "}"); - fprintf(gl2ps->stream, "}}\n"); - break; - case GL2PS_SPECIAL : - /* alignment contains the format for which the special output text - is intended */ - if (prim->data.text->alignment == GL2PS_TEX) - fprintf(gl2ps->stream, "%s\n", prim->data.text->str); - break; - default : - break; - } -} - -static void gl2psPrintTeXFooter(void) -{ - fprintf(gl2ps->stream, "\\end{picture}%s\n", - (gl2ps->options & GL2PS_LANDSCAPE) ? "}" : ""); -} - -static void gl2psPrintTeXBeginViewport(GLint viewport[4]) -{ - (void) viewport; /* not used */ - glRenderMode(GL_FEEDBACK); - - if(gl2ps->header){ - gl2psPrintTeXHeader(); - gl2ps->header = GL_FALSE; - } -} - -static GLint gl2psPrintTeXEndViewport(void) -{ - return gl2psPrintPrimitives(); -} - -static void gl2psPrintTeXFinalPrimitive(void) -{ -} - -/* definition of the LaTeX backend */ - -static GL2PSbackend gl2psTEX = { - gl2psPrintTeXHeader, - gl2psPrintTeXFooter, - gl2psPrintTeXBeginViewport, - gl2psPrintTeXEndViewport, - gl2psPrintTeXPrimitive, - gl2psPrintTeXFinalPrimitive, - "tex", - "LaTeX text" -}; - -/********************************************************************* - * - * PDF routines - * - *********************************************************************/ - -static int gl2psPrintPDFCompressorType(void) -{ -#if defined(GL2PS_HAVE_ZLIB) - if(gl2ps->options & GL2PS_COMPRESS){ - return fprintf(gl2ps->stream, "/Filter [/FlateDecode]\n"); - } -#endif - return 0; -} - -static int gl2psPrintPDFStrokeColor(GL2PSrgba rgba) -{ - int i, offs = 0; - - gl2psSetLastColor(rgba); - for(i = 0; i < 3; ++i){ - if(GL2PS_ZERO(rgba[i])) - offs += gl2psPrintf("%.0f ", 0.); - else if(rgba[i] < 1e-4 || rgba[i] > 1e6) /* avoid %e formatting */ - offs += gl2psPrintf("%f ", rgba[i]); - else - offs += gl2psPrintf("%g ", rgba[i]); - } - offs += gl2psPrintf("RG\n"); - return offs; -} - -static int gl2psPrintPDFFillColor(GL2PSrgba rgba) -{ - int i, offs = 0; - - for(i = 0; i < 3; ++i){ - if(GL2PS_ZERO(rgba[i])) - offs += gl2psPrintf("%.0f ", 0.); - else if(rgba[i] < 1e-4 || rgba[i] > 1e6) /* avoid %e formatting */ - offs += gl2psPrintf("%f ", rgba[i]); - else - offs += gl2psPrintf("%g ", rgba[i]); - } - offs += gl2psPrintf("rg\n"); - return offs; -} - -static int gl2psPrintPDFLineWidth(GLfloat lw) -{ - if(GL2PS_ZERO(lw)) - return gl2psPrintf("%.0f w\n", 0.); - else if(lw < 1e-4 || lw > 1e6) /* avoid %e formatting */ - return gl2psPrintf("%f w\n", lw); - else - return gl2psPrintf("%g w\n", lw); -} - -static void gl2psPutPDFText(GL2PSstring *text, int cnt, GLfloat x, GLfloat y) -{ - GLfloat rad, crad, srad; - - if(text->angle == 0.0F){ - gl2ps->streamlength += gl2psPrintf - ("BT\n" - "/F%d %d Tf\n" - "%f %f Td\n" - "(%s) Tj\n" - "ET\n", - cnt, text->fontsize, x, y, text->str); - } - else{ - rad = (GLfloat)(M_PI * text->angle / 180.0F); - srad = (GLfloat)sin(rad); - crad = (GLfloat)cos(rad); - gl2ps->streamlength += gl2psPrintf - ("BT\n" - "/F%d %d Tf\n" - "%f %f %f %f %f %f Tm\n" - "(%s) Tj\n" - "ET\n", - cnt, text->fontsize, crad, srad, -srad, crad, x, y, text->str); - } -} - -static void gl2psPutPDFImage(GL2PSimage *image, int cnt, GLfloat x, GLfloat y) -{ - gl2ps->streamlength += gl2psPrintf - ("q\n" - "%d 0 0 %d %f %f cm\n" - "/Im%d Do\n" - "Q\n", - (int)image->width, (int)image->height, x, y, cnt); -} - -static void gl2psPDFstacksInit(void) -{ - gl2ps->objects_stack = 7 /* FIXED_XREF_ENTRIES */ + 1; - gl2ps->extgs_stack = 0; - gl2ps->font_stack = 0; - gl2ps->im_stack = 0; - gl2ps->trgroupobjects_stack = 0; - gl2ps->shader_stack = 0; - gl2ps->mshader_stack = 0; -} - -static void gl2psPDFgroupObjectInit(GL2PSpdfgroup *gro) -{ - if(!gro) - return; - - gro->ptrlist = NULL; - gro->fontno = gro->gsno = gro->imno = gro->maskshno = gro->shno - = gro->trgroupno = gro->fontobjno = gro->imobjno = gro->shobjno - = gro->maskshobjno = gro->gsobjno = gro->trgroupobjno = -1; -} - -/* Build up group objects and assign name and object numbers */ - -static void gl2psPDFgroupListInit(void) -{ - int i; - GL2PSprimitive *p = NULL; - GL2PSpdfgroup gro; - int lasttype = GL2PS_NO_TYPE; - GL2PSrgba lastrgba = {-1.0F, -1.0F, -1.0F, -1.0F}; - GLushort lastpattern = 0; - GLint lastfactor = 0; - GLfloat lastwidth = 1; - GL2PStriangle lastt, tmpt; - int lastTriangleWasNotSimpleWithSameColor = 0; - - if(!gl2ps->pdfprimlist) - return; - - gl2ps->pdfgrouplist = gl2psListCreate(500, 500, sizeof(GL2PSpdfgroup)); - gl2psInitTriangle(&lastt); - - for(i = 0; i < gl2psListNbr(gl2ps->pdfprimlist); ++i){ - p = *(GL2PSprimitive**)gl2psListPointer(gl2ps->pdfprimlist, i); - switch(p->type){ - case GL2PS_PIXMAP: - gl2psPDFgroupObjectInit(&gro); - gro.ptrlist = gl2psListCreate(1, 2, sizeof(GL2PSprimitive*)); - gro.imno = gl2ps->im_stack++; - gl2psListAdd(gro.ptrlist, &p); - gl2psListAdd(gl2ps->pdfgrouplist, &gro); - break; - case GL2PS_TEXT: - gl2psPDFgroupObjectInit(&gro); - gro.ptrlist = gl2psListCreate(1, 2, sizeof(GL2PSprimitive*)); - gro.fontno = gl2ps->font_stack++; - gl2psListAdd(gro.ptrlist, &p); - gl2psListAdd(gl2ps->pdfgrouplist, &gro); - break; - case GL2PS_LINE: - if(lasttype != p->type || lastwidth != p->width || - lastpattern != p->pattern || lastfactor != p->factor || - !gl2psSameColor(p->verts[0].rgba, lastrgba)){ - gl2psPDFgroupObjectInit(&gro); - gro.ptrlist = gl2psListCreate(1, 2, sizeof(GL2PSprimitive*)); - gl2psListAdd(gro.ptrlist, &p); - gl2psListAdd(gl2ps->pdfgrouplist, &gro); - } - else{ - gl2psListAdd(gro.ptrlist, &p); - } - lastpattern = p->pattern; - lastfactor = p->factor; - lastwidth = p->width; - lastrgba[0] = p->verts[0].rgba[0]; - lastrgba[1] = p->verts[0].rgba[1]; - lastrgba[2] = p->verts[0].rgba[2]; - break; - case GL2PS_POINT: - if(lasttype != p->type || lastwidth != p->width || - !gl2psSameColor(p->verts[0].rgba, lastrgba)){ - gl2psPDFgroupObjectInit(&gro); - gro.ptrlist = gl2psListCreate(1,2,sizeof(GL2PSprimitive*)); - gl2psListAdd(gro.ptrlist, &p); - gl2psListAdd(gl2ps->pdfgrouplist, &gro); - } - else{ - gl2psListAdd(gro.ptrlist, &p); - } - lastwidth = p->width; - lastrgba[0] = p->verts[0].rgba[0]; - lastrgba[1] = p->verts[0].rgba[1]; - lastrgba[2] = p->verts[0].rgba[2]; - break; - case GL2PS_TRIANGLE: - gl2psFillTriangleFromPrimitive(&tmpt, p, GL_TRUE); - lastTriangleWasNotSimpleWithSameColor = - !(tmpt.prop & T_CONST_COLOR && tmpt.prop & T_ALPHA_1) || - !gl2psSameColor(tmpt.vertex[0].rgba, lastt.vertex[0].rgba); - if(lasttype == p->type && tmpt.prop == lastt.prop && - lastTriangleWasNotSimpleWithSameColor){ - /* TODO Check here for last alpha */ - gl2psListAdd(gro.ptrlist, &p); - } - else{ - gl2psPDFgroupObjectInit(&gro); - gro.ptrlist = gl2psListCreate(1, 2, sizeof(GL2PSprimitive*)); - gl2psListAdd(gro.ptrlist, &p); - gl2psListAdd(gl2ps->pdfgrouplist, &gro); - } - lastt = tmpt; - break; - default: - break; - } - lasttype = p->type; - } -} - -static void gl2psSortOutTrianglePDFgroup(GL2PSpdfgroup *gro) -{ - GL2PStriangle t; - GL2PSprimitive *prim = NULL; - - if(!gro) - return; - - if(!gl2psListNbr(gro->ptrlist)) - return; - - prim = *(GL2PSprimitive**)gl2psListPointer(gro->ptrlist, 0); - - if(prim->type != GL2PS_TRIANGLE) - return; - - gl2psFillTriangleFromPrimitive(&t, prim, GL_TRUE); - - if(t.prop & T_CONST_COLOR && t.prop & T_ALPHA_LESS_1){ - gro->gsno = gl2ps->extgs_stack++; - gro->gsobjno = gl2ps->objects_stack ++; - } - else if(t.prop & T_CONST_COLOR && t.prop & T_VAR_ALPHA){ - gro->gsno = gl2ps->extgs_stack++; - gro->gsobjno = gl2ps->objects_stack++; - gro->trgroupno = gl2ps->trgroupobjects_stack++; - gro->trgroupobjno = gl2ps->objects_stack++; - gro->maskshno = gl2ps->mshader_stack++; - gro->maskshobjno = gl2ps->objects_stack++; - } - else if(t.prop & T_VAR_COLOR && t.prop & T_ALPHA_1){ - gro->shno = gl2ps->shader_stack++; - gro->shobjno = gl2ps->objects_stack++; - } - else if(t.prop & T_VAR_COLOR && t.prop & T_ALPHA_LESS_1){ - gro->gsno = gl2ps->extgs_stack++; - gro->gsobjno = gl2ps->objects_stack++; - gro->shno = gl2ps->shader_stack++; - gro->shobjno = gl2ps->objects_stack++; - } - else if(t.prop & T_VAR_COLOR && t.prop & T_VAR_ALPHA){ - gro->gsno = gl2ps->extgs_stack++; - gro->gsobjno = gl2ps->objects_stack++; - gro->shno = gl2ps->shader_stack++; - gro->shobjno = gl2ps->objects_stack++; - gro->trgroupno = gl2ps->trgroupobjects_stack++; - gro->trgroupobjno = gl2ps->objects_stack++; - gro->maskshno = gl2ps->mshader_stack++; - gro->maskshobjno = gl2ps->objects_stack++; - } -} - -/* Main stream data */ - -static void gl2psPDFgroupListWriteMainStream(void) -{ - int i, j, lastel; - GL2PSprimitive *prim = NULL, *prev = NULL; - GL2PSpdfgroup *gro; - GL2PStriangle t; - - if(!gl2ps->pdfgrouplist) - return; - - for(i = 0; i < gl2psListNbr(gl2ps->pdfgrouplist); ++i){ - gro = (GL2PSpdfgroup*)gl2psListPointer(gl2ps->pdfgrouplist, i); - - lastel = gl2psListNbr(gro->ptrlist) - 1; - if(lastel < 0) - continue; - - prim = *(GL2PSprimitive**)gl2psListPointer(gro->ptrlist, 0); - - switch(prim->type){ - case GL2PS_POINT: - gl2ps->streamlength += gl2psPrintf("1 J\n"); - gl2ps->streamlength += gl2psPrintPDFLineWidth(prim->width); - gl2ps->streamlength += gl2psPrintPDFStrokeColor(prim->verts[0].rgba); - for(j = 0; j <= lastel; ++j){ - prim = *(GL2PSprimitive**)gl2psListPointer(gro->ptrlist, j); - gl2ps->streamlength += - gl2psPrintf("%f %f m %f %f l\n", - prim->verts[0].xyz[0], prim->verts[0].xyz[1], - prim->verts[0].xyz[0], prim->verts[0].xyz[1]); - } - gl2ps->streamlength += gl2psPrintf("S\n"); - gl2ps->streamlength += gl2psPrintf("0 J\n"); - break; - case GL2PS_LINE: - /* We try to use as few paths as possible to draw lines, in - order to get nice stippling even when the individual segments - are smaller than the stipple */ - gl2ps->streamlength += gl2psPrintPDFLineWidth(prim->width); - gl2ps->streamlength += gl2psPrintPDFStrokeColor(prim->verts[0].rgba); - gl2ps->streamlength += gl2psPrintPostScriptDash(prim->pattern, prim->factor, "d"); - /* start new path */ - gl2ps->streamlength += - gl2psPrintf("%f %f m\n", - prim->verts[0].xyz[0], prim->verts[0].xyz[1]); - - for(j = 1; j <= lastel; ++j){ - prev = prim; - prim = *(GL2PSprimitive**)gl2psListPointer(gro->ptrlist, j); - if(!gl2psSamePosition(prim->verts[0].xyz, prev->verts[1].xyz)){ - /* the starting point of the new segment does not match the - end point of the previous line, so we end the current - path and start a new one */ - gl2ps->streamlength += - gl2psPrintf("%f %f l\n", - prev->verts[1].xyz[0], prev->verts[1].xyz[1]); - gl2ps->streamlength += - gl2psPrintf("%f %f m\n", - prim->verts[0].xyz[0], prim->verts[0].xyz[1]); - } - else{ - /* the two segements are connected, so we just append to the - current path */ - gl2ps->streamlength += - gl2psPrintf("%f %f l\n", - prim->verts[0].xyz[0], prim->verts[0].xyz[1]); - } - } - /* end last path */ - gl2ps->streamlength += - gl2psPrintf("%f %f l\n", - prim->verts[1].xyz[0], prim->verts[1].xyz[1]); - gl2ps->streamlength += gl2psPrintf("S\n"); - break; - case GL2PS_TRIANGLE: - gl2psFillTriangleFromPrimitive(&t, prim, GL_TRUE); - gl2psSortOutTrianglePDFgroup(gro); - - /* No alpha and const color: Simple PDF draw orders */ - if(t.prop & T_CONST_COLOR && t.prop & T_ALPHA_1){ - gl2ps->streamlength += gl2psPrintPDFFillColor(t.vertex[0].rgba); - for(j = 0; j <= lastel; ++j){ - prim = *(GL2PSprimitive**)gl2psListPointer(gro->ptrlist, j); - gl2psFillTriangleFromPrimitive(&t, prim, GL_FALSE); - gl2ps->streamlength - += gl2psPrintf("%f %f m\n" - "%f %f l\n" - "%f %f l\n" - "h f\n", - t.vertex[0].xyz[0], t.vertex[0].xyz[1], - t.vertex[1].xyz[0], t.vertex[1].xyz[1], - t.vertex[2].xyz[0], t.vertex[2].xyz[1]); - } - } - /* Const alpha < 1 and const color: Simple PDF draw orders - and an extra extended Graphics State for the alpha const */ - else if(t.prop & T_CONST_COLOR && t.prop & T_ALPHA_LESS_1){ - gl2ps->streamlength += gl2psPrintf("q\n" - "/GS%d gs\n", - gro->gsno); - gl2ps->streamlength += gl2psPrintPDFFillColor(prim->verts[0].rgba); - for(j = 0; j <= lastel; ++j){ - prim = *(GL2PSprimitive**)gl2psListPointer(gro->ptrlist, j); - gl2psFillTriangleFromPrimitive(&t, prim, GL_FALSE); - gl2ps->streamlength - += gl2psPrintf("%f %f m\n" - "%f %f l\n" - "%f %f l\n" - "h f\n", - t.vertex[0].xyz[0], t.vertex[0].xyz[1], - t.vertex[1].xyz[0], t.vertex[1].xyz[1], - t.vertex[2].xyz[0], t.vertex[2].xyz[1]); - } - gl2ps->streamlength += gl2psPrintf("Q\n"); - } - /* Variable alpha and const color: Simple PDF draw orders - and an extra extended Graphics State + Xobject + Shader - object for the alpha mask */ - else if(t.prop & T_CONST_COLOR && t.prop & T_VAR_ALPHA){ - gl2ps->streamlength += gl2psPrintf("q\n" - "/GS%d gs\n" - "/TrG%d Do\n", - gro->gsno, gro->trgroupno); - gl2ps->streamlength += gl2psPrintPDFFillColor(prim->verts[0].rgba); - for(j = 0; j <= lastel; ++j){ - prim = *(GL2PSprimitive**)gl2psListPointer(gro->ptrlist, j); - gl2psFillTriangleFromPrimitive(&t, prim, GL_FALSE); - gl2ps->streamlength - += gl2psPrintf("%f %f m\n" - "%f %f l\n" - "%f %f l\n" - "h f\n", - t.vertex[0].xyz[0], t.vertex[0].xyz[1], - t.vertex[1].xyz[0], t.vertex[1].xyz[1], - t.vertex[2].xyz[0], t.vertex[2].xyz[1]); - } - gl2ps->streamlength += gl2psPrintf("Q\n"); - } - /* Variable color and no alpha: Shader Object for the colored - triangle(s) */ - else if(t.prop & T_VAR_COLOR && t.prop & T_ALPHA_1){ - gl2ps->streamlength += gl2psPrintf("/Sh%d sh\n", gro->shno); - } - /* Variable color and const alpha < 1: Shader Object for the - colored triangle(s) and an extra extended Graphics State - for the alpha const */ - else if(t.prop & T_VAR_COLOR && t.prop & T_ALPHA_LESS_1){ - gl2ps->streamlength += gl2psPrintf("q\n" - "/GS%d gs\n" - "/Sh%d sh\n" - "Q\n", - gro->gsno, gro->shno); - } - /* Variable alpha and color: Shader Object for the colored - triangle(s) and an extra extended Graphics State - + Xobject + Shader object for the alpha mask */ - else if(t.prop & T_VAR_COLOR && t.prop & T_VAR_ALPHA){ - gl2ps->streamlength += gl2psPrintf("q\n" - "/GS%d gs\n" - "/TrG%d Do\n" - "/Sh%d sh\n" - "Q\n", - gro->gsno, gro->trgroupno, gro->shno); - } - break; - case GL2PS_PIXMAP: - for(j = 0; j <= lastel; ++j){ - prim = *(GL2PSprimitive**)gl2psListPointer(gro->ptrlist, j); - gl2psPutPDFImage(prim->data.image, gro->imno, prim->verts[0].xyz[0], - prim->verts[0].xyz[1]); - } - break; - case GL2PS_TEXT: - for(j = 0; j <= lastel; ++j){ - prim = *(GL2PSprimitive**)gl2psListPointer(gro->ptrlist, j); - gl2ps->streamlength += gl2psPrintPDFFillColor(prim->verts[0].rgba); - gl2psPutPDFText(prim->data.text, gro->fontno, prim->verts[0].xyz[0], - prim->verts[0].xyz[1]); - } - break; - default: - break; - } - } -} - -/* Graphics State names */ - -static int gl2psPDFgroupListWriteGStateResources(void) -{ - GL2PSpdfgroup *gro; - int offs = 0; - int i; - - offs += fprintf(gl2ps->stream, - "/ExtGState\n" - "<<\n" - "/GSa 7 0 R\n"); - for(i = 0; i < gl2psListNbr(gl2ps->pdfgrouplist); ++i){ - gro = (GL2PSpdfgroup*)gl2psListPointer(gl2ps->pdfgrouplist, i); - if(gro->gsno >= 0) - offs += fprintf(gl2ps->stream, "/GS%d %d 0 R\n", gro->gsno, gro->gsobjno); - } - offs += fprintf(gl2ps->stream, ">>\n"); - return offs; -} - -/* Main Shader names */ - -static int gl2psPDFgroupListWriteShaderResources(void) -{ - GL2PSpdfgroup *gro; - int offs = 0; - int i; - - offs += fprintf(gl2ps->stream, - "/Shading\n" - "<<\n"); - for(i = 0; i < gl2psListNbr(gl2ps->pdfgrouplist); ++i){ - gro = (GL2PSpdfgroup*)gl2psListPointer(gl2ps->pdfgrouplist, i); - if(gro->shno >= 0) - offs += fprintf(gl2ps->stream, "/Sh%d %d 0 R\n", gro->shno, gro->shobjno); - if(gro->maskshno >= 0) - offs += fprintf(gl2ps->stream, "/TrSh%d %d 0 R\n", gro->maskshno, gro->maskshobjno); - } - offs += fprintf(gl2ps->stream,">>\n"); - return offs; -} - -/* Images & Mask Shader XObject names */ - -static int gl2psPDFgroupListWriteXObjectResources(void) -{ - int i; - GL2PSprimitive *p = NULL; - GL2PSpdfgroup *gro; - int offs = 0; - - offs += fprintf(gl2ps->stream, - "/XObject\n" - "<<\n"); - - for(i = 0; i < gl2psListNbr(gl2ps->pdfgrouplist); ++i){ - gro = (GL2PSpdfgroup*)gl2psListPointer(gl2ps->pdfgrouplist, i); - if(!gl2psListNbr(gro->ptrlist)) - continue; - p = *(GL2PSprimitive**)gl2psListPointer(gro->ptrlist, 0); - switch(p->type){ - case GL2PS_PIXMAP: - gro->imobjno = gl2ps->objects_stack++; - if(GL_RGBA == p->data.image->format) /* reserve one object for image mask */ - gl2ps->objects_stack++; - offs += fprintf(gl2ps->stream, "/Im%d %d 0 R\n", gro->imno, gro->imobjno); - case GL2PS_TRIANGLE: - if(gro->trgroupno >=0) - offs += fprintf(gl2ps->stream, "/TrG%d %d 0 R\n", gro->trgroupno, gro->trgroupobjno); - break; - default: - break; - } - } - offs += fprintf(gl2ps->stream,">>\n"); - return offs; -} - -/* Font names */ - -static int gl2psPDFgroupListWriteFontResources(void) -{ - int i; - GL2PSpdfgroup *gro; - int offs = 0; - - offs += fprintf(gl2ps->stream, "/Font\n<<\n"); - - for(i = 0; i < gl2psListNbr(gl2ps->pdfgrouplist); ++i){ - gro = (GL2PSpdfgroup*)gl2psListPointer(gl2ps->pdfgrouplist, i); - if(gro->fontno < 0) - continue; - gro->fontobjno = gl2ps->objects_stack++; - offs += fprintf(gl2ps->stream, "/F%d %d 0 R\n", gro->fontno, gro->fontobjno); - } - offs += fprintf(gl2ps->stream, ">>\n"); - - return offs; -} - -static void gl2psPDFgroupListDelete(void) -{ - int i; - GL2PSpdfgroup *gro = NULL; - - if(!gl2ps->pdfgrouplist) - return; - - for(i = 0; i < gl2psListNbr(gl2ps->pdfgrouplist); ++i){ - gro = (GL2PSpdfgroup*)gl2psListPointer(gl2ps->pdfgrouplist,i); - gl2psListDelete(gro->ptrlist); - } - - gl2psListDelete(gl2ps->pdfgrouplist); - gl2ps->pdfgrouplist = NULL; -} - -/* Print 1st PDF object - file info */ - -static int gl2psPrintPDFInfo(void) -{ - int offs; - time_t now; - struct tm *newtime; - - time(&now); - newtime = gmtime(&now); - - offs = fprintf(gl2ps->stream, - "1 0 obj\n" - "<<\n" - "/Title (%s)\n" - "/Creator (GL2PS %d.%d.%d%s, %s)\n" - "/Producer (%s)\n", - gl2ps->title, GL2PS_MAJOR_VERSION, GL2PS_MINOR_VERSION, - GL2PS_PATCH_VERSION, GL2PS_EXTRA_VERSION, GL2PS_COPYRIGHT, - gl2ps->producer); - - if(!newtime){ - offs += fprintf(gl2ps->stream, - ">>\n" - "endobj\n"); - return offs; - } - - offs += fprintf(gl2ps->stream, - "/CreationDate (D:%d%02d%02d%02d%02d%02d)\n" - ">>\n" - "endobj\n", - newtime->tm_year+1900, - newtime->tm_mon+1, - newtime->tm_mday, - newtime->tm_hour, - newtime->tm_min, - newtime->tm_sec); - return offs; -} - -/* Create catalog and page structure - 2nd and 3th PDF object */ - -static int gl2psPrintPDFCatalog(void) -{ - return fprintf(gl2ps->stream, - "2 0 obj\n" - "<<\n" - "/Type /Catalog\n" - "/Pages 3 0 R\n" - ">>\n" - "endobj\n"); -} - -static int gl2psPrintPDFPages(void) -{ - return fprintf(gl2ps->stream, - "3 0 obj\n" - "<<\n" - "/Type /Pages\n" - "/Kids [6 0 R]\n" - "/Count 1\n" - ">>\n" - "endobj\n"); -} - -/* Open stream for data - graphical objects, fonts etc. PDF object 4 */ - -static int gl2psOpenPDFDataStream(void) -{ - int offs = 0; - - offs += fprintf(gl2ps->stream, - "4 0 obj\n" - "<<\n" - "/Length 5 0 R\n" ); - offs += gl2psPrintPDFCompressorType(); - offs += fprintf(gl2ps->stream, - ">>\n" - "stream\n"); - return offs; -} - -/* Stream setup - Graphics state, fill background if allowed */ - -static int gl2psOpenPDFDataStreamWritePreface(void) -{ - int offs; - - offs = gl2psPrintf("/GSa gs\n"); - - if(gl2ps->options & GL2PS_DRAW_BACKGROUND){ - offs += gl2psPrintPDFFillColor(gl2ps->bgcolor); - offs += gl2psPrintf("%d %d %d %d re\n", - (int)gl2ps->viewport[0], (int)gl2ps->viewport[1], - (int)gl2ps->viewport[2], (int)gl2ps->viewport[3]); - offs += gl2psPrintf("f\n"); - } - return offs; -} - -/* Use the functions above to create the first part of the PDF*/ - -static void gl2psPrintPDFHeader(void) -{ - int offs = 0; - gl2ps->pdfprimlist = gl2psListCreate(500, 500, sizeof(GL2PSprimitive*)); - gl2psPDFstacksInit(); - - gl2ps->xreflist = (int*)gl2psMalloc(sizeof(int) * gl2ps->objects_stack); - -#if defined(GL2PS_HAVE_ZLIB) - if(gl2ps->options & GL2PS_COMPRESS){ - gl2psSetupCompress(); - } -#endif - gl2ps->xreflist[0] = 0; - offs += fprintf(gl2ps->stream, "%%PDF-1.4\n"); - gl2ps->xreflist[1] = offs; - - offs += gl2psPrintPDFInfo(); - gl2ps->xreflist[2] = offs; - - offs += gl2psPrintPDFCatalog(); - gl2ps->xreflist[3] = offs; - - offs += gl2psPrintPDFPages(); - gl2ps->xreflist[4] = offs; - - offs += gl2psOpenPDFDataStream(); - gl2ps->xreflist[5] = offs; /* finished in gl2psPrintPDFFooter */ - gl2ps->streamlength = gl2psOpenPDFDataStreamWritePreface(); -} - -/* The central primitive drawing */ - -static void gl2psPrintPDFPrimitive(void *data) -{ - GL2PSprimitive *prim = *(GL2PSprimitive**)data; - - if((gl2ps->options & GL2PS_OCCLUSION_CULL) && prim->culled) - return; - - prim = gl2psCopyPrimitive(prim); /* deep copy */ - gl2psListAdd(gl2ps->pdfprimlist, &prim); -} - -/* close stream and ... */ - -static int gl2psClosePDFDataStream(void) -{ - int offs = 0; - -#if defined(GL2PS_HAVE_ZLIB) - if(gl2ps->options & GL2PS_COMPRESS){ - if(Z_OK != gl2psDeflate()) - gl2psMsg(GL2PS_ERROR, "Zlib deflate error"); - else - fwrite(gl2ps->compress->dest, gl2ps->compress->destLen, 1, gl2ps->stream); - gl2ps->streamlength += gl2ps->compress->destLen; - - offs += gl2ps->streamlength; - gl2psFreeCompress(); - } -#endif - - offs += fprintf(gl2ps->stream, - "endstream\n" - "endobj\n"); - return offs; -} - -/* ... write the now known length object */ - -static int gl2psPrintPDFDataStreamLength(int val) -{ - return fprintf(gl2ps->stream, - "5 0 obj\n" - "%d\n" - "endobj\n", val); -} - -/* Put the info created before in PDF objects */ - -static int gl2psPrintPDFOpenPage(void) -{ - int offs; - - /* Write fixed part */ - - offs = fprintf(gl2ps->stream, - "6 0 obj\n" - "<<\n" - "/Type /Page\n" - "/Parent 3 0 R\n" - "/MediaBox [%d %d %d %d]\n", - (int)gl2ps->viewport[0], (int)gl2ps->viewport[1], - (int)gl2ps->viewport[2], (int)gl2ps->viewport[3]); - - if(gl2ps->options & GL2PS_LANDSCAPE) - offs += fprintf(gl2ps->stream, "/Rotate -90\n"); - - offs += fprintf(gl2ps->stream, - "/Contents 4 0 R\n" - "/Resources\n" - "<<\n" - "/ProcSet [/PDF /Text /ImageB /ImageC] %%/ImageI\n"); - - return offs; - - /* End fixed part, proceeds in gl2psPDFgroupListWriteVariableResources() */ -} - -static int gl2psPDFgroupListWriteVariableResources(void) -{ - int offs = 0; - - /* a) Graphics States for shader alpha masks*/ - offs += gl2psPDFgroupListWriteGStateResources(); - - /* b) Shader and shader masks */ - offs += gl2psPDFgroupListWriteShaderResources(); - - /* c) XObjects (Images & Shader Masks) */ - offs += gl2psPDFgroupListWriteXObjectResources(); - - /* d) Fonts */ - offs += gl2psPDFgroupListWriteFontResources(); - - /* End resources and page */ - offs += fprintf(gl2ps->stream, - ">>\n" - ">>\n" - "endobj\n"); - return offs; -} - -/* Standard Graphics State */ - -static int gl2psPrintPDFGSObject(void) -{ - return fprintf(gl2ps->stream, - "7 0 obj\n" - "<<\n" - "/Type /ExtGState\n" - "/SA false\n" - "/SM 0.02\n" - "/OP false\n" - "/op false\n" - "/OPM 0\n" - "/BG2 /Default\n" - "/UCR2 /Default\n" - "/TR2 /Default\n" - ">>\n" - "endobj\n"); -} - -/* Put vertex' edge flag (8bit) and coordinates (32bit) in shader stream */ - -static int gl2psPrintPDFShaderStreamDataCoord(GL2PSvertex *vertex, - int (*action)(unsigned long data, int size), - GLfloat dx, GLfloat dy, - GLfloat xmin, GLfloat ymin) -{ - int offs = 0; - unsigned long imap; - GLfloat diff; - double dmax = ~1UL; - char edgeflag = 0; - - /* FIXME: temp bux fix for 64 bit archs: */ - if(sizeof(unsigned long) == 8) dmax = dmax - 2048.; - - offs += (*action)(edgeflag, 1); - - /* The Shader stream in PDF requires to be in a 'big-endian' - order */ - - if(GL2PS_ZERO(dx * dy)){ - offs += (*action)(0, 4); - offs += (*action)(0, 4); - } - else{ - diff = (vertex->xyz[0] - xmin) / dx; - if(diff > 1) - diff = 1.0F; - else if(diff < 0) - diff = 0.0F; - imap = (unsigned long)(diff * dmax); - offs += (*action)(imap, 4); - - diff = (vertex->xyz[1] - ymin) / dy; - if(diff > 1) - diff = 1.0F; - else if(diff < 0) - diff = 0.0F; - imap = (unsigned long)(diff * dmax); - offs += (*action)(imap, 4); - } - - return offs; -} - -/* Put vertex' rgb value (8bit for every component) in shader stream */ - -static int gl2psPrintPDFShaderStreamDataRGB(GL2PSvertex *vertex, - int (*action)(unsigned long data, int size)) -{ - int offs = 0; - unsigned long imap; - double dmax = ~1UL; - - /* FIXME: temp bux fix for 64 bit archs: */ - if(sizeof(unsigned long) == 8) dmax = dmax - 2048.; - - imap = (unsigned long)((vertex->rgba[0]) * dmax); - offs += (*action)(imap, 1); - - imap = (unsigned long)((vertex->rgba[1]) * dmax); - offs += (*action)(imap, 1); - - imap = (unsigned long)((vertex->rgba[2]) * dmax); - offs += (*action)(imap, 1); - - return offs; -} - -/* Put vertex' alpha (8/16bit) in shader stream */ - -static int gl2psPrintPDFShaderStreamDataAlpha(GL2PSvertex *vertex, - int (*action)(unsigned long data, int size), - int sigbyte) -{ - int offs = 0; - unsigned long imap; - double dmax = ~1UL; - - /* FIXME: temp bux fix for 64 bit archs: */ - if(sizeof(unsigned long) == 8) dmax = dmax - 2048.; - - if(sigbyte != 8 && sigbyte != 16) - sigbyte = 8; - - sigbyte /= 8; - - imap = (unsigned long)((vertex->rgba[3]) * dmax); - - offs += (*action)(imap, sigbyte); - - return offs; -} - -/* Put a triangles raw data in shader stream */ - -static int gl2psPrintPDFShaderStreamData(GL2PStriangle *triangle, - GLfloat dx, GLfloat dy, - GLfloat xmin, GLfloat ymin, - int (*action)(unsigned long data, int size), - int gray) -{ - int i, offs = 0; - GL2PSvertex v; - - if(gray && gray != 8 && gray != 16) - gray = 8; - - for(i = 0; i < 3; ++i){ - offs += gl2psPrintPDFShaderStreamDataCoord(&triangle->vertex[i], action, - dx, dy, xmin, ymin); - if(gray){ - v = triangle->vertex[i]; - offs += gl2psPrintPDFShaderStreamDataAlpha(&v, action, gray); - } - else{ - offs += gl2psPrintPDFShaderStreamDataRGB(&triangle->vertex[i], action); - } - } - - return offs; -} - -static void gl2psPDFRectHull(GLfloat *xmin, GLfloat *xmax, - GLfloat *ymin, GLfloat *ymax, - GL2PStriangle *triangles, int cnt) -{ - int i, j; - - *xmin = triangles[0].vertex[0].xyz[0]; - *xmax = triangles[0].vertex[0].xyz[0]; - *ymin = triangles[0].vertex[0].xyz[1]; - *ymax = triangles[0].vertex[0].xyz[1]; - - for(i = 0; i < cnt; ++i){ - for(j = 0; j < 3; ++j){ - if(*xmin > triangles[i].vertex[j].xyz[0]) - *xmin = triangles[i].vertex[j].xyz[0]; - if(*xmax < triangles[i].vertex[j].xyz[0]) - *xmax = triangles[i].vertex[j].xyz[0]; - if(*ymin > triangles[i].vertex[j].xyz[1]) - *ymin = triangles[i].vertex[j].xyz[1]; - if(*ymax < triangles[i].vertex[j].xyz[1]) - *ymax = triangles[i].vertex[j].xyz[1]; - } - } -} - -/* Writes shaded triangle - gray == 0 means write RGB triangles - gray == 8 8bit-grayscale (for alpha masks) - gray == 16 16bit-grayscale (for alpha masks) */ - -static int gl2psPrintPDFShader(int obj, GL2PStriangle *triangles, - int size, int gray) -{ - int i, offs = 0, vertexbytes, done = 0; - GLfloat xmin, xmax, ymin, ymax; - - switch(gray){ - case 0: - vertexbytes = 1+4+4+1+1+1; - break; - case 8: - vertexbytes = 1+4+4+1; - break; - case 16: - vertexbytes = 1+4+4+2; - break; - default: - gray = 8; - vertexbytes = 1+4+4+1; - break; - } - - gl2psPDFRectHull(&xmin, &xmax, &ymin, &ymax, triangles, size); - - offs += fprintf(gl2ps->stream, - "%d 0 obj\n" - "<< " - "/ShadingType 4 " - "/ColorSpace %s " - "/BitsPerCoordinate 32 " - "/BitsPerComponent %d " - "/BitsPerFlag 8 " - "/Decode [%f %f %f %f 0 1 %s] ", - obj, - (gray) ? "/DeviceGray" : "/DeviceRGB", - (gray) ? gray : 8, - xmin, xmax, ymin, ymax, - (gray) ? "" : "0 1 0 1"); - -#if defined(GL2PS_HAVE_ZLIB) - if(gl2ps->options & GL2PS_COMPRESS){ - gl2psAllocCompress(vertexbytes * size * 3); - - for(i = 0; i < size; ++i) - gl2psPrintPDFShaderStreamData(&triangles[i], - xmax-xmin, ymax-ymin, xmin, ymin, - gl2psWriteBigEndianCompress, gray); - - if(Z_OK == gl2psDeflate() && 23 + gl2ps->compress->destLen < gl2ps->compress->srcLen){ - offs += gl2psPrintPDFCompressorType(); - offs += fprintf(gl2ps->stream, - "/Length %d " - ">>\n" - "stream\n", - (int)gl2ps->compress->destLen); - offs += gl2ps->compress->destLen * fwrite(gl2ps->compress->dest, - gl2ps->compress->destLen, - 1, gl2ps->stream); - done = 1; - } - gl2psFreeCompress(); - } -#endif - - if(!done){ - /* no compression, or too long after compression, or compress error - -> write non-compressed entry */ - offs += fprintf(gl2ps->stream, - "/Length %d " - ">>\n" - "stream\n", - vertexbytes * 3 * size); - for(i = 0; i < size; ++i) - offs += gl2psPrintPDFShaderStreamData(&triangles[i], - xmax-xmin, ymax-ymin, xmin, ymin, - gl2psWriteBigEndian, gray); - } - - offs += fprintf(gl2ps->stream, - "\nendstream\n" - "endobj\n"); - - return offs; -} - -/* Writes a XObject for a shaded triangle mask */ - -static int gl2psPrintPDFShaderMask(int obj, int childobj) -{ - int offs = 0, len; - - offs += fprintf(gl2ps->stream, - "%d 0 obj\n" - "<<\n" - "/Type /XObject\n" - "/Subtype /Form\n" - "/BBox [ %d %d %d %d ]\n" - "/Group \n<<\n/S /Transparency /CS /DeviceRGB\n" - ">>\n", - obj, - (int)gl2ps->viewport[0], (int)gl2ps->viewport[1], - (int)gl2ps->viewport[2], (int)gl2ps->viewport[3]); - - len = (childobj>0) - ? (int)strlen("/TrSh sh\n") + (int)log10((double)childobj)+1 - : (int)strlen("/TrSh0 sh\n"); - - offs += fprintf(gl2ps->stream, - "/Length %d\n" - ">>\n" - "stream\n", - len); - offs += fprintf(gl2ps->stream, - "/TrSh%d sh\n", - childobj); - offs += fprintf(gl2ps->stream, - "endstream\n" - "endobj\n"); - - return offs; -} - -/* Writes a Extended graphics state for a shaded triangle mask if - simplealpha ist true the childobj argument is ignored and a /ca - statement will be written instead */ - -static int gl2psPrintPDFShaderExtGS(int obj, int childobj) -{ - int offs = 0; - - offs += fprintf(gl2ps->stream, - "%d 0 obj\n" - "<<\n", - obj); - - offs += fprintf(gl2ps->stream, - "/SMask << /S /Alpha /G %d 0 R >> ", - childobj); - - offs += fprintf(gl2ps->stream, - ">>\n" - "endobj\n"); - return offs; -} - -/* a simple graphics state */ - -static int gl2psPrintPDFShaderSimpleExtGS(int obj, GLfloat alpha) -{ - int offs = 0; - - offs += fprintf(gl2ps->stream, - "%d 0 obj\n" - "<<\n" - "/ca %g" - ">>\n" - "endobj\n", - obj, alpha); - return offs; -} - -/* Similar groups of functions for pixmaps and text */ - -static int gl2psPrintPDFPixmapStreamData(GL2PSimage *im, - int (*action)(unsigned long data, int size), - int gray) -{ - int x, y, shift; - GLfloat r, g, b, a; - - if(im->format != GL_RGBA && gray) - return 0; - - if(gray && gray != 8 && gray != 16) - gray = 8; - - gray /= 8; - - shift = (sizeof(unsigned long) - 1) * 8; - - for(y = 0; y < im->height; ++y){ - for(x = 0; x < im->width; ++x){ - a = gl2psGetRGB(im, x, y, &r, &g, &b); - if(im->format == GL_RGBA && gray){ - (*action)((unsigned long)(a * 255) << shift, gray); - } - else{ - (*action)((unsigned long)(r * 255) << shift, 1); - (*action)((unsigned long)(g * 255) << shift, 1); - (*action)((unsigned long)(b * 255) << shift, 1); - } - } - } - - switch(gray){ - case 0: return 3 * im->width * im->height; - case 1: return im->width * im->height; - case 2: return 2 * im->width * im->height; - default: return 3 * im->width * im->height; - } -} - -static int gl2psPrintPDFPixmap(int obj, int childobj, GL2PSimage *im, int gray) -{ - int offs = 0, done = 0, sigbytes = 3; - - if(gray && gray !=8 && gray != 16) - gray = 8; - - if(gray) - sigbytes = gray / 8; - - offs += fprintf(gl2ps->stream, - "%d 0 obj\n" - "<<\n" - "/Type /XObject\n" - "/Subtype /Image\n" - "/Width %d\n" - "/Height %d\n" - "/ColorSpace %s \n" - "/BitsPerComponent 8\n", - obj, - (int)im->width, (int)im->height, - (gray) ? "/DeviceGray" : "/DeviceRGB" ); - if(GL_RGBA == im->format && gray == 0){ - offs += fprintf(gl2ps->stream, - "/SMask %d 0 R\n", - childobj); - } - -#if defined(GL2PS_HAVE_ZLIB) - if(gl2ps->options & GL2PS_COMPRESS){ - gl2psAllocCompress((int)(im->width * im->height * sigbytes)); - - gl2psPrintPDFPixmapStreamData(im, gl2psWriteBigEndianCompress, gray); - - if(Z_OK == gl2psDeflate() && 23 + gl2ps->compress->destLen < gl2ps->compress->srcLen){ - offs += gl2psPrintPDFCompressorType(); - offs += fprintf(gl2ps->stream, - "/Length %d " - ">>\n" - "stream\n", - (int)gl2ps->compress->destLen); - offs += gl2ps->compress->destLen * fwrite(gl2ps->compress->dest, gl2ps->compress->destLen, - 1, gl2ps->stream); - done = 1; - } - gl2psFreeCompress(); - } -#endif - - if(!done){ - /* no compression, or too long after compression, or compress error - -> write non-compressed entry */ - offs += fprintf(gl2ps->stream, - "/Length %d " - ">>\n" - "stream\n", - (int)(im->width * im->height * sigbytes)); - offs += gl2psPrintPDFPixmapStreamData(im, gl2psWriteBigEndian, gray); - } - - offs += fprintf(gl2ps->stream, - "\nendstream\n" - "endobj\n"); - - return offs; -} - -static int gl2psPrintPDFText(int obj, GL2PSstring *s, int fontnumber) -{ - int offs = 0; - - offs += fprintf(gl2ps->stream, - "%d 0 obj\n" - "<<\n" - "/Type /Font\n" - "/Subtype /Type1\n" - "/Name /F%d\n" - "/BaseFont /%s\n" - "/Encoding /MacRomanEncoding\n" - ">>\n" - "endobj\n", - obj, fontnumber, s->fontname); - return offs; -} - -/* Write the physical objects */ - -static int gl2psPDFgroupListWriteObjects(int entryoffs) -{ - int i,j; - GL2PSprimitive *p = NULL; - GL2PSpdfgroup *gro; - int offs = entryoffs; - GL2PStriangle *triangles; - int size = 0; - - if(!gl2ps->pdfgrouplist) - return offs; - - for(i = 0; i < gl2psListNbr(gl2ps->pdfgrouplist); ++i){ - gro = (GL2PSpdfgroup*)gl2psListPointer(gl2ps->pdfgrouplist, i); - if(!gl2psListNbr(gro->ptrlist)) - continue; - p = *(GL2PSprimitive**)gl2psListPointer(gro->ptrlist, 0); - switch(p->type){ - case GL2PS_POINT: - break; - case GL2PS_LINE: - break; - case GL2PS_TRIANGLE: - size = gl2psListNbr(gro->ptrlist); - triangles = (GL2PStriangle*)gl2psMalloc(sizeof(GL2PStriangle) * size); - for(j = 0; j < size; ++j){ - p = *(GL2PSprimitive**)gl2psListPointer(gro->ptrlist, j); - gl2psFillTriangleFromPrimitive(&triangles[j], p, GL_TRUE); - } - if(triangles[0].prop & T_VAR_COLOR){ - gl2ps->xreflist[gro->shobjno] = offs; - offs += gl2psPrintPDFShader(gro->shobjno, triangles, size, 0); - } - if(triangles[0].prop & T_ALPHA_LESS_1){ - gl2ps->xreflist[gro->gsobjno] = offs; - offs += gl2psPrintPDFShaderSimpleExtGS(gro->gsobjno, triangles[0].vertex[0].rgba[3]); - } - if(triangles[0].prop & T_VAR_ALPHA){ - gl2ps->xreflist[gro->gsobjno] = offs; - offs += gl2psPrintPDFShaderExtGS(gro->gsobjno, gro->trgroupobjno); - gl2ps->xreflist[gro->trgroupobjno] = offs; - offs += gl2psPrintPDFShaderMask(gro->trgroupobjno, gro->maskshno); - gl2ps->xreflist[gro->maskshobjno] = offs; - offs += gl2psPrintPDFShader(gro->maskshobjno, triangles, size, 8); - } - gl2psFree(triangles); - break; - case GL2PS_PIXMAP: - gl2ps->xreflist[gro->imobjno] = offs; - offs += gl2psPrintPDFPixmap(gro->imobjno, gro->imobjno+1, p->data.image, 0); - if(p->data.image->format == GL_RGBA){ - gl2ps->xreflist[gro->imobjno+1] = offs; - offs += gl2psPrintPDFPixmap(gro->imobjno+1, -1, p->data.image, 8); - } - break; - case GL2PS_TEXT: - gl2ps->xreflist[gro->fontobjno] = offs; - offs += gl2psPrintPDFText(gro->fontobjno,p->data.text,gro->fontno); - break; - case GL2PS_SPECIAL : - /* alignment contains the format for which the special output text - is intended */ - if(p->data.text->alignment == GL2PS_PDF) - offs += fprintf(gl2ps->stream, "%s\n", p->data.text->str); - break; - default: - break; - } - } - return offs; -} - -/* All variable data has been written at this point and all required - functioninality has been gathered, so we can write now file footer - with cross reference table and trailer */ - -static void gl2psPrintPDFFooter(void) -{ - int i, offs; - - gl2psPDFgroupListInit(); - gl2psPDFgroupListWriteMainStream(); - - offs = gl2ps->xreflist[5] + gl2ps->streamlength; - offs += gl2psClosePDFDataStream(); - gl2ps->xreflist[5] = offs; - - offs += gl2psPrintPDFDataStreamLength(gl2ps->streamlength); - gl2ps->xreflist[6] = offs; - gl2ps->streamlength = 0; - - offs += gl2psPrintPDFOpenPage(); - offs += gl2psPDFgroupListWriteVariableResources(); - gl2ps->xreflist = (int*)gl2psRealloc(gl2ps->xreflist, - sizeof(int) * (gl2ps->objects_stack + 1)); - gl2ps->xreflist[7] = offs; - - offs += gl2psPrintPDFGSObject(); - gl2ps->xreflist[8] = offs; - - gl2ps->xreflist[gl2ps->objects_stack] = - gl2psPDFgroupListWriteObjects(gl2ps->xreflist[8]); - - /* Start cross reference table. The file has to been opened in - binary mode to preserve the 20 digit string length! */ - fprintf(gl2ps->stream, - "xref\n" - "0 %d\n" - "%010d 65535 f \n", gl2ps->objects_stack, 0); - - for(i = 1; i < gl2ps->objects_stack; ++i) - fprintf(gl2ps->stream, "%010d 00000 n \n", gl2ps->xreflist[i]); - - fprintf(gl2ps->stream, - "trailer\n" - "<<\n" - "/Size %d\n" - "/Info 1 0 R\n" - "/Root 2 0 R\n" - ">>\n" - "startxref\n%d\n" - "%%%%EOF\n", - gl2ps->objects_stack, gl2ps->xreflist[gl2ps->objects_stack]); - - /* Free auxiliary lists and arrays */ - gl2psFree(gl2ps->xreflist); - gl2psListAction(gl2ps->pdfprimlist, gl2psFreePrimitive); - gl2psListDelete(gl2ps->pdfprimlist); - gl2psPDFgroupListDelete(); - -#if defined(GL2PS_HAVE_ZLIB) - if(gl2ps->options & GL2PS_COMPRESS){ - gl2psFreeCompress(); - gl2psFree(gl2ps->compress); - gl2ps->compress = NULL; - } -#endif -} - -/* PDF begin viewport */ - -static void gl2psPrintPDFBeginViewport(GLint viewport[4]) -{ - int offs = 0; - GLint index; - GLfloat rgba[4]; - int x = viewport[0], y = viewport[1], w = viewport[2], h = viewport[3]; - - glRenderMode(GL_FEEDBACK); - - if(gl2ps->header){ - gl2psPrintPDFHeader(); - gl2ps->header = GL_FALSE; - } - - offs += gl2psPrintf("q\n"); - - if(gl2ps->options & GL2PS_DRAW_BACKGROUND){ - if(gl2ps->colormode == GL_RGBA || gl2ps->colorsize == 0){ - glGetFloatv(GL_COLOR_CLEAR_VALUE, rgba); - } - else{ - glGetIntegerv(GL_INDEX_CLEAR_VALUE, &index); - rgba[0] = gl2ps->colormap[index][0]; - rgba[1] = gl2ps->colormap[index][1]; - rgba[2] = gl2ps->colormap[index][2]; - rgba[3] = 1.0F; - } - offs += gl2psPrintPDFFillColor(rgba); - offs += gl2psPrintf("%d %d %d %d re\n" - "W\n" - "f\n", - x, y, w, h); - } - else{ - offs += gl2psPrintf("%d %d %d %d re\n" - "W\n" - "n\n", - x, y, w, h); - } - - gl2ps->streamlength += offs; -} - -static GLint gl2psPrintPDFEndViewport(void) -{ - GLint res; - - res = gl2psPrintPrimitives(); - gl2ps->streamlength += gl2psPrintf("Q\n"); - return res; -} - -static void gl2psPrintPDFFinalPrimitive(void) -{ -} - -/* definition of the PDF backend */ - -static GL2PSbackend gl2psPDF = { - gl2psPrintPDFHeader, - gl2psPrintPDFFooter, - gl2psPrintPDFBeginViewport, - gl2psPrintPDFEndViewport, - gl2psPrintPDFPrimitive, - gl2psPrintPDFFinalPrimitive, - "pdf", - "Portable Document Format" -}; - -/********************************************************************* - * - * SVG routines - * - *********************************************************************/ - -static void gl2psSVGGetCoordsAndColors(int n, GL2PSvertex *verts, - GL2PSxyz *xyz, GL2PSrgba *rgba) -{ - int i, j; - - for(i = 0; i < n; i++){ - xyz[i][0] = verts[i].xyz[0]; - xyz[i][1] = gl2ps->viewport[3] - verts[i].xyz[1]; - xyz[i][2] = 0.0F; - for(j = 0; j < 4; j++) - rgba[i][j] = verts[i].rgba[j]; - } -} - -static void gl2psSVGGetColorString(GL2PSrgba rgba, char str[32]) -{ - int r = (int)(255. * rgba[0]); - int g = (int)(255. * rgba[1]); - int b = (int)(255. * rgba[2]); - int rc = (r < 0) ? 0 : (r > 255) ? 255 : r; - int gc = (g < 0) ? 0 : (g > 255) ? 255 : g; - int bc = (b < 0) ? 0 : (b > 255) ? 255 : b; - sprintf(str, "#%2.2x%2.2x%2.2x", rc, gc, bc); -} - -static void gl2psPrintSVGHeader(void) -{ - int x, y, width, height; - char col[32]; - time_t now; - - time(&now); - - if (gl2ps->options & GL2PS_LANDSCAPE){ - x = (int)gl2ps->viewport[1]; - y = (int)gl2ps->viewport[0]; - width = (int)gl2ps->viewport[3]; - height = (int)gl2ps->viewport[2]; - } - else{ - x = (int)gl2ps->viewport[0]; - y = (int)gl2ps->viewport[1]; - width = (int)gl2ps->viewport[2]; - height = (int)gl2ps->viewport[3]; - } - - /* Compressed SVG files (.svgz) are simply gzipped SVG files */ - gl2psPrintGzipHeader(); - - gl2psPrintf("\n"); - gl2psPrintf("\n", - width, height, x, y, width, height); - gl2psPrintf("%s\n", gl2ps->title); - gl2psPrintf("\n"); - gl2psPrintf("Creator: GL2PS %d.%d.%d%s, %s\n" - "For: %s\n" - "CreationDate: %s", - GL2PS_MAJOR_VERSION, GL2PS_MINOR_VERSION, GL2PS_PATCH_VERSION, - GL2PS_EXTRA_VERSION, GL2PS_COPYRIGHT, gl2ps->producer, ctime(&now)); - gl2psPrintf("\n"); - gl2psPrintf("\n"); - gl2psPrintf("\n"); - - if(gl2ps->options & GL2PS_DRAW_BACKGROUND){ - gl2psSVGGetColorString(gl2ps->bgcolor, col); - gl2psPrintf("\n", col, - (int)gl2ps->viewport[0], (int)gl2ps->viewport[1], - (int)gl2ps->viewport[2], (int)gl2ps->viewport[1], - (int)gl2ps->viewport[2], (int)gl2ps->viewport[3], - (int)gl2ps->viewport[0], (int)gl2ps->viewport[3]); - } - - /* group all the primitives and disable antialiasing */ - gl2psPrintf("\n"); -} - -static void gl2psPrintSVGSmoothTriangle(GL2PSxyz xyz[3], GL2PSrgba rgba[3]) -{ - int i; - GL2PSxyz xyz2[3]; - GL2PSrgba rgba2[3]; - char col[32]; - - /* Apparently there is no easy way to do Gouraud shading in SVG - without explicitly pre-defining gradients, so for now we just do - recursive subdivision */ - - if(gl2psSameColorThreshold(3, rgba, gl2ps->threshold)){ - gl2psSVGGetColorString(rgba[0], col); - gl2psPrintf("\n", xyz[0][0], xyz[0][1], - xyz[1][0], xyz[1][1], xyz[2][0], xyz[2][1]); - } - else{ - /* subdivide into 4 subtriangles */ - for(i = 0; i < 3; i++){ - xyz2[0][i] = xyz[0][i]; - xyz2[1][i] = 0.5F * (xyz[0][i] + xyz[1][i]); - xyz2[2][i] = 0.5F * (xyz[0][i] + xyz[2][i]); - } - for(i = 0; i < 4; i++){ - rgba2[0][i] = rgba[0][i]; - rgba2[1][i] = 0.5F * (rgba[0][i] + rgba[1][i]); - rgba2[2][i] = 0.5F * (rgba[0][i] + rgba[2][i]); - } - gl2psPrintSVGSmoothTriangle(xyz2, rgba2); - for(i = 0; i < 3; i++){ - xyz2[0][i] = 0.5F * (xyz[0][i] + xyz[1][i]); - xyz2[1][i] = xyz[1][i]; - xyz2[2][i] = 0.5F * (xyz[1][i] + xyz[2][i]); - } - for(i = 0; i < 4; i++){ - rgba2[0][i] = 0.5F * (rgba[0][i] + rgba[1][i]); - rgba2[1][i] = rgba[1][i]; - rgba2[2][i] = 0.5F * (rgba[1][i] + rgba[2][i]); - } - gl2psPrintSVGSmoothTriangle(xyz2, rgba2); - for(i = 0; i < 3; i++){ - xyz2[0][i] = 0.5F * (xyz[0][i] + xyz[2][i]); - xyz2[1][i] = xyz[2][i]; - xyz2[2][i] = 0.5F * (xyz[1][i] + xyz[2][i]); - } - for(i = 0; i < 4; i++){ - rgba2[0][i] = 0.5F * (rgba[0][i] + rgba[2][i]); - rgba2[1][i] = rgba[2][i]; - rgba2[2][i] = 0.5F * (rgba[1][i] + rgba[2][i]); - } - gl2psPrintSVGSmoothTriangle(xyz2, rgba2); - for(i = 0; i < 3; i++){ - xyz2[0][i] = 0.5F * (xyz[0][i] + xyz[1][i]); - xyz2[1][i] = 0.5F * (xyz[1][i] + xyz[2][i]); - xyz2[2][i] = 0.5F * (xyz[0][i] + xyz[2][i]); - } - for(i = 0; i < 4; i++){ - rgba2[0][i] = 0.5F * (rgba[0][i] + rgba[1][i]); - rgba2[1][i] = 0.5F * (rgba[1][i] + rgba[2][i]); - rgba2[2][i] = 0.5F * (rgba[0][i] + rgba[2][i]); - } - gl2psPrintSVGSmoothTriangle(xyz2, rgba2); - } -} - -static void gl2psPrintSVGDash(GLushort pattern, GLint factor) -{ - int i, n, array[10]; - - if(!pattern || !factor) return; /* solid line */ - - gl2psParseStipplePattern(pattern, factor, &n, array); - gl2psPrintf("stroke-dasharray=\""); - for(i = 0; i < n; i++){ - if(i) gl2psPrintf(","); - gl2psPrintf("%d", array[i]); - } - gl2psPrintf("\" "); -} - -static void gl2psEndSVGLine(void) -{ - int i; - if(gl2ps->lastvertex.rgba[0] >= 0.){ - gl2psPrintf("%g,%g\"/>\n", gl2ps->lastvertex.xyz[0], - gl2ps->viewport[3] - gl2ps->lastvertex.xyz[1]); - for(i = 0; i < 3; i++) - gl2ps->lastvertex.xyz[i] = -1.; - for(i = 0; i < 4; i++) - gl2ps->lastvertex.rgba[i] = -1.; - } -} - -static void gl2psPrintSVGPixmap(GLfloat x, GLfloat y, GL2PSimage *pixmap) -{ -#if defined(GL2PS_HAVE_LIBPNG) - GL2PSlist *png; - unsigned char c; - int i; - - /* The only image types supported by the SVG standard are JPEG, PNG - and SVG. Here we choose PNG, and since we want to embed the image - directly in the SVG stream (and not link to an external image - file), we need to encode the pixmap into PNG in memory, then - encode it into base64. */ - - png = gl2psListCreate(pixmap->width * pixmap->height * 3, 1000, - sizeof(unsigned char)); - gl2psConvertPixmapToPNG(pixmap, png); - gl2psListEncodeBase64(png); - gl2psPrintf("height, pixmap->width, pixmap->height); - gl2psPrintf("xlink:href=\"data:image/png;base64,"); - for(i = 0; i < gl2psListNbr(png); i++){ - gl2psListRead(png, i, &c); - gl2psPrintf("%c", c); - } - gl2psPrintf("\"/>\n"); - gl2psListDelete(png); -#else - gl2psMsg(GL2PS_WARNING, "GL2PS must be compiled with PNG support in " - "order to embed images in SVG streams"); -#endif -} - -static void gl2psPrintSVGPrimitive(void *data) -{ - GL2PSprimitive *prim; - GL2PSxyz xyz[4]; - GL2PSrgba rgba[4]; - char col[32]; - int newline; - - prim = *(GL2PSprimitive**)data; - - if((gl2ps->options & GL2PS_OCCLUSION_CULL) && prim->culled) return; - - /* We try to draw connected lines as a single path to get nice line - joins and correct stippling. So if the primitive to print is not - a line we must first finish the current line (if any): */ - if(prim->type != GL2PS_LINE) gl2psEndSVGLine(); - - gl2psSVGGetCoordsAndColors(prim->numverts, prim->verts, xyz, rgba); - - switch(prim->type){ - case GL2PS_POINT : - gl2psSVGGetColorString(rgba[0], col); - gl2psPrintf("\n", - xyz[0][0], xyz[0][1], 0.5 * prim->width); - break; - case GL2PS_LINE : - if(!gl2psSamePosition(gl2ps->lastvertex.xyz, prim->verts[0].xyz) || - !gl2psSameColor(gl2ps->lastrgba, prim->verts[0].rgba) || - gl2ps->lastlinewidth != prim->width || - gl2ps->lastpattern != prim->pattern || - gl2ps->lastfactor != prim->factor){ - /* End the current line if the new segment does not start where - the last one ended, or if the color, the width or the - stippling have changed (we will need to use multi-point - gradients for smooth-shaded lines) */ - gl2psEndSVGLine(); - newline = 1; - } - else{ - newline = 0; - } - gl2ps->lastvertex = prim->verts[1]; - gl2psSetLastColor(prim->verts[0].rgba); - gl2ps->lastlinewidth = prim->width; - gl2ps->lastpattern = prim->pattern; - gl2ps->lastfactor = prim->factor; - if(newline){ - gl2psSVGGetColorString(rgba[0], col); - gl2psPrintf("width); - if(rgba[0][3] < 1.0F) gl2psPrintf("stroke-opacity=\"%g\" ", rgba[0][3]); - gl2psPrintSVGDash(prim->pattern, prim->factor); - gl2psPrintf("points=\"%g,%g ", xyz[0][0], xyz[0][1]); - } - else{ - gl2psPrintf("%g,%g ", xyz[0][0], xyz[0][1]); - } - break; - case GL2PS_TRIANGLE : - gl2psPrintSVGSmoothTriangle(xyz, rgba); - break; - case GL2PS_QUADRANGLE : - gl2psMsg(GL2PS_WARNING, "There should not be any quad left to print"); - break; - case GL2PS_PIXMAP : - gl2psPrintSVGPixmap(xyz[0][0], xyz[0][1], prim->data.image); - break; - case GL2PS_TEXT : - gl2psSVGGetColorString(prim->verts[0].rgba, col); - gl2psPrintf("data.text->fontsize); - if(prim->data.text->angle) - gl2psPrintf("transform=\"rotate(%g, %g, %g)\" ", - -prim->data.text->angle, xyz[0][0], xyz[0][1]); - switch(prim->data.text->alignment){ - case GL2PS_TEXT_C: - gl2psPrintf("text-anchor=\"middle\" baseline-shift=\"%d\" ", - -prim->data.text->fontsize / 2); - break; - case GL2PS_TEXT_CL: - gl2psPrintf("text-anchor=\"start\" baseline-shift=\"%d\" ", - -prim->data.text->fontsize / 2); - break; - case GL2PS_TEXT_CR: - gl2psPrintf("text-anchor=\"end\" baseline-shift=\"%d\" ", - -prim->data.text->fontsize / 2); - break; - case GL2PS_TEXT_B: - gl2psPrintf("text-anchor=\"middle\" baseline-shift=\"0\" "); - break; - case GL2PS_TEXT_BR: - gl2psPrintf("text-anchor=\"end\" baseline-shift=\"0\" "); - break; - case GL2PS_TEXT_T: - gl2psPrintf("text-anchor=\"middle\" baseline-shift=\"%d\" ", - -prim->data.text->fontsize); - break; - case GL2PS_TEXT_TL: - gl2psPrintf("text-anchor=\"start\" baseline-shift=\"%d\" ", - -prim->data.text->fontsize); - break; - case GL2PS_TEXT_TR: - gl2psPrintf("text-anchor=\"end\" baseline-shift=\"%d\" ", - -prim->data.text->fontsize); - break; - case GL2PS_TEXT_BL: - default: /* same as GL2PS_TEXT_BL */ - gl2psPrintf("text-anchor=\"start\" baseline-shift=\"0\" "); - break; - } - if(!strcmp(prim->data.text->fontname, "Times-Roman")) - gl2psPrintf("font-family=\"Times\">"); - else if(!strcmp(prim->data.text->fontname, "Times-Bold")) - gl2psPrintf("font-family=\"Times\" font-weight=\"bold\">"); - else if(!strcmp(prim->data.text->fontname, "Times-Italic")) - gl2psPrintf("font-family=\"Times\" font-style=\"italic\">"); - else if(!strcmp(prim->data.text->fontname, "Times-BoldItalic")) - gl2psPrintf("font-family=\"Times\" font-style=\"italic\" font-weight=\"bold\">"); - else if(!strcmp(prim->data.text->fontname, "Helvetica-Bold")) - gl2psPrintf("font-family=\"Helvetica\" font-weight=\"bold\">"); - else if(!strcmp(prim->data.text->fontname, "Helvetica-Oblique")) - gl2psPrintf("font-family=\"Helvetica\" font-style=\"oblique\">"); - else if(!strcmp(prim->data.text->fontname, "Helvetica-BoldOblique")) - gl2psPrintf("font-family=\"Helvetica\" font-style=\"oblique\" font-weight=\"bold\">"); - else if(!strcmp(prim->data.text->fontname, "Courier-Bold")) - gl2psPrintf("font-family=\"Courier\" font-weight=\"bold\">"); - else if(!strcmp(prim->data.text->fontname, "Courier-Oblique")) - gl2psPrintf("font-family=\"Courier\" font-style=\"oblique\">"); - else if(!strcmp(prim->data.text->fontname, "Courier-BoldOblique")) - gl2psPrintf("font-family=\"Courier\" font-style=\"oblique\" font-weight=\"bold\">"); - else - gl2psPrintf("font-family=\"%s\">", prim->data.text->fontname); - gl2psPrintf("%s\n", prim->data.text->str); - break; - case GL2PS_SPECIAL : - /* alignment contains the format for which the special output text - is intended */ - if(prim->data.text->alignment == GL2PS_SVG) - gl2psPrintf("%s\n", prim->data.text->str); - break; - default : - break; - } -} - -static void gl2psPrintSVGFooter(void) -{ - gl2psPrintf("\n"); - gl2psPrintf("\n"); - - gl2psPrintGzipFooter(); -} - -static void gl2psPrintSVGBeginViewport(GLint viewport[4]) -{ - GLint index; - char col[32]; - GLfloat rgba[4]; - int x = viewport[0], y = viewport[1], w = viewport[2], h = viewport[3]; - - glRenderMode(GL_FEEDBACK); - - if(gl2ps->header){ - gl2psPrintSVGHeader(); - gl2ps->header = GL_FALSE; - } - - if(gl2ps->options & GL2PS_DRAW_BACKGROUND){ - if(gl2ps->colormode == GL_RGBA || gl2ps->colorsize == 0){ - glGetFloatv(GL_COLOR_CLEAR_VALUE, rgba); - } - else{ - glGetIntegerv(GL_INDEX_CLEAR_VALUE, &index); - rgba[0] = gl2ps->colormap[index][0]; - rgba[1] = gl2ps->colormap[index][1]; - rgba[2] = gl2ps->colormap[index][2]; - rgba[3] = 1.0F; - } - gl2psSVGGetColorString(rgba, col); - gl2psPrintf("\n", col, - x, gl2ps->viewport[3] - y, - x + w, gl2ps->viewport[3] - y, - x + w, gl2ps->viewport[3] - (y + h), - x, gl2ps->viewport[3] - (y + h)); - } - - gl2psPrintf("\n", x, y, w, h); - gl2psPrintf(" \n", - x, gl2ps->viewport[3] - y, - x + w, gl2ps->viewport[3] - y, - x + w, gl2ps->viewport[3] - (y + h), - x, gl2ps->viewport[3] - (y + h)); - gl2psPrintf("\n"); - gl2psPrintf("\n", x, y, w, h); -} - -static GLint gl2psPrintSVGEndViewport(void) -{ - GLint res; - - res = gl2psPrintPrimitives(); - gl2psPrintf("\n"); - return res; -} - -static void gl2psPrintSVGFinalPrimitive(void) -{ - /* End any remaining line, if any */ - gl2psEndSVGLine(); -} - -/* definition of the SVG backend */ - -static GL2PSbackend gl2psSVG = { - gl2psPrintSVGHeader, - gl2psPrintSVGFooter, - gl2psPrintSVGBeginViewport, - gl2psPrintSVGEndViewport, - gl2psPrintSVGPrimitive, - gl2psPrintSVGFinalPrimitive, - "svg", - "Scalable Vector Graphics" -}; - -/********************************************************************* - * - * PGF routines - * - *********************************************************************/ - -static void gl2psPrintPGFColor(GL2PSrgba rgba) -{ - if(!gl2psSameColor(gl2ps->lastrgba, rgba)){ - gl2psSetLastColor(rgba); - fprintf(gl2ps->stream, "\\color[rgb]{%f,%f,%f}\n", rgba[0], rgba[1], rgba[2]); - } -} - -static void gl2psPrintPGFHeader(void) -{ - time_t now; - - time(&now); - - fprintf(gl2ps->stream, - "%% Title: %s\n" - "%% Creator: GL2PS %d.%d.%d%s, %s\n" - "%% For: %s\n" - "%% CreationDate: %s", - gl2ps->title, GL2PS_MAJOR_VERSION, GL2PS_MINOR_VERSION, - GL2PS_PATCH_VERSION, GL2PS_EXTRA_VERSION, GL2PS_COPYRIGHT, - gl2ps->producer, ctime(&now)); - - fprintf(gl2ps->stream, "\\begin{pgfpicture}\n"); - if(gl2ps->options & GL2PS_DRAW_BACKGROUND){ - gl2psPrintPGFColor(gl2ps->bgcolor); - fprintf(gl2ps->stream, - "\\pgfpathrectanglecorners{" - "\\pgfpoint{%dpt}{%dpt}}{\\pgfpoint{%dpt}{%dpt}}\n" - "\\pgfusepath{fill}\n", - (int)gl2ps->viewport[0], (int)gl2ps->viewport[1], - (int)gl2ps->viewport[2], (int)gl2ps->viewport[3]); - } -} - -static void gl2psPrintPGFDash(GLushort pattern, GLint factor) -{ - int i, n, array[10]; - - if(pattern == gl2ps->lastpattern && factor == gl2ps->lastfactor) - return; - - gl2ps->lastpattern = pattern; - gl2ps->lastfactor = factor; - - if(!pattern || !factor){ - /* solid line */ - fprintf(gl2ps->stream, "\\pgfsetdash{}{0pt}\n"); - } - else{ - gl2psParseStipplePattern(pattern, factor, &n, array); - fprintf(gl2ps->stream, "\\pgfsetdash{"); - for(i = 0; i < n; i++) fprintf(gl2ps->stream, "{%dpt}", array[i]); - fprintf(gl2ps->stream, "}{0pt}\n"); - } -} - -static const char *gl2psPGFTextAlignment(int align) -{ - switch(align){ - case GL2PS_TEXT_C : return "center"; - case GL2PS_TEXT_CL : return "west"; - case GL2PS_TEXT_CR : return "east"; - case GL2PS_TEXT_B : return "south"; - case GL2PS_TEXT_BR : return "south east"; - case GL2PS_TEXT_T : return "north"; - case GL2PS_TEXT_TL : return "north west"; - case GL2PS_TEXT_TR : return "north east"; - case GL2PS_TEXT_BL : - default : return "south west"; - } -} - -static void gl2psPrintPGFPrimitive(void *data) -{ - GL2PSprimitive *prim; - - prim = *(GL2PSprimitive**)data; - - switch(prim->type){ - case GL2PS_POINT : - /* Points in openGL are rectangular */ - gl2psPrintPGFColor(prim->verts[0].rgba); - fprintf(gl2ps->stream, - "\\pgfpathrectangle{\\pgfpoint{%fpt}{%fpt}}" - "{\\pgfpoint{%fpt}{%fpt}}\n\\pgfusepath{fill}\n", - prim->verts[0].xyz[0]-0.5*prim->width, - prim->verts[0].xyz[1]-0.5*prim->width, - prim->width,prim->width); - break; - case GL2PS_LINE : - gl2psPrintPGFColor(prim->verts[0].rgba); - if(gl2ps->lastlinewidth != prim->width){ - gl2ps->lastlinewidth = prim->width; - fprintf(gl2ps->stream, "\\pgfsetlinewidth{%fpt}\n", gl2ps->lastlinewidth); - } - gl2psPrintPGFDash(prim->pattern, prim->factor); - fprintf(gl2ps->stream, - "\\pgfpathmoveto{\\pgfpoint{%fpt}{%fpt}}\n" - "\\pgflineto{\\pgfpoint{%fpt}{%fpt}}\n" - "\\pgfusepath{stroke}\n", - prim->verts[1].xyz[0], prim->verts[1].xyz[1], - prim->verts[0].xyz[0], prim->verts[0].xyz[1]); - break; - case GL2PS_TRIANGLE : - if(gl2ps->lastlinewidth != 0){ - gl2ps->lastlinewidth = 0; - fprintf(gl2ps->stream, "\\pgfsetlinewidth{0.01pt}\n"); - } - gl2psPrintPGFColor(prim->verts[0].rgba); - fprintf(gl2ps->stream, - "\\pgfpathmoveto{\\pgfpoint{%fpt}{%fpt}}\n" - "\\pgflineto{\\pgfpoint{%fpt}{%fpt}}\n" - "\\pgflineto{\\pgfpoint{%fpt}{%fpt}}\n" - "\\pgfpathclose\n" - "\\pgfusepath{fill,stroke}\n", - prim->verts[2].xyz[0], prim->verts[2].xyz[1], - prim->verts[1].xyz[0], prim->verts[1].xyz[1], - prim->verts[0].xyz[0], prim->verts[0].xyz[1]); - break; - case GL2PS_TEXT : - fprintf(gl2ps->stream, "{\n\\pgftransformshift{\\pgfpoint{%fpt}{%fpt}}\n", - prim->verts[0].xyz[0], prim->verts[0].xyz[1]); - - if(prim->data.text->angle) - fprintf(gl2ps->stream, "\\pgftransformrotate{%f}{", prim->data.text->angle); - - fprintf(gl2ps->stream, "\\pgfnode{rectangle}{%s}{\\fontsize{%d}{0}\\selectfont", - gl2psPGFTextAlignment(prim->data.text->alignment), - prim->data.text->fontsize); - - fprintf(gl2ps->stream, "\\textcolor[rgb]{%g,%g,%g}{{%s}}", - prim->verts[0].rgba[0], prim->verts[0].rgba[1], - prim->verts[0].rgba[2], prim->data.text->str); - - fprintf(gl2ps->stream, "}{}{\\pgfusepath{discard}}}\n"); - break; - case GL2PS_SPECIAL : - /* alignment contains the format for which the special output text - is intended */ - if (prim->data.text->alignment == GL2PS_PGF) - fprintf(gl2ps->stream, "%s\n", prim->data.text->str); - break; - default : - break; - } -} - -static void gl2psPrintPGFFooter(void) -{ - fprintf(gl2ps->stream, "\\end{pgfpicture}\n"); -} - -static void gl2psPrintPGFBeginViewport(GLint viewport[4]) -{ - GLint index; - GLfloat rgba[4]; - int x = viewport[0], y = viewport[1], w = viewport[2], h = viewport[3]; - - glRenderMode(GL_FEEDBACK); - - if(gl2ps->header){ - gl2psPrintPGFHeader(); - gl2ps->header = GL_FALSE; - } - - fprintf(gl2ps->stream, "\\begin{pgfscope}\n"); - if(gl2ps->options & GL2PS_DRAW_BACKGROUND){ - if(gl2ps->colormode == GL_RGBA || gl2ps->colorsize == 0){ - glGetFloatv(GL_COLOR_CLEAR_VALUE, rgba); - } - else{ - glGetIntegerv(GL_INDEX_CLEAR_VALUE, &index); - rgba[0] = gl2ps->colormap[index][0]; - rgba[1] = gl2ps->colormap[index][1]; - rgba[2] = gl2ps->colormap[index][2]; - rgba[3] = 1.0F; - } - gl2psPrintPGFColor(rgba); - fprintf(gl2ps->stream, - "\\pgfpathrectangle{\\pgfpoint{%dpt}{%dpt}}" - "{\\pgfpoint{%dpt}{%dpt}}\n" - "\\pgfusepath{fill}\n", - x, y, w, h); - } - - fprintf(gl2ps->stream, - "\\pgfpathrectangle{\\pgfpoint{%dpt}{%dpt}}" - "{\\pgfpoint{%dpt}{%dpt}}\n" - "\\pgfusepath{clip}\n", - x, y, w, h); -} - -static GLint gl2psPrintPGFEndViewport(void) -{ - GLint res; - res = gl2psPrintPrimitives(); - fprintf(gl2ps->stream, "\\end{pgfscope}\n"); - return res; -} - -static void gl2psPrintPGFFinalPrimitive(void) -{ -} - -/* definition of the PGF backend */ - -static GL2PSbackend gl2psPGF = { - gl2psPrintPGFHeader, - gl2psPrintPGFFooter, - gl2psPrintPGFBeginViewport, - gl2psPrintPGFEndViewport, - gl2psPrintPGFPrimitive, - gl2psPrintPGFFinalPrimitive, - "tex", - "PGF Latex Graphics" -}; - -/********************************************************************* - * - * General primitive printing routine - * - *********************************************************************/ - -/* Warning: the ordering of the backends must match the format - #defines in gl2ps.h */ - -static GL2PSbackend *gl2psbackends[] = { - &gl2psPS, /* 0 */ - &gl2psEPS, /* 1 */ - &gl2psTEX, /* 2 */ - &gl2psPDF, /* 3 */ - &gl2psSVG, /* 4 */ - &gl2psPGF /* 5 */ -}; - -static void gl2psComputeTightBoundingBox(void *data) -{ - GL2PSprimitive *prim; - int i; - - prim = *(GL2PSprimitive**)data; - - for(i = 0; i < prim->numverts; i++){ - if(prim->verts[i].xyz[0] < gl2ps->viewport[0]) - gl2ps->viewport[0] = (GLint)prim->verts[i].xyz[0]; - if(prim->verts[i].xyz[0] > gl2ps->viewport[2]) - gl2ps->viewport[2] = (GLint)(prim->verts[i].xyz[0] + 0.5F); - if(prim->verts[i].xyz[1] < gl2ps->viewport[1]) - gl2ps->viewport[1] = (GLint)prim->verts[i].xyz[1]; - if(prim->verts[i].xyz[1] > gl2ps->viewport[3]) - gl2ps->viewport[3] = (GLint)(prim->verts[i].xyz[1] + 0.5F); - } -} - -static GLint gl2psPrintPrimitives(void) -{ - GL2PSbsptree *root; - GL2PSxyz eye = {0.0F, 0.0F, 100.0F * GL2PS_ZSCALE}; - GLint used; - - used = glRenderMode(GL_RENDER); - - if(used < 0){ - gl2psMsg(GL2PS_INFO, "OpenGL feedback buffer overflow"); - return GL2PS_OVERFLOW; - } - - if(used > 0) - gl2psParseFeedbackBuffer(used); - - gl2psRescaleAndOffset(); - - if(gl2ps->header){ - if(gl2psListNbr(gl2ps->primitives) && - (gl2ps->options & GL2PS_TIGHT_BOUNDING_BOX)){ - gl2ps->viewport[0] = gl2ps->viewport[1] = 100000; - gl2ps->viewport[2] = gl2ps->viewport[3] = -100000; - gl2psListAction(gl2ps->primitives, gl2psComputeTightBoundingBox); - } - (gl2psbackends[gl2ps->format]->printHeader)(); - gl2ps->header = GL_FALSE; - } - - if(!gl2psListNbr(gl2ps->primitives)){ - /* empty feedback buffer and/or nothing else to print */ - return GL2PS_NO_FEEDBACK; - } - - switch(gl2ps->sort){ - case GL2PS_NO_SORT : - gl2psListAction(gl2ps->primitives, gl2psbackends[gl2ps->format]->printPrimitive); - gl2psListAction(gl2ps->primitives, gl2psFreePrimitive); - /* reset the primitive list, waiting for the next viewport */ - gl2psListReset(gl2ps->primitives); - break; - case GL2PS_SIMPLE_SORT : - gl2psListSort(gl2ps->primitives, gl2psCompareDepth); - if(gl2ps->options & GL2PS_OCCLUSION_CULL){ - gl2psListActionInverse(gl2ps->primitives, gl2psAddInImageTree); - gl2psFreeBspImageTree(&gl2ps->imagetree); - } - gl2psListAction(gl2ps->primitives, gl2psbackends[gl2ps->format]->printPrimitive); - gl2psListAction(gl2ps->primitives, gl2psFreePrimitive); - /* reset the primitive list, waiting for the next viewport */ - gl2psListReset(gl2ps->primitives); - break; - case GL2PS_BSP_SORT : - root = (GL2PSbsptree*)gl2psMalloc(sizeof(GL2PSbsptree)); - gl2psBuildBspTree(root, gl2ps->primitives); - if(GL_TRUE == gl2ps->boundary) gl2psBuildPolygonBoundary(root); - if(gl2ps->options & GL2PS_OCCLUSION_CULL){ - gl2psTraverseBspTree(root, eye, -GL2PS_EPSILON, gl2psLess, - gl2psAddInImageTree, 1); - gl2psFreeBspImageTree(&gl2ps->imagetree); - } - gl2psTraverseBspTree(root, eye, GL2PS_EPSILON, gl2psGreater, - gl2psbackends[gl2ps->format]->printPrimitive, 0); - gl2psFreeBspTree(&root); - /* reallocate the primitive list (it's been deleted by - gl2psBuildBspTree) in case there is another viewport */ - gl2ps->primitives = gl2psListCreate(500, 500, sizeof(GL2PSprimitive*)); - break; - } - gl2psbackends[gl2ps->format]->printFinalPrimitive(); - - return GL2PS_SUCCESS; -} - -/********************************************************************* - * - * Public routines - * - *********************************************************************/ - -GL2PSDLL_API GLint gl2psBeginPage(const char *title, const char *producer, - GLint viewport[4], GLint format, GLint sort, - GLint options, GLint colormode, - GLint colorsize, GL2PSrgba *colormap, - GLint nr, GLint ng, GLint nb, GLint buffersize, - FILE *stream, const char *filename) -{ - GLint index; - int i; - - if(gl2ps){ - gl2psMsg(GL2PS_ERROR, "gl2psBeginPage called in wrong program state"); - return GL2PS_ERROR; - } - - gl2ps = (GL2PScontext*)gl2psMalloc(sizeof(GL2PScontext)); - - if(format >= 0 && format < (GLint)(sizeof(gl2psbackends) / sizeof(gl2psbackends[0]))){ - gl2ps->format = format; - } - else { - gl2psMsg(GL2PS_ERROR, "Unknown output format: %d", format); - gl2psFree(gl2ps); - gl2ps = NULL; - return GL2PS_ERROR; - } - - switch(sort){ - case GL2PS_NO_SORT : - case GL2PS_SIMPLE_SORT : - case GL2PS_BSP_SORT : - gl2ps->sort = sort; - break; - default : - gl2psMsg(GL2PS_ERROR, "Unknown sorting algorithm: %d", sort); - gl2psFree(gl2ps); - gl2ps = NULL; - return GL2PS_ERROR; - } - - if(stream){ - gl2ps->stream = stream; - } - else{ - gl2psMsg(GL2PS_ERROR, "Bad file pointer"); - gl2psFree(gl2ps); - gl2ps = NULL; - return GL2PS_ERROR; - } - - gl2ps->header = GL_TRUE; - gl2ps->maxbestroot = 10; - gl2ps->options = options; - gl2ps->compress = NULL; - gl2ps->imagemap_head = NULL; - gl2ps->imagemap_tail = NULL; - - if(gl2ps->options & GL2PS_USE_CURRENT_VIEWPORT){ - glGetIntegerv(GL_VIEWPORT, gl2ps->viewport); - } - else{ - for(i = 0; i < 4; i++){ - gl2ps->viewport[i] = viewport[i]; - } - } - - if(!gl2ps->viewport[2] || !gl2ps->viewport[3]){ - gl2psMsg(GL2PS_ERROR, "Incorrect viewport (x=%d, y=%d, width=%d, height=%d)", - gl2ps->viewport[0], gl2ps->viewport[1], - gl2ps->viewport[2], gl2ps->viewport[3]); - gl2psFree(gl2ps); - gl2ps = NULL; - return GL2PS_ERROR; - } - - gl2ps->threshold[0] = nr ? 1.0F / (GLfloat)nr : 0.064F; - gl2ps->threshold[1] = ng ? 1.0F / (GLfloat)ng : 0.034F; - gl2ps->threshold[2] = nb ? 1.0F / (GLfloat)nb : 0.100F; - gl2ps->colormode = colormode; - gl2ps->buffersize = buffersize > 0 ? buffersize : 2048 * 2048; - for(i = 0; i < 3; i++){ - gl2ps->lastvertex.xyz[i] = -1.0F; - } - for(i = 0; i < 4; i++){ - gl2ps->lastvertex.rgba[i] = -1.0F; - gl2ps->lastrgba[i] = -1.0F; - } - gl2ps->lastlinewidth = -1.0F; - gl2ps->lastpattern = 0; - gl2ps->lastfactor = 0; - gl2ps->imagetree = NULL; - gl2ps->primitivetoadd = NULL; - gl2ps->zerosurfacearea = GL_FALSE; - gl2ps->pdfprimlist = NULL; - gl2ps->pdfgrouplist = NULL; - gl2ps->xreflist = NULL; - - /* get default blending mode from current OpenGL state (enabled by - default for SVG) */ - gl2ps->blending = (gl2ps->format == GL2PS_SVG) ? GL_TRUE : glIsEnabled(GL_BLEND); - glGetIntegerv(GL_BLEND_SRC, &gl2ps->blendfunc[0]); - glGetIntegerv(GL_BLEND_DST, &gl2ps->blendfunc[1]); - - if(gl2ps->colormode == GL_RGBA){ - gl2ps->colorsize = 0; - gl2ps->colormap = NULL; - glGetFloatv(GL_COLOR_CLEAR_VALUE, gl2ps->bgcolor); - } - else if(gl2ps->colormode == GL_COLOR_INDEX){ - if(!colorsize || !colormap){ - gl2psMsg(GL2PS_ERROR, "Missing colormap for GL_COLOR_INDEX rendering"); - gl2psFree(gl2ps); - gl2ps = NULL; - return GL2PS_ERROR; - } - gl2ps->colorsize = colorsize; - gl2ps->colormap = (GL2PSrgba*)gl2psMalloc(gl2ps->colorsize * sizeof(GL2PSrgba)); - memcpy(gl2ps->colormap, colormap, gl2ps->colorsize * sizeof(GL2PSrgba)); - glGetIntegerv(GL_INDEX_CLEAR_VALUE, &index); - gl2ps->bgcolor[0] = gl2ps->colormap[index][0]; - gl2ps->bgcolor[1] = gl2ps->colormap[index][1]; - gl2ps->bgcolor[2] = gl2ps->colormap[index][2]; - gl2ps->bgcolor[3] = 1.0F; - } - else{ - gl2psMsg(GL2PS_ERROR, "Unknown color mode in gl2psBeginPage"); - gl2psFree(gl2ps); - gl2ps = NULL; - return GL2PS_ERROR; - } - - if(!title){ - gl2ps->title = (char*)gl2psMalloc(sizeof(char)); - gl2ps->title[0] = '\0'; - } - else{ - gl2ps->title = (char*)gl2psMalloc((strlen(title)+1)*sizeof(char)); - strcpy(gl2ps->title, title); - } - - if(!producer){ - gl2ps->producer = (char*)gl2psMalloc(sizeof(char)); - gl2ps->producer[0] = '\0'; - } - else{ - gl2ps->producer = (char*)gl2psMalloc((strlen(producer)+1)*sizeof(char)); - strcpy(gl2ps->producer, producer); - } - - if(!filename){ - gl2ps->filename = (char*)gl2psMalloc(sizeof(char)); - gl2ps->filename[0] = '\0'; - } - else{ - gl2ps->filename = (char*)gl2psMalloc((strlen(filename)+1)*sizeof(char)); - strcpy(gl2ps->filename, filename); - } - - gl2ps->primitives = gl2psListCreate(500, 500, sizeof(GL2PSprimitive*)); - gl2ps->auxprimitives = gl2psListCreate(100, 100, sizeof(GL2PSprimitive*)); - gl2ps->feedback = (GLfloat*)gl2psMalloc(gl2ps->buffersize * sizeof(GLfloat)); - glFeedbackBuffer(gl2ps->buffersize, GL_3D_COLOR, gl2ps->feedback); - glRenderMode(GL_FEEDBACK); - - return GL2PS_SUCCESS; -} - -GL2PSDLL_API GLint gl2psEndPage(void) -{ - GLint res; - - if(!gl2ps) return GL2PS_UNINITIALIZED; - - res = gl2psPrintPrimitives(); - - if(res != GL2PS_OVERFLOW) - (gl2psbackends[gl2ps->format]->printFooter)(); - - fflush(gl2ps->stream); - - gl2psListDelete(gl2ps->primitives); - gl2psListDelete(gl2ps->auxprimitives); - gl2psFreeImagemap(gl2ps->imagemap_head); - gl2psFree(gl2ps->colormap); - gl2psFree(gl2ps->title); - gl2psFree(gl2ps->producer); - gl2psFree(gl2ps->filename); - gl2psFree(gl2ps->feedback); - gl2psFree(gl2ps); - gl2ps = NULL; - - return res; -} - -GL2PSDLL_API GLint gl2psBeginViewport(GLint viewport[4]) -{ - if(!gl2ps) return GL2PS_UNINITIALIZED; - - (gl2psbackends[gl2ps->format]->beginViewport)(viewport); - - return GL2PS_SUCCESS; -} - -GL2PSDLL_API GLint gl2psEndViewport(void) -{ - GLint res; - - if(!gl2ps) return GL2PS_UNINITIALIZED; - - res = (gl2psbackends[gl2ps->format]->endViewport)(); - - /* reset last used colors, line widths */ - gl2ps->lastlinewidth = -1.0F; - - return res; -} - -GL2PSDLL_API GLint gl2psTextOpt(const char *str, const char *fontname, - GLshort fontsize, GLint alignment, GLfloat angle) -{ - return gl2psAddText(GL2PS_TEXT, str, fontname, fontsize, alignment, angle); -} - -GL2PSDLL_API GLint gl2psText(const char *str, const char *fontname, GLshort fontsize) -{ - return gl2psAddText(GL2PS_TEXT, str, fontname, fontsize, GL2PS_TEXT_BL, 0.0F); -} - -GL2PSDLL_API GLint gl2psSpecial(GLint format, const char *str) -{ - return gl2psAddText(GL2PS_SPECIAL, str, "", 0, format, 0.0F); -} - -GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height, - GLint xorig, GLint yorig, - GLenum format, GLenum type, - const void *pixels) -{ - int size, i; - const GLfloat *piv; - GLfloat pos[4], zoom_x, zoom_y; - GL2PSprimitive *prim; - GLboolean valid; - - if(!gl2ps || !pixels) return GL2PS_UNINITIALIZED; - - if((width <= 0) || (height <= 0)) return GL2PS_ERROR; - - if(gl2ps->options & GL2PS_NO_PIXMAP) return GL2PS_SUCCESS; - - if((format != GL_RGB && format != GL_RGBA) || type != GL_FLOAT){ - gl2psMsg(GL2PS_ERROR, "gl2psDrawPixels only implemented for " - "GL_RGB/GL_RGBA, GL_FLOAT pixels"); - return GL2PS_ERROR; - } - - glGetBooleanv(GL_CURRENT_RASTER_POSITION_VALID, &valid); - if(GL_FALSE == valid) return GL2PS_SUCCESS; /* the primitive is culled */ - - glGetFloatv(GL_CURRENT_RASTER_POSITION, pos); - glGetFloatv(GL_ZOOM_X, &zoom_x); - glGetFloatv(GL_ZOOM_Y, &zoom_y); - - prim = (GL2PSprimitive*)gl2psMalloc(sizeof(GL2PSprimitive)); - prim->type = GL2PS_PIXMAP; - prim->boundary = 0; - prim->numverts = 1; - prim->verts = (GL2PSvertex*)gl2psMalloc(sizeof(GL2PSvertex)); - prim->verts[0].xyz[0] = pos[0] + xorig; - prim->verts[0].xyz[1] = pos[1] + yorig; - prim->verts[0].xyz[2] = pos[2]; - prim->culled = 0; - prim->offset = 0; - prim->pattern = 0; - prim->factor = 0; - prim->width = 1; - glGetFloatv(GL_CURRENT_RASTER_COLOR, prim->verts[0].rgba); - prim->data.image = (GL2PSimage*)gl2psMalloc(sizeof(GL2PSimage)); - prim->data.image->width = width; - prim->data.image->height = height; - prim->data.image->zoom_x = zoom_x; - prim->data.image->zoom_y = zoom_y; - prim->data.image->format = format; - prim->data.image->type = type; - - switch(format){ - case GL_RGBA: - if(gl2ps->options & GL2PS_NO_BLENDING || !gl2ps->blending){ - /* special case: blending turned off */ - prim->data.image->format = GL_RGB; - size = height * width * 3; - prim->data.image->pixels = (GLfloat*)gl2psMalloc(size * sizeof(GLfloat)); - piv = (const GLfloat*)pixels; - for(i = 0; i < size; ++i, ++piv){ - prim->data.image->pixels[i] = *piv; - if(!((i + 1) % 3)) - ++piv; - } - } - else{ - size = height * width * 4; - prim->data.image->pixels = (GLfloat*)gl2psMalloc(size * sizeof(GLfloat)); - memcpy(prim->data.image->pixels, pixels, size * sizeof(GLfloat)); - } - break; - case GL_RGB: - default: - size = height * width * 3; - prim->data.image->pixels = (GLfloat*)gl2psMalloc(size * sizeof(GLfloat)); - memcpy(prim->data.image->pixels, pixels, size * sizeof(GLfloat)); - break; - } - - gl2psListAdd(gl2ps->auxprimitives, &prim); - glPassThrough(GL2PS_DRAW_PIXELS_TOKEN); - - return GL2PS_SUCCESS; -} - -GL2PSDLL_API GLint gl2psDrawImageMap(GLsizei width, GLsizei height, - const GLfloat position[3], - const unsigned char *imagemap){ - int size, i; - int sizeoffloat = sizeof(GLfloat); - - if(!gl2ps || !imagemap) return GL2PS_UNINITIALIZED; - - if((width <= 0) || (height <= 0)) return GL2PS_ERROR; - - size = height + height * ((width - 1) / 8); - glPassThrough(GL2PS_IMAGEMAP_TOKEN); - glBegin(GL_POINTS); - glVertex3f(position[0], position[1],position[2]); - glEnd(); - glPassThrough((GLfloat)width); - glPassThrough((GLfloat)height); - for(i = 0; i < size; i += sizeoffloat){ - const float *value = (const float*)imagemap; - glPassThrough(*value); - imagemap += sizeoffloat; - } - return GL2PS_SUCCESS; -} - -GL2PSDLL_API GLint gl2psEnable(GLint mode) -{ - GLint tmp; - - if(!gl2ps) return GL2PS_UNINITIALIZED; - - switch(mode){ - case GL2PS_POLYGON_OFFSET_FILL : - glPassThrough(GL2PS_BEGIN_OFFSET_TOKEN); - glGetFloatv(GL_POLYGON_OFFSET_FACTOR, &gl2ps->offset[0]); - glGetFloatv(GL_POLYGON_OFFSET_UNITS, &gl2ps->offset[1]); - break; - case GL2PS_POLYGON_BOUNDARY : - glPassThrough(GL2PS_BEGIN_BOUNDARY_TOKEN); - break; - case GL2PS_LINE_STIPPLE : - glPassThrough(GL2PS_BEGIN_STIPPLE_TOKEN); - glGetIntegerv(GL_LINE_STIPPLE_PATTERN, &tmp); - glPassThrough((GLfloat)tmp); - glGetIntegerv(GL_LINE_STIPPLE_REPEAT, &tmp); - glPassThrough((GLfloat)tmp); - break; - case GL2PS_BLEND : - glPassThrough(GL2PS_BEGIN_BLEND_TOKEN); - break; - default : - gl2psMsg(GL2PS_WARNING, "Unknown mode in gl2psEnable: %d", mode); - return GL2PS_WARNING; - } - - return GL2PS_SUCCESS; -} - -GL2PSDLL_API GLint gl2psDisable(GLint mode) -{ - if(!gl2ps) return GL2PS_UNINITIALIZED; - - switch(mode){ - case GL2PS_POLYGON_OFFSET_FILL : - glPassThrough(GL2PS_END_OFFSET_TOKEN); - break; - case GL2PS_POLYGON_BOUNDARY : - glPassThrough(GL2PS_END_BOUNDARY_TOKEN); - break; - case GL2PS_LINE_STIPPLE : - glPassThrough(GL2PS_END_STIPPLE_TOKEN); - break; - case GL2PS_BLEND : - glPassThrough(GL2PS_END_BLEND_TOKEN); - break; - default : - gl2psMsg(GL2PS_WARNING, "Unknown mode in gl2psDisable: %d", mode); - return GL2PS_WARNING; - } - - return GL2PS_SUCCESS; -} - -GL2PSDLL_API GLint gl2psPointSize(GLfloat value) -{ - if(!gl2ps) return GL2PS_UNINITIALIZED; - - glPassThrough(GL2PS_POINT_SIZE_TOKEN); - glPassThrough(value); - - return GL2PS_SUCCESS; -} - -GL2PSDLL_API GLint gl2psLineWidth(GLfloat value) -{ - if(!gl2ps) return GL2PS_UNINITIALIZED; - - glPassThrough(GL2PS_LINE_WIDTH_TOKEN); - glPassThrough(value); - - return GL2PS_SUCCESS; -} - -GL2PSDLL_API GLint gl2psBlendFunc(GLenum sfactor, GLenum dfactor) -{ - if(!gl2ps) return GL2PS_UNINITIALIZED; - - if(GL_FALSE == gl2psSupportedBlendMode(sfactor, dfactor)) - return GL2PS_WARNING; - - glPassThrough(GL2PS_SRC_BLEND_TOKEN); - glPassThrough((GLfloat)sfactor); - glPassThrough(GL2PS_DST_BLEND_TOKEN); - glPassThrough((GLfloat)dfactor); - - return GL2PS_SUCCESS; -} - -GL2PSDLL_API GLint gl2psSetOptions(GLint options) -{ - if(!gl2ps) return GL2PS_UNINITIALIZED; - - gl2ps->options = options; - - return GL2PS_SUCCESS; -} - -GL2PSDLL_API GLint gl2psGetOptions(GLint *options) -{ - if(!gl2ps) { - *options = 0; - return GL2PS_UNINITIALIZED; - } - - *options = gl2ps->options; - - return GL2PS_SUCCESS; -} - -GL2PSDLL_API const char *gl2psGetFileExtension(GLint format) -{ - if(format >= 0 && format < (GLint)(sizeof(gl2psbackends) / sizeof(gl2psbackends[0]))) - return gl2psbackends[format]->file_extension; - else - return "Unknown format"; -} - -GL2PSDLL_API const char *gl2psGetFormatDescription(GLint format) -{ - if(format >= 0 && format < (GLint)(sizeof(gl2psbackends) / sizeof(gl2psbackends[0]))) - return gl2psbackends[format]->description; - else - return "Unknown format"; -} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/gl2ps/gl2ps.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/gl2ps/gl2ps.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/gl2ps/gl2ps.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/gl2ps/gl2ps.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,202 +0,0 @@ -/* - * GL2PS, an OpenGL to PostScript Printing Library - * Copyright (C) 1999-2011 C. Geuzaine - * - * This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or - * modify it under the terms of either: - * - * a) the GNU Library General Public License as published by the Free - * Software Foundation, either version 2 of the License, or (at your - * option) any later version; or - * - * b) the GL2PS License as published by Christophe Geuzaine, either - * version 2 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either - * the GNU Library General Public License or the GL2PS License for - * more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library in the file named "COPYING.LGPL"; - * if not, write to the Free Software Foundation, Inc., 675 Mass Ave, - * Cambridge, MA 02139, USA. - * - * You should have received a copy of the GL2PS License with this - * library in the file named "COPYING.GL2PS"; if not, I will be glad - * to provide one. - * - * For the latest info about gl2ps and a full list of contributors, - * see http://www.geuz.org/gl2ps/. - * - * Please report all bugs and problems to . - */ - -#ifndef __GL2PS_H__ -#define __GL2PS_H__ - -#include -#include - -/* Define GL2PSDLL at compile time to build a Windows DLL */ - -#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) -# if defined(_MSC_VER) -# pragma warning(disable:4115) -# pragma warning(disable:4996) -# endif -# define NOMINMAX -# include -# undef NOMINMAX -# if defined(GL2PSDLL) -# if defined(GL2PSDLL_EXPORTS) -# define GL2PSDLL_API __declspec(dllexport) -# else -# define GL2PSDLL_API __declspec(dllimport) -# endif -# else -# define GL2PSDLL_API -# endif -#else -# define GL2PSDLL_API -#endif - -#if defined(__APPLE__) || defined(HAVE_OPENGL_GL_H) -# include -#else -# include -#endif - -/* Support for compressed PostScript/PDF/SVG and for embedded PNG - images in SVG */ - -#if defined(HAVE_ZLIB) || defined(HAVE_LIBZ) -# define GL2PS_HAVE_ZLIB -# if defined(HAVE_LIBPNG) || defined(HAVE_PNG) -# define GL2PS_HAVE_LIBPNG -# endif -#endif - -/* Version number */ - -#define GL2PS_MAJOR_VERSION 1 -#define GL2PS_MINOR_VERSION 3 -#define GL2PS_PATCH_VERSION 6 -#define GL2PS_EXTRA_VERSION "" - -#define GL2PS_VERSION (GL2PS_MAJOR_VERSION + \ - 0.01 * GL2PS_MINOR_VERSION + \ - 0.0001 * GL2PS_PATCH_VERSION) - -#define GL2PS_COPYRIGHT "(C) 1999-2011 C. Geuzaine" - -/* Output file formats (the values and the ordering are important!) */ - -#define GL2PS_PS 0 -#define GL2PS_EPS 1 -#define GL2PS_TEX 2 -#define GL2PS_PDF 3 -#define GL2PS_SVG 4 -#define GL2PS_PGF 5 - -/* Sorting algorithms */ - -#define GL2PS_NO_SORT 1 -#define GL2PS_SIMPLE_SORT 2 -#define GL2PS_BSP_SORT 3 - -/* Message levels and error codes */ - -#define GL2PS_SUCCESS 0 -#define GL2PS_INFO 1 -#define GL2PS_WARNING 2 -#define GL2PS_ERROR 3 -#define GL2PS_NO_FEEDBACK 4 -#define GL2PS_OVERFLOW 5 -#define GL2PS_UNINITIALIZED 6 - -/* Options for gl2psBeginPage */ - -#define GL2PS_NONE 0 -#define GL2PS_DRAW_BACKGROUND (1<<0) -#define GL2PS_SIMPLE_LINE_OFFSET (1<<1) -#define GL2PS_SILENT (1<<2) -#define GL2PS_BEST_ROOT (1<<3) -#define GL2PS_OCCLUSION_CULL (1<<4) -#define GL2PS_NO_TEXT (1<<5) -#define GL2PS_LANDSCAPE (1<<6) -#define GL2PS_NO_PS3_SHADING (1<<7) -#define GL2PS_NO_PIXMAP (1<<8) -#define GL2PS_USE_CURRENT_VIEWPORT (1<<9) -#define GL2PS_COMPRESS (1<<10) -#define GL2PS_NO_BLENDING (1<<11) -#define GL2PS_TIGHT_BOUNDING_BOX (1<<12) - -/* Arguments for gl2psEnable/gl2psDisable */ - -#define GL2PS_POLYGON_OFFSET_FILL 1 -#define GL2PS_POLYGON_BOUNDARY 2 -#define GL2PS_LINE_STIPPLE 3 -#define GL2PS_BLEND 4 - -/* Text alignment (o=raster position; default mode is BL): - +---+ +---+ +---+ +---+ +---+ +---+ +-o-+ o---+ +---o - | o | o | | o | | | | | | | | | | | | - +---+ +---+ +---+ +-o-+ o---+ +---o +---+ +---+ +---+ - C CL CR B BL BR T TL TR */ - -#define GL2PS_TEXT_C 1 -#define GL2PS_TEXT_CL 2 -#define GL2PS_TEXT_CR 3 -#define GL2PS_TEXT_B 4 -#define GL2PS_TEXT_BL 5 -#define GL2PS_TEXT_BR 6 -#define GL2PS_TEXT_T 7 -#define GL2PS_TEXT_TL 8 -#define GL2PS_TEXT_TR 9 - -typedef GLfloat GL2PSrgba[4]; - -#if defined(__cplusplus) -extern "C" { -#endif - -GL2PSDLL_API GLint gl2psBeginPage(const char *title, const char *producer, - GLint viewport[4], GLint format, GLint sort, - GLint options, GLint colormode, - GLint colorsize, GL2PSrgba *colormap, - GLint nr, GLint ng, GLint nb, GLint buffersize, - FILE *stream, const char *filename); -GL2PSDLL_API GLint gl2psEndPage(void); -GL2PSDLL_API GLint gl2psSetOptions(GLint options); -GL2PSDLL_API GLint gl2psGetOptions(GLint *options); -GL2PSDLL_API GLint gl2psBeginViewport(GLint viewport[4]); -GL2PSDLL_API GLint gl2psEndViewport(void); -GL2PSDLL_API GLint gl2psText(const char *str, const char *fontname, - GLshort fontsize); -GL2PSDLL_API GLint gl2psTextOpt(const char *str, const char *fontname, - GLshort fontsize, GLint align, GLfloat angle); -GL2PSDLL_API GLint gl2psSpecial(GLint format, const char *str); -GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height, - GLint xorig, GLint yorig, - GLenum format, GLenum type, const void *pixels); -GL2PSDLL_API GLint gl2psEnable(GLint mode); -GL2PSDLL_API GLint gl2psDisable(GLint mode); -GL2PSDLL_API GLint gl2psPointSize(GLfloat value); -GL2PSDLL_API GLint gl2psLineWidth(GLfloat value); -GL2PSDLL_API GLint gl2psBlendFunc(GLenum sfactor, GLenum dfactor); - -/* undocumented */ -GL2PSDLL_API GLint gl2psDrawImageMap(GLsizei width, GLsizei height, - const GLfloat position[3], - const unsigned char *imagemap); -GL2PSDLL_API const char *gl2psGetFileExtension(GLint format); -GL2PSDLL_API const char *gl2psGetFormatDescription(GLint format); - -#if defined(__cplusplus) -} -#endif - -#endif /* __GL2PS_H__ */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/gl2ps/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/gl2ps/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/gl2ps/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/gl2ps/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -noinst_LIBRARIES = libgl2ps.a - -libgl2ps_a_SOURCES = \ -gl2ps.h gl2ps.c diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/gl2ps/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/gl2ps/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/gl2ps/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/gl2ps/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,494 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = src/foreign/gl2ps -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libgl2ps_a_AR = $(AR) $(ARFLAGS) -libgl2ps_a_LIBADD = -am_libgl2ps_a_OBJECTS = gl2ps.$(OBJEXT) -libgl2ps_a_OBJECTS = $(am_libgl2ps_a_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libgl2ps_a_SOURCES) -DIST_SOURCES = $(libgl2ps_a_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FOX_LDFLAGS = @FOX_LDFLAGS@ -GDAL_LDFLAGS = @GDAL_LDFLAGS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ -LIB_XERCES = @LIB_XERCES@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OSG_LIBS = @OSG_LIBS@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PROJ_LDFLAGS = @PROJ_LDFLAGS@ -PYTHON_LIBS = @PYTHON_LIBS@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -XERCES_CFLAGS = @XERCES_CFLAGS@ -XERCES_LDFLAGS = @XERCES_LDFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LIBRARIES = libgl2ps.a -libgl2ps_a_SOURCES = \ -gl2ps.h gl2ps.c - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/foreign/gl2ps/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/foreign/gl2ps/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libgl2ps.a: $(libgl2ps_a_OBJECTS) $(libgl2ps_a_DEPENDENCIES) - -rm -f libgl2ps.a - $(libgl2ps_a_AR) libgl2ps.a $(libgl2ps_a_OBJECTS) $(libgl2ps_a_LIBADD) - $(RANLIB) libgl2ps.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl2ps.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/Makefile.in 2014-03-16 09:53:43.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/Makefile.in 2015-04-17 00:20:33.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,7 +79,7 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/foreign -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -44,20 +88,58 @@ CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = eulerspiral mersenne tcpip nvwa polyfonts rtree @@ -92,6 +174,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -118,9 +201,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -131,10 +218,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -273,22 +356,25 @@ -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -303,57 +389,12 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -369,12 +410,7 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -386,15 +422,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -403,6 +435,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -439,13 +486,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -480,10 +524,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -561,22 +610,20 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/mersenne/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/mersenne/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/mersenne/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/mersenne/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,7 +79,7 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/foreign/mersenne -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -44,14 +88,33 @@ CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -78,9 +141,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -91,10 +158,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -228,11 +291,11 @@ clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: + +ctags CTAGS: -ctags: CTAGS -CTAGS: +cscope cscopelist: distdir: $(DISTFILES) @@ -279,10 +342,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -363,15 +431,16 @@ .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/mersenne/MersenneTwister.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/mersenne/MersenneTwister.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/mersenne/MersenneTwister.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/mersenne/MersenneTwister.h 2015-04-17 00:20:29.000000000 +0000 @@ -131,12 +131,12 @@ void initialize( const uint32 oneSeed ); void reload(); uint32 hiBit( const uint32& u ) const { return u & 0x80000000UL; } - uint32 loBit( const uint32& u ) const { return u & 0x00000001UL; } uint32 loBits( const uint32& u ) const { return u & 0x7fffffffUL; } uint32 mixBits( const uint32& u, const uint32& v ) const { return hiBit(u) | loBits(v); } uint32 twist( const uint32& m, const uint32& s0, const uint32& s1 ) const - { return m ^ (mixBits(s0,s1)>>1) ^ (-loBit(s1) & 0x9908b0dfUL); } + { return m ^ (mixBits(s0,s1)>>1) ^ (s1 & 1UL ? 0x9908b0dfUL : 0); } + // !!! mb changed -(s1&1)&a to the ? operator to remove negation of unsigned value }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/nvwa/debug_new.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/nvwa/debug_new.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/nvwa/debug_new.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/nvwa/debug_new.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,8 +6,9 @@ #include #endif #ifdef CHECK_MEMORY_LEAKS + /* - * Copyright (C) 2004-2008 Wu Yongwei + * Copyright (C) 2004-2011 Wu Yongwei * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any @@ -36,7 +37,7 @@ * * Implementation of debug versions of new and delete to check leakage. * - * @version 4.14, 2008/10/20 + * @version 4.22, 2011/07/12 * @author Wu Yongwei * */ @@ -107,14 +108,19 @@ * * The length of file name stored if greater than zero. If it is zero, * only a const char pointer will be stored. Currently the default - * behaviour is to copy the file name, because I found that the exit - * leakage check cannot access the address of the file name sometimes - * (in my case, a core dump will occur when trying to access the file - * name in a shared library after a \c SIGINT). The current default - * value makes the size of new_ptr_list_t 64 on 32-bit platforms. + * value is non-zero (thus to copy the file name) on non-Windows + * platforms, because I once found that the exit leakage check could not + * access the address of the file name on Linux (in my case, a core dump + * occurred when check_leaks tried to access the file name in a shared + * library after a \c SIGINT). This value makes the size of + * new_ptr_list_t \c 64 on non-Windows 32-bit platforms. */ #ifndef _DEBUG_NEW_FILENAME_LEN -#define _DEBUG_NEW_FILENAME_LEN 80 +#ifdef _WIN32 +#define _DEBUG_NEW_FILENAME_LEN 0 +#else +#define _DEBUG_NEW_FILENAME_LEN 44 +#endif #endif /** @@ -181,9 +187,12 @@ #endif #ifdef _MSC_VER -#pragma warning(disable: 4073) // #pragma init_seg(lib) used +#pragma warning(disable: 4074) // #pragma init_seg(compiler) used #pragma warning(disable: 4290) // C++ exception specification ignored -#pragma init_seg(lib) +#if _MSC_VER >= 1400 // Visual Studio 2005 or later +#pragma warning(disable: 4996) // Use the `unsafe' strncpy +#endif +#pragma init_seg(compiler) #endif #undef _DEBUG_NEW_EMULATE_MALLOC @@ -198,40 +207,50 @@ /** * Gets the aligned value of memory block size. */ -#define align(s) \ +#define ALIGN(s) \ (((s) + _DEBUG_NEW_ALIGNMENT - 1) & ~(_DEBUG_NEW_ALIGNMENT - 1)) /** + * The platform memory alignment. The current value works well in + * platforms I have tested: Windows XP, Windows 7 x64, and Mac OS X + * Leopard. It may be smaller than the real alignment, but must be + * bigger than \c sizeof(size_t) for it work. __debug_new_recorder uses + * it to detect misaligned pointer returned by `new + * NonPODType[size]'. + */ +const size_t PLATFORM_MEM_ALIGNMENT = sizeof(size_t) * 2; + +/** * Structure to store the position information where \c new occurs. */ struct new_ptr_list_t { - new_ptr_list_t* next; - new_ptr_list_t* prev; - size_t size; + new_ptr_list_t* next; ///< Pointer to the next memory block + new_ptr_list_t* prev; ///< Pointer to the previous memory block + size_t size; ///< Size of the memory block union { #if _DEBUG_NEW_FILENAME_LEN == 0 - const char* file; + const char* file; ///< Pointer to the file name of the caller #else - char file[_DEBUG_NEW_FILENAME_LEN]; + char file[_DEBUG_NEW_FILENAME_LEN]; ///< File name of the caller #endif - void* addr; + void* addr; ///< Address of the caller to \e new }; - unsigned line :31; - unsigned is_array :1; - unsigned magic; + unsigned line :31; ///< Line number of the caller; or \c 0 + unsigned is_array:1; ///< Non-zero iff new[] is used + unsigned magic; ///< Magic number for error detection }; /** - * Magic number for error detection. + * Definition of the constant magic number used for error detection. */ const unsigned MAGIC = 0x4442474E; /** * The extra memory allocated by operator new. */ -const int ALIGNED_LIST_ITEM_SIZE = align(sizeof(new_ptr_list_t)); +const int ALIGNED_LIST_ITEM_SIZE = ALIGN(sizeof(new_ptr_list_t)); /** * List of all new'd pointers. @@ -457,6 +476,10 @@ static void* alloc_mem(size_t size, const char* file, int line, bool is_array) { assert(line >= 0); +#if _DEBUG_NEW_TYPE == 1 + STATIC_ASSERT(_DEBUG_NEW_ALIGNMENT >= PLATFORM_MEM_ALIGNMENT, + Alignment_too_small); +#endif STATIC_ASSERT((_DEBUG_NEW_ALIGNMENT & (_DEBUG_NEW_ALIGNMENT - 1)) == 0, Alignment_must_be_power_of_two); STATIC_ASSERT(_DEBUG_NEW_TAILCHECK >= 0, Invalid_tail_check_length); @@ -469,8 +492,8 @@ #else fast_mutex_autolock lock(new_output_lock); fprintf(new_output_fp, - "Out of memory when allocating %u bytes\n", - size); + "Out of memory when allocating %lu bytes\n", + (unsigned long)size); fflush(new_output_fp); _DEBUG_NEW_ERROR_ACTION; #endif @@ -506,7 +529,7 @@ fprintf(new_output_fp, "new%s: allocated %p (size %lu, ", is_array ? "[]" : "", - pointer, size); + pointer, (unsigned long)size); if (line != 0) print_position(ptr->file, ptr->line); else @@ -520,7 +543,7 @@ /** * Frees memory and adjusts pointers. * - * @param pointer pointer to delete + * @param pointer pointer to the previously allocated memory * @param addr pointer to the caller * @param is_array flag indicating whether it is invoked by a * delete[] call @@ -556,7 +579,7 @@ "%s: pointer %p (size %lu)\n\tat ", msg, (char*)ptr + ALIGNED_LIST_ITEM_SIZE, - ptr->size); + (unsigned long)ptr->size); print_position(addr, 0); fprintf(new_output_fp, "\n\toriginally allocated at "); if (ptr->line != 0) @@ -589,7 +612,7 @@ "delete%s: freed %p (size %lu, %lu bytes still allocated)\n", is_array ? "[]" : "", (char*)ptr + ALIGNED_LIST_ITEM_SIZE, - ptr->size, total_mem_alloc); + (unsigned long)ptr->size, (unsigned long)total_mem_alloc); } free(ptr); return; @@ -626,7 +649,7 @@ fprintf(new_output_fp, "Leaked object at %p (size %lu, ", pointer, - ptr->size); + (unsigned long)ptr->size); if (ptr->line != 0) print_position(ptr->file, ptr->line); else @@ -670,15 +693,15 @@ fprintf(new_output_fp, "Heap data corrupt near %p (size %lu, ", pointer, - ptr->size); + (unsigned long)ptr->size); #if _DEBUG_NEW_TAILCHECK } else { fprintf(new_output_fp, - "Overwritten past end of object at %p (size %u, ", + "Overwritten past end of object at %p (size %lu, ", pointer, - ptr->size); + (unsigned long)ptr->size); } #endif if (ptr->line != 0) @@ -693,10 +716,30 @@ return corrupt_cnt; } +/** + * Processes the allocated memory and inserts file/line informatin. + * It will only be done when it can ensure the memory is allocated by + * one of our operator new variants. + * + * @param pointer pointer returned by a new-expression + */ void __debug_new_recorder::_M_process(void* pointer) { if (pointer == NULL) return; + + // In an expression `new NonPODType[size]', the pointer returned is + // not the pointer returned by operator new[], but offset by size_t + // to leave room for the size. It needs to be compensated here. + size_t offset = (char*)pointer - (char*)NULL; + if (offset % PLATFORM_MEM_ALIGNMENT != 0) { + offset -= sizeof(size_t); + if (offset % PLATFORM_MEM_ALIGNMENT != 0) { + return; + } + pointer = (char*)pointer - sizeof(size_t); + } + new_ptr_list_t* ptr = (new_ptr_list_t*)((char*)pointer - ALIGNED_LIST_ITEM_SIZE); if (ptr->magic != MAGIC || ptr->line != 0) @@ -707,6 +750,12 @@ _M_file, _M_line); return; } + if (new_verbose_flag) { + fast_mutex_autolock lock(new_output_lock); + fprintf(new_output_fp, + "info: pointer %p allocated from %s:%d\n", + pointer, _M_file, _M_line); + } #if _DEBUG_NEW_FILENAME_LEN == 0 ptr->file = _M_file; #else @@ -716,6 +765,16 @@ ptr->line = _M_line; } +/** + * Allocates memory with file/line information. + * + * @param size size of the required memory block + * @param file null-terminated string of the file name + * @param line line number + * @return pointer to the memory allocated; or \c NULL if memory is + * insufficient (#_DEBUG_NEW_STD_OPER_NEW is 0) + * @throw bad_alloc memory is insufficient (#_DEBUG_NEW_STD_OPER_NEW is 1) + */ void* operator new(size_t size, const char* file, int line) { void* ptr = alloc_mem(size, file, line, false); @@ -729,6 +788,16 @@ #endif } +/** + * Allocates array memory with file/line information. + * + * @param size size of the required memory block + * @param file null-terminated string of the file name + * @param line line number + * @return pointer to the memory allocated; or \c NULL if memory is + * insufficient (#_DEBUG_NEW_STD_OPER_NEW is 0) + * @throw bad_alloc memory is insufficient (#_DEBUG_NEW_STD_OPER_NEW is 1) + */ void* operator new[](size_t size, const char* file, int line) { void* ptr = alloc_mem(size, file, line, true); @@ -742,39 +811,87 @@ #endif } +/** + * Allocates memory without file/line information. + * + * @param size size of the required memory block + * @return pointer to the memory allocated; or \c NULL if memory is + * insufficient (#_DEBUG_NEW_STD_OPER_NEW is 0) + * @throw bad_alloc memory is insufficient (#_DEBUG_NEW_STD_OPER_NEW is 1) + */ void* operator new(size_t size) throw(std::bad_alloc) { return operator new(size, (char*)_DEBUG_NEW_CALLER_ADDRESS, 0); } +/** + * Allocates array memory without file/line information. + * + * @param size size of the required memory block + * @return pointer to the memory allocated; or \c NULL if memory is + * insufficient (#_DEBUG_NEW_STD_OPER_NEW is 0) + * @throw bad_alloc memory is insufficient (#_DEBUG_NEW_STD_OPER_NEW is 1) + */ void* operator new[](size_t size) throw(std::bad_alloc) { return operator new[](size, (char*)_DEBUG_NEW_CALLER_ADDRESS, 0); } -#if !defined(__BORLANDC__) || __BORLANDC__ > 0x551 +/** + * Allocates memory with no-throw guarantee. + * + * @param size size of the required memory block + * @return pointer to the memory allocated; or \c NULL if memory is + * insufficient + */ void* operator new(size_t size, const std::nothrow_t&) throw() { return alloc_mem(size, (char*)_DEBUG_NEW_CALLER_ADDRESS, 0, false); } +/** + * Allocates array memory with no-throw guarantee. + * + * @param size size of the required memory block + * @return pointer to the memory allocated; or \c NULL if memory is + * insufficient + */ void* operator new[](size_t size, const std::nothrow_t&) throw() { return alloc_mem(size, (char*)_DEBUG_NEW_CALLER_ADDRESS, 0, true); } -#endif +/** + * Deallocates memory. + * + * @param pointer pointer to the previously allocated memory + */ void operator delete(void* pointer) throw() { free_pointer(pointer, _DEBUG_NEW_CALLER_ADDRESS, false); } +/** + * Deallocates array memory. + * + * @param pointer pointer to the previously allocated memory + */ void operator delete[](void* pointer) throw() { free_pointer(pointer, _DEBUG_NEW_CALLER_ADDRESS, true); } -#if HAVE_PLACEMENT_DELETE +/** + * Placement deallocation function. For details, please check Section + * 5.3.4 of the C++ 1998 Standard. + * + * @param pointer pointer to the previously allocated memory + * @param file null-terminated string of the file name + * @param line line number + * + * @see http://www.csci.csusb.edu/dick/c++std/cd2/expr.html#expr.new + * @see http://wyw.dcweb.cn/leakage.htm + */ void operator delete(void* pointer, const char* file, int line) throw() { if (new_verbose_flag) @@ -789,6 +906,14 @@ operator delete(pointer); } +/** + * Placement deallocation function. For details, please check Section + * 5.3.4 of the C++ 1998 Standard. + * + * @param pointer pointer to the previously allocated memory + * @param file null-terminated string of the file name + * @param line line number + */ void operator delete[](void* pointer, const char* file, int line) throw() { if (new_verbose_flag) @@ -803,17 +928,31 @@ operator delete[](pointer); } +/** + * Placement deallocation function. For details, please check Section + * 5.3.4 of the C++ 1998 Standard. + * + * @param pointer pointer to the previously allocated memory + */ void operator delete(void* pointer, const std::nothrow_t&) throw() { operator delete(pointer, (char*)_DEBUG_NEW_CALLER_ADDRESS, 0); } +/** + * Placement deallocation function. For details, please check Section + * 5.3.4 of the C++ 1998 Standard. + * + * @param pointer pointer to the previously allocated memory + */ void operator delete[](void* pointer, const std::nothrow_t&) throw() { operator delete[](pointer, (char*)_DEBUG_NEW_CALLER_ADDRESS, 0); } -#endif // HAVE_PLACEMENT_DELETE +/** + * Count of source files that use debug_new. + */ int __debug_new_counter::_S_count = 0; /** @@ -845,5 +984,4 @@ } } - #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/nvwa/debug_new.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/nvwa/debug_new.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/nvwa/debug_new.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/nvwa/debug_new.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,8 @@ // -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- // vim:tabstop=4:shiftwidth=4:expandtab: -#ifdef _MSC_VER -#include -#else -#include -#endif -#ifdef CHECK_MEMORY_LEAKS + /* - * Copyright (C) 2004-2008 Wu Yongwei + * Copyright (C) 2004-2010 Wu Yongwei * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any @@ -36,7 +31,7 @@ * * Header file for checking leaks caused by unmatched new/delete. * - * @version 4.4, 2007/12/31 + * @version 4.7, 2010/01/08 * @author Wu Yongwei * */ @@ -48,28 +43,13 @@ #include /** - * @def HAVE_PLACEMENT_DELETE - * - * Macro to indicate whether placement delete operators are supported on - * a certain compiler. Some compilers, like Borland C++ Compiler 5.5.1 - * and Digital Mars Compiler 8.42, do not support them, and the user - * must define this macro to \c 0 to make the program compile. Also - * note that in that case memory leakage will occur if an exception is - * thrown in the initialization (constructor) of a dynamically created - * object. - */ -#ifndef HAVE_PLACEMENT_DELETE -#define HAVE_PLACEMENT_DELETE 1 -#endif - -/** * @def _DEBUG_NEW_REDEFINE_NEW * * Macro to indicate whether redefinition of \c new is wanted. If one - * wants to define one's own operator new, to call - * operator new directly, or to call placement \c new, it - * should be defined to \c 0 to alter the default behaviour. Unless, of - * course, one is willing to take the trouble to write something like: + * wants to define one's own operator new, or to call + * operator new directly, it should be defined to \c 0 to + * alter the default behaviour. Unless, of course, one is willing to + * take the trouble to write something like: * @code * # ifdef new * # define _NEW_REDEFINED @@ -90,15 +70,28 @@ #define _DEBUG_NEW_REDEFINE_NEW 1 #endif +/** + * @def _DEBUG_NEW_TYPE + * + * Macro to indicate which variant of \c #DEBUG_NEW is wanted. The + * default value \c 1 allows the use of placement new (like + * %new(std::nothrow)), but the verbose output (when + * \c #new_verbose_flag is \c true) looks worse than some older + * versions (no file/line information for allocations). Define it + * to \c 2 to revert to the old behaviour that records file and line + * information directly on the call to operator new. + */ +#ifndef _DEBUG_NEW_TYPE +#define _DEBUG_NEW_TYPE 1 +#endif + /* Prototypes */ int check_leaks(); int check_mem_corruption(); void* operator new(size_t size, const char* file, int line); void* operator new[](size_t size, const char* file, int line); -#if HAVE_PLACEMENT_DELETE void operator delete(void* pointer, const char* file, int line) throw(); void operator delete[](void* pointer, const char* file, int line) throw(); -#endif #if defined(_MSC_VER) && _MSC_VER < 1300 // MSVC 6 requires the following declarations; or the non-placement // new[]/delete[] will not compile. @@ -120,7 +113,11 @@ * otherwise \c new will be defined to it, and one must use \c new * instead. */ +#if _DEBUG_NEW_TYPE == 1 #define DEBUG_NEW __debug_new_recorder(__FILE__, __LINE__) ->* new +#else +#define DEBUG_NEW new(__FILE__, __LINE__) +#endif # if _DEBUG_NEW_REDEFINE_NEW # define new DEBUG_NEW @@ -182,7 +179,3 @@ static __debug_new_counter __debug_new_count; #endif // _DEBUG_NEW_H - - -#endif - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/nvwa/fast_mutex.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/nvwa/fast_mutex.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/nvwa/fast_mutex.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/nvwa/fast_mutex.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,8 @@ // -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- // vim:tabstop=4:shiftwidth=4:expandtab: -#ifdef _MSC_VER -#include -#else -#include -#endif -#ifdef CHECK_MEMORY_LEAKS + /* - * Copyright (C) 2004-2008 Wu Yongwei + * Copyright (C) 2004-2010 Wu Yongwei * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any @@ -36,7 +31,7 @@ * * A fast mutex implementation for POSIX and Win32. * - * @version 1.18, 2005/05/06 + * @version 1.20, 2010/05/16 * @author Wu Yongwei * */ @@ -181,9 +176,10 @@ # endif // _PTHREADS # ifdef _WIN32THREADS -# define NOMINMAX +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif /* WIN32_LEAN_AND_MEAN */ # include -# undef NOMINMAX /** * Macro alias to `volatile' semantics. Here it is truly volatile since * it is in a multi-threaded (Win32 threads) environment. @@ -302,7 +298,7 @@ { fast_mutex& _M_mtx; public: - explicit fast_mutex_autolock(fast_mutex& __mtx) : _M_mtx(__mtx) + explicit fast_mutex_autolock(fast_mutex& mtx) : _M_mtx(mtx) { _M_mtx.lock(); } @@ -316,7 +312,3 @@ }; #endif // _FAST_MUTEX_H - - -#endif - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/nvwa/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/nvwa/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/nvwa/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/nvwa/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/foreign/nvwa -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,34 +92,94 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libnvwa_a_AR = $(AR) $(ARFLAGS) libnvwa_a_LIBADD = am_libnvwa_a_OBJECTS = debug_new.$(OBJEXT) libnvwa_a_OBJECTS = $(am_libnvwa_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libnvwa_a_SOURCES) DIST_SOURCES = $(libnvwa_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -83,6 +188,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -109,9 +215,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -122,10 +232,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -258,10 +364,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libnvwa.a: $(libnvwa_a_OBJECTS) $(libnvwa_a_DEPENDENCIES) - -rm -f libnvwa.a - $(libnvwa_a_AR) libnvwa.a $(libnvwa_a_OBJECTS) $(libnvwa_a_LIBADD) - $(RANLIB) libnvwa.a + +libnvwa.a: $(libnvwa_a_OBJECTS) $(libnvwa_a_DEPENDENCIES) $(EXTRA_libnvwa_a_DEPENDENCIES) + $(AM_V_at)-rm -f libnvwa.a + $(AM_V_AR)$(libnvwa_a_AR) libnvwa.a $(libnvwa_a_OBJECTS) $(libnvwa_a_LIBADD) + $(AM_V_at)$(RANLIB) libnvwa.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -272,25 +379,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug_new.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -298,26 +405,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -329,15 +425,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -346,6 +438,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -394,10 +501,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -482,18 +594,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/nvwa/static_assert.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/nvwa/static_assert.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/nvwa/static_assert.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/nvwa/static_assert.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,8 @@ // -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- // vim:tabstop=4:shiftwidth=4:expandtab: -#ifdef _MSC_VER -#include -#else -#include -#endif -#ifdef CHECK_MEMORY_LEAKS + /* - * Copyright (C) 2004-2008 Wu Yongwei + * Copyright (C) 2004-2010 Wu Yongwei * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any @@ -53,6 +48,3 @@ } #endif // STATIC_ASSERT - - -#endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/polyfonts/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/polyfonts/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/polyfonts/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/polyfonts/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/foreign/polyfonts -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,26 +92,77 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libpolyfonts_a_AR = $(AR) $(ARFLAGS) libpolyfonts_a_LIBADD = am_libpolyfonts_a_OBJECTS = polyfonts.$(OBJEXT) \ pfPSansBold16.$(OBJEXT) libpolyfonts_a_OBJECTS = $(am_libpolyfonts_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libpolyfonts_a_SOURCES) DIST_SOURCES = $(libpolyfonts_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -75,6 +171,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -101,9 +198,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -114,10 +215,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -253,10 +350,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libpolyfonts.a: $(libpolyfonts_a_OBJECTS) $(libpolyfonts_a_DEPENDENCIES) - -rm -f libpolyfonts.a - $(libpolyfonts_a_AR) libpolyfonts.a $(libpolyfonts_a_OBJECTS) $(libpolyfonts_a_LIBADD) - $(RANLIB) libpolyfonts.a + +libpolyfonts.a: $(libpolyfonts_a_OBJECTS) $(libpolyfonts_a_DEPENDENCIES) $(EXTRA_libpolyfonts_a_DEPENDENCIES) + $(AM_V_at)-rm -f libpolyfonts.a + $(AM_V_AR)$(libpolyfonts_a_AR) libpolyfonts.a $(libpolyfonts_a_OBJECTS) $(libpolyfonts_a_LIBADD) + $(AM_V_at)$(RANLIB) libpolyfonts.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -268,25 +366,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polyfonts.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -294,26 +392,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -325,15 +412,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -342,6 +425,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -390,10 +488,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -478,18 +581,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/polyfonts/pfPSansBold16.c sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/polyfonts/pfPSansBold16.c --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/polyfonts/pfPSansBold16.c 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/polyfonts/pfPSansBold16.c 2015-04-17 00:20:29.000000000 +0000 @@ -30,7 +30,11 @@ #include #endif +#ifdef __APPLE__ +#include +#else #include +#endif /* ========================================================================= * compiler pragmas diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/polyfonts/polyfonts.c sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/polyfonts/polyfonts.c --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/polyfonts/polyfonts.c 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/polyfonts/polyfonts.c 2015-04-17 00:20:29.000000000 +0000 @@ -45,7 +45,11 @@ #include #endif +#ifdef __APPLE__ +#include +#else #include +#endif //#include "SDL.h" //#include "sgl.h" diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/rtree/LayeredRTree.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/rtree/LayeredRTree.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/rtree/LayeredRTree.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/rtree/LayeredRTree.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,7 +2,7 @@ /// @file LayeredRTree.h /// @author Jakob Erdmann /// @date 16.10.2012 -/// @version $Id: LayeredRTree.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: LayeredRTree.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A wrapper around RT-trees for for efficient storing of SUMO's GL-objects and // accessing them ordered by their layer @@ -12,8 +12,8 @@ // The search order returns layer 2 first because it must be drawn before layer // 1 for alpha blending to work /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -76,7 +76,7 @@ * @param a_max Max of bounding rect * @param a_dataId Positive Id of data. Maybe zero, but negative numbers not allowed. */ - void Insert(const float a_min[2], const float a_max[2], GUIGlObject* a_dataId) { + void Insert(const float a_min[2], const float a_max[2], GUIGlObject* const & a_dataId) { myLayers[selectLayer(a_dataId)]->Insert(a_min, a_max, a_dataId); } @@ -86,7 +86,7 @@ * @param a_max Max of bounding rect * @param a_dataId Positive Id of data. Maybe zero, but negative numbers not allowed. */ - void Remove(const float a_min[2], const float a_max[2], GUIGlObject* a_dataId) { + void Remove(const float a_min[2], const float a_max[2], GUIGlObject* const & a_dataId) { myLayers[selectLayer(a_dataId)]->Remove(a_min, a_max, a_dataId); } @@ -98,9 +98,9 @@ * @param a_context User context to pass as parameter to a_resultCallback * @return Returns the number of entries found */ - int Search(const float a_min[2], const float a_max[2], const GUIVisualizationSettings& c) { + int Search(const float a_min[2], const float a_max[2], const GUIVisualizationSettings& c) const { int result = 0; - for (std::vector::iterator it = myLayers.begin(); it != myLayers.end(); ++it) { + for (std::vector::const_iterator it = myLayers.begin(); it != myLayers.end(); ++it) { result += (*it)->Search(a_min, a_max, c); } return result; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/rtree/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/rtree/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/rtree/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/rtree/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,7 +79,7 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/foreign/rtree -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -44,14 +88,33 @@ CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -78,9 +141,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -91,10 +158,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -228,11 +291,11 @@ clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: + +ctags CTAGS: -ctags: CTAGS -CTAGS: +cscope cscopelist: distdir: $(DISTFILES) @@ -279,10 +342,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -363,15 +431,16 @@ .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/rtree/RTree.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/rtree/RTree.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/rtree/RTree.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/rtree/RTree.h 2015-04-17 00:20:29.000000000 +0000 @@ -104,7 +104,7 @@ /// \param a_resultCallback Callback function to return result. Callback should return 'true' to continue searching /// \param a_context User context to pass as parameter to a_resultCallback /// \return Returns the number of entries found - virtual int Search(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const CONTEXT &c); + virtual int Search(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const CONTEXT &c) const; /// DK 15.10.2008 - end @@ -287,8 +287,8 @@ /// Node for each branch level struct Node { - bool IsInternalNode() { return (m_level > 0); } // Not a leaf, but a internal node - bool IsLeaf() { return (m_level == 0); } // A leaf, contains data + bool IsInternalNode() const { return (m_level > 0); } // Not a leaf, but a internal node + bool IsLeaf() const { return (m_level == 0); } // A leaf, contains data int m_count; ///< Count int m_level; ///< Leaf is zero, others positive @@ -344,9 +344,9 @@ bool RemoveRectRec(Rect* a_rect, const DATATYPE& a_id, Node* a_node, ListNode** a_listNode); ListNode* AllocListNode(); void FreeListNode(ListNode* a_listNode); - bool Overlap(Rect* a_rectA, Rect* a_rectB); + bool Overlap(Rect* a_rectA, Rect* a_rectB) const; void ReInsert(Node* a_node, ListNode** a_listNode); - bool Search(Node* a_node, Rect* a_rect, int& a_foundCount, const CONTEXT &c); + bool Search(Node* a_node, Rect* a_rect, int& a_foundCount, const CONTEXT &c) const; void RemoveAllRec(Node* a_node); void Reset(); void CountRec(Node* a_node, int& a_count); @@ -524,7 +524,7 @@ RTREE_TEMPLATE -int RTREE_QUAL::Search(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const CONTEXT &c) +int RTREE_QUAL::Search(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const CONTEXT &c) const { #ifdef _DEBUG for(int index=0; indexm_level >= 0); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/rtree/SUMORTree.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/rtree/SUMORTree.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/rtree/SUMORTree.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/rtree/SUMORTree.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file SUMORTree.h /// @author Daniel Krajzewicz /// @date 27.10.2008 -/// @version $Id: SUMORTree.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMORTree.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A RT-tree for efficient storing of SUMO's GL-objects /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -38,16 +38,29 @@ #include "RTree.h" +#define GUI_RTREE_QUAL RTree + // specialized implementation for speedup and avoiding warnings + template<> -inline float RTree::RectSphericalVolume(Rect* a_rect) -{ +inline float GUI_RTREE_QUAL::RectSphericalVolume(Rect* a_rect) { ASSERT(a_rect); const float extent0 = a_rect->m_max[0] - a_rect->m_min[0]; const float extent1 = a_rect->m_max[1] - a_rect->m_min[1]; return .78539816f * (extent0 * extent0 + extent1 * extent1); } +template<> +inline GUI_RTREE_QUAL::Rect GUI_RTREE_QUAL::CombineRect(Rect* a_rectA, Rect* a_rectB) { + ASSERT(a_rectA && a_rectB); + Rect newRect; + newRect.m_min[0] = rtree_min(a_rectA->m_min[0], a_rectB->m_min[0]); + newRect.m_max[0] = rtree_max(a_rectA->m_max[0], a_rectB->m_max[0]); + newRect.m_min[1] = rtree_min(a_rectA->m_min[1], a_rectB->m_min[1]); + newRect.m_max[1] = rtree_max(a_rectA->m_max[1], a_rectB->m_max[1]); + return newRect; +} + // =========================================================================== // class definitions @@ -58,12 +71,11 @@ * This class specialises the used RT-tree implementation from "rttree.h" and * extends it by a mutex for avoiding parallel change and traversal of the tree. */ -class SUMORTree : private RTree, public Boundary +class SUMORTree : private GUI_RTREE_QUAL, public Boundary { public: /// @brief Constructor - SUMORTree() - : RTree(&GUIGlObject::drawGL){ + SUMORTree() : GUI_RTREE_QUAL(&GUIGlObject::drawGL) { } @@ -78,9 +90,9 @@ * @param a_dataId Positive Id of data. Maybe zero, but negative numbers not allowed. * @see RTree::Insert */ - virtual void Insert(const float a_min[2], const float a_max[2], GUIGlObject* a_dataId) { + virtual void Insert(const float a_min[2], const float a_max[2], GUIGlObject* const & a_dataId) { AbstractMutex::ScopedLocker locker(myLock); - RTree::Insert(a_min, a_max, a_dataId); + GUI_RTREE_QUAL::Insert(a_min, a_max, a_dataId); } @@ -90,9 +102,9 @@ * @param a_dataId Positive Id of data. Maybe zero, but negative numbers not allowed. * @see RTree::Remove */ - virtual void Remove(const float a_min[2], const float a_max[2], GUIGlObject* a_dataId) { + virtual void Remove(const float a_min[2], const float a_max[2], GUIGlObject* const & a_dataId) { AbstractMutex::ScopedLocker locker(myLock); - RTree::Remove(a_min, a_max, a_dataId); + GUI_RTREE_QUAL::Remove(a_min, a_max, a_dataId); } @@ -105,9 +117,9 @@ * @return Returns the number of entries found * @see RTree::Search */ - virtual int Search(const float a_min[2], const float a_max[2], const GUIVisualizationSettings& c) { + virtual int Search(const float a_min[2], const float a_max[2], const GUIVisualizationSettings& c) const { AbstractMutex::ScopedLocker locker(myLock); - return RTree::Search(a_min, a_max, c); + return GUI_RTREE_QUAL::Search(a_min, a_max, c); } @@ -115,6 +127,7 @@ * @param[in] o The object to add */ void addAdditionalGLObject(GUIGlObject *o) { + AbstractMutex::ScopedLocker locker(myLock); Boundary b = o->getCenteringBoundary(); const float cmin[2] = {(float) b.xmin(), (float) b.ymin()}; const float cmax[2] = {(float) b.xmax(), (float) b.ymax()}; @@ -126,6 +139,7 @@ * @param[in] o The object to remove */ void removeAdditionalGLObject(GUIGlObject *o) { + AbstractMutex::ScopedLocker locker(myLock); Boundary b = o->getCenteringBoundary(); const float cmin[2] = {(float) b.xmin(), (float) b.ymin()}; const float cmax[2] = {(float) b.xmax(), (float) b.ymax()}; @@ -135,7 +149,7 @@ protected: /// @brief A mutex avoiding parallel change and traversal of the tree - MFXMutex myLock; + mutable MFXMutex myLock; }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/tcpip/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/tcpip/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/tcpip/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/tcpip/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/foreign/tcpip -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,34 +92,94 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libtcpip_a_AR = $(AR) $(ARFLAGS) libtcpip_a_LIBADD = am_libtcpip_a_OBJECTS = socket.$(OBJEXT) storage.$(OBJEXT) libtcpip_a_OBJECTS = $(am_libtcpip_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libtcpip_a_SOURCES) DIST_SOURCES = $(libtcpip_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -83,6 +188,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -109,9 +215,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -122,10 +232,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -258,10 +364,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libtcpip.a: $(libtcpip_a_OBJECTS) $(libtcpip_a_DEPENDENCIES) - -rm -f libtcpip.a - $(libtcpip_a_AR) libtcpip.a $(libtcpip_a_OBJECTS) $(libtcpip_a_LIBADD) - $(RANLIB) libtcpip.a + +libtcpip.a: $(libtcpip_a_OBJECTS) $(libtcpip_a_DEPENDENCIES) $(EXTRA_libtcpip_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtcpip.a + $(AM_V_AR)$(libtcpip_a_AR) libtcpip.a $(libtcpip_a_OBJECTS) $(libtcpip_a_LIBADD) + $(AM_V_at)$(RANLIB) libtcpip.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -273,25 +380,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/storage.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -299,26 +406,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -330,15 +426,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -347,6 +439,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -395,10 +502,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -483,18 +595,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/tcpip/socket.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/tcpip/socket.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/tcpip/socket.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/tcpip/socket.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -615,7 +615,7 @@ /*----------------------------------------------------------------------- * Source $Source: $ * Version $Revision: 645 $ -* Date $Date: 2012-04-27 14:03:33 +0200 (Fr, 27. Apr 2012) $ +* Date $Date: 2012-04-27 14:03:33 +0200 (Fri, 27 Apr 2012) $ *----------------------------------------------------------------------- * $Log: $ *-----------------------------------------------------------------------*/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/tcpip/socket.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/tcpip/socket.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/tcpip/socket.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/tcpip/socket.h 2015-04-17 00:20:29.000000000 +0000 @@ -153,7 +153,7 @@ /*----------------------------------------------------------------------- * Source $Source: $ * Version $Revision: 612 $ -* Date $Date: 2011-06-14 15:16:52 +0200 (Di, 14. Jun 2011) $ +* Date $Date: 2011-06-14 15:16:52 +0200 (Tue, 14 Jun 2011) $ *----------------------------------------------------------------------- * $Log:$ *-----------------------------------------------------------------------*/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/tcpip/storage.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/tcpip/storage.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/tcpip/storage.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/tcpip/storage.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -438,7 +438,7 @@ /*----------------------------------------------------------------------- * Source $Source: $ * Version $Revision: 620 $ - * Date $Date: 2011-07-08 17:39:10 +0200 (Fr, 08. Jul 2011) $ + * Date $Date: 2011-07-08 17:39:10 +0200 (Fri, 08 Jul 2011) $ *----------------------------------------------------------------------- * $Log: $ *-----------------------------------------------------------------------*/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/tcpip/storage.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/tcpip/storage.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/foreign/tcpip/storage.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/foreign/tcpip/storage.h 2015-04-17 00:20:29.000000000 +0000 @@ -127,7 +127,7 @@ /*----------------------------------------------------------------------- * Source $Source: $ * Version $Revision: 620 $ - * Date $Date: 2011-07-08 17:39:10 +0200 (Fr, 08. Jul 2011) $ + * Date $Date: 2011-07-08 17:39:10 +0200 (Fri, 08 Jul 2011) $ *----------------------------------------------------------------------- * $Log: $ *-----------------------------------------------------------------------*/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AboutSUMO.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AboutSUMO.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AboutSUMO.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AboutSUMO.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 08.03.2004 -/// @version $Id: GUIDialog_AboutSUMO.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDialog_AboutSUMO.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The application's "About" - dialog /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,6 +35,7 @@ #include "GUIDialog_AboutSUMO.h" #include +#include #include #ifdef CHECK_MEMORY_LEAKS @@ -108,7 +109,7 @@ // "SUMO " FXVerticalFrame* f4 = new FXVerticalFrame(f2, FRAME_NONE, 0, 0, 0, 0, 20, 0, 0, 0); myHeadlineFont = new FXFont(getApp(), "Arial", 18, FXFont::Bold); - FXLabel* l = new FXLabel(f4, (FXString)"SUMO " + VERSION_STRING, 0, LAYOUT_CENTER_Y | LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0); + FXLabel* l = new FXLabel(f4, ("SUMO " + getBuildName(VERSION_STRING)).c_str(), 0, LAYOUT_CENTER_Y | LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0); l->setFont(myHeadlineFont); new FXLabel(f4, "Simulation of Urban MObility", 0, LAYOUT_CENTER_Y | LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0); // @@ -117,10 +118,10 @@ // copyright notice new FXLabel(f3, "A microscopic, multi-modal, open source", 0, LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0); new FXLabel(f3, "road traffic simulation.", 0, LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0); - new FXLabel(f3, "Copyright (C) 2001-2013 DLR / Institute of Transportation Systems", 0, LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0); + new FXLabel(f3, "Copyright (C) 2001-2015 DLR / Institute of Transportation Systems", 0, LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0); - FXLinkLabel* link = new FXLinkLabel(f3, "http://sumo-sim.org", 0, LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 5, 5, 5, 5); - link->setTipText("http://sumo-sim.org"); + FXLinkLabel* link = new FXLinkLabel(f3, "http://sumo.dlr.de", 0, LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 5, 5, 5, 5); + link->setTipText("http://sumo.dlr.de"); // ok-button new FXButton(f1, "OK\t\t", 0, this, ID_ACCEPT, LAYOUT_FIX_WIDTH | LAYOUT_CENTER_X | JUSTIFY_CENTER_X | FRAME_THICK | FRAME_RAISED, 0, 0, 50, 30); setIcon(GUIIconSubSys::getIcon(ICON_APP)); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AboutSUMO.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AboutSUMO.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AboutSUMO.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AboutSUMO.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Fri, 29.04.2005 -/// @version $Id: GUIDialog_AboutSUMO.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDialog_AboutSUMO.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The application's "About" - dialog /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AppSettings.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AppSettings.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AppSettings.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AppSettings.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 08.03.2004 -/// @version $Id: GUIDialog_AppSettings.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDialog_AppSettings.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The application-settings dialog /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AppSettings.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AppSettings.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AppSettings.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/dialogs/GUIDialog_AppSettings.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 08.03.2004 -/// @version $Id: GUIDialog_AppSettings.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDialog_AppSettings.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The application-settings dialog /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/dialogs/GUIDialog_Breakpoints.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/dialogs/GUIDialog_Breakpoints.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/dialogs/GUIDialog_Breakpoints.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/dialogs/GUIDialog_Breakpoints.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Thu, 17 Jun 2004 -/// @version $Id: GUIDialog_Breakpoints.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDialog_Breakpoints.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Editor for simulation breakpoints /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -83,9 +83,9 @@ // =========================================================================== // method definitions // =========================================================================== -GUIDialog_Breakpoints::GUIDialog_Breakpoints(GUIMainWindow* parent) +GUIDialog_Breakpoints::GUIDialog_Breakpoints(GUIMainWindow* parent, std::vector& breakpoints, MFXMutex& breakpointLock) : FXMainWindow(parent->getApp(), "Breakpoints Editor", NULL, NULL, DECOR_ALL, 20, 20, 300, 300), - myParent(parent) { + myParent(parent), myBreakpoints(&breakpoints), myBreakpointLock(&breakpointLock) { FXHorizontalFrame* hbox = new FXHorizontalFrame(this, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0); // build the table @@ -102,7 +102,9 @@ } myTable->setNumberCellParams(0, begin / 1000, end / 1000, 1, 10, 100, "%.2f"); myTable->getRowHeader()->setWidth(0); + myBreakpointLock->lock(); rebuildList(); + myBreakpointLock->unlock(); // build the layout FXVerticalFrame* layout = new FXVerticalFrame(hbox, LAYOUT_TOP, 0, 0, 0, 0, 4, 4, 4, 4); // "Load" @@ -129,9 +131,9 @@ void GUIDialog_Breakpoints::rebuildList() { myTable->clearItems(); - sort(GUIGlobals::gBreakpoints.begin(), GUIGlobals::gBreakpoints.end()); + sort(myBreakpoints->begin(), myBreakpoints->end()); // set table attributes - myTable->setTableSize((FXint) GUIGlobals::gBreakpoints.size() + 1, 1); + myTable->setTableSize((FXint) myBreakpoints->size() + 1, 1); myTable->setColumnText(0, "Time"); FXHeader* header = myTable->getColumnHeader(); header->setHeight(getApp()->getNormalFont()->getFontHeight() + getApp()->getNormalFont()->getFontAscent()); @@ -142,7 +144,7 @@ // insert into table FXint row = 0; std::vector::iterator j; - for (j = GUIGlobals::gBreakpoints.begin(); j != GUIGlobals::gBreakpoints.end(); ++j) { + for (j = myBreakpoints->begin(); j != myBreakpoints->end(); ++j) { myTable->setItemText(row, 0, time2string(*j).c_str()); row++; } @@ -165,8 +167,11 @@ if (opendialog.execute()) { gCurrentFolder = opendialog.getDirectory(); std::string file = opendialog.getFilename().text(); - GUIGlobals::gBreakpoints = GUISettingsHandler::loadBreakpoints(file); + std::vector newBreakpoints = GUISettingsHandler::loadBreakpoints(file); + myBreakpointLock->lock(); + myBreakpoints->assign(newBreakpoints.begin(), newBreakpoints.end()); rebuildList(); + myBreakpointLock->unlock(); } return 1; } @@ -192,21 +197,25 @@ std::string GUIDialog_Breakpoints::encode2TXT() { + myBreakpointLock->lock(); std::ostringstream strm; - std::sort(GUIGlobals::gBreakpoints.begin(), GUIGlobals::gBreakpoints.end()); - for (std::vector::iterator j = GUIGlobals::gBreakpoints.begin(); j != GUIGlobals::gBreakpoints.end(); ++j) { + std::sort(myBreakpoints->begin(), myBreakpoints->end()); + for (std::vector::iterator j = myBreakpoints->begin(); j != myBreakpoints->end(); ++j) { if ((*j) != INVALID_VALUE) { strm << time2string(*j) << std::endl; } } + myBreakpointLock->unlock(); return strm.str(); } long GUIDialog_Breakpoints::onCmdClear(FXObject*, FXSelector, void*) { - GUIGlobals::gBreakpoints.clear(); + myBreakpointLock->lock(); + myBreakpoints->clear(); rebuildList(); + myBreakpointLock->unlock(); return 1; } @@ -221,6 +230,7 @@ long GUIDialog_Breakpoints::onCmdEditTable(FXObject*, FXSelector, void* data) { + myBreakpointLock->lock(); MFXEditedTableItem* i = (MFXEditedTableItem*) data; std::string value = i->item->getText().text(); // check whether the inserted value is empty @@ -229,14 +239,14 @@ value = INVALID_VALUE_STR; } int row = i->row; - if (row == (int) GUIGlobals::gBreakpoints.size()) { - GUIGlobals::gBreakpoints.push_back(INVALID_VALUE); + if (row == (int) myBreakpoints->size()) { + myBreakpoints->push_back(INVALID_VALUE); } switch (i->col) { case 0: try { - GUIGlobals::gBreakpoints[row] = string2time(value); + (*myBreakpoints)[row] = string2time(value); } catch (NumberFormatException&) { std::string msg = "The value must be an int, is:" + value; FXMessageBox::error(this, MBOX_OK, "Number format error", "%s", msg.c_str()); @@ -248,6 +258,7 @@ if (!i->updateOnly) { rebuildList(); } + myBreakpointLock->unlock(); return 1; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/dialogs/GUIDialog_Breakpoints.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/dialogs/GUIDialog_Breakpoints.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/dialogs/GUIDialog_Breakpoints.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/dialogs/GUIDialog_Breakpoints.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @date Thu, 17 Jun 2004 -/// @version $Id: GUIDialog_Breakpoints.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDialog_Breakpoints.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Editor for simulation breakpoints /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -61,7 +61,7 @@ /** @brief Constructor * @param[in] parent The parent window */ - GUIDialog_Breakpoints(GUIMainWindow* parent); + GUIDialog_Breakpoints(GUIMainWindow* parent, std::vector& breakpoints, MFXMutex& breakpointLock); /// @brief Destructor @@ -106,6 +106,12 @@ /// @brief The parent window GUIMainWindow* myParent; + /// @brief List of breakpoints + std::vector* myBreakpoints; + + /// @brief Lock for modifying the list of breakpoints + MFXMutex* myBreakpointLock; + protected: /// FOX needs this diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/dialogs/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/dialogs/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/dialogs/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/dialogs/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/gui/dialogs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,36 +92,96 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libguidialogs_a_AR = $(AR) $(ARFLAGS) libguidialogs_a_LIBADD = am_libguidialogs_a_OBJECTS = GUIDialog_AboutSUMO.$(OBJEXT) \ GUIDialog_AppSettings.$(OBJEXT) \ GUIDialog_Breakpoints.$(OBJEXT) libguidialogs_a_OBJECTS = $(am_libguidialogs_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libguidialogs_a_SOURCES) DIST_SOURCES = $(libguidialogs_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -85,6 +190,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -111,9 +217,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -124,10 +234,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -263,10 +369,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libguidialogs.a: $(libguidialogs_a_OBJECTS) $(libguidialogs_a_DEPENDENCIES) - -rm -f libguidialogs.a - $(libguidialogs_a_AR) libguidialogs.a $(libguidialogs_a_OBJECTS) $(libguidialogs_a_LIBADD) - $(RANLIB) libguidialogs.a + +libguidialogs.a: $(libguidialogs_a_OBJECTS) $(libguidialogs_a_DEPENDENCIES) $(EXTRA_libguidialogs_a_DEPENDENCIES) + $(AM_V_at)-rm -f libguidialogs.a + $(AM_V_AR)$(libguidialogs_a_AR) libguidialogs.a $(libguidialogs_a_OBJECTS) $(libguidialogs_a_LIBADD) + $(AM_V_at)$(RANLIB) libguidialogs.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -279,25 +386,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIDialog_Breakpoints.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -305,26 +412,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -336,15 +432,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -353,6 +445,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -401,10 +508,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -489,18 +601,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIApplicationWindow.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIApplicationWindow.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIApplicationWindow.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIApplicationWindow.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Andreas Gaubatz /// @date Sept 2002 -/// @version $Id: GUIApplicationWindow.cpp 14500 2013-08-27 08:07:09Z dkrajzew $ +/// @version $Id: GUIApplicationWindow.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The main window of the SUMO-gui. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -40,6 +40,11 @@ #include #include +#include +#include +#include +#include +#include #include "GUISUMOViewParent.h" #include "GUILoadThread.h" @@ -49,11 +54,13 @@ #include "GUIEvent_SimulationEnded.h" #include +#include #include #include #include #include +#include #include #include #include @@ -74,11 +81,6 @@ #include "dialogs/GUIDialog_AppSettings.h" #include "dialogs/GUIDialog_Breakpoints.h" -#ifndef NO_TRACI -#include -#include "TraCIServerAPI_GUI.h" -#endif - #ifdef CHECK_MEMORY_LEAKS #include #endif @@ -94,6 +96,7 @@ FXMAPFUNC(SEL_COMMAND, MID_OPEN_CONFIG, GUIApplicationWindow::onCmdOpenConfiguration), FXMAPFUNC(SEL_COMMAND, MID_OPEN_NETWORK, GUIApplicationWindow::onCmdOpenNetwork), + FXMAPFUNC(SEL_COMMAND, MID_OPEN_SHAPES, GUIApplicationWindow::onCmdOpenShapes), FXMAPFUNC(SEL_COMMAND, MID_RECENTFILE, GUIApplicationWindow::onCmdOpenRecent), FXMAPFUNC(SEL_COMMAND, MID_RELOAD, GUIApplicationWindow::onCmdReload), FXMAPFUNC(SEL_COMMAND, MID_CLOSE, GUIApplicationWindow::onCmdClose), @@ -102,6 +105,7 @@ FXMAPFUNC(SEL_COMMAND, MID_APPSETTINGS, GUIApplicationWindow::onCmdAppSettings), FXMAPFUNC(SEL_COMMAND, MID_GAMING, GUIApplicationWindow::onCmdGaming), + FXMAPFUNC(SEL_COMMAND, MID_FULLSCREEN, GUIApplicationWindow::onCmdFullScreen), FXMAPFUNC(SEL_COMMAND, MID_LISTINTERNAL, GUIApplicationWindow::onCmdListInternal), FXMAPFUNC(SEL_COMMAND, MID_ABOUT, GUIApplicationWindow::onCmdAbout), FXMAPFUNC(SEL_COMMAND, MID_NEW_MICROVIEW, GUIApplicationWindow::onCmdNewView), @@ -117,6 +121,8 @@ FXMAPFUNC(SEL_UPDATE, MID_OPEN_CONFIG, GUIApplicationWindow::onUpdOpen), FXMAPFUNC(SEL_UPDATE, MID_OPEN_NETWORK, GUIApplicationWindow::onUpdOpen), + FXMAPFUNC(SEL_UPDATE, MID_OPEN_NETWORK, GUIApplicationWindow::onUpdOpen), + FXMAPFUNC(SEL_UPDATE, MID_OPEN_SHAPES, GUIApplicationWindow::onUpdReload), FXMAPFUNC(SEL_UPDATE, MID_RELOAD, GUIApplicationWindow::onUpdReload), FXMAPFUNC(SEL_UPDATE, MID_RECENTFILE, GUIApplicationWindow::onUpdOpenRecent), FXMAPFUNC(SEL_UPDATE, MID_NEW_MICROVIEW, GUIApplicationWindow::onUpdAddView), @@ -126,8 +132,26 @@ FXMAPFUNC(SEL_UPDATE, MID_START, GUIApplicationWindow::onUpdStart), FXMAPFUNC(SEL_UPDATE, MID_STOP, GUIApplicationWindow::onUpdStop), FXMAPFUNC(SEL_UPDATE, MID_STEP, GUIApplicationWindow::onUpdStep), - FXMAPFUNC(SEL_UPDATE, MID_EDITCHOSEN, GUIApplicationWindow::onUpdEditChosen), - FXMAPFUNC(SEL_UPDATE, MID_EDIT_BREAKPOINTS, GUIApplicationWindow::onUpdEditBreakpoints), + FXMAPFUNC(SEL_UPDATE, MID_EDITCHOSEN, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_EDIT_BREAKPOINTS, GUIApplicationWindow::onUpdNeedsSimulation), + + // forward requests to the active view + FXMAPFUNC(SEL_COMMAND, MID_LOCATEJUNCTION, GUIApplicationWindow::onCmdLocate), + FXMAPFUNC(SEL_COMMAND, MID_LOCATEEDGE, GUIApplicationWindow::onCmdLocate), + FXMAPFUNC(SEL_COMMAND, MID_LOCATEVEHICLE, GUIApplicationWindow::onCmdLocate), + FXMAPFUNC(SEL_COMMAND, MID_LOCATEPERSON, GUIApplicationWindow::onCmdLocate), + FXMAPFUNC(SEL_COMMAND, MID_LOCATETLS, GUIApplicationWindow::onCmdLocate), + FXMAPFUNC(SEL_COMMAND, MID_LOCATEADD, GUIApplicationWindow::onCmdLocate), + FXMAPFUNC(SEL_COMMAND, MID_LOCATEPOI, GUIApplicationWindow::onCmdLocate), + FXMAPFUNC(SEL_COMMAND, MID_LOCATEPOLY, GUIApplicationWindow::onCmdLocate), + FXMAPFUNC(SEL_UPDATE, MID_LOCATEJUNCTION, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_LOCATEEDGE, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_LOCATEVEHICLE, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_LOCATEPERSON, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_LOCATETLS, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_LOCATEADD, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_LOCATEPOI, GUIApplicationWindow::onUpdNeedsSimulation), + FXMAPFUNC(SEL_UPDATE, MID_LOCATEPOLY, GUIApplicationWindow::onUpdNeedsSimulation), FXMAPFUNC(SEL_CLIPBOARD_REQUEST, 0, GUIApplicationWindow::onClipboardRequest), @@ -141,6 +165,11 @@ FXIMPLEMENT(GUIApplicationWindow, FXMainWindow, GUIApplicationWindowMap, ARRAYNUMBER(GUIApplicationWindowMap)) // =========================================================================== +// static members +// =========================================================================== +MTRand GUIApplicationWindow::myGamingRNG; + +// =========================================================================== // member method definitions // =========================================================================== GUIApplicationWindow::GUIApplicationWindow(FXApp* a, @@ -151,7 +180,13 @@ myAlternateSimDelay(0), myRecentNets(a, "nets"), myConfigPattern(configPattern), hadDependentBuild(false), - myShowTimeAsHMS(false) { + myShowTimeAsHMS(false), + myAmFullScreen(false), + myHaveNotifiedAboutSimEnd(false), + // game specific + myJamSoundTime(60), + myWaitingTime(0), + myTimeLoss(0) { GUIIconSubSys::init(a); } @@ -214,12 +249,9 @@ fillMenuBar(); if (game) { onCmdGaming(0, 0, 0); - myMenuBar->hide(); - myToolBar1->hide(); - myToolBar2->hide(); - myToolBar4->hide(); - myToolBar5->hide(); - myMessageWindow->hide(); + } else { + myToolBar6->hide(); + myToolBar7->hide(); } // build additional threads myLoadThread = new GUILoadThread(getApp(), this, myEvents, myLoadThreadEvent); @@ -228,7 +260,7 @@ // set the status bar myStatusbar->getStatusLine()->setText("Ready."); // set the caption - setTitle(MFXUtils::getTitleText(("SUMO " + std::string(VERSION_STRING)).c_str())); + setTitle(MFXUtils::getTitleText(("SUMO " + getBuildName(VERSION_STRING)).c_str())); // start the simulation-thread (it will loop until the application ends deciding by itself whether to perform a step or not) myRunThread->start(); @@ -249,9 +281,17 @@ myMenuBarDrag->create(); myToolBarDrag1->create(); myToolBarDrag2->create(); + myToolBarDrag3->create(); + myToolBarDrag4->create(); + myToolBarDrag5->create(); + myToolBarDrag6->create(); + myToolBarDrag7->create(); myFileMenu->create(); + mySelectByPermissions->create(); myEditMenu->create(); mySettingsMenu->create(); + myLocatorMenu->create(); + myControlMenu->create(); myWindowsMenu->create(); myHelpMenu->create(); @@ -281,7 +321,10 @@ delete myRunThread; delete myFileMenu; delete myEditMenu; + delete mySelectByPermissions; delete mySettingsMenu; + delete myLocatorMenu; + delete myControlMenu; delete myWindowsMenu; delete myHelpMenu; @@ -289,7 +332,7 @@ while (!myEvents.empty()) { // get the next event - GUIEvent* e = static_cast(myEvents.top()); + GUIEvent* e = myEvents.top(); myEvents.pop(); delete e; } @@ -316,6 +359,9 @@ "Open &Network...\tCtl-N\tOpen a network.", GUIIconSubSys::getIcon(ICON_OPEN_NET), this, MID_OPEN_NETWORK); new FXMenuCommand(myFileMenu, + "Open Shapes \tCtl-P\tLoad POIs and Polygons for visualization.", + GUIIconSubSys::getIcon(ICON_OPEN_SHAPES), this, MID_OPEN_SHAPES); + new FXMenuCommand(myFileMenu, "&Reload\tCtl-R\tReloads the simulation / the network.", GUIIconSubSys::getIcon(ICON_RELOAD), this, MID_RELOAD); new FXMenuSeparator(myFileMenu); @@ -361,14 +407,24 @@ 0, this, MID_QUIT, 0); // build edit menu + mySelectByPermissions = new FXMenuPane(this); + std::vector vehicleClasses = SumoVehicleClassStrings.getStrings(); + for (std::vector::iterator it = vehicleClasses.begin(); it != vehicleClasses.end(); ++it) { + new FXMenuCommand(mySelectByPermissions, + (*it).c_str(), NULL, this, MID_EDITCHOSEN); + } + myEditMenu = new FXMenuPane(this); new FXMenuTitle(myMenuBar, "&Edit", NULL, myEditMenu); new FXMenuCommand(myEditMenu, - "Edit Chosen...\t\tOpens a Dialog for editing the List of chosen Items.", + "Edit Selected...\tCtl-E\tOpens a Dialog for editing the List of Selected Items.", GUIIconSubSys::getIcon(ICON_FLAG), this, MID_EDITCHOSEN); + new FXMenuCascade(myEditMenu, + "Select lanes which allow...\t\tOpens a menu for selecting a vehicle class by which to selected lanes.", + GUIIconSubSys::getIcon(ICON_FLAG), mySelectByPermissions); new FXMenuSeparator(myEditMenu); new FXMenuCommand(myEditMenu, - "Edit Breakpoints...\t\tOpens a Dialog for editing breakpoints.", + "Edit Breakpoints...\tCtl-B\tOpens a Dialog for editing breakpoints.", 0, this, MID_EDIT_BREAKPOINTS); // build settings menu @@ -378,17 +434,62 @@ "Application Settings...\t\tOpen a Dialog for Application Settings editing.", NULL, this, MID_APPSETTINGS); new FXMenuCheck(mySettingsMenu, - "Gaming Mode\t\tToggle gaming mode on/off.", + "Gaming Mode\tCtl-G\tToggle gaming mode on/off.", this, MID_GAMING); new FXMenuCheck(mySettingsMenu, - "Locate Internal Structures\t\tList internal junctions and streets in the object locator.", + "Full Screen Mode\tCtl-F\tToggle full screen mode on/off.", + this, MID_FULLSCREEN); + // build Locate menu + myLocatorMenu = new FXMenuPane(this); + new FXMenuTitle(myMenuBar, "&Locate", NULL, myLocatorMenu); + new FXMenuCommand(myLocatorMenu, + "Locate &Junctions\t\tOpen a Dialog for Locating a Junction.", + GUIIconSubSys::getIcon(ICON_LOCATEJUNCTION), this, MID_LOCATEJUNCTION); + new FXMenuCommand(myLocatorMenu, + "Locate &Edges\t\tOpen a Dialog for Locating an Edge.", + GUIIconSubSys::getIcon(ICON_LOCATEEDGE), this, MID_LOCATEEDGE); + if (!MSGlobals::gUseMesoSim) { // there are no gui-vehicles in mesosim + new FXMenuCommand(myLocatorMenu, + "Locate &Vehicles\t\tOpen a Dialog for Locating a Vehicle.", + GUIIconSubSys::getIcon(ICON_LOCATEVEHICLE), this, MID_LOCATEVEHICLE); + } + new FXMenuCommand(myLocatorMenu, + "Locate &Persons\t\tOpen a Dialog for Locating a Person.", + GUIIconSubSys::getIcon(ICON_LOCATEPERSON), this, MID_LOCATEPERSON); + new FXMenuCommand(myLocatorMenu, + "Locate &TLS\t\tOpen a Dialog for Locating a Traffic Light.", + GUIIconSubSys::getIcon(ICON_LOCATETLS), this, MID_LOCATETLS); + new FXMenuCommand(myLocatorMenu, + "Locate &Additional\t\tOpen a Dialog for Locating an Additional Structure.", + GUIIconSubSys::getIcon(ICON_LOCATEADD), this, MID_LOCATEADD); + new FXMenuCommand(myLocatorMenu, + "Locate P&oI\t\tOpen a Dialog for Locating a Point of Intereset.", + GUIIconSubSys::getIcon(ICON_LOCATEPOI), this, MID_LOCATEPOI); + new FXMenuCommand(myLocatorMenu, + "Locate Po&lygon\t\tOpen a Dialog for Locating a Polygon.", + GUIIconSubSys::getIcon(ICON_LOCATEPOLY), this, MID_LOCATEPOLY); + new FXMenuSeparator(myLocatorMenu); + new FXMenuCheck(myLocatorMenu, + "Show Internal Structures\t\tShow internal junctions and streets in locator Dialog.", this, MID_LISTINTERNAL); + // build control menu + myControlMenu = new FXMenuPane(this); + new FXMenuTitle(myMenuBar, "Simulation", NULL, myControlMenu); + new FXMenuCommand(myControlMenu, + "Run\tCtl-A\tStart running the simulation.", + NULL, this, MID_START); + new FXMenuCommand(myControlMenu, + "Stop\tCtl-S\tStop running the simulation.", + NULL, this, MID_STOP); + new FXMenuCommand(myControlMenu, + "Step\tCtl-D\tPerform one simulation step.", + NULL, this, MID_STEP); // build windows menu myWindowsMenu = new FXMenuPane(this); new FXMenuTitle(myMenuBar, "&Windows", NULL, myWindowsMenu); new FXMenuCheck(myWindowsMenu, - "Show Status Line\t\tToggle this Status Bar on/off.", + "Show Status Line\t\tToggle the Status Bar on/off.", myStatusbar, FXWindow::ID_TOGGLESHOWN); new FXMenuCheck(myWindowsMenu, "Show Message Window\t\tToggle the Message Window on/off.", @@ -407,7 +508,7 @@ new FXMenuCommand(myWindowsMenu, "Tile &Vertically", GUIIconSubSys::getIcon(ICON_WINDOWS_TILE_VERT), myMDIClient, FXMDIClient::ID_MDI_TILEVERTICAL); - new FXMenuCommand(myWindowsMenu, "C&ascade", + new FXMenuCommand(myWindowsMenu, "Cascade", GUIIconSubSys::getIcon(ICON_WINDOWS_CASCADE), myMDIClient, FXMDIClient::ID_MDI_CASCADE); new FXMenuCommand(myWindowsMenu, "&Close", NULL, @@ -521,15 +622,43 @@ ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT); #endif } + { + /// game specific stuff + // total waitingTime + myToolBarDrag6 = new FXToolBarShell(this, FRAME_NORMAL); + myToolBar6 = new FXToolBar(myTopDock, myToolBarDrag6, LAYOUT_DOCK_SAME | LAYOUT_SIDE_TOP | FRAME_RAISED); + new FXToolBarGrip(myToolBar6, myToolBar6, FXToolBar::ID_TOOLBARGRIP, TOOLBARGRIP_DOUBLE); + new FXLabel(myToolBar6, "Waiting Time:\t\tTime spent waiting accumulated for all vehicles", 0, LAYOUT_TOP | LAYOUT_LEFT); + myWaitingTimeLabel = new FXEX::FXLCDLabel(myToolBar6, 13, 0, 0, JUSTIFY_RIGHT); + myWaitingTimeLabel->setHorizontal(2); + myWaitingTimeLabel->setVertical(6); + myWaitingTimeLabel->setThickness(2); + myWaitingTimeLabel->setGroove(2); + myWaitingTimeLabel->setText("-------------"); + + // idealistic time loss + myToolBarDrag7 = new FXToolBarShell(this, FRAME_NORMAL); + myToolBar7 = new FXToolBar(myTopDock, myToolBarDrag7, LAYOUT_DOCK_SAME | LAYOUT_SIDE_TOP | FRAME_RAISED); + new FXToolBarGrip(myToolBar7, myToolBar7, FXToolBar::ID_TOOLBARGRIP, TOOLBARGRIP_DOUBLE); + new FXLabel(myToolBar7, "Time Loss:\t\tTime lost due to being unable to drive with maximum speed for all vehicles", 0, LAYOUT_TOP | LAYOUT_LEFT); + myTimeLossLabel = new FXEX::FXLCDLabel(myToolBar7, 13, 0, 0, JUSTIFY_RIGHT); + myTimeLossLabel->setHorizontal(2); + myTimeLossLabel->setVertical(6); + myTimeLossLabel->setThickness(2); + myTimeLossLabel->setGroove(2); + myTimeLossLabel->setText("-------------"); + } } long GUIApplicationWindow::onCmdQuit(FXObject*, FXSelector, void*) { - getApp()->reg().writeIntEntry("SETTINGS", "x", getX()); - getApp()->reg().writeIntEntry("SETTINGS", "y", getY()); - getApp()->reg().writeIntEntry("SETTINGS", "width", getWidth()); - getApp()->reg().writeIntEntry("SETTINGS", "height", getHeight()); + if (!myAmFullScreen) { + getApp()->reg().writeIntEntry("SETTINGS", "x", getX()); + getApp()->reg().writeIntEntry("SETTINGS", "y", getY()); + getApp()->reg().writeIntEntry("SETTINGS", "width", getWidth()); + getApp()->reg().writeIntEntry("SETTINGS", "height", getHeight()); + } getApp()->reg().writeStringEntry("SETTINGS", "basedir", gCurrentFolder.text()); getApp()->reg().writeIntEntry("SETTINGS", "maximized", isMaximized() ? 1 : 0); getApp()->reg().writeIntEntry("gui", "timeasHMS", myShowTimeAsHMS ? 1 : 0); @@ -540,18 +669,43 @@ long -GUIApplicationWindow::onCmdEditChosen(FXObject*, FXSelector, void*) { - GUIDialog_GLChosenEditor* chooser = - new GUIDialog_GLChosenEditor(this, &gSelected); - chooser->create(); - chooser->show(); +GUIApplicationWindow::onCmdEditChosen(FXObject* menu, FXSelector, void*) { + FXMenuCommand* mc = dynamic_cast(menu); + if (mc->getText() == "Edit Selected...") { + GUIDialog_GLChosenEditor* chooser = + new GUIDialog_GLChosenEditor(this, &gSelected); + chooser->create(); + chooser->show(); + } else { + if (!myAmLoading && myRunThread->simulationAvailable()) { + const SUMOVehicleClass svc = SumoVehicleClassStrings.get(mc->getText().text()); + for (size_t i = 0; i < MSEdge::dictSize(); ++i) { + const std::vector& lanes = MSEdge::dictionary(i)->getLanes(); + for (std::vector::const_iterator it = lanes.begin(); it != lanes.end(); ++it) { + GUILane* lane = dynamic_cast(*it); + assert(lane != 0); + if ((lane->getPermissions() & svc) != 0) { + gSelected.select(lane->getGlID()); + } + } + } + if (myMDIClient->numChildren() > 0) { + GUISUMOViewParent* w = dynamic_cast(myMDIClient->getActiveChild()); + if (w != 0) { + // color by selection + w->getView()->getVisualisationSettings()->laneColorer.setActive(1); + } + } + } + updateChildren(); + } return 1; } long GUIApplicationWindow::onCmdEditBreakpoints(FXObject*, FXSelector, void*) { - GUIDialog_Breakpoints* chooser = new GUIDialog_Breakpoints(this); + GUIDialog_Breakpoints* chooser = new GUIDialog_Breakpoints(this, myRunThread->getBreakpoints(), myRunThread->getBreakpointLock()); chooser->create(); chooser->show(); return 1; @@ -571,7 +725,7 @@ if (opendialog.execute()) { gCurrentFolder = opendialog.getDirectory(); std::string file = opendialog.getFilename().text(); - load(file, false); + loadConfigOrNet(file, false); myRecentConfigs.appendFile(file.c_str()); } return 1; @@ -591,7 +745,7 @@ if (opendialog.execute()) { gCurrentFolder = opendialog.getDirectory(); std::string file = opendialog.getFilename().text(); - load(file, true); + loadConfigOrNet(file, true); myRecentNets.appendFile(file.c_str()); } return 1; @@ -599,8 +753,31 @@ long +GUIApplicationWindow::onCmdOpenShapes(FXObject*, FXSelector, void*) { + // get the shape file name + FXFileDialog opendialog(this, "Open Shapes"); + opendialog.setIcon(GUIIconSubSys::getIcon(ICON_EMPTY)); + opendialog.setSelectMode(SELECTFILE_EXISTING); + opendialog.setPatternList("Additional files (*.xml)\nAll files (*)"); + if (gCurrentFolder.length() != 0) { + opendialog.setDirectory(gCurrentFolder); + } + if (opendialog.execute()) { + gCurrentFolder = opendialog.getDirectory(); + std::string file = opendialog.getFilename().text(); + + NLShapeHandler handler(file, myRunThread->getNet().getShapeContainer()); + if (!XMLSubSys::runParser(handler, file, false)) { + WRITE_MESSAGE("Loading of " + file + " failed."); + } + } + return 1; +} + + +long GUIApplicationWindow::onCmdReload(FXObject*, FXSelector, void*) { - load("", false, true); + loadConfigOrNet("", false, true); return 1; } @@ -612,7 +789,7 @@ return 1; } std::string file((const char*)data); - load(file, sender == &myRecentNets); + loadConfigOrNet(file, sender == &myRecentNets); return 1; } @@ -760,7 +937,7 @@ long -GUIApplicationWindow::onUpdEditChosen(FXObject* sender, FXSelector, void* ptr) { +GUIApplicationWindow::onUpdNeedsSimulation(FXObject* sender, FXSelector, void* ptr) { sender->handle(this, !myRunThread->simulationAvailable() || myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), @@ -770,15 +947,16 @@ long -GUIApplicationWindow::onUpdEditBreakpoints(FXObject* sender, FXSelector, void* ptr) { - sender->handle(this, - !myRunThread->simulationAvailable() || myAmLoading - ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), - ptr); +GUIApplicationWindow::onCmdLocate(FXObject*, FXSelector sel, void*) { + if (myMDIClient->numChildren() > 0) { + GUISUMOViewParent* w = dynamic_cast(myMDIClient->getActiveChild()); + if (w != 0) { + w->onCmdLocate(0, sel, 0); + } + } return 1; } - long GUIApplicationWindow::onCmdAppSettings(FXObject*, FXSelector, void*) { GUIDialog_AppSettings* d = new GUIDialog_AppSettings(this); @@ -792,7 +970,82 @@ GUIApplicationWindow::onCmdGaming(FXObject*, FXSelector, void*) { myAmGaming = !myAmGaming; if (myAmGaming) { - mySimDelayTarget->setValue(1000); + myMenuBar->hide(); + myStatusbar->hide(); + myToolBar1->hide(); + myToolBar2->hide(); + myToolBar4->hide(); + myToolBar5->hide(); + myToolBar6->show(); + myToolBar7->show(); + myMessageWindow->hide(); + myLCDLabel->setFgColor(MFXUtils::getFXColor(RGBColor::RED)); + myWaitingTimeLabel->setFgColor(MFXUtils::getFXColor(RGBColor::RED)); + myTimeLossLabel->setFgColor(MFXUtils::getFXColor(RGBColor::RED)); + gSchemeStorage.getDefault().gaming = true; + } else { + myMenuBar->show(); + myStatusbar->show(); + myToolBar1->show(); + myToolBar2->show(); + myToolBar4->show(); + myToolBar5->show(); + myToolBar6->hide(); + myToolBar7->hide(); + myMessageWindow->show(); + myLCDLabel->setFgColor(MFXUtils::getFXColor(RGBColor::GREEN)); + gSchemeStorage.getDefault().gaming = false; + } + if (myMDIClient->numChildren() > 0) { + GUISUMOViewParent* w = dynamic_cast(myMDIClient->getActiveChild()); + if (w != 0) { + w->setToolBarVisibility(!myAmGaming && !myAmFullScreen); + } + } + update(); + return 1; +} + + +long +GUIApplicationWindow::onCmdFullScreen(FXObject*, FXSelector, void*) { + myAmFullScreen = !myAmFullScreen; + if (myAmFullScreen) { + getApp()->reg().writeIntEntry("SETTINGS", "x", getX()); + getApp()->reg().writeIntEntry("SETTINGS", "y", getY()); + getApp()->reg().writeIntEntry("SETTINGS", "width", getWidth()); + getApp()->reg().writeIntEntry("SETTINGS", "height", getHeight()); + maximize(); + setDecorations(DECOR_NONE); + place(PLACEMENT_MAXIMIZED); + myMenuBar->hide(); + myStatusbar->hide(); + myToolBar1->hide(); + myToolBar2->hide(); + myToolBar3->hide(); + myToolBar4->hide(); + myToolBar5->hide(); + myToolBar6->hide(); + myToolBar7->hide(); + myMessageWindow->hide(); + if (myMDIClient->numChildren() > 0) { + GUISUMOViewParent* w = dynamic_cast(myMDIClient->getActiveChild()); + if (w != 0) { + w->setToolBarVisibility(false); + } + } + update(); + } else { + place(PLACEMENT_VISIBLE); + setDecorations(DECOR_ALL); + restore(); + myToolBar3->show(); + myAmGaming = !myAmGaming; + onCmdGaming(0, 0, 0); + setWidth(getApp()->reg().readIntEntry("SETTINGS", "width", 600)); + setHeight(getApp()->reg().readIntEntry("SETTINGS", "height", 400)); + setX(getApp()->reg().readIntEntry("SETTINGS", "x", 150)); + setY(getApp()->reg().readIntEntry("SETTINGS", "y", 150)); } return 1; } @@ -857,7 +1110,7 @@ GUIApplicationWindow::eventOccured() { while (!myEvents.empty()) { // get the next event - GUIEvent* e = static_cast(myEvents.top()); + GUIEvent* e = myEvents.top(); myEvents.pop(); // process switch (e->getOwnType()) { @@ -891,22 +1144,6 @@ GUIApplicationWindow::handleEvent_SimulationLoaded(GUIEvent* e) { myAmLoading = false; GUIEvent_SimulationLoaded* ec = static_cast(e); - if (ec->myNet != 0) { -#ifndef NO_TRACI - std::map execs; - execs[CMD_GET_GUI_VARIABLE] = &TraCIServerAPI_GUI::processGet; - execs[CMD_SET_GUI_VARIABLE] = &TraCIServerAPI_GUI::processSet; - try { - traci::TraCIServer::openSocket(execs); - } catch (ProcessError& e) { - myMessageWindow->appendText(EVENT_ERROR_OCCURED, e.what()); - WRITE_ERROR(e.what()); - delete ec->myNet; - ec->myNet = 0; - } -#endif - } - // check whether the loading was successfull if (ec->myNet == 0) { // report failure @@ -917,7 +1154,7 @@ } } else { // initialise simulation thread - if(!myRunThread->init(ec->myNet, ec->myBegin, ec->myEnd)) { + if (!myRunThread->init(ec->myNet, ec->myBegin, ec->myEnd)) { if (GUIGlobals::gQuitOnEnd) { closeAllWindows(); getApp()->exit(1); @@ -926,6 +1163,7 @@ // report success setStatusBarText("'" + ec->myFile + "' loaded."); myWasStarted = false; + myHaveNotifiedAboutSimEnd = false; // initialise views myViewNumber = 0; const GUISUMOViewParent::ViewType defaultType = ec->myOsgView ? GUISUMOViewParent::VIEW_3D_OSG : GUISUMOViewParent::VIEW_2D_OPENGL; @@ -952,7 +1190,13 @@ mySimDelayTarget->setValue(settings.getDelay()); } if (settings.getBreakpoints().size() > 0) { - GUIGlobals::gBreakpoints = settings.getBreakpoints(); + myRunThread->getBreakpointLock().lock(); + myRunThread->getBreakpoints().assign(settings.getBreakpoints().begin(), settings.getBreakpoints().end()); + myRunThread->getBreakpointLock().unlock(); + } + myJamSounds = settings.getEventDistribution("jam"); + if (settings.getJamSoundTime() > 0) { + myJamSoundTime = settings.getJamSoundTime(); } } } else { @@ -960,14 +1204,14 @@ } if (isGaming()) { - setTitle("SUMO Traffic Light Game"); + setTitle("SUMO Interactive Traffic Light"); } else { // set simulation name on the caption - std::string caption = "SUMO " + std::string(VERSION_STRING); + std::string caption = "SUMO " + getBuildName(VERSION_STRING); setTitle(MFXUtils::getTitleText(caption.c_str(), ec->myFile.c_str())); } // set simulation step begin information - updateTimeLCD(ec->myNet->getCurrentTimeStep()); + myLCDLabel->setText("-------------"); } } getApp()->endWaitCursor(); @@ -983,6 +1227,9 @@ GUIApplicationWindow::handleEvent_SimulationStep(GUIEvent*) { updateChildren(); updateTimeLCD(myRunThread->getNet().getCurrentTimeStep()); + if (myAmGaming) { + checkGamingEvents(); + } update(); } @@ -990,7 +1237,7 @@ void GUIApplicationWindow::handleEvent_Message(GUIEvent* e) { GUIEvent_Message* ec = static_cast(e); - myMessageWindow->appendText(ec->getOwnType(), ec->getMsg()); + myMessageWindow->appendMsg(ec->getOwnType(), ec->getMsg()); } @@ -1001,27 +1248,66 @@ if (GUIGlobals::gQuitOnEnd) { closeAllWindows(); getApp()->exit(ec->getReason() == MSNet::SIMSTATE_ERROR_IN_SIM); - } else { + } else if (!myHaveNotifiedAboutSimEnd) { // build the text const std::string text = "Simulation ended at time: " + time2string(ec->getTimeStep()) + ".\nReason: " + MSNet::getStateMessage(ec->getReason()); FXMessageBox::warning(this, MBOX_OK, "Simulation ended", "%s", text.c_str()); + myHaveNotifiedAboutSimEnd = true; } } +void +GUIApplicationWindow::checkGamingEvents() { + MSVehicleControl& vc = MSNet::getInstance()->getVehicleControl(); + MSVehicleControl::constVehIt it = vc.loadedVehBegin(); + MSVehicleControl::constVehIt end = vc.loadedVehEnd(); +#ifdef HAVE_INTERNAL + if (myJamSounds.getOverallProb() > 0) { + // play honking sound if some vehicle is waiting too long + for (; it != end; ++it) { + // XXX use impatience instead of waiting time ? + if (it->second->getWaitingTime() > TIME2STEPS(myJamSoundTime)) { + const std::string cmd = myJamSounds.get(&myGamingRNG); + if (cmd != "") { + // yay! fun with dangerous commands... Never use this over the internet + SysUtils::runHiddenCommand(cmd); + // one sound per simulation step is enough + break; + } + } + } + } +#endif + // updated peformance indicators + + for (it = vc.loadedVehBegin(); it != end; ++it) { + const MSVehicle* veh = dynamic_cast(it->second); + assert(veh != 0); + const SUMOReal vmax = MIN2(veh->getVehicleType().getMaxSpeed(), veh->getEdge()->getSpeedLimit()); + if (veh->isOnRoad() && veh->getSpeed() < SUMO_const_haltingSpeed) { + myWaitingTime += DELTA_T; + } + myTimeLoss += TS * TIME2STEPS(vmax - veh->getSpeed()) / vmax; // may be negative with speedFactor > 1 + myWaitingTimeLabel->setText(time2string(myWaitingTime).c_str()); + myTimeLossLabel->setText(time2string(myTimeLoss).c_str()); + } + +} + void -GUIApplicationWindow::load(const std::string& file, bool isNet, bool isReload) { +GUIApplicationWindow::loadConfigOrNet(const std::string& file, bool isNet, bool isReload) { getApp()->beginWaitCursor(); myAmLoading = true; closeAllWindows(); if (isReload) { - myLoadThread->start(); + myLoadThread->reloadConfigOrNet(); setStatusBarText("Reloading."); } else { gSchemeStorage.saveViewport(0, 0, -1); // recenter view - myLoadThread->load(file, isNet); + myLoadThread->loadConfigOrNet(file, isNet); setStatusBarText("Loading '" + file + "'."); } update(); @@ -1076,7 +1362,7 @@ // delete the simulation myRunThread->deleteSim(); // reset the caption - setTitle(MFXUtils::getTitleText(("SUMO " + std::string(VERSION_STRING)).c_str())); + setTitle(MFXUtils::getTitleText(("SUMO " + getBuildName(VERSION_STRING)).c_str())); // delete other children while (myTrackerWindows.size() != 0) { delete myTrackerWindows[0]; @@ -1113,7 +1399,7 @@ void GUIApplicationWindow::loadOnStartup() { - load("", false); + loadConfigOrNet("", false); } @@ -1125,7 +1411,12 @@ void -GUIApplicationWindow::updateTimeLCD(const SUMOTime time) { +GUIApplicationWindow::updateTimeLCD(SUMOTime time) { + time -= DELTA_T; // synchronize displayed time with netstate output + if (myAmGaming) { + // show time counting backwards + time = myRunThread->getSimEndTime() - time; + } SUMOReal fracSeconds = STEPS2TIME(time); const bool hideFraction = myAmGaming || fmod(TS, 1.) == 0.; const int BuffSize = 100; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIApplicationWindow.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIApplicationWindow.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIApplicationWindow.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIApplicationWindow.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Christian Roessel /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIApplicationWindow.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIApplicationWindow.h 18096 2015-03-17 09:50:59Z behrisch $ /// // The main window of the SUMO-gui. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,6 +45,7 @@ #include #include #include +#include #include "GUISUMOViewParent.h" @@ -133,6 +134,9 @@ /// @brief Called on menu File->Open Network long onCmdOpenNetwork(FXObject*, FXSelector, void*); + /// @brief Called on menu File->Load Shapes + long onCmdOpenShapes(FXObject*, FXSelector, void*); + /// @brief Called on reload long onCmdReload(FXObject*, FXSelector, void*); @@ -159,6 +163,9 @@ /// @brief Toggle gaming mode long onCmdGaming(FXObject*, FXSelector, void*); + /// @brief Toggle full screen mode + long onCmdFullScreen(FXObject*, FXSelector, void*); + /// @brief Toggle listing of internal structures long onCmdListInternal(FXObject*, FXSelector, void*); @@ -201,7 +208,7 @@ long onUpdAddView(FXObject*, FXSelector, void*); /// @brief Determines whether "play" is enabled - virtual long onUpdStart(FXObject*, FXSelector, void*); + long onUpdStart(FXObject* sender, FXSelector, void* ptr); /// @brief Determines whether "stop" is enabled long onUpdStop(FXObject*, FXSelector, void*); @@ -209,15 +216,15 @@ /// @brief Determines whether "step" is enabled long onUpdStep(FXObject*, FXSelector, void*); - /// @brief Determines whether editing chosen is enabled - long onUpdEditChosen(FXObject* sender, FXSelector, void* ptr); - - /// @brief Determines whether editing breakpoints is enabled - virtual long onUpdEditBreakpoints(FXObject*, FXSelector, void*); + /// @brief Determines whether some buttons which require an active simulation may be shown + long onUpdNeedsSimulation(FXObject*, FXSelector, void*); /// @brief Called if the message window shall be cleared long onCmdClearMsgWindow(FXObject*, FXSelector, void*); + /// @brief Called on menu commands from the Locator menu + long onCmdLocate(FXObject*, FXSelector, void*); + /// @brief Called on an event from the loading thread long onLoadThreadEvent(FXObject*, FXSelector, void*); @@ -228,22 +235,33 @@ long onClipboardRequest(FXObject* sender, FXSelector sel, void* ptr); /// @} + + /** @brief Returns the simulation delay + * @return delay in milliseconds + */ + virtual SUMOReal getDelay() const { + return mySimDelayTarget->getValue(); + } + protected: virtual void addToWindowsMenu(FXMenuPane*) { } private: /** starts to load a simulation */ - void load(const std::string& file, bool isNet, bool isReload = false); + void loadConfigOrNet(const std::string& file, bool isNet, bool isReload = false); /** this method closes all windows and deletes the current simulation */ void closeAllWindows(); /// @brief updates the simulation time display - void updateTimeLCD(const SUMOTime time); + void updateTimeLCD(SUMOTime time); /** opens a new simulation display */ GUISUMOAbstractView* openNewView(GUISUMOViewParent::ViewType vt = GUISUMOViewParent::VIEW_2D_OPENGL); + /// @brief handles additional game-related events + void checkGamingEvents(); + protected: /// FOX needs this for static members GUIApplicationWindow() { } @@ -275,7 +293,8 @@ bool myAmLoading; /// the submenus - FXMenuPane* myFileMenu, *myEditMenu, *mySettingsMenu, + FXMenuPane* myFileMenu, *myEditMenu, *mySelectByPermissions, *mySettingsMenu, + *myLocatorMenu, *myControlMenu, *myWindowsMenu, *myHelpMenu; /// A window to display messages, warnings and error in @@ -286,8 +305,7 @@ /// for some menu detaching fun FXToolBarShell* myToolBarDrag1, *myToolBarDrag2, *myToolBarDrag3, - *myToolBarDrag4, *myToolBarDrag5, - *myMenuBarDrag; + *myToolBarDrag4, *myToolBarDrag5, *myMenuBarDrag; /// FXRealSpinDial* mySimDelayTarget; @@ -296,7 +314,7 @@ SUMOTime myAlternateSimDelay; /// List of got requests - MFXEventQue myEvents; + MFXEventQue myEvents; /// The menu used for the MDI-windows FXMDIMenu* myMDIMenu; @@ -330,6 +348,29 @@ /// @brief whether to show time as hour:minute:second bool myShowTimeAsHMS; + /// @brief whether to show the window in full screen mode + bool myAmFullScreen; + + /// @brief whether the simulation end was already announced + bool myHaveNotifiedAboutSimEnd; + + /// @name game related things + /// { + RandomDistributor myJamSounds; + /// @brief waiting time after which vehicles trigger jam sounds + SUMOReal myJamSoundTime; + /// @brief A random number generator used to choose a gaming sound + static MTRand myGamingRNG; + + /// performance indicators + FXEX::FXLCDLabel* myWaitingTimeLabel; + FXEX::FXLCDLabel* myTimeLossLabel; + SUMOTime myWaitingTime; + SUMOTime myTimeLoss; + FXToolBar* myToolBar6, *myToolBar7; + FXToolBarShell* myToolBarDrag6, *myToolBarDrag7; + ////} + }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIEvent_SimulationEnded.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIEvent_SimulationEnded.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIEvent_SimulationEnded.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIEvent_SimulationEnded.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Thu, 19 Jun 2003 -/// @version $Id: GUIEvent_SimulationEnded.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIEvent_SimulationEnded.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Event sent when the the simulation is over /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIEvent_SimulationLoaded.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIEvent_SimulationLoaded.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIEvent_SimulationLoaded.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIEvent_SimulationLoaded.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: GUIEvent_SimulationLoaded.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIEvent_SimulationLoaded.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Event send when the simulation has been loaded by GUILadThread /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIGlobals.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIGlobals.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIGlobals.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIGlobals.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2004 -/// @version $Id: GUIGlobals.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGlobals.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // } /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,7 +45,5 @@ bool GUIGlobals::gRunAfterLoad; -std::vector GUIGlobals::gBreakpoints; - /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIGlobals.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIGlobals.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIGlobals.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIGlobals.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date 2004 -/// @version $Id: GUIGlobals.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGlobals.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Some global variables (yep) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -54,8 +54,6 @@ /// the window shall be closed when the simulation has ended static bool gQuitOnEnd; - /// List of breakpoints - static std::vector gBreakpoints; }; #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUILoadThread.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUILoadThread.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUILoadThread.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUILoadThread.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUILoadThread.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUILoadThread.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Class describing the thread that performs the loading of a simulation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -31,39 +31,47 @@ #endif #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include #include #include #include #include #include #include -#include #include -#include -#include -#include -#include -#include -#include +#include #include -#include +#include #include "GUIApplicationWindow.h" #include "GUILoadThread.h" #include "GUIGlobals.h" #include "GUIEvent_SimulationLoaded.h" -#include -#include -#include -#include -#include -#include #ifdef HAVE_INTERNAL #include #endif +#ifndef NO_TRACI +#include +#include "TraCIServerAPI_GUI.h" +#endif + #ifdef CHECK_MEMORY_LEAKS #include #endif // CHECK_MEMORY_LEAKS @@ -73,7 +81,7 @@ // member method definitions // =========================================================================== GUILoadThread::GUILoadThread(FXApp* app, MFXInterThreadEventClient* mw, - MFXEventQue& eq, FXEX::FXThreadEvent& ev) + MFXEventQue& eq, FXEX::FXThreadEvent& ev) : FXSingleEventThread(app, mw), myParent(mw), myEventQue(eq), myEventThrow(ev) { myErrorRetriever = new MsgRetrievingFunction(this, &GUILoadThread::retrieveMessage, MsgHandler::MT_ERROR); @@ -102,25 +110,50 @@ // register message callbacks MsgHandler::getMessageInstance()->addRetriever(myMessageRetriever); MsgHandler::getErrorInstance()->addRetriever(myErrorRetriever); - MsgHandler::getWarningInstance()->addRetriever(myWarningRetriever); + if (!OptionsCont::getOptions().getBool("no-warnings")) { + MsgHandler::getWarningInstance()->addRetriever(myWarningRetriever); + } // try to load the given configuration - if (!initOptions()) { + try { + oc.clear(); + MSFrame::fillOptions(); + if (myFile != "") { + myTitle = myFile; + // triggered by menu option + if (myLoadNet) { + oc.set("net-file", myFile); + } else { + oc.set("configuration-file", myFile); + } + OptionsIO::getOptions(true, 1, 0); + } else { + // triggered at application start or reload + OptionsIO::getOptions(true); + if (oc.isSet("configuration-file")) { + myTitle = oc.getString("configuration-file"); + } else if (oc.isSet("net-file")) { + myTitle = oc.getString("net-file"); + } + } + // within gui-based applications, nothing is reported to the console + MsgHandler::getMessageInstance()->removeRetriever(&OutputDevice::getDevice("stdout")); + MsgHandler::getWarningInstance()->removeRetriever(&OutputDevice::getDevice("stderr")); + MsgHandler::getErrorInstance()->removeRetriever(&OutputDevice::getDevice("stderr")); + // do this once again to get parsed options + MsgHandler::initOutputOptions(); + XMLSubSys::setValidation(oc.getString("xml-validation"), oc.getString("xml-validation.net")); + GUIGlobals::gRunAfterLoad = oc.getBool("start"); + GUIGlobals::gQuitOnEnd = oc.getBool("quit-on-end"); + if (!MSFrame::checkOptions()) { + throw ProcessError(); + } + } catch (ProcessError& e) { + if (std::string(e.what()) != std::string("Process Error") && std::string(e.what()) != std::string("")) { + WRITE_ERROR(e.what()); + } // the options are not valid but maybe we want to quit GUIGlobals::gQuitOnEnd = oc.getBool("quit-on-end"); - submitEndAndCleanup(net, simStartTime, simEndTime); - return 0; - } - // within gui-based applications, nothing is reported to the console - MsgHandler::getMessageInstance()->removeRetriever(&OutputDevice::getDevice("stdout")); - MsgHandler::getWarningInstance()->removeRetriever(&OutputDevice::getDevice("stderr")); - MsgHandler::getErrorInstance()->removeRetriever(&OutputDevice::getDevice("stderr")); - // do this once again to get parsed options - MsgHandler::initOutputOptions(); - GUIGlobals::gRunAfterLoad = oc.getBool("start"); - GUIGlobals::gQuitOnEnd = oc.getBool("quit-on-end"); - - if (!MSFrame::checkOptions()) { MsgHandler::getErrorInstance()->inform("Quitting (on error).", false); submitEndAndCleanup(net, simStartTime, simEndTime); return 0; @@ -128,7 +161,7 @@ // initialise global settings RandHelper::initRandGlobal(); - RandHelper::initRandGlobal(&MSVehicleControl::myVehicleParamsRNG); + RandHelper::initRandGlobal(MSRouteHandler::getParsingRNG()); MSFrame::setMSGlobals(oc); GUITexturesHelper::allowTextures(!oc.getBool("disable-textures")); MSVehicleControl* vehControl = 0; @@ -147,6 +180,14 @@ new GUIEventControl(), new GUIEventControl(), new GUIEventControl()); +#ifndef NO_TRACI + // need to init TraCI-Server before loading routes to catch VEHICLE_STATE_BUILT + std::map execs; + execs[CMD_GET_GUI_VARIABLE] = &TraCIServerAPI_GUI::processGet; + execs[CMD_SET_GUI_VARIABLE] = &TraCIServerAPI_GUI::processSet; + TraCIServer::openSocket(execs); +#endif + eb = new GUIEdgeControlBuilder(); GUIDetectorBuilder db(*net); NLJunctionControlBuilder jb(*net, db); @@ -203,41 +244,19 @@ MsgHandler::getWarningInstance()->removeRetriever(myWarningRetriever); MsgHandler::getMessageInstance()->removeRetriever(myMessageRetriever); // inform parent about the process - GUIEvent* e = new GUIEvent_SimulationLoaded(net, simStartTime, simEndTime, myFile, guiSettingsFiles, osgView); + GUIEvent* e = new GUIEvent_SimulationLoaded(net, simStartTime, simEndTime, myTitle, guiSettingsFiles, osgView); myEventQue.add(e); myEventThrow.signal(); } -bool -GUILoadThread::initOptions() { - try { - OptionsCont& oc = OptionsCont::getOptions(); - oc.clear(); - MSFrame::fillOptions(); - if (myFile != "") { - if (myLoadNet) { - oc.set("net-file", myFile); - } else { - oc.set("configuration-file", myFile); - } - OptionsIO::getOptions(true, 1, 0); - } else { - OptionsIO::getOptions(true); - } - return true; - } catch (ProcessError& e) { - if (std::string(e.what()) != std::string("Process Error") && std::string(e.what()) != std::string("")) { - WRITE_ERROR(e.what()); - } - MsgHandler::getErrorInstance()->inform("Quitting (on error).", false); - } - return false; +void +GUILoadThread::reloadConfigOrNet() { + start(); } - void -GUILoadThread::load(const std::string& file, bool isNet) { +GUILoadThread::loadConfigOrNet(const std::string& file, bool isNet) { myFile = file; myLoadNet = isNet; start(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUILoadThread.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUILoadThread.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUILoadThread.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUILoadThread.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: GUILoadThread.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUILoadThread.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Class describing the thread that performs the loading of a simulation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,17 +34,18 @@ #endif #include +#include #include #include -#include +#include // =========================================================================== // class declarations // =========================================================================== class MFXInterThreadEventClient; -class MFXEventQue; class GUINet; +class GUIEvent; // =========================================================================== @@ -55,7 +57,7 @@ class GUILoadThread : public FXSingleEventThread { public: /// constructor - GUILoadThread(FXApp* app, MFXInterThreadEventClient* mw, MFXEventQue& eq, + GUILoadThread(FXApp* app, MFXInterThreadEventClient* mw, MFXEventQue& eq, FXEX::FXThreadEvent& ev); /// destructor @@ -65,8 +67,11 @@ the thread ends after the net has been loaded */ FXint run(); + /// reloads according to the given input options + void reloadConfigOrNet(); + /// begins the loading of the given file - void load(const std::string& file, bool isNet); + void loadConfigOrNet(const std::string& file, bool isNet); /// Retrieves messages from the loading module void retrieveMessage(const MsgHandler::MsgType type, const std::string& msg); @@ -74,9 +79,6 @@ const std::string& getFileName() const; protected: - virtual bool initOptions(); - - /** @brief Closes the loading process * * This method is called both on success and failure. @@ -93,11 +95,14 @@ /// the path to load the simulation from std::string myFile; + /// the title string for the application + std::string myTitle; + /** @brief The instances of message retriever encapsulations Needed to be deleted from the handler later on */ OutputDevice* myErrorRetriever, *myMessageRetriever, *myWarningRetriever; - MFXEventQue& myEventQue; + MFXEventQue& myEventQue; FXEX::FXThreadEvent& myEventThrow; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIManipulator.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIManipulator.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIManipulator.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIManipulator.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file GUIManipulator.cpp /// @author Daniel Krajzewicz /// @date Jun 2004 -/// @version $Id: GUIManipulator.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIManipulator.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Abstract GUI manipulation class /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIManipulator.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIManipulator.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIManipulator.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIManipulator.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @date Jun 2004 -/// @version $Id: GUIManipulator.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIManipulator.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Abstract GUI manipulation class /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIRunThread.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIRunThread.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIRunThread.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIRunThread.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIRunThread.cpp 14500 2013-08-27 08:07:09Z dkrajzew $ +/// @version $Id: GUIRunThread.cpp 18154 2015-03-26 08:46:55Z namdre $ /// // The thread that runs the simulation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -60,17 +60,10 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace FXEX; -using namespace std; - - -// =========================================================================== // member method definitions // =========================================================================== GUIRunThread::GUIRunThread(FXApp* app, MFXInterThreadEventClient* parent, - FXRealSpinDial& simDelay, MFXEventQue& eq, + FXRealSpinDial& simDelay, MFXEventQue& eq, FXEX::FXThreadEvent& ev) : FXSingleEventThread(app, parent), myNet(0), myHalting(true), myQuit(false), mySimulationInProgress(false), myOk(true), @@ -97,19 +90,23 @@ GUIRunThread::init(GUINet* net, SUMOTime start, SUMOTime end) { assert(net != 0); // assign new values + myOk = true; myNet = net; mySimStartTime = start; mySimEndTime = end; // register message callbacks MsgHandler::getErrorInstance()->addRetriever(myErrorRetriever); MsgHandler::getMessageInstance()->addRetriever(myMessageRetriever); - MsgHandler::getWarningInstance()->addRetriever(myWarningRetriever); + if (!OptionsCont::getOptions().getBool("no-warnings")) { + MsgHandler::getWarningInstance()->addRetriever(myWarningRetriever); + } // preload the routes especially for TraCI mySimulationLock.lock(); try { + net->setCurrentTimeStep(start); net->loadRoutes(); } catch (ProcessError& e2) { - if (string(e2.what()) != string("Process Error") && std::string(e2.what()) != string("")) { + if (std::string(e2.what()) != std::string("Process Error") && std::string(e2.what()) != std::string("")) { WRITE_ERROR(e2.what()); } MsgHandler::getErrorInstance()->inform("Quitting (on error).", false); @@ -143,7 +140,9 @@ } } // check whether we shall stop at this step - const bool haltAfter = find(GUIGlobals::gBreakpoints.begin(), GUIGlobals::gBreakpoints.end(), myNet->getCurrentTimeStep()) != GUIGlobals::gBreakpoints.end(); + myBreakpointLock.lock(); + const bool haltAfter = find(myBreakpoints.begin(), myBreakpoints.end(), myNet->getCurrentTimeStep()) != myBreakpoints.end(); + myBreakpointLock.unlock(); // do the step makeStep(); // stop if wished @@ -162,7 +161,7 @@ } } else { // sleep if the simulation is not running - sleep(500); + sleep(50); } } // delete a maybe existing simulation at the end @@ -192,7 +191,7 @@ MSNet::SimulationState state = myNet->simulationState(mySimEndTime); #ifndef NO_TRACI if (state != MSNet::SIMSTATE_RUNNING) { - if (OptionsCont::getOptions().getInt("remote-port") != 0 && !traci::TraCIServer::wasClosed()) { + if (OptionsCont::getOptions().getInt("remote-port") != 0 && !TraCIServer::wasClosed()) { state = MSNet::SIMSTATE_RUNNING; } } @@ -222,7 +221,7 @@ // simulation step is over mySimulationInProgress = false; } catch (ProcessError& e2) { - if (string(e2.what()) != string("Process Error") && std::string(e2.what()) != string("")) { + if (std::string(e2.what()) != std::string("Process Error") && std::string(e2.what()) != std::string("")) { WRITE_ERROR(e2.what()); } MsgHandler::getErrorInstance()->inform("Quitting (on error).", false); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIRunThread.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIRunThread.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIRunThread.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIRunThread.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIRunThread.h 14500 2013-08-27 08:07:09Z dkrajzew $ +/// @version $Id: GUIRunThread.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The thread that runs the simulation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -46,6 +46,7 @@ // class declarations // =========================================================================== class GUINet; +class GUIEvent; class OutputDevice; @@ -63,7 +64,7 @@ public: /// constructor GUIRunThread(FXApp* app, MFXInterThreadEventClient* mw, - FXRealSpinDial& simDelay, MFXEventQue& eq, FXEX::FXThreadEvent& ev); + FXRealSpinDial& simDelay, MFXEventQue& eq, FXEX::FXThreadEvent& ev); /// destructor virtual ~GUIRunThread(); @@ -107,6 +108,18 @@ /// Retrieves messages from the loading module void retrieveMessage(const MsgHandler::MsgType type, const std::string& msg); + SUMOTime getSimEndTime() const { + return mySimEndTime; + } + + std::vector& getBreakpoints() { + return myBreakpoints; + } + + MFXMutex& getBreakpointLock() { + return myBreakpointLock; + } + protected: void makeStep(); @@ -140,12 +153,18 @@ FXRealSpinDial& mySimDelay; - MFXEventQue& myEventQue; + MFXEventQue& myEventQue; FXEX::FXThreadEvent& myEventThrow; MFXMutex mySimulationLock; + /// @brief List of breakpoints + std::vector myBreakpoints; + + /// @brief Lock for modifying the list of breakpoints + MFXMutex myBreakpointLock; + }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUISUMOViewParent.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUISUMOViewParent.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUISUMOViewParent.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUISUMOViewParent.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Laura Bieker /// @author Andreas Gaubatz /// @date Sept 2002 -/// @version $Id: GUISUMOViewParent.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: GUISUMOViewParent.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A single child window which contains a view of the simulation area /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,7 +34,6 @@ #include #include -#include #include #include #include @@ -43,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -50,10 +50,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include "GUIGlobals.h" #include "GUIViewTraffic.h" @@ -78,6 +80,7 @@ FXMAPFUNC(SEL_COMMAND, MID_LOCATEJUNCTION, GUISUMOViewParent::onCmdLocate), FXMAPFUNC(SEL_COMMAND, MID_LOCATEEDGE, GUISUMOViewParent::onCmdLocate), FXMAPFUNC(SEL_COMMAND, MID_LOCATEVEHICLE, GUISUMOViewParent::onCmdLocate), + FXMAPFUNC(SEL_COMMAND, MID_LOCATEPERSON, GUISUMOViewParent::onCmdLocate), FXMAPFUNC(SEL_COMMAND, MID_LOCATETLS, GUISUMOViewParent::onCmdLocate), FXMAPFUNC(SEL_COMMAND, MID_LOCATEADD, GUISUMOViewParent::onCmdLocate), FXMAPFUNC(SEL_COMMAND, MID_LOCATEPOI, GUISUMOViewParent::onCmdLocate), @@ -129,6 +132,16 @@ } +void +GUISUMOViewParent::setToolBarVisibility(const bool value) { + if (value) { + myNavigationToolBar->show(); + } else { + myNavigationToolBar->hide(); + } +} + + long GUISUMOViewParent::onCmdMakeSnapshot(FXObject*, FXSelector, void*) { // get the new file name @@ -160,51 +173,48 @@ long GUISUMOViewParent::onCmdLocate(FXObject*, FXSelector sel, void*) { - GUIGlObjectType type; std::vector ids; GUIIcon icon; std::string title; switch (FXSELID(sel)) { case MID_LOCATEJUNCTION: - type = GLO_JUNCTION; ids = static_cast(GUINet::getInstance())->getJunctionIDs(myParent->listInternal()); icon = ICON_LOCATEJUNCTION; title = "Junction Chooser"; break; case MID_LOCATEEDGE: - type = GLO_EDGE; ids = GUIEdge::getIDs(myParent->listInternal()); icon = ICON_LOCATEEDGE; title = "Edge Chooser"; break; case MID_LOCATEVEHICLE: - type = GLO_VEHICLE; static_cast(MSNet::getInstance()->getVehicleControl()).insertVehicleIDs(ids); icon = ICON_LOCATEVEHICLE; title = "Vehicle Chooser"; break; + case MID_LOCATEPERSON: + static_cast(MSNet::getInstance()->getPersonControl()).insertPersonIDs(ids); + icon = ICON_LOCATEPERSON; + title = "Person Chooser"; + break; case MID_LOCATETLS: - type = GLO_TLLOGIC; ids = static_cast(GUINet::getInstance())->getTLSIDs(); icon = ICON_LOCATETLS; title = "Traffic Lights Chooser"; break; case MID_LOCATEADD: - type = GLO_ADDITIONAL; ids = GUIGlObject_AbstractAdd::getIDList(); icon = ICON_LOCATEADD; title = "Additional Objects Chooser"; break; case MID_LOCATEPOI: - type = GLO_POI; ids = static_cast(GUINet::getInstance()->getShapeContainer()).getPOIIds(); - icon = ICON_LOCATESHAPE; + icon = ICON_LOCATEPOI; title = "POI Chooser"; break; case MID_LOCATEPOLY: - type = GLO_POLYGON; ids = static_cast(GUINet::getInstance()->getShapeContainer()).getPolygonIDs(); - icon = ICON_LOCATESHAPE; + icon = ICON_LOCATEPOLY; title = "Polygon Chooser"; break; default: @@ -214,7 +224,7 @@ myLocatorButton->killFocus(); myLocatorPopup->update(); GUIDialog_GLObjChooser* chooser = new GUIDialog_GLObjChooser( - this, GUIIconSubSys::getIcon(icon), title.c_str(), type, ids, GUIGlObjectStorage::gIDStorage); + this, GUIIconSubSys::getIcon(icon), title.c_str(), ids, GUIGlObjectStorage::gIDStorage); chooser->create(); chooser->show(); return 1; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUISUMOViewParent.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUISUMOViewParent.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUISUMOViewParent.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUISUMOViewParent.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Andreas Gaubatz /// @date Sept 2002 -/// @version $Id: GUISUMOViewParent.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUISUMOViewParent.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A single child window which contains a view of the simulation area /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -119,6 +119,9 @@ /// @brief true if the object is selected (may include extra logic besides calling gSelected) bool isSelected(GUIGlObject* o) const; + /// @notify about toggled gaming status + void setToolBarVisibility(const bool value); + protected: /// @brief FOX needs this GUISUMOViewParent() { } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUITLLogicPhasesTrackerWindow.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUITLLogicPhasesTrackerWindow.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUITLLogicPhasesTrackerWindow.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUITLLogicPhasesTrackerWindow.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Oct/Nov 2003 -/// @version $Id: GUITLLogicPhasesTrackerWindow.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUITLLogicPhasesTrackerWindow.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A window displaying the phase diagram of a tl-logic /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,6 +33,7 @@ #include #include #include +#include #include "GUITLLogicPhasesTrackerWindow.h" #include #include @@ -72,7 +73,7 @@ FXComposite* c, GUIMainWindow& app, GUITLLogicPhasesTrackerWindow& parent) : FXGLCanvas(c, app.getGLVisual(), app.getBuildGLCanvas(), (FXObject*) 0, (FXSelector) 0, LAYOUT_SIDE_TOP | LAYOUT_FILL_X | LAYOUT_FILL_Y/*, 0, 0, 300, 200*/), - myParent(&parent), myApplication(&app) {} + myParent(&parent) {} GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerPanel::~GUITLLogicPhasesTrackerPanel() {} @@ -253,6 +254,10 @@ myDurations.push_back((*j)->duration); myLastTime += (*j)->duration; } + if (myLastTime <= myBeginTime) { + WRITE_ERROR("Overflow in time computation occured."); + return; + } } else { SUMOTime beginOffset = TIME2STEPS(myBeginOffset->getValue()); myBeginTime = myLastTime - beginOffset; @@ -295,7 +300,9 @@ const SUMOReal width = (SUMOReal) caller.getWidth(); pfSetScaleXY((SUMOReal)(.08 * 300. / width), (SUMOReal)(.08 * 300. / height)); const SUMOReal h4 = ((SUMOReal) 4 / height); + const SUMOReal h9 = ((SUMOReal) 9 / height); const SUMOReal h10 = ((SUMOReal) 10 / height); + const SUMOReal h11 = ((SUMOReal) 11 / height); const SUMOReal h16 = ((SUMOReal) 16 / height); const SUMOReal h20 = ((SUMOReal) 20 / height); // draw the link names and the lines dividing them @@ -362,20 +369,20 @@ // determine the current link's color LinkState state = (*pi).getSignalState(j); // draw the bar (red is drawn as a line) + GLHelper::setColor(getLinkColor(state)); switch (state) { - case LINKSTATE_TL_GREEN_MAJOR: - case LINKSTATE_TL_GREEN_MINOR: - glColor3d(0, 1.0, 0); + case LINKSTATE_TL_RED: + case LINKSTATE_TL_REDYELLOW: + // draw a thin line glBegin(GL_QUADS); - glVertex2d(x, h - h16); - glVertex2d(x, h - h4); - glVertex2d(x2, h - h4); - glVertex2d(x2, h - h16); + glVertex2d(x, h - h11); + glVertex2d(x, h - h9); + glVertex2d(x2, h - h9); + glVertex2d(x2, h - h11); glEnd(); break; - case LINKSTATE_TL_YELLOW_MAJOR: - case LINKSTATE_TL_YELLOW_MINOR: - glColor3d(1.0, 1.0, 0); + default: + // draw a thick block glBegin(GL_QUADS); glVertex2d(x, h - h16); glVertex2d(x, h - h4); @@ -383,15 +390,6 @@ glVertex2d(x2, h - h16); glEnd(); break; - case LINKSTATE_TL_RED: - glColor3d(1.0, 0, 0); - glBegin(GL_LINES); - glVertex2d(x, h - h10); - glVertex2d(x2, h - h10); - glEnd(); - break; - default: - break; } // proceed to next link h -= h20; @@ -417,7 +415,7 @@ t -= (SUMOReal)((width - 31.) / 4.); } // draw time information - h = (SUMOReal)(myTLLogic->getLinks().size() * 20 + 12); + //h = (SUMOReal)(myTLLogic->getLinks().size() * 20 + 12); SUMOReal glh = (SUMOReal)(1.0 - myTLLogic->getLinks().size() * h20 - h10); // current begin time pfSetScaleXY((SUMOReal)(.05 * 300. / width), (SUMOReal)(.05 * 300. / height)); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUITLLogicPhasesTrackerWindow.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUITLLogicPhasesTrackerWindow.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUITLLogicPhasesTrackerWindow.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUITLLogicPhasesTrackerWindow.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Oct/Nov 2003 -/// @version $Id: GUITLLogicPhasesTrackerWindow.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUITLLogicPhasesTrackerWindow.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A window displaying the phase diagram of a tl-logic /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -172,9 +172,6 @@ /// @brief The parent window GUITLLogicPhasesTrackerWindow* myParent; - /// @brief The main application - GUIMainWindow* myApplication; - protected: /// @brief protected constructor for FOX GUITLLogicPhasesTrackerPanel() { } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIViewTraffic.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIViewTraffic.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIViewTraffic.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIViewTraffic.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Andreas Gaubatz /// @date Sept 2002 -/// @version $Id: GUIViewTraffic.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIViewTraffic.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // A view on the simulation; this view is a microscopic one /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -117,6 +118,10 @@ GUIIconSubSys::getIcon(ICON_LOCATEVEHICLE), &v, MID_LOCATEVEHICLE, ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED); } + new FXButton(v.getLocatorPopup(), + "\tLocate Vehicle\tLocate a person within the network.", + GUIIconSubSys::getIcon(ICON_LOCATEPERSON), &v, MID_LOCATEPERSON, + ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED); // for tls new FXButton(v.getLocatorPopup(), "\tLocate TLS\tLocate a tls within the network.", @@ -129,13 +134,13 @@ ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED); // for pois new FXButton(v.getLocatorPopup(), - "\tLocate POI\tLocate a POI within the network.", - GUIIconSubSys::getIcon(ICON_LOCATESHAPE), &v, MID_LOCATEPOI, + "\tLocate PoI\tLocate a PoI within the network.", + GUIIconSubSys::getIcon(ICON_LOCATEPOI), &v, MID_LOCATEPOI, ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED); // for polygons new FXButton(v.getLocatorPopup(), "\tLocate Polygon\tLocate a Polygon within the network.", - GUIIconSubSys::getIcon(ICON_LOCATESHAPE), &v, MID_LOCATEPOLY, + GUIIconSubSys::getIcon(ICON_LOCATEPOLY), &v, MID_LOCATEPOLY, ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED); } @@ -276,4 +281,6 @@ GUIViewTraffic::getCurrentTimeStep() const { return MSNet::getInstance()->getCurrentTimeStep(); } + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIViewTraffic.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIViewTraffic.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/GUIViewTraffic.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/GUIViewTraffic.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Andreas Gaubatz /// @date Sept 2002 -/// @version $Id: GUIViewTraffic.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIViewTraffic.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A view on the simulation; this view is a microscopic one /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/gui -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,6 +92,10 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libgui_a_AR = $(AR) $(ARFLAGS) libgui_a_LIBADD = am_libgui_a_OBJECTS = GUIApplicationWindow.$(OBJEXT) \ @@ -56,42 +105,102 @@ GUITLLogicPhasesTrackerWindow.$(OBJEXT) \ GUIViewTraffic.$(OBJEXT) TraCIServerAPI_GUI.$(OBJEXT) libgui_a_OBJECTS = $(am_libgui_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libgui_a_SOURCES) DIST_SOURCES = $(libgui_a_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -126,6 +235,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -152,9 +262,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -165,10 +279,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -312,10 +422,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libgui.a: $(libgui_a_OBJECTS) $(libgui_a_DEPENDENCIES) - -rm -f libgui.a - $(libgui_a_AR) libgui.a $(libgui_a_OBJECTS) $(libgui_a_LIBADD) - $(RANLIB) libgui.a + +libgui.a: $(libgui_a_OBJECTS) $(libgui_a_DEPENDENCIES) $(EXTRA_libgui_a_DEPENDENCIES) + $(AM_V_at)-rm -f libgui.a + $(AM_V_AR)$(libgui_a_AR) libgui.a $(libgui_a_OBJECTS) $(libgui_a_LIBADD) + $(AM_V_at)$(RANLIB) libgui.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -334,25 +445,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_GUI.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -361,22 +472,25 @@ -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -391,57 +505,12 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -457,12 +526,7 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -474,15 +538,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -491,6 +551,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -527,13 +602,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -568,10 +640,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -654,12 +731,11 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - clean-noinstLIBRARIES ctags ctags-recursive distclean \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ @@ -669,8 +745,8 @@ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/TraCIServerAPI_GUI.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/TraCIServerAPI_GUI.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/TraCIServerAPI_GUI.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/TraCIServerAPI_GUI.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_GUI.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_GUI.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting GUI values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -49,12 +49,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace traci; - - -// =========================================================================== // method definitions // =========================================================================== bool diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/TraCIServerAPI_GUI.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/TraCIServerAPI_GUI.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/gui/TraCIServerAPI_GUI.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/gui/TraCIServerAPI_GUI.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_GUI.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_GUI.h 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting GUI values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -60,7 +60,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processGet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -70,7 +70,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processSet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processSet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guinetload/GUIDetectorBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guinetload/GUIDetectorBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guinetload/GUIDetectorBuilder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guinetload/GUIDetectorBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Tue, 22 Jul 2003 -/// @version $Id: GUIDetectorBuilder.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDetectorBuilder.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Builds detectors for guisim /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guinetload/GUIDetectorBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guinetload/GUIDetectorBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guinetload/GUIDetectorBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guinetload/GUIDetectorBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Tue, 22 Jul 2003 -/// @version $Id: GUIDetectorBuilder.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDetectorBuilder.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Builds detectors for guisim /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guinetload/GUIEdgeControlBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guinetload/GUIEdgeControlBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guinetload/GUIEdgeControlBuilder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guinetload/GUIEdgeControlBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIEdgeControlBuilder.cpp 14439 2013-08-19 10:09:54Z namdre $ +/// @version $Id: GUIEdgeControlBuilder.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Derivation of NLEdgeControlBuilder which build gui-edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -71,8 +71,9 @@ MSEdge* -GUIEdgeControlBuilder::buildEdge(const std::string& id, const MSEdge::EdgeBasicFunction function, const std::string& streetName) { - return new GUIEdge(id, myCurrentNumericalEdgeID++, function, streetName); +GUIEdgeControlBuilder::buildEdge(const std::string& id, const MSEdge::EdgeBasicFunction function, + const std::string& streetName, const std::string& edgeType, const int priority) { + return new GUIEdge(id, myCurrentNumericalEdgeID++, function, streetName, edgeType, priority); } /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guinetload/GUIEdgeControlBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guinetload/GUIEdgeControlBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guinetload/GUIEdgeControlBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guinetload/GUIEdgeControlBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIEdgeControlBuilder.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIEdgeControlBuilder.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Derivation of NLEdgeControlBuilder which builds gui-edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -96,7 +96,8 @@ * * @param[in] id The id of the edge to build */ - MSEdge* buildEdge(const std::string& id, const MSEdge::EdgeBasicFunction function, const std::string& streetName); + MSEdge* buildEdge(const std::string& id, const MSEdge::EdgeBasicFunction function, + const std::string& streetName, const std::string& edgeType, const int priority); private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guinetload/GUITriggerBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guinetload/GUITriggerBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guinetload/GUITriggerBuilder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guinetload/GUITriggerBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 26.04.2004 -/// @version $Id: GUITriggerBuilder.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: GUITriggerBuilder.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Builds trigger objects for guisim /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,6 +36,7 @@ #include #include #include +#include #include #include "GUITriggerBuilder.h" @@ -65,7 +66,7 @@ MSTriggeredRerouter* GUITriggerBuilder::buildRerouter(MSNet& net, const std::string& id, - std::vector& edges, + MSEdgeVector& edges, SUMOReal prob, const std::string& file, bool off) { GUITriggeredRerouter* rr = new GUITriggeredRerouter(id, edges, prob, file, off, dynamic_cast(net).getVisualisationSpeedUp()); @@ -86,14 +87,28 @@ static_cast(net).getVisualisationSpeedUp().addAdditionalGLObject(stop); } +void +GUITriggerBuilder::buildContainerStop(MSNet& net, const std::string& id, + const std::vector& lines, + MSLane* lane, + SUMOReal frompos, SUMOReal topos) { + GUIContainerStop* stop = new GUIContainerStop(id, lines, *lane, frompos, topos); + if (!net.addContainerStop(stop)) { + delete stop; + throw InvalidArgument("Could not build container stop '" + id + "'; probably declared twice."); + } + static_cast(net).getVisualisationSpeedUp().addAdditionalGLObject(stop); +} + MSCalibrator* GUITriggerBuilder::buildCalibrator(MSNet& net, const std::string& id, MSEdge* edge, SUMOReal pos, const std::string& file, const std::string& outfile, - const SUMOTime freq) { - GUICalibrator* cali = new GUICalibrator(id, edge, pos, file, outfile, freq); + const SUMOTime freq, + const MSRouteProbe* probe) { + GUICalibrator* cali = new GUICalibrator(id, edge, pos, file, outfile, freq, probe); static_cast(net).getVisualisationSpeedUp().addAdditionalGLObject(cali); return cali; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guinetload/GUITriggerBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guinetload/GUITriggerBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guinetload/GUITriggerBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guinetload/GUITriggerBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Mon, 26.04.2004 -/// @version $Id: GUITriggerBuilder.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: GUITriggerBuilder.h 18096 2015-03-17 09:50:59Z behrisch $ /// // Builds trigger objects for guisim /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -97,7 +98,7 @@ * @param[in] file The file to read the reroute definitions from */ virtual MSTriggeredRerouter* buildRerouter(MSNet& net, - const std::string& id, std::vector& edges, + const std::string& id, MSEdgeVector& edges, SUMOReal prob, const std::string& file, bool off); @@ -118,6 +119,23 @@ SUMOReal frompos, SUMOReal topos); + /** @brief Builds a container stop + * + * Simply calls the GUIContainerStop constructor. + * + * @param[in] net The net the container stop belongs to + * @param[in] id The id of the container stop + * @param[in] lines Names of the lines that halt on this container stop + * @param[in] lane The lane the container stop is placed on + * @param[in] frompos Begin position of the container stop on the lane + * @param[in] topos End position of the container stop on the lane + * @exception InvalidArgument If the container stop can not be added to the net (is duplicate) + */ + virtual void buildContainerStop(MSNet& net, const std::string& id, + const std::vector& lines, MSLane* lane, + SUMOReal frompos, SUMOReal topos); + + /** @brief builds a microscopic calibrator * * Simply calls the MSCalibrator constructor. @@ -132,7 +150,7 @@ virtual MSCalibrator* buildCalibrator(MSNet& net, const std::string& id, MSEdge* edge, SUMOReal pos, const std::string& file, const std::string& outfile, - const SUMOTime freq); + const SUMOTime freq, const MSRouteProbe* probe); /// @} }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guinetload/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guinetload/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guinetload/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guinetload/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/guinetload -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,35 +92,95 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libguinetload_a_AR = $(AR) $(ARFLAGS) libguinetload_a_LIBADD = am_libguinetload_a_OBJECTS = GUIDetectorBuilder.$(OBJEXT) \ GUIEdgeControlBuilder.$(OBJEXT) GUITriggerBuilder.$(OBJEXT) libguinetload_a_OBJECTS = $(am_libguinetload_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libguinetload_a_SOURCES) DIST_SOURCES = $(libguinetload_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -84,6 +189,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -110,9 +216,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -123,10 +233,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -262,10 +368,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libguinetload.a: $(libguinetload_a_OBJECTS) $(libguinetload_a_DEPENDENCIES) - -rm -f libguinetload.a - $(libguinetload_a_AR) libguinetload.a $(libguinetload_a_OBJECTS) $(libguinetload_a_LIBADD) - $(RANLIB) libguinetload.a + +libguinetload.a: $(libguinetload_a_OBJECTS) $(libguinetload_a_DEPENDENCIES) $(EXTRA_libguinetload_a_DEPENDENCIES) + $(AM_V_at)-rm -f libguinetload.a + $(AM_V_AR)$(libguinetload_a_AR) libguinetload.a $(libguinetload_a_OBJECTS) $(libguinetload_a_LIBADD) + $(AM_V_at)$(RANLIB) libguinetload.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -278,25 +385,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUITriggerBuilder.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -304,26 +411,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -335,15 +431,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -352,6 +444,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -400,10 +507,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -488,18 +600,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIBusStop.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIBusStop.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIBusStop.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIBusStop.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Wed, 07.12.2005 -/// @version $Id: GUIBusStop.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIBusStop.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A lane area vehicles can halt at (gui-version) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -135,7 +135,8 @@ GLHelper::setColor(green); GLHelper::drawBoxLines(myFGShape, myFGShapeRotations, myFGShapeLengths, 1.0); // draw details unless zoomed out to far - if (s.scale * s.addExaggeration >= 10) { + const SUMOReal exaggeration = s.addSize.getExaggeration(s); + if (s.scale * exaggeration >= 10) { // draw the lines for (i = 0; i != myLines.size(); ++i) { glPushMatrix(); @@ -145,7 +146,7 @@ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); pfSetPosition(0, 0); pfSetScale(1.f); - glScaled(s.addExaggeration, s.addExaggeration, 1); + glScaled(exaggeration, exaggeration, 1); glTranslated(1.2, -(double)i, 0); pfDrawString(myLines[i].c_str()); glPopMatrix(); @@ -153,16 +154,16 @@ // draw the sign glTranslated(myFGSignPos.x(), myFGSignPos.y(), 0); int noPoints = 9; - if (s.scale * s.addExaggeration > 25) { - noPoints = MIN2((int)(9.0 + (s.scale * s.addExaggeration) / 10.0), 36); + if (s.scale * exaggeration > 25) { + noPoints = MIN2((int)(9.0 + (s.scale * exaggeration) / 10.0), 36); } - glScaled(s.addExaggeration, s.addExaggeration, 1); + glScaled(exaggeration, exaggeration, 1); GLHelper::drawFilledCircle((SUMOReal) 1.1, noPoints); glTranslated(0, 0, .1); GLHelper::setColor(yellow); GLHelper::drawFilledCircle((SUMOReal) 0.9, noPoints); - if (s.scale * s.addExaggeration >= 4.5) { - GLHelper::drawText("H", Position(), .1, 1.6 * s.addExaggeration, green, myFGSignRot); + if (s.scale * exaggeration >= 4.5) { + GLHelper::drawText("H", Position(), .1, 1.6 * exaggeration, green, myFGSignRot); } } glPopMatrix(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIBusStop.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIBusStop.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIBusStop.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIBusStop.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Wed, 07.12.2005 -/// @version $Id: GUIBusStop.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIBusStop.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A lane area vehicles can halt at (gui-version) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUICalibrator.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUICalibrator.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUICalibrator.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUICalibrator.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 26.04.2004 -/// @version $Id: GUICalibrator.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: GUICalibrator.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Changes flow and speed on a set of lanes (gui version) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -283,8 +283,9 @@ MSEdge* edge, SUMOReal pos, const std::string& aXMLFilename, const std::string& outputFilename, - const SUMOTime freq) : - MSCalibrator(id, edge, pos, aXMLFilename, outputFilename, freq), + const SUMOTime freq, + const MSRouteProbe* probe) : + MSCalibrator(id, edge, pos, aXMLFilename, outputFilename, freq, edge->getLength(), probe), GUIGlObject_AbstractAdd("calibrator", GLO_TRIGGER, id), myShowAsKMH(true) { const std::vector& destLanes = edge->getLanes(); @@ -361,6 +362,7 @@ flow = toString((int)myCurrentStateInterval->q) + "v/h"; } } + const SUMOReal exaggeration = s.addSize.getExaggeration(s); for (size_t i = 0; i < myFGPositions.size(); ++i) { const Position& pos = myFGPositions[i]; SUMOReal rot = myFGRotations[i]; @@ -368,7 +370,7 @@ glTranslated(pos.x(), pos.y(), getType()); glRotated(rot, 0, 0, 1); glTranslated(0, 0, getType()); - glScaled(s.addExaggeration, s.addExaggeration, 1); + glScaled(exaggeration, exaggeration, 1); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glBegin(GL_TRIANGLES); @@ -383,7 +385,7 @@ glEnd(); // draw text - if (s.scale * s.addExaggeration >= 1.) { + if (s.scale * exaggeration >= 1.) { glTranslated(0, 0, .1); glColor3d(0, 0, 0); pfSetPosition(0, 0); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUICalibrator.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUICalibrator.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUICalibrator.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUICalibrator.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 26.04.2004 -/// @version $Id: GUICalibrator.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: GUICalibrator.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Changes flow and speed on a set of lanes (gui version) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -62,7 +62,8 @@ MSEdge* edge, SUMOReal pos, const std::string& aXMLFilename, const std::string& outputFilename, - const SUMOTime freq); + const SUMOTime freq, + const MSRouteProbe* probe); /** destructor */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIContainerControl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIContainerControl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIContainerControl.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIContainerControl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,59 @@ +/****************************************************************************/ +/// @file GUIContainerControl.cpp +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Wed, 01.08.2014 +/// @version $Id: GUIContainerControl.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// GUI-version of the container control for building gui containers +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include "GUINet.h" +#include "GUIContainerControl.h" +#include "GUIContainer.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +GUIContainerControl::GUIContainerControl() {} + + +GUIContainerControl::~GUIContainerControl() { +} + + +MSContainer* +GUIContainerControl::buildContainer(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSContainer::MSContainerPlan* plan) const { + return new GUIContainer(pars, vtype, plan); +} + + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIContainerControl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIContainerControl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIContainerControl.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIContainerControl.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,66 @@ +/****************************************************************************/ +/// @file GUIContainerControl.h +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Wed, 01.08.2014 +/// @version $Id: GUIContainerControl.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// GUI-version of the container control for building gui containers +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef GUIContainerControl_h +#define GUIContainerControl_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** @class GUIContainerControl + * @brief GUI-version of the container control for building gui containers + */ +class GUIContainerControl : public MSContainerControl { +public: + /// constructor + GUIContainerControl(); + + + /// destructor + virtual ~GUIContainerControl(); + + + /** @brief Builds a new container + * @param[in] pars The parameter + * @param[in] vtype The type (reusing vehicle type container here) + * @param[in] plan This container's plan + */ + virtual MSContainer* buildContainer(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSContainer::MSContainerPlan* plan) const; + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIContainer.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIContainer.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIContainer.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIContainer.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,408 @@ +/****************************************************************************/ +/// @file GUIContainer.cpp +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Wed, 01.08.2014 +/// @version $Id: GUIContainer.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// A MSContainer extended by some values for usage within the gui +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "GUIContainer.h" +#include "GUINet.h" +#include "GUIEdge.h" +#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + +//#define GUIContainer_DEBUG_DRAW_WALKING_AREA_SHAPE + +// =========================================================================== +// FOX callback mapping +// =========================================================================== +/* +FXDEFMAP(GUIContainer::GUIContainerPopupMenu) GUIContainerPopupMenuMap[] = { + FXMAPFUNC(SEL_COMMAND, MID_SHOW_ALLROUTES, GUIContainer::GUIContainerPopupMenu::onCmdShowAllRoutes), + FXMAPFUNC(SEL_COMMAND, MID_HIDE_ALLROUTES, GUIContainer::GUIContainerPopupMenu::onCmdHideAllRoutes), + FXMAPFUNC(SEL_COMMAND, MID_SHOW_CURRENTROUTE, GUIContainer::GUIContainerPopupMenu::onCmdShowCurrentRoute), + FXMAPFUNC(SEL_COMMAND, MID_HIDE_CURRENTROUTE, GUIContainer::GUIContainerPopupMenu::onCmdHideCurrentRoute), + FXMAPFUNC(SEL_COMMAND, MID_SHOW_BEST_LANES, GUIContainer::GUIContainerPopupMenu::onCmdShowBestLanes), + FXMAPFUNC(SEL_COMMAND, MID_HIDE_BEST_LANES, GUIContainer::GUIContainerPopupMenu::onCmdHideBestLanes), + FXMAPFUNC(SEL_COMMAND, MID_START_TRACK, GUIContainer::GUIContainerPopupMenu::onCmdStartTrack), + FXMAPFUNC(SEL_COMMAND, MID_STOP_TRACK, GUIContainer::GUIContainerPopupMenu::onCmdStopTrack), + FXMAPFUNC(SEL_COMMAND, MID_SHOW_LFLINKITEMS, GUIContainer::GUIContainerPopupMenu::onCmdShowLFLinkItems), + FXMAPFUNC(SEL_COMMAND, MID_HIDE_LFLINKITEMS, GUIContainer::GUIContainerPopupMenu::onCmdHideLFLinkItems), +}; + +// Object implementation +FXIMPLEMENT(GUIContainer::GUIContainerPopupMenu, GUIGLObjectPopupMenu, GUIContainerPopupMenuMap, ARRAYNUMBER(GUIContainerPopupMenuMap)) +*/ + +#define WATER_WAY_OFFSET 6.0 + +// =========================================================================== +// method definitions +// =========================================================================== +/* ------------------------------------------------------------------------- + * GUIContainer::GUIContainerPopupMenu - methods + * ----------------------------------------------------------------------- */ +GUIContainer::GUIContainerPopupMenu::GUIContainerPopupMenu( + GUIMainWindow& app, GUISUMOAbstractView& parent, + GUIGlObject& o, std::map& additionalVisualizations) + : GUIGLObjectPopupMenu(app, parent, o), myVehiclesAdditionalVisualizations(additionalVisualizations) { +} + + +GUIContainer::GUIContainerPopupMenu::~GUIContainerPopupMenu() {} + + + +/* ------------------------------------------------------------------------- + * GUIContainer - methods + * ----------------------------------------------------------------------- */ +GUIContainer::GUIContainer(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSContainer::MSContainerPlan* plan) : + MSContainer(pars, vtype, plan), + GUIGlObject(GLO_CONTAINER, pars->id) +{ } + + +GUIContainer::~GUIContainer() { +} + + +GUIGLObjectPopupMenu* +GUIContainer::getPopUpMenu(GUIMainWindow& app, + GUISUMOAbstractView& parent) { + GUIGLObjectPopupMenu* ret = new GUIContainerPopupMenu(app, parent, *this, myAdditionalVisualizations); + buildPopupHeader(ret, app); + buildCenterPopupEntry(ret); + buildNameCopyPopupEntry(ret); + buildSelectionPopupEntry(ret); + // + buildShowParamsPopupEntry(ret); + buildPositionCopyEntry(ret, false); + return ret; +} + + +GUIParameterTableWindow* +GUIContainer::getParameterWindow(GUIMainWindow& app, + GUISUMOAbstractView&) { + GUIParameterTableWindow* ret = + new GUIParameterTableWindow(app, *this, 8); + // add items + //ret->mkItem("type [NAME]", false, myType->getID()); + ret->mkItem("stage", false, getCurrentStageDescription()); + ret->mkItem("start edge [id]", false, getFromEdge()->getID()); + ret->mkItem("dest edge [id]", false, getDestination().getID()); + ret->mkItem("edge [id]", false, getEdge()->getID()); + ret->mkItem("position [m]", true, new FunctionBinding(this, &GUIContainer::getEdgePos)); + ret->mkItem("speed [m/s]", true, new FunctionBinding(this, &GUIContainer::getSpeed)); + ret->mkItem("angle [degree]", true, new FunctionBinding(this, &GUIContainer::getAngle)); + ret->mkItem("waiting time [s]", true, new FunctionBinding(this, &GUIContainer::getWaitingSeconds)); + // close building + ret->closeBuilding(); + return ret; +} + + +Boundary +GUIContainer::getCenteringBoundary() const { + Boundary b; + b.add(getPosition()); + b.grow(20); + return b; +} + + +void +GUIContainer::drawGL(const GUIVisualizationSettings& s) const { + glPushName(getGlID()); + glPushMatrix(); + Position p1 = getPosition(); + glTranslated(p1.x(), p1.y(), getType()); + glRotated(90, 0, 0, 1); + // XXX use container specific gui settings + // set container color + setColor(s); + // scale + const SUMOReal upscale = s.containerSize.getExaggeration(s); + glScaled(upscale, upscale, 1); + switch (s.containerQuality) { + case 0: + case 1: + case 2: + drawAction_drawAsPoly(s); + break; + case 3: + default: + drawAction_drawAsImage(s); + break; + } + glPopMatrix(); + + drawName(p1, s.scale, s.containerName); + glPopName(); +} + + +void +GUIContainer::drawGLAdditional(GUISUMOAbstractView* const /* parent */, const GUIVisualizationSettings& /* s */) const { + glPushName(getGlID()); + glPushMatrix(); + /* + glTranslated(0, 0, getType() - .1); // don't draw on top of other cars + if (hasActiveAddVisualisation(parent, VO_SHOW_BEST_LANES)) { + drawBestLanes(); + } + if (hasActiveAddVisualisation(parent, VO_SHOW_ROUTE)) { + drawRoute(s, 0, 0.25); + } + if (hasActiveAddVisualisation(parent, VO_SHOW_ALL_ROUTES)) { + if (getNumberReroutes() > 0) { + const int noReroutePlus1 = getNumberReroutes() + 1; + for (int i = noReroutePlus1 - 1; i >= 0; i--) { + SUMOReal darken = SUMOReal(0.4) / SUMOReal(noReroutePlus1) * SUMOReal(i); + drawRoute(s, i, darken); + } + } else { + drawRoute(s, 0, 0.25); + } + } + if (hasActiveAddVisualisation(parent, VO_SHOW_LFLINKITEMS)) { + for (DriveItemVector::const_iterator i = myLFLinkLanes.begin(); i != myLFLinkLanes.end(); ++i) { + if((*i).myLink==0) { + continue; + } + MSLink* link = (*i).myLink; + #ifdef HAVE_INTERNAL_LANES + MSLane *via = link->getViaLane(); + if (via == 0) { + via = link->getLane(); + } + #else + MSLane *via = link->getLane(); + #endif + if (via != 0) { + Position p = via->getShape()[0]; + if((*i).mySetRequest) { + glColor3f(0, 1, 0); + } else { + glColor3f(1, 0, 0); + } + glTranslated(p.x(), p.y(), -.1); + GLHelper::drawFilledCircle(1); + glTranslated(-p.x(), -p.y(), .1); + } + } + } + */ + glPopMatrix(); + glPopName(); +} + + + + +void +GUIContainer::setColor(const GUIVisualizationSettings& s) const { + const GUIColorer& c = s.containerColorer; + if (!setFunctionalColor(c.getActive())) { + GLHelper::setColor(c.getScheme().getColor(getColorValue(c.getActive()))); + } +} + + +bool +GUIContainer::setFunctionalColor(size_t activeScheme) const { + switch (activeScheme) { + case 0: { + if (getParameter().wasSet(VEHPARS_COLOR_SET)) { + GLHelper::setColor(getParameter().color); + return true; + } + if (getVehicleType().wasSet(VTYPEPARS_COLOR_SET)) { + GLHelper::setColor(getVehicleType().getColor()); + return true; + } + return false; + } + case 2: { + if (getParameter().wasSet(VEHPARS_COLOR_SET)) { + GLHelper::setColor(getParameter().color); + return true; + } + return false; + } + case 3: { + if (getVehicleType().wasSet(VTYPEPARS_COLOR_SET)) { + GLHelper::setColor(getVehicleType().getColor()); + return true; + } + return false; + } + case 8: { + SUMOReal hue = getAngle() + 180; // [0-360] + GLHelper::setColor(RGBColor::fromHSV(hue, 1., 1.)); + return true; + } + default: + return false; + } +} + + +SUMOReal +GUIContainer::getColorValue(size_t activeScheme) const { + switch (activeScheme) { + case 4: + return getSpeed(); + case 5: + if (isWaiting4Vehicle()) { + return 3; + } else { + return (SUMOReal)getCurrentStageType(); + } + case 6: + return getWaitingSeconds(); + case 7: + return gSelected.isSelected(GLO_CONTAINER, getGlID()); + } + return 0; +} + + +SUMOReal +GUIContainer::getEdgePos() const { + AbstractMutex::ScopedLocker locker(myLock); + return MSContainer::getEdgePos(); +} + + +Position +GUIContainer::getPosition() const { + AbstractMutex::ScopedLocker locker(myLock); + if (getCurrentStageType() == DRIVING && !isWaiting4Vehicle()) { + return myPositionInVehicle; + } + if (getCurrentStageType() == WAITING && getEdge()->getPermissions() == SVC_SHIP) { + MSLane* lane = getEdge()->getLanes().front(); //the most right lane of the water way + PositionVector laneShape = lane->getShape(); + return laneShape.positionAtOffset2D(getEdgePos(), WATER_WAY_OFFSET); + } + return MSContainer::getPosition(); +} + + +SUMOReal +GUIContainer::getAngle() const { + AbstractMutex::ScopedLocker locker(myLock); + return MSContainer::getAngle(); +} + + +SUMOReal +GUIContainer::getWaitingSeconds() const { + AbstractMutex::ScopedLocker locker(myLock); + return MSContainer::getWaitingSeconds(); +} + + +SUMOReal +GUIContainer::getSpeed() const { + AbstractMutex::ScopedLocker locker(myLock); + return MSContainer::getSpeed(); +} + + +void +GUIContainer::drawAction_drawAsPoly(const GUIVisualizationSettings& /* s */) const { + // draw pedestrian shape + glRotated(getAngle(), 0, 0, 1); + glScaled(getVehicleType().getLength(), getVehicleType().getWidth(), 1); + glBegin(GL_QUADS); + glVertex2d(0, 0.5); + glVertex2d(0, -0.5); + glVertex2d(-1, -0.5); + glVertex2d(-1, 0.5); + glEnd(); + GLHelper::setColor(GLHelper::getColor().changedBrightness(-30)); + glTranslated(0, 0, .045); + glBegin(GL_QUADS); + glVertex2d(-0.1, 0.4); + glVertex2d(-0.1, -0.4); + glVertex2d(-0.9, -0.4); + glVertex2d(-0.9, 0.4); + glEnd(); +} + + +void +GUIContainer::drawAction_drawAsImage(const GUIVisualizationSettings& s) const { + const std::string& file = getVehicleType().getImgFile(); + if (file != "") { + // @todo invent an option for controlling whether images should be rotated or not + //if (getVehicleType().getGuiShape() == SVS_CONTAINER) { + // glRotated(getAngle(), 0, 0, 1); + //} + int textureID = GUITexturesHelper::getTextureID(file); + if (textureID > 0) { + const SUMOReal exaggeration = s.personSize.getExaggeration(s); + const SUMOReal halfLength = getVehicleType().getLength() / 2.0 * exaggeration; + const SUMOReal halfWidth = getVehicleType().getWidth() / 2.0 * exaggeration; + GUITexturesHelper::drawTexturedBox(textureID, -halfWidth, -halfLength, halfWidth, halfLength); + } + } else { + // fallback if no image is defined + drawAction_drawAsPoly(s); + } +} +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIContainer.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIContainer.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIContainer.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIContainer.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,213 @@ +/****************************************************************************/ +/// @file GUIContainer.h +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Wed, 01.08.2014 +/// @version $Id: GUIContainer.h 18096 2015-03-17 09:50:59Z behrisch $ +/// +// A MSVehicle extended by some values for usage within the gui +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef GUIContainer_h +#define GUIContainer_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class GUISUMOAbstractView; +class GUIGLObjectPopupMenu; +class MSDevice_Vehroutes; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GUIContainer + */ +class GUIContainer : public MSContainer, public GUIGlObject { +public: + /** @brief Constructor + */ + GUIContainer(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSContainer::MSContainerPlan* plan); + + + /// @brief destructor + ~GUIContainer(); + + + /// @name inherited from GUIGlObject + //@{ + + /** @brief Returns an own popup-menu + * + * @param[in] app The application needed to build the popup-menu + * @param[in] parent The parent window needed to build the popup-menu + * @return The built popup-menu + * @see GUIGlObject::getPopUpMenu + */ + GUIGLObjectPopupMenu* getPopUpMenu(GUIMainWindow& app, GUISUMOAbstractView& parent); + + + /** @brief Returns an own parameter window + * + * @param[in] app The application needed to build the parameter window + * @param[in] parent The parent window needed to build the parameter window + * @return The built parameter window + * @see GUIGlObject::getParameterWindow + */ + GUIParameterTableWindow* getParameterWindow(GUIMainWindow& app, GUISUMOAbstractView& parent); + + + /** @brief Returns the boundary to which the view shall be centered in order to show the object + * + * @return The boundary the object is within + * @see GUIGlObject::getCenteringBoundary + */ + Boundary getCenteringBoundary() const; + + + /** @brief Draws the object + * @param[in] s The settings for the current view (may influence drawing) + * @see GUIGlObject::drawGL + */ + void drawGL(const GUIVisualizationSettings& s) const; + + + + /** @brief Draws additionally triggered visualisations + * @param[in] parent The view + * @param[in] s The settings for the current view (may influence drawing) + */ + virtual void drawGLAdditional(GUISUMOAbstractView* const parent, const GUIVisualizationSettings& s) const; + //@} + + /* @brief set the position of a container while being transporte by a vehicle + * @note This must be called by the vehicle before the call to drawGl */ + void setPositionInVehicle(const Position& pos) { + myPositionInVehicle = pos; + } + + /// @name inherited from MSContainer with added locking + //@{ + + /// @brief return the offset from the start of the current edge + SUMOReal getEdgePos() const; + + /// @brief return the Network coordinate of the container + // @note overrides the base method and returns myPositionInVehicle while in driving stage + Position getPosition() const; + + /// @brief return the current angle of the container + SUMOReal getAngle() const; + + /// @brief the time this container spent waiting in seconds + SUMOReal getWaitingSeconds() const; + + /// @brief the current speed of the container + SUMOReal getSpeed() const; + + //@} + + + /** + * @class GUIContainerPopupMenu + * + * A popup-menu for vehicles. In comparison to the normal popup-menu, this one + * also allows to trigger further visualisations and to track the vehicle. + */ + class GUIContainerPopupMenu : public GUIGLObjectPopupMenu { + //FXDECLARE(GUIContainerPopupMenu) + public: + /** @brief Constructor + * @param[in] app The main window for instantiation of other windows + * @param[in] parent The parent view for changing it + * @param[in] o The object of interest + * @param[in, out] additionalVisualizations Information which additional visualisations are enabled (per view) + */ + GUIContainerPopupMenu(GUIMainWindow& app, + GUISUMOAbstractView& parent, GUIGlObject& o, std::map& additionalVisualizations); + + /// @brief Destructor + ~GUIContainerPopupMenu(); + + + protected: + /// @brief Information which additional visualisations are enabled (per view) + std::map& myVehiclesAdditionalVisualizations; + /// @brief Needed for parameterless instantiation + std::map dummy; + + protected: + /// @brief default constructor needed by FOX + GUIContainerPopupMenu() : myVehiclesAdditionalVisualizations(dummy) { } + + }; + + + + /// @brief Enabled visualisations, per view + std::map myAdditionalVisualizations; + + + + +private: + /// The mutex used to avoid concurrent updates of the vehicle buffer + mutable MFXMutex myLock; + + /// The position of a container while riding a vehicle + Position myPositionInVehicle; + + /// @brief sets the color according to the currente settings + void setColor(const GUIVisualizationSettings& s) const; + + /// @brief gets the color value according to the current scheme index + SUMOReal getColorValue(size_t activeScheme) const; + + /// @brief sets the color according to the current scheme index and some vehicle function + bool setFunctionalColor(size_t activeScheme) const; + + /// @name drawing helper methods + /// @{ + void drawAction_drawAsPoly(const GUIVisualizationSettings& s) const; + void drawAction_drawAsImage(const GUIVisualizationSettings& s) const; + /// @} +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIContainerStop.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIContainerStop.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIContainerStop.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIContainerStop.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,188 @@ +/****************************************************************************/ +/// @file GUIContainerStop.cpp +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Wed, 01.08.2014 +/// @version $Id: GUIContainerStop.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// A lane area vehicles can halt at (gui-version) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "GUINet.h" +#include "GUIEdge.h" +#include "GUIContainer.h" +#include "GUIContainerStop.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +GUIContainerStop::GUIContainerStop(const std::string& id, const std::vector& lines, MSLane& lane, + SUMOReal frompos, SUMOReal topos) + : MSContainerStop(id, lines, lane, frompos, topos), + GUIGlObject_AbstractAdd("containerStop", GLO_TRIGGER, id) { + myFGShape = lane.getShape(); + myFGShape.move2side((SUMOReal) 1.65); + myFGShape = myFGShape.getSubpart(frompos, topos); + myFGShapeRotations.reserve(myFGShape.size() - 1); + myFGShapeLengths.reserve(myFGShape.size() - 1); + int e = (int) myFGShape.size() - 1; + for (int i = 0; i < e; ++i) { + const Position& f = myFGShape[i]; + const Position& s = myFGShape[i + 1]; + myFGShapeLengths.push_back(f.distanceTo(s)); + myFGShapeRotations.push_back((SUMOReal) atan2((s.x() - f.x()), (f.y() - s.y())) * (SUMOReal) 180.0 / (SUMOReal) PI); + } + PositionVector tmp = myFGShape; + tmp.move2side(1.5); + myFGSignPos = tmp.getLineCenter(); + myFGSignRot = 0; + if (tmp.length() != 0) { + myFGSignRot = myFGShape.rotationDegreeAtOffset(SUMOReal((myFGShape.length() / 2.))); + myFGSignRot -= 90; + } +} + + +GUIContainerStop::~GUIContainerStop() {} + + +GUIGLObjectPopupMenu* +GUIContainerStop::getPopUpMenu(GUIMainWindow& app, + GUISUMOAbstractView& parent) { + GUIGLObjectPopupMenu* ret = new GUIGLObjectPopupMenu(app, parent, *this); + buildPopupHeader(ret, app); + buildCenterPopupEntry(ret); + buildNameCopyPopupEntry(ret); + buildSelectionPopupEntry(ret); + buildShowParamsPopupEntry(ret); + buildPositionCopyEntry(ret, false); + return ret; +} + + +GUIParameterTableWindow* +GUIContainerStop::getParameterWindow(GUIMainWindow& app, + GUISUMOAbstractView&) { + GUIParameterTableWindow* ret = + new GUIParameterTableWindow(app, *this, 4); + // add items + ret->mkItem("begin position [m]", false, myBegPos); + ret->mkItem("end position [m]", false, myEndPos); + ret->mkItem("container number [#]", true, new FunctionBinding(this, &MSContainerStop::getContainerNumber)); + // close building + ret->closeBuilding(); + return ret; +} + + +void +GUIContainerStop::drawGL(const GUIVisualizationSettings& s) const { + glPushName(getGlID()); + glPushMatrix(); + RGBColor grey(177, 184, 186, 171); + RGBColor blue(83, 89, 172, 255); + // draw the area + size_t i; + glTranslated(0, 0, getType()); + GLHelper::setColor(blue); + GLHelper::drawBoxLines(myFGShape, myFGShapeRotations, myFGShapeLengths, 1.0); + // draw details unless zoomed out to far + const SUMOReal exaggeration = s.addSize.getExaggeration(s); + if (s.scale * exaggeration >= 10) { + // draw the lines + for (i = 0; i != myLines.size(); ++i) { + glPushMatrix(); + glTranslated(myFGSignPos.x(), myFGSignPos.y(), 0); + glRotated(180, 1, 0, 0); + glRotated(myFGSignRot, 0, 0, 1); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + pfSetPosition(0, 0); + pfSetScale(1.f); + glScaled(exaggeration, exaggeration, 1); + glTranslated(1.2, -(double)i, 0); + pfDrawString(myLines[i].c_str()); + glPopMatrix(); + } + // draw the sign + glTranslated(myFGSignPos.x(), myFGSignPos.y(), 0); + int noPoints = 9; + if (s.scale * exaggeration > 25) { + noPoints = MIN2((int)(9.0 + (s.scale * exaggeration) / 10.0), 36); + } + glScaled(exaggeration, exaggeration, 1); + GLHelper::drawFilledCircle((SUMOReal) 1.1, noPoints); + glTranslated(0, 0, .1); + GLHelper::setColor(grey); + GLHelper::drawFilledCircle((SUMOReal) 0.9, noPoints); + if (s.scale * exaggeration >= 4.5) { + GLHelper::drawText("C", Position(), .1, 1.6 * exaggeration, blue, myFGSignRot); + } + } + glPopMatrix(); + glPopName(); + drawName(getCenteringBoundary().getCenter(), s.scale, s.addName); + for (std::vector::const_iterator i = myWaitingContainers.begin(); i != myWaitingContainers.end(); ++i) { + glTranslated(0, 1, 0); // make multiple containers viewable + static_cast(*i)->drawGL(s); + } +} + + +Boundary +GUIContainerStop::getCenteringBoundary() const { + Boundary b = myFGShape.getBoxBoundary(); + b.grow(20); + return b; +} + + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIContainerStop.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIContainerStop.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIContainerStop.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIContainerStop.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,156 @@ +/****************************************************************************/ +/// @file GUIContainerStop.h +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Wed, 01.08.2014 +/// @version $Id: GUIContainerStop.h 18096 2015-03-17 09:50:59Z behrisch $ +/// +// A lane area vehicles can halt at (gui-version) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef GUIContainerStop_h +#define GUIContainerStop_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class MSNet; +class MSLane; +class GUIManipulator; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GUIContainerStop + * @brief A lane area vehicles can halt at (gui-version) + * + * This gui-version of a container-stop extends MSContainerStop by methods for displaying + * and interaction. + * + * @see MSContainerStop + * @see GUIGlObject_AbstractAdd + * @see GUIGlObject + */ +class GUIContainerStop : public MSContainerStop, public GUIGlObject_AbstractAdd { +public: + /** @brief Constructor + * @param[in] idStorage The gl-id storage for giving this object an gl-id + * @param[in] id The id of the container stop + * @param[in] lines Names of the container lines that halt on this container stop + * @param[in] lane The lane the container stop is placed on + * @param[in] begPos Begin position of the container stop on the lane + * @param[in] endPos End position of the container stop on the lane + */ + GUIContainerStop(const std::string& id, + const std::vector& lines, MSLane& lane, + SUMOReal frompos, SUMOReal topos); + + + /// @brief Destructor + ~GUIContainerStop(); + + + + /// @name inherited from GUIGlObject + //@{ + + /** @brief Returns an own popup-menu + * + * @param[in] app The application needed to build the popup-menu + * @param[in] parent The parent window needed to build the popup-menu + * @return The built popup-menu + * @see GUIGlObject::getPopUpMenu + */ + GUIGLObjectPopupMenu* getPopUpMenu(GUIMainWindow& app, + GUISUMOAbstractView& parent); + + + /** @brief Returns an own parameter window + * + * Container stops have no parameter windows (yet). + * + * @param[in] app The application needed to build the parameter window + * @param[in] parent The parent window needed to build the parameter window + * @return The built parameter window (always 0 in this case) + * @see GUIGlObject::getParameterWindow + */ + GUIParameterTableWindow* getParameterWindow(GUIMainWindow& app, + GUISUMOAbstractView& parent); + + + /** @brief Returns the boundary to which the view shall be centered in order to show the object + * + * @return The boundary the object is within + * @see GUIGlObject::getCenteringBoundary + */ + Boundary getCenteringBoundary() const; + + + /** @brief Draws the object + * @param[in] s The settings for the current view (may influence drawing) + * @see GUIGlObject::drawGL + */ + void drawGL(const GUIVisualizationSettings& s) const; + //@} + + +private: + /// @brief The rotations of the shape parts + std::vector myFGShapeRotations; + + /// @brief The lengths of the shape parts + std::vector myFGShapeLengths; + + /// @brief The shape + PositionVector myFGShape; + + /// @brief The position of the sign + Position myFGSignPos; + + /// @brief The rotation of the sign + SUMOReal myFGSignRot; + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIDetectorWrapper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIDetectorWrapper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIDetectorWrapper.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIDetectorWrapper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: GUIDetectorWrapper.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDetectorWrapper.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The base class for detector wrapper /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIDetectorWrapper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIDetectorWrapper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIDetectorWrapper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIDetectorWrapper.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIDetectorWrapper.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDetectorWrapper.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The base class for detector wrapper /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUI_E2_ZS_Collector.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUI_E2_ZS_Collector.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUI_E2_ZS_Collector.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUI_E2_ZS_Collector.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Okt 2003 -/// @version $Id: GUI_E2_ZS_Collector.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUI_E2_ZS_Collector.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The gui-version of the MS_E2_ZS_Collector /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -151,16 +151,16 @@ glPushMatrix(); glTranslated(0, 0, getType()); SUMOReal dwidth = 1; + const SUMOReal exaggeration = s.addSize.getExaggeration(s); if (myDetector.getUsageType() == DU_TL_CONTROL) { dwidth = (SUMOReal) 0.3; glColor3d(0, (SUMOReal) .6, (SUMOReal) .8); } else { glColor3d(0, (SUMOReal) .8, (SUMOReal) .8); } - SUMOReal width = 2; // !!! - if (width * s.addExaggeration > 1.0) { - glScaled(s.addExaggeration, s.addExaggeration, 1); - GLHelper::drawBoxLines(myFullGeometry, myShapeRotations, myShapeLengths, dwidth); + SUMOReal width = (SUMOReal) 2.0 * s.scale; + if (width * exaggeration > 1.0) { + GLHelper::drawBoxLines(myFullGeometry, myShapeRotations, myShapeLengths, dwidth * exaggeration); } else { int e = (int) myFullGeometry.size() - 1; for (int i = 0; i < e; ++i) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUI_E2_ZS_Collector.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUI_E2_ZS_Collector.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUI_E2_ZS_Collector.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUI_E2_ZS_Collector.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Okt 2003 -/// @version $Id: GUI_E2_ZS_Collector.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUI_E2_ZS_Collector.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The gui-version of the MS_E2_ZS_Collector /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUI_E2_ZS_CollectorOverLanes.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUI_E2_ZS_CollectorOverLanes.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUI_E2_ZS_CollectorOverLanes.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUI_E2_ZS_CollectorOverLanes.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Okt 2003 -/// @version $Id: GUI_E2_ZS_CollectorOverLanes.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUI_E2_ZS_CollectorOverLanes.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The gui-version of a MS_E2_ZS_CollectorOverLanes. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUI_E2_ZS_CollectorOverLanes.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUI_E2_ZS_CollectorOverLanes.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUI_E2_ZS_CollectorOverLanes.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUI_E2_ZS_CollectorOverLanes.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Okt 2003 -/// @version $Id: GUI_E2_ZS_CollectorOverLanes.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUI_E2_ZS_CollectorOverLanes.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The gui-version of a MS_E2_ZS_CollectorOverLanes. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIE3Collector.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIE3Collector.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIE3Collector.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIE3Collector.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Jan 2004 -/// @version $Id: GUIE3Collector.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIE3Collector.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The gui-version of a MSE3Collector /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -89,11 +89,11 @@ // add items // values ret->mkItem("vehicles within [#]", true, - new FunctionBinding(&myDetector, &MSE3Collector::getVehiclesWithin)); + new FunctionBinding(&myDetector, &MSE3Collector::getVehiclesWithin)); ret->mkItem("mean speed [m/s]", true, new FunctionBinding(&myDetector, &MSE3Collector::getCurrentMeanSpeed)); ret->mkItem("haltings [#]", true, - new FunctionBinding(&myDetector, &MSE3Collector::getCurrentHaltingNumber)); + new FunctionBinding(&myDetector, &MSE3Collector::getCurrentHaltingNumber)); // close building ret->closeBuilding(); return ret; @@ -108,12 +108,13 @@ typedef std::vector CrossingDefinitions; CrossingDefinitions::const_iterator i; glColor3d(0, .8, 0); + const SUMOReal exaggeration = s.addSize.getExaggeration(s); for (i = myEntryDefinitions.begin(); i != myEntryDefinitions.end(); ++i) { - drawSingleCrossing((*i).myFGPosition, (*i).myFGRotation, s.addExaggeration); + drawSingleCrossing((*i).myFGPosition, (*i).myFGRotation, exaggeration); } glColor3d(.8, 0, 0); for (i = myExitDefinitions.begin(); i != myExitDefinitions.end(); ++i) { - drawSingleCrossing((*i).myFGPosition, (*i).myFGRotation, s.addExaggeration); + drawSingleCrossing((*i).myFGPosition, (*i).myFGRotation, exaggeration); } glPopMatrix(); drawName(getCenteringBoundary().getCenter(), s.scale, s.addName); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIE3Collector.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIE3Collector.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIE3Collector.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIE3Collector.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Jan 2004 -/// @version $Id: GUIE3Collector.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIE3Collector.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The gui-version of a MSE3Collector /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIEdge.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIEdge.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIEdge.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIEdge.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Sept 2002 -/// @version $Id: GUIEdge.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: GUIEdge.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // A road/street connecting two junctions (gui-version) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -53,9 +53,11 @@ #include #include #include "GUIEdge.h" +#include "GUIVehicle.h" #include "GUINet.h" #include "GUILane.h" #include "GUIPerson.h" +#include "GUIContainer.h" #ifdef HAVE_INTERNAL #include @@ -73,8 +75,9 @@ // included modules // =========================================================================== GUIEdge::GUIEdge(const std::string& id, int numericalID, - const EdgeBasicFunction function, const std::string& streetName) - : MSEdge(id, numericalID, function, streetName), + const EdgeBasicFunction function, + const std::string& streetName, const std::string& edgeType, int priority) + : MSEdge(id, numericalID, function, streetName, edgeType, priority), GUIGlObject(GLO_EDGE, id) {} @@ -97,8 +100,8 @@ GUIEdge::getIDs(bool includeInternal) { std::vector ret; ret.reserve(MSEdge::myDict.size()); - for (MSEdge::DictType::iterator i = MSEdge::myDict.begin(); i != MSEdge::myDict.end(); ++i) { - GUIEdge* edge = dynamic_cast(i->second); + for (MSEdge::DictType::const_iterator i = MSEdge::myDict.begin(); i != MSEdge::myDict.end(); ++i) { + const GUIEdge* edge = dynamic_cast(i->second); assert(edge); if (edge->getPurpose() != EDGEFUNCTION_INTERNAL || includeInternal) { ret.push_back(edge->getGlID()); @@ -108,6 +111,20 @@ } +SUMOReal +GUIEdge::getTotalLength(bool includeInternal, bool eachLane) { + SUMOReal result = 0; + for (MSEdge::DictType::const_iterator i = MSEdge::myDict.begin(); i != MSEdge::myDict.end(); ++i) { + const MSEdge* edge = i->second; + if (edge->getPurpose() != EDGEFUNCTION_INTERNAL || includeInternal) { + // @note needs to be change once lanes may have different length + result += edge->getLength() * (eachLane ? edge->getLanes().size() : 1); + } + } + return result; +} + + Boundary GUIEdge::getBoundary() const { Boundary ret; @@ -158,14 +175,10 @@ // add edge items ret->mkItem("length [m]", false, (*myLanes)[0]->getLength()); ret->mkItem("allowed speed [m/s]", false, getAllowedSpeed()); - ret->mkItem("occupancy [%]", true, - new FunctionBinding(this, &GUIEdge::getOccupancy)); - ret->mkItem("mean vehicle speed [m/s]", true, - new FunctionBinding(this, &GUIEdge::getMeanSpeed)); - ret->mkItem("flow [veh/h/lane]", true, - new FunctionBinding(this, &GUIEdge::getFlow)); - ret->mkItem("#vehicles", true, - new CastingFunctionBinding(this, &GUIEdge::getVehicleNo)); + ret->mkItem("occupancy [%]", true, new FunctionBinding(this, &GUIEdge::getBruttoOccupancy, 100.)); + ret->mkItem("mean vehicle speed [m/s]", true, new FunctionBinding(this, &GUIEdge::getMeanSpeed)); + ret->mkItem("flow [veh/h/lane]", true, new FunctionBinding(this, &GUIEdge::getFlow)); + ret->mkItem("#vehicles", true, new CastingFunctionBinding(this, &GUIEdge::getVehicleNo)); ret->mkItem("vehicle ids", false, getVehicleIDs()); // add segment items MESegment* segment = getSegmentAtPosition(parent.getPositionInformation()); @@ -202,9 +215,7 @@ if (s.hideConnectors && myFunction == MSEdge::EDGEFUNCTION_CONNECTOR) { return; } - if (MSGlobals::gUseMesoSim) { - glPushName(getGlID()); - } + glPushName(getGlID()); // draw the lanes for (std::vector::const_iterator i = myLanes->begin(); i != myLanes->end(); ++i) { #ifdef HAVE_INTERNAL @@ -219,86 +230,18 @@ } #ifdef HAVE_INTERNAL if (MSGlobals::gUseMesoSim) { - const GUIVisualizationTextSettings& nameSettings = s.vehicleName; - GUIMEVehicleControl* vehicleControl = GUINet::getGUIInstance()->getGUIMEVehicleControl(); - if (vehicleControl != 0) { - // draw the meso vehicles - vehicleControl->secureVehicles(); - size_t laneIndex = 0; - MESegment::Queue queue; - for (std::vector::const_iterator msl = myLanes->begin(); msl != myLanes->end(); ++msl, ++laneIndex) { - GUILane* l = static_cast(*msl); - const PositionVector& shape = l->getShape(); - const std::vector& shapeRotations = l->getShapeRotations(); - const std::vector& shapeLengths = l->getShapeLengths(); - const Position& laneBeg = shape[0]; - glPushMatrix(); - glTranslated(laneBeg.x(), laneBeg.y(), 0); - glRotated(shapeRotations[0], 0, 0, 1); - // go through the vehicles - int shapeIndex = 0; - SUMOReal shapeOffset = 0; // ofset at start of current shape - SUMOReal segmentOffset = 0; // offset at start of current segment - for (MESegment* segment = MSGlobals::gMesoNet->getSegmentForEdge(*this); - segment != 0; segment = segment->getNextSegment()) { - const SUMOReal length = segment->getLength(); - if (laneIndex < segment->numQueues()) { - // make a copy so we don't have to worry about synchronization - queue = segment->getQueue(laneIndex); - const SUMOReal avgCarSize = segment->getOccupancy() / segment->getCarNumber(); - const size_t queueSize = queue.size(); - for (size_t i = 0; i < queueSize; ++i) { - MSBaseVehicle* veh = queue[queueSize - i - 1]; - setVehicleColor(s, veh); - SUMOReal vehiclePosition = segmentOffset + length - i * avgCarSize; - SUMOReal xOff = 0.f; - while (vehiclePosition < segmentOffset) { - // if there is only a single queue for a - // multi-lane edge shift vehicles and start - // drawing again from the end of the segment - vehiclePosition += length; - xOff += 0.5f; - } - while (shapeIndex < (int)shapeRotations.size() - 1 && vehiclePosition > shapeOffset + shapeLengths[shapeIndex]) { - glPopMatrix(); - shapeOffset += shapeLengths[shapeIndex]; - shapeIndex++; - glPushMatrix(); - glTranslated(shape[shapeIndex].x(), shape[shapeIndex].y(), 0); - glRotated(shapeRotations[shapeIndex], 0, 0, 1); - } - glPushMatrix(); - glTranslated(xOff, -(vehiclePosition - shapeOffset), GLO_VEHICLE); - glPushMatrix(); - glScaled(1, avgCarSize, 1); - glBegin(GL_TRIANGLES); - glVertex2d(0, 0); - glVertex2d(0 - 1.25, 1); - glVertex2d(0 + 1.25, 1); - glEnd(); - glPopMatrix(); - glPopMatrix(); - if (nameSettings.show) { - GLHelper::drawText(veh->getID(), - Position(xOff, -(vehiclePosition - shapeOffset)), - GLO_MAX, nameSettings.size / s.scale, nameSettings.color, 0); - } - } - } - segmentOffset += length; - } - glPopMatrix(); - } - vehicleControl->releaseVehicles(); + if (s.scale * s.vehicleSize.getExaggeration(s) > s.vehicleSize.minSize) { + drawMesoVehicles(s); } - glPopName(); } #endif + glPopName(); // (optionally) draw the name and/or the street name const bool drawEdgeName = s.edgeName.show && myFunction == EDGEFUNCTION_NORMAL; - const bool drawInternalEdgeName = s.internalEdgeName.show && myFunction != EDGEFUNCTION_NORMAL; + const bool drawInternalEdgeName = s.internalEdgeName.show && myFunction == EDGEFUNCTION_INTERNAL; + const bool drawCwaEdgeName = s.cwaEdgeName.show && (myFunction == EDGEFUNCTION_CROSSING || myFunction == EDGEFUNCTION_WALKINGAREA); const bool drawStreetName = s.streetName.show && myStreetName != ""; - if (drawEdgeName || drawInternalEdgeName || drawStreetName) { + if (drawEdgeName || drawInternalEdgeName || drawCwaEdgeName || drawStreetName) { GUILane* lane1 = dynamic_cast((*myLanes)[0]); GUILane* lane2 = dynamic_cast((*myLanes).back()); if (lane1 != 0 && lane2 != 0) { @@ -314,6 +257,8 @@ drawName(p, s.scale, s.edgeName, angle); } else if (drawInternalEdgeName) { drawName(p, s.scale, s.internalEdgeName, angle); + } else if (drawCwaEdgeName) { + drawName(p, s.scale, s.cwaEdgeName, angle); } if (drawStreetName) { GLHelper::drawText(getStreetName(), p, GLO_MAX, @@ -321,16 +266,101 @@ } } } - myLock.lock(); - for (std::set::const_iterator i = myPersons.begin(); i != myPersons.end(); ++i) { - GUIPerson* person = dynamic_cast(*i); - assert(person != 0); - person->drawGL(s); + if (s.scale * s.personSize.getExaggeration(s) > s.personSize.minSize) { + myLock.lock(); + for (std::set::const_iterator i = myPersons.begin(); i != myPersons.end(); ++i) { + GUIPerson* person = dynamic_cast(*i); + assert(person != 0); + person->drawGL(s); + } + myLock.unlock(); + } + if (s.scale * s.containerSize.getExaggeration(s) > s.containerSize.minSize) { + myLock.lock(); + for (std::set::const_iterator i = myContainers.begin(); i != myContainers.end(); ++i) { + GUIContainer* container = dynamic_cast(*i); + assert(container != 0); + container->drawGL(s); + } + myLock.unlock(); } - myLock.unlock(); } + #ifdef HAVE_INTERNAL +void +GUIEdge::drawMesoVehicles(const GUIVisualizationSettings& s) const { + const GUIVisualizationTextSettings& nameSettings = s.vehicleName; + const SUMOReal exaggeration = s.vehicleSize.getExaggeration(s); + GUIMEVehicleControl* vehicleControl = GUINet::getGUIInstance()->getGUIMEVehicleControl(); + if (vehicleControl != 0) { + // draw the meso vehicles + vehicleControl->secureVehicles(); + size_t laneIndex = 0; + MESegment::Queue queue; + for (std::vector::const_iterator msl = myLanes->begin(); msl != myLanes->end(); ++msl, ++laneIndex) { + GUILane* l = static_cast(*msl); + // go through the vehicles + SUMOReal segmentOffset = 0; // offset at start of current segment + for (MESegment* segment = MSGlobals::gMesoNet->getSegmentForEdge(*this); + segment != 0; segment = segment->getNextSegment()) { + const SUMOReal length = segment->getLength() * segment->getLengthGeometryFactor(); + if (laneIndex < segment->numQueues()) { + // make a copy so we don't have to worry about synchronization + queue = segment->getQueue(laneIndex); + const SUMOReal avgCarSize = segment->getBruttoOccupancy() / segment->getCarNumber(); + const SUMOReal avgCarHalfSize = 0.5 * avgCarSize; + const size_t queueSize = queue.size(); + SUMOReal vehiclePosition = segmentOffset + length; + // draw vehicles beginning with the leader at the end of the segment + SUMOReal xOff = 0; + for (size_t i = 0; i < queueSize; ++i) { + MSBaseVehicle* veh = queue[queueSize - i - 1]; + const SUMOReal vehLength = veh->getVehicleType().getLengthWithGap(); + setVehicleColor(s, veh); + while (vehiclePosition < segmentOffset) { + // if there is only a single queue for a + // multi-lane edge shift vehicles and start + // drawing again from the end of the segment + vehiclePosition += length; + xOff += 2; + } + const Position p = l->geometryPositionAtOffset(vehiclePosition); + const SUMOReal angle = -l->getShape().rotationDegreeAtOffset(l->interpolateLanePosToGeometryPos(vehiclePosition)); + glPushMatrix(); + glTranslated(p.x(), p.y(), 0); + glRotated(angle, 0, 0, 1); + glTranslated(xOff, 0, GLO_VEHICLE); + glScaled(exaggeration, vehLength * exaggeration, 1); + glBegin(GL_TRIANGLES); + glVertex2d(0, 0); + glVertex2d(0 - 1.25, 1); + glVertex2d(0 + 1.25, 1); + glEnd(); + glPopMatrix(); + if (nameSettings.show) { + glPushMatrix(); + glRotated(angle, 0, 0, 1); + glTranslated(xOff, 0, 0); + glRotated(-angle, 0, 0, 1); + GLHelper::drawText(veh->getID(), + l->geometryPositionAtOffset(vehiclePosition - 0.5 * vehLength), + GLO_MAX, nameSettings.size / s.scale, nameSettings.color); + glPopMatrix(); + } + vehiclePosition -= vehLength; + } + } + segmentOffset += length; + } + glPopMatrix(); + } + vehicleControl->releaseVehicles(); + } +} + + + unsigned int GUIEdge::getVehicleNo() const { size_t vehNo = 0; @@ -367,10 +397,10 @@ SUMOReal -GUIEdge::getOccupancy() const { +GUIEdge::getBruttoOccupancy() const { SUMOReal occ = 0; for (MESegment* segment = MSGlobals::gMesoNet->getSegmentForEdge(*this); segment != 0; segment = segment->getNextSegment()) { - occ += segment->getOccupancy(); + occ += segment->getBruttoOccupancy(); } return occ / (*myLanes)[0]->getLength() / (SUMOReal)(myLanes->size()); } @@ -420,7 +450,7 @@ case 3: return getAllowedSpeed(); case 4: - return getOccupancy(); + return getBruttoOccupancy(); case 5: return getMeanSpeed(); case 6: @@ -432,6 +462,26 @@ } +SUMOReal +GUIEdge::getScaleValue(size_t activeScheme) const { + switch (activeScheme) { + case 1: + return gSelected.isSelected(getType(), getGlID()); + case 2: + return getAllowedSpeed(); + case 3: + return getBruttoOccupancy(); + case 4: + return getMeanSpeed(); + case 5: + return getFlow(); + case 6: + return getRelativeSpeed(); + } + return 0; +} + + MESegment* GUIEdge::getSegmentAtPosition(const Position& pos) { const PositionVector& shape = getLanes()[0]->getShape(); @@ -443,21 +493,61 @@ void GUIEdge::setVehicleColor(const GUIVisualizationSettings& s, MSBaseVehicle* veh) const { const GUIColorer& c = s.vehicleColorer; - switch (c.getActive()) { - case 1: - GLHelper::setColor(veh->getParameter().color); - break; - case 2: - GLHelper::setColor(veh->getVehicleType().getColor()); - break; - case 3: - GLHelper::setColor(veh->getRoute().getColor()); - break; - default: - GLHelper::setColor(c.getScheme().getColor(0)); + if (!GUIVehicle::setFunctionalColor(c.getActive(), veh)) { + GLHelper::setColor(c.getScheme().getColor(getVehicleColorValue(c.getActive(), veh))); + } +} + + +SUMOReal +GUIEdge::getVehicleColorValue(size_t activeScheme, MSBaseVehicle* veh) const { + switch (activeScheme) { + case 8: + return veh->getSpeed(); + case 9: + return STEPS2TIME(veh->getWaitingTime()); + case 10: + return 0; // invalid getLastLaneChangeOffset(); + case 11: + return MIN2(veh->getMaxSpeed(), getVehicleMaxSpeed(veh)); + case 12: + return 0; // invalid getCO2Emissions(); + case 13: + return 0; // invalid getCOEmissions(); + case 14: + return 0; // invalid getPMxEmissions(); + case 15: + return 0; // invalid getNOxEmissions(); + case 16: + return 0; // invalid getHCEmissions(); + case 17: + return 0; // invalid getFuelConsumption(); + case 18: + return 0; // invalid getHarmonoise_NoiseEmissions(); + case 19: // !!! unused!? + if (veh->getNumberReroutes() == 0) { + return -1; + } + return veh->getNumberReroutes(); + case 20: + return 0; // invalid gSelected.isSelected(GLO_VEHICLE, getGlID()); + case 21: + return 0; // invalid getBestLaneOffset(); + case 22: + return 0; // invalid getAcceleration(); + case 23: + return 0; // invalid getTimeGap(); } + return 0; } + + + + + + + #endif /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIEdge.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIEdge.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIEdge.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIEdge.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIEdge.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIEdge.h 18096 2015-03-17 09:50:59Z behrisch $ /// // A road/street connecting two junctions (gui-version) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -66,7 +66,8 @@ * @see MSEdge */ GUIEdge(const std::string& id, int numericalID, - const EdgeBasicFunction function, const std::string& streetName); + const EdgeBasicFunction function, + const std::string& streetName, const std::string& edgeType, int priority); /// @brief Destructor. @@ -78,6 +79,12 @@ */ static std::vector getIDs(bool includeInternal); + /* @brief Returns the combined length of all edges + * @param[in] includeInternal Whether to include lengths of internal edges + * @param[in] eachLane Whether to count each lane separately + */ + static SUMOReal getTotalLength(bool includeInternal, bool eachLane); + /// Returns the street's geometry Boundary getBoundary() const; @@ -137,21 +144,31 @@ //@} - void addPerson(MSPerson* p) { + void addPerson(MSPerson* p) const { AbstractMutex::ScopedLocker locker(myLock); MSEdge::addPerson(p); } - void removePerson(MSPerson* p) { + void removePerson(MSPerson* p) const { AbstractMutex::ScopedLocker locker(myLock); MSEdge::removePerson(p); } + void addContainer(MSContainer* c) const { + AbstractMutex::ScopedLocker locker(myLock); + MSEdge::addContainer(c); + } + + void removeContainer(MSContainer* c) const { + AbstractMutex::ScopedLocker locker(myLock); + MSEdge::removeContainer(c); + } + #ifdef HAVE_INTERNAL unsigned int getVehicleNo() const; std::string getVehicleIDs() const; - SUMOReal getOccupancy() const; + SUMOReal getBruttoOccupancy() const; SUMOReal getMeanSpeed() const; SUMOReal getAllowedSpeed() const; /// @brief return flow based on meanSpead @note: may produced incorrect results when jammed @@ -165,12 +182,20 @@ /// @brief gets the color value according to the current scheme index SUMOReal getColorValue(size_t activeScheme) const; + /// @brief gets the scaling value according to the current scheme index + SUMOReal getScaleValue(size_t activeScheme) const; + /// @brief returns the segment closest to the given position MESegment* getSegmentAtPosition(const Position& pos); /// @brief sets the vehicle color according to the currente settings void setVehicleColor(const GUIVisualizationSettings& s, MSBaseVehicle* veh) const; + /// @brief gets the vehicle color value according to the current scheme index + SUMOReal getVehicleColorValue(size_t activeScheme, MSBaseVehicle* veh) const; + + void drawMesoVehicles(const GUIVisualizationSettings& s) const; + #endif @@ -183,7 +208,7 @@ private: - /// The mutex used to avoid concurrent updates of myPersons + /// The mutex used to avoid concurrent updates of myPersons/ myContainers mutable MFXMutex myLock; }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIEventControl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIEventControl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIEventControl.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIEventControl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 04 Feb 2008 -/// @version $Id: GUIEventControl.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIEventControl.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Stores time-dependant events and executes them at the proper time (guisim) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIEventControl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIEventControl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIEventControl.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIEventControl.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 04 Feb 2008 -/// @version $Id: GUIEventControl.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIEventControl.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Stores time-dependant events and executes them at the proper time (guisim) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIInductLoop.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIInductLoop.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIInductLoop.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIInductLoop.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Aug 2003 -/// @version $Id: GUIInductLoop.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIInductLoop.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The gui-version of the MSInductLoop, together with the according /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -88,9 +87,9 @@ } void -GUIInductLoop::leaveDetectorByLaneChange(SUMOVehicle& veh) { +GUIInductLoop::leaveDetectorByLaneChange(SUMOVehicle& veh, SUMOReal lastPos) { AbstractMutex::ScopedLocker locker(myLock); - MSInductLoop::leaveDetectorByLaneChange(veh); + MSInductLoop::leaveDetectorByLaneChange(veh, lastPos); } @@ -156,13 +155,14 @@ glPushName(getGlID()); SUMOReal width = (SUMOReal) 2.0 * s.scale; glLineWidth(1.0); + const SUMOReal exaggeration = s.addSize.getExaggeration(s); // shape glColor3d(1, 1, 0); glPushMatrix(); glTranslated(0, 0, getType()); glTranslated(myFGPosition.x(), myFGPosition.y(), 0); glRotated(myFGRotation, 0, 0, 1); - glScaled(s.addExaggeration, s.addExaggeration, 1); + glScaled(exaggeration, exaggeration, 1); glBegin(GL_QUADS); glVertex2d(0 - 1.0, 2); glVertex2d(-1.0, -2); @@ -176,7 +176,7 @@ glEnd(); // outline - if (width * s.addExaggeration > 1) { + if (width * exaggeration > 1) { glColor3d(1, 1, 1); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glBegin(GL_QUADS); @@ -189,7 +189,7 @@ } // position indicator - if (width * s.addExaggeration > 1) { + if (width * exaggeration > 1) { glRotated(90, 0, 0, -1); glColor3d(1, 1, 1); glBegin(GL_LINES); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIInductLoop.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIInductLoop.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIInductLoop.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIInductLoop.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Aug 2003 -/// @version $Id: GUIInductLoop.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIInductLoop.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The gui-version of the MSInductLoop, together with the according /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -124,8 +124,9 @@ * Locks the internal mutex before calling MSInductLoop::leaveDetectorByLaneChange() * @see MSInductLoop::leaveDetectorByLaneChange() * @param veh The leaving vehicle. + * @param lastPos The last position of the leaving vehicle. */ - void leaveDetectorByLaneChange(SUMOVehicle& veh); + void leaveDetectorByLaneChange(SUMOVehicle& veh, SUMOReal lastPos); /// @} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIInstantInductLoop.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIInstantInductLoop.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIInstantInductLoop.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIInstantInductLoop.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file GUIInstantInductLoop.cpp /// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch /// @date Aug 2003 -/// @version $Id: GUIInstantInductLoop.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIInstantInductLoop.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The gui-version of the MSInstantInductLoop /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -111,13 +112,14 @@ glPushName(getGlID()); SUMOReal width = (SUMOReal) 2.0 * s.scale; glLineWidth(1.0); + const SUMOReal exaggeration = s.addSize.getExaggeration(s); // shape glColor3d(1, 0, 1); glPushMatrix(); glTranslated(0, 0, getType()); glTranslated(myFGPosition.x(), myFGPosition.y(), 0); glRotated(myFGRotation, 0, 0, 1); - glScaled(s.addExaggeration, s.addExaggeration, 1); + glScaled(exaggeration, exaggeration, 1); glBegin(GL_QUADS); glVertex2d(0 - 1.0, 2); glVertex2d(-1.0, -2); @@ -131,7 +133,7 @@ glEnd(); // outline - if (width * s.addExaggeration > 1) { + if (width * exaggeration > 1) { glColor3d(1, 1, 1); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glBegin(GL_QUADS); @@ -144,7 +146,7 @@ } // position indicator - if (width * s.addExaggeration > 1) { + if (width * exaggeration > 1) { glRotated(90, 0, 0, -1); glColor3d(1, 1, 1); glBegin(GL_LINES); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIInstantInductLoop.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIInstantInductLoop.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIInstantInductLoop.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIInstantInductLoop.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file GUIInstantInductLoop.h /// @author Daniel Krajzewicz /// @date Aug 2003 -/// @version $Id: GUIInstantInductLoop.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIInstantInductLoop.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The gui-version of the MSInstantInductLoop /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIJunctionWrapper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIJunctionWrapper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIJunctionWrapper.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIJunctionWrapper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Laura Bieker /// @author Andreas Gaubatz /// @date Mon, 1 Jul 2003 -/// @version $Id: GUIJunctionWrapper.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIJunctionWrapper.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // } /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -38,6 +38,7 @@ #include #endif #include +#include #include #include #include @@ -58,6 +59,7 @@ #include #endif // CHECK_MEMORY_LEAKS +//#define GUIJunctionWrapper_DEBUG_DRAW_NODE_SHAPE_VERTICES // =========================================================================== // method definitions @@ -77,6 +79,19 @@ #else myIsInner = false; #endif + myAmWaterway = true; + for (ConstMSEdgeVector::const_iterator it = myJunction.getIncoming().begin(); it != myJunction.getIncoming().end(); ++it) { + if (!(*it)->isInternal() && !isWaterway((*it)->getPermissions())) { + myAmWaterway = false; + break; + } + } + for (ConstMSEdgeVector::const_iterator it = myJunction.getOutgoing().begin(); it != myJunction.getOutgoing().end(); ++it) { + if (!(*it)->isInternal() && !isWaterway((*it)->getPermissions())) { + myAmWaterway = false; + break; + } + } } @@ -117,13 +132,21 @@ if (s.scale * myMaxSize < 1.) { return; } - if (!myIsInner) { - glPushName(getGlID()); + if (!myIsInner && s.drawJunctionShape) { glPushMatrix(); - const SUMOReal colorValue = static_cast(s.junctionColorer.getActive() == 1 && gSelected.isSelected(getType(), getGlID())); + glPushName(getGlID()); + const SUMOReal colorValue = getColorValue(s); GLHelper::setColor(s.junctionColorer.getScheme().getColor(colorValue)); glTranslated(0, 0, getType()); - GLHelper::drawFilledPoly(myJunction.getShape(), true); + if (s.scale * myMaxSize < 40.) { + GLHelper::drawFilledPoly(myJunction.getShape(), true); + } else { + GLHelper::drawFilledPolyTesselated(myJunction.getShape(), true); + } +#ifdef GUIJunctionWrapper_DEBUG_DRAW_NODE_SHAPE_VERTICES + GLHelper::debugVertices(myJunction.getShape(), 80 / s.scale); +#endif + glPopName(); glPopMatrix(); } if (myIsInner) { @@ -131,14 +154,59 @@ } else { drawName(myJunction.getPosition(), s.scale, s.junctionName); } - glPopName(); +} + + +SUMOReal +GUIJunctionWrapper::getColorValue(const GUIVisualizationSettings& s) const { + switch (s.junctionColorer.getActive()) { + case 0: + if (myAmWaterway) { + return 1; + } else { + return 0; + } + case 1: + return gSelected.isSelected(getType(), getGlID()) ? 1 : 0; + case 2: + switch (myJunction.getType()) { + case NODETYPE_TRAFFIC_LIGHT: + return 0; + case NODETYPE_TRAFFIC_LIGHT_NOJUNCTION: + return 1; + case NODETYPE_PRIORITY: + return 2; + case NODETYPE_PRIORITY_STOP: + return 3; + case NODETYPE_RIGHT_BEFORE_LEFT: + return 4; + case NODETYPE_ALLWAY_STOP: + return 5; + case NODETYPE_DISTRICT: + return 6; + case NODETYPE_NOJUNCTION: + return 7; + case NODETYPE_DEAD_END: + case NODETYPE_DEAD_END_DEPRECATED: + return 8; + case NODETYPE_UNKNOWN: + case NODETYPE_INTERNAL: + assert(false); + return 8; + case NODETYPE_RAIL_SIGNAL: + return 9; + } + default: + assert(false); + return 0; + } } #ifdef HAVE_OSG void GUIJunctionWrapper::updateColor(const GUIVisualizationSettings& s) { - const SUMOReal colorValue = static_cast(s.junctionColorer.getActive() == 1 && gSelected.isSelected(getType(), getGlID())); + const SUMOReal colorValue = getColorValue(s); const RGBColor& col = s.junctionColorer.getScheme().getColor(colorValue); osg::Vec4ubArray* colors = dynamic_cast(myGeom->getColorArray()); (*colors)[0].set(col.red(), col.green(), col.blue(), col.alpha()); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIJunctionWrapper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIJunctionWrapper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIJunctionWrapper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIJunctionWrapper.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 1 Jul 2003 -/// @version $Id: GUIJunctionWrapper.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIJunctionWrapper.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Holds geometrical values for a junction /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -148,6 +148,9 @@ #endif private: + SUMOReal getColorValue(const GUIVisualizationSettings& s) const; + +private: /// @brief A reference to the represented junction MSJunction& myJunction; @@ -160,6 +163,9 @@ /// @brief whether this wraps an instance of MSInternalJunction bool myIsInner; + /// @brief whether this junction has only waterways as incoming and outgoing edges + bool myAmWaterway; + #ifdef HAVE_OSG osg::Geometry* myGeom; #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUILane.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUILane.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUILane.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUILane.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUILane.cpp 14504 2013-08-27 12:17:36Z namdre $ +/// @version $Id: GUILane.cpp 18114 2015-03-20 08:06:51Z namdre $ /// // Representation of a lane in the micro simulation (gui-version) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -37,12 +37,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -61,6 +63,7 @@ #include #endif // CHECK_MEMORY_LEAKS +//#define GUILane_DEBUG_DRAW_WALKING_AREA_VERTICES // =========================================================================== // method definitions @@ -68,11 +71,12 @@ GUILane::GUILane(const std::string& id, SUMOReal maxSpeed, SUMOReal length, MSEdge* const edge, unsigned int numericalID, const PositionVector& shape, SUMOReal width, - SVCPermissions permissions, unsigned int index) - : MSLane(id, maxSpeed, length, edge, numericalID, shape, width, permissions), - GUIGlObject(GLO_LANE, id) { + SVCPermissions permissions, unsigned int index) : + MSLane(id, maxSpeed, length, edge, numericalID, shape, width, permissions), + GUIGlObject(GLO_LANE, id) { myShapeRotations.reserve(myShape.size() - 1); myShapeLengths.reserve(myShape.size() - 1); + myShapeColors.reserve(myShape.size() - 1); int e = (int) myShape.size() - 1; for (int i = 0; i < e; ++i) { const Position& f = myShape[i]; @@ -134,9 +138,9 @@ MSVehicle* -GUILane::removeVehicle(MSVehicle* remVehicle, MSMoveReminder::Notification notification) { +GUILane::removeVehicle(MSVehicle* remVehicle, MSMoveReminder::Notification notification, bool notify) { AbstractMutex::ScopedLocker locker(myLock); - return MSLane::removeVehicle(remVehicle, notification); + return MSLane::removeVehicle(remVehicle, notification, notify); } @@ -155,7 +159,7 @@ void -GUILane::detectCollisions(SUMOTime timestep, int stage) { +GUILane::detectCollisions(SUMOTime timestep, const std::string& stage) { AbstractMutex::ScopedLocker locker(myLock); MSLane::detectCollisions(timestep, stage); } @@ -169,23 +173,23 @@ return; } // draw all links + if (getEdge().isCrossing()) { + // draw indices at the start and end of the crossing + MSLink* link = MSLinkContHelper::getConnectingLink(*getLogicalPredecessorLane(), *this); + PositionVector shape = getShape(); + shape.extrapolate(0.5); // draw on top of the walking area + drawTextAtEnd(toString(link->getIndex()), shape, 0); + drawTextAtEnd(toString(link->getIndex()), shape.reverse(), 0); + return; + } + // draw all links SUMOReal w = myWidth / (SUMOReal) noLinks; SUMOReal x1 = myHalfLaneWidth; - glPushMatrix(); - const PositionVector& g = getShape(); - const Position& end = g.back(); - const Position& f = g[-2]; - const Position& s = end; - const SUMOReal rot = RAD2DEG(atan2((s.x() - f.x()), (f.y() - s.y()))); - glTranslated(end.x(), end.y(), 0); - glRotated(rot, 0, 0, 1); for (int i = noLinks; --i >= 0;) { SUMOReal x2 = x1 - (SUMOReal)(w / 2.); - GLHelper::drawText(toString(myLinks[i]->getRespondIndex()), - Position(x2, 0), 0, .6, RGBColor(128, 128, 255, 255), 180); + drawTextAtEnd(toString(myLinks[i]->getIndex()), getShape(), x2); x1 -= w; } - glPopMatrix(); } @@ -195,43 +199,80 @@ if (noLinks == 0) { return; } + if (getEdge().isCrossing()) { + // draw indices at the start and end of the crossing + MSLink* link = MSLinkContHelper::getConnectingLink(*getLogicalPredecessorLane(), *this); + int linkNo = net.getLinkTLIndex(link); + if (linkNo >= 0) { + PositionVector shape = getShape(); + shape.extrapolate(0.5); // draw on top of the walking area + drawTextAtEnd(toString(linkNo), shape, 0); + drawTextAtEnd(toString(linkNo), shape.reverse(), 0); + } + return; + } // draw all links SUMOReal w = myWidth / (SUMOReal) noLinks; SUMOReal x1 = myHalfLaneWidth; - glPushMatrix(); - const PositionVector& g = getShape(); - const Position& end = g.back(); - const Position& f = g[-2]; - const Position& s = end; - const SUMOReal rot = RAD2DEG(atan2((s.x() - f.x()), (f.y() - s.y()))); - glTranslated(end.x(), end.y(), 0); - glRotated(rot, 0, 0, 1); for (int i = noLinks; --i >= 0;) { SUMOReal x2 = x1 - (SUMOReal)(w / 2.); int linkNo = net.getLinkTLIndex(myLinks[i]); if (linkNo < 0) { continue; } - GLHelper::drawText(toString(linkNo), - Position(x2, 0), 0, .6, RGBColor(128, 128, 255, 255), 180); + drawTextAtEnd(toString(linkNo), getShape(), x2); x1 -= w; } +} + + +void +GUILane::drawTextAtEnd(const std::string& text, const PositionVector& shape, SUMOReal x) const { + glPushMatrix(); + const Position& end = shape.back(); + const Position& f = shape[-2]; + const SUMOReal rot = RAD2DEG(atan2((end.x() - f.x()), (f.y() - end.y()))); + glTranslated(end.x(), end.y(), 0); + glRotated(rot, 0, 0, 1); + GLHelper::drawText(text, Position(x, 0), 0, .6, RGBColor(128, 128, 255, 255), 180); glPopMatrix(); } void -GUILane::drawLinkRules(const GUINet& net) const { +GUILane::drawLinkRules(const GUIVisualizationSettings& s, const GUINet& net) const { unsigned int noLinks = (unsigned int)myLinks.size(); - const PositionVector& g = getShape(); - const Position& end = g.back(); - const Position& f = g[-2]; - const Position& s = end; - const SUMOReal rot = RAD2DEG(atan2((s.x() - f.x()), (f.y() - s.y()))); if (noLinks == 0) { - glPushName(getGlID()); - // draw a grey bar if no links are on the street - glColor3d(0.5, 0.5, 0.5); + drawLinkRule(s, net, 0, getShape(), 0, 0); + return; + } + if (getEdge().isCrossing()) { + // draw rules at the start and end of the crossing + MSLink* link = MSLinkContHelper::getConnectingLink(*getLogicalPredecessorLane(), *this); + PositionVector shape = getShape(); + shape.extrapolate(0.5); // draw on top of the walking area + drawLinkRule(s, net, link, shape, 0, myWidth); + drawLinkRule(s, net, link, shape.reverse(), 0, myWidth); + return; + } + // draw all links + SUMOReal w = myWidth / (SUMOReal) noLinks; + SUMOReal x1 = 0; + for (unsigned int i = 0; i < noLinks; ++i) { + SUMOReal x2 = x1 + w; + drawLinkRule(s, net, myLinks[i], getShape(), x1, x2); + x1 = x2; + } +} + + +void +GUILane::drawLinkRule(const GUIVisualizationSettings& s, const GUINet& net, MSLink* link, const PositionVector& shape, SUMOReal x1, SUMOReal x2) const { + const Position& end = shape.back(); + const Position& f = shape[-2]; + const SUMOReal rot = RAD2DEG(atan2((end.x() - f.x()), (f.y() - end.y()))); + if (link == 0) { + GLHelper::setColor(getLinkColor(LINKSTATE_DEADEND)); glPushMatrix(); glTranslated(end.x(), end.y(), 0); glRotated(rot, 0, 0, 1); @@ -242,24 +283,16 @@ glVertex2d(myHalfLaneWidth, 0.0); glEnd(); glPopMatrix(); - glPopName(); - return; - } - // draw all links - const bool railway = isRailway(myPermissions); - SUMOReal w = myWidth / (SUMOReal) noLinks; - SUMOReal x1 = 0; - glPushMatrix(); - glTranslated(end.x(), end.y(), 0); - glRotated(rot, 0, 0, 1); - for (unsigned int i = 0; i < noLinks; ++i) { - SUMOReal x2 = x1 + w; - MSLink* link = myLinks[i]; + } else { + glPushMatrix(); + glTranslated(end.x(), end.y(), 0); + glRotated(rot, 0, 0, 1); // select glID switch (link->getState()) { case LINKSTATE_TL_GREEN_MAJOR: case LINKSTATE_TL_GREEN_MINOR: case LINKSTATE_TL_RED: + case LINKSTATE_TL_REDYELLOW: case LINKSTATE_TL_YELLOW_MAJOR: case LINKSTATE_TL_YELLOW_MINOR: case LINKSTATE_TL_OFF_BLINKING: @@ -273,63 +306,22 @@ glPushName(getGlID()); break; } - // select color - switch (link->getState()) { - case LINKSTATE_TL_GREEN_MAJOR: - case LINKSTATE_TL_GREEN_MINOR: - glColor3d(0, 1, 0); - break; - case LINKSTATE_TL_RED: - glColor3d(1, 0, 0); - break; - case LINKSTATE_TL_YELLOW_MAJOR: - case LINKSTATE_TL_YELLOW_MINOR: - glColor3d(1, 1, 0); - break; - case LINKSTATE_TL_OFF_BLINKING: - glColor3d(.7, .7, 0); - break; - case LINKSTATE_TL_OFF_NOSIGNAL: - glColor3d(0, 1, 1); - break; - case LINKSTATE_MAJOR: - glColor3d(1, 1, 1); - if (railway) { - // the white bar should be the default for most railway - // links and looks ugly so we do not draw it - continue; - } - break; - case LINKSTATE_MINOR: - glColor3d(.2, .2, .2); - break; - case LINKSTATE_STOP: - glColor3d(.4, .2, .2); - break; - case LINKSTATE_EQUAL: - glColor3d(.5, .5, .5); - break; - case LINKSTATE_ALLWAY_STOP: - glColor3d(.2, .2, .4); - break; - case LINKSTATE_DEADEND: - glColor3d(0, 0, 0); - break; + GLHelper::setColor(getLinkColor(link->getState())); + if (!(drawAsRailway(s) || drawAsWaterway(s)) || link->getState() != LINKSTATE_MAJOR) { + // the white bar should be the default for most railway + // links and looks ugly so we do not draw it + glBegin(GL_QUADS); + glVertex2d(x1 - myHalfLaneWidth, 0.0); + glVertex2d(x1 - myHalfLaneWidth, 0.5); + glVertex2d(x2 - myHalfLaneWidth, 0.5); + glVertex2d(x2 - myHalfLaneWidth, 0.0); + glEnd(); } - glBegin(GL_QUADS); - glVertex2d(x1 - myHalfLaneWidth, 0.0); - glVertex2d(x1 - myHalfLaneWidth, 0.5); - glVertex2d(x2 - myHalfLaneWidth, 0.5); - glVertex2d(x2 - myHalfLaneWidth, 0.0); - glEnd(); glPopName(); - x1 = x2; - x2 += w; + glPopMatrix(); } - glPopMatrix(); } - void GUILane::drawArrows() const { if (myLinks.size() == 0) { @@ -340,10 +332,12 @@ const Position& f = getShape()[-2]; const SUMOReal rot = RAD2DEG(atan2((end.x() - f.x()), (f.y() - end.y()))); glPushMatrix(); - glPushName(0); glColor3d(1, 1, 1); glTranslated(end.x(), end.y(), 0); glRotated(rot, 0, 0, 1); + if (myWidth < SUMO_const_laneWidth) { + glScaled(myWidth / SUMO_const_laneWidth, 1, 1); + } for (std::vector::const_iterator i = myLinks.begin(); i != myLinks.end(); ++i) { LinkDirection dir = (*i)->getDirection(); LinkState state = (*i)->getState(); @@ -386,56 +380,17 @@ } } glPopMatrix(); - glPopName(); } void GUILane::drawLane2LaneConnections() const { for (std::vector::const_iterator i = myLinks.begin(); i != myLinks.end(); ++i) { - LinkState state = (*i)->getState(); const MSLane* connected = (*i)->getLane(); if (connected == 0) { continue; } - switch (state) { - case LINKSTATE_TL_GREEN_MAJOR: - case LINKSTATE_TL_GREEN_MINOR: - glColor3d(0, 1, 0); - break; - case LINKSTATE_TL_RED: - glColor3d(1, 0, 0); - break; - case LINKSTATE_TL_YELLOW_MAJOR: - case LINKSTATE_TL_YELLOW_MINOR: - glColor3d(1, 1, 0); - break; - case LINKSTATE_TL_OFF_BLINKING: - glColor3d(1, 1, 0); - break; - case LINKSTATE_TL_OFF_NOSIGNAL: - glColor3d(0, 1, 1); - break; - case LINKSTATE_MAJOR: - glColor3d(1, 1, 1); - break; - case LINKSTATE_MINOR: - glColor3d(.2, .2, .2); - break; - case LINKSTATE_STOP: - glColor3d(.4, .2, .2); - break; - case LINKSTATE_EQUAL: - glColor3d(.5, .5, .5); - break; - case LINKSTATE_ALLWAY_STOP: - glColor3d(.2, .2, .4); - break; - case LINKSTATE_DEADEND: - glColor3d(0, 0, 0); - break; - } - + GLHelper::setColor(getLinkColor((*i)->getState())); glBegin(GL_LINES); const Position& p1 = getShape()[-1]; const Position& p2 = connected->getShape()[0]; @@ -450,76 +405,131 @@ void GUILane::drawGL(const GUIVisualizationSettings& s) const { glPushMatrix(); - const bool isInternal = myEdge->getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL; + glPushName(getGlID()); + const bool isCrossing = myEdge->getPurpose() == MSEdge::EDGEFUNCTION_CROSSING; + const bool isWalkingArea = myEdge->getPurpose() == MSEdge::EDGEFUNCTION_WALKINGAREA; + const bool isInternal = isCrossing || isWalkingArea || myEdge->getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL; bool mustDrawMarkings = false; - const bool drawDetails = s.scale * s.laneWidthExaggeration > 5; - if (isInternal) { + SUMOReal exaggeration = s.laneWidthExaggeration * s.laneScaler.getScheme().getColor(getScaleValue(s.laneScaler.getActive())); +#ifdef HAVE_INTERNAL + if (MSGlobals::gUseMesoSim) { + GUIEdge* myGUIEdge = dynamic_cast(myEdge); + exaggeration *= s.edgeScaler.getScheme().getColor(myGUIEdge->getScaleValue(s.edgeScaler.getActive())); + } +#endif + const bool drawDetails = s.scale * exaggeration > 5; + if (isCrossing || isWalkingArea) { // draw internal lanes on top of junctions glTranslated(0, 0, GLO_JUNCTION + 0.1); + } else if (isWaterway(myPermissions)) { + // draw waterways below normal roads + glTranslated(0, 0, getType() - 0.2); } else { glTranslated(0, 0, getType()); } // set lane color if (!MSGlobals::gUseMesoSim) { setColor(s); - glPushName(getGlID()); // do not register for clicks in MESOSIM } - // draw lane - // check whether it is not too small - if (s.scale * s.laneWidthExaggeration < 1.) { - GLHelper::drawLine(myShape); - if (!MSGlobals::gUseMesoSim) { - glPopName(); - } - glPopMatrix(); - } else { - if (isRailway(myPermissions)) { - // draw as railway - const SUMOReal halfRailWidth = 0.725; - GLHelper::drawBoxLines(myShape, myShapeRotations, myShapeLengths, halfRailWidth * s.laneWidthExaggeration); - glColor3d(1, 1, 1); - glTranslated(0, 0, .1); - GLHelper::drawBoxLines(myShape, myShapeRotations, myShapeLengths, (halfRailWidth - 0.2) * s.laneWidthExaggeration); - drawCrossties(s); + // recognize full transparency and simply don't draw + GLfloat color[4]; + glGetFloatv(GL_CURRENT_COLOR, color); + if (color[3] != 0) { + // draw lane + // check whether it is not too small + if (s.scale * exaggeration < 1.) { + if (myShapeColors.size() > 0) { + GLHelper::drawLine(myShape, myShapeColors); + } else { + GLHelper::drawLine(myShape); + } + glPopMatrix(); } else { - const SUMOReal laneWidth = isInternal ? myQuarterLaneWidth : myHalfLaneWidth; - mustDrawMarkings = !isInternal; - GLHelper::drawBoxLines(myShape, myShapeRotations, myShapeLengths, laneWidth * s.laneWidthExaggeration); - } - if (!MSGlobals::gUseMesoSim) { - glPopName(); - } - glPopMatrix(); - // draw ROWs (not for inner lanes) - if (!isInternal && drawDetails) { - glPushMatrix(); - glTranslated(0, 0, GLO_JUNCTION); // must draw on top of junction shape GUINet* net = (GUINet*) MSNet::getInstance(); - glTranslated(0, 0, .2); - drawLinkRules(*net); - if (s.showLinkDecals && !isRailway(myPermissions)) { - drawArrows(); - } - if (s.showLane2Lane) { - // this should be independent to the geometry: - // draw from end of first to the begin of second - drawLane2LaneConnections(); - } - glTranslated(0, 0, .1); - if (s.drawLinkJunctionIndex) { - drawLinkNo(); - } - if (s.drawLinkTLIndex) { - drawTLSLinkNo(*net); + if (drawAsRailway(s)) { + // draw as railway + const SUMOReal halfRailWidth = 0.725 * exaggeration; + if (myShapeColors.size() > 0) { + GLHelper::drawBoxLines(myShape, myShapeRotations, myShapeLengths, myShapeColors, halfRailWidth); + } else { + GLHelper::drawBoxLines(myShape, myShapeRotations, myShapeLengths, halfRailWidth); + } + glColor3d(1, 1, 1); + glTranslated(0, 0, .1); + GLHelper::drawBoxLines(myShape, myShapeRotations, myShapeLengths, halfRailWidth - 0.2); + if (!MSGlobals::gUseMesoSim) { + setColor(s); + } + drawCrossties(0.3 * exaggeration, 1 * exaggeration, 1 * exaggeration); + } else if (isCrossing) { + // determine priority to decide color + MSLink* link = MSLinkContHelper::getConnectingLink(*getLogicalPredecessorLane(), *this); + if (link->havePriority() || net->getLinkTLIndex(link) > 0) { + glColor3d(0.9, 0.9, 0.9); + } else { + glColor3d(0.1, 0.1, 0.1); + } + glTranslated(0, 0, .2); + drawCrossties(0.5, 1.0, getWidth() * 0.5); + glTranslated(0, 0, -.2); + } else if (isWalkingArea) { + glTranslated(0, 0, .2); + if (s.scale * exaggeration < 20.) { + GLHelper::drawFilledPoly(myShape, true); + } else { + GLHelper::drawFilledPolyTesselated(myShape, true); + } + glTranslated(0, 0, -.2); +#ifdef GUILane_DEBUG_DRAW_WALKING_AREA_VERTICES + GLHelper::debugVertices(myShape, 80 / s.scale); +#endif + } else { + const SUMOReal halfWidth = isInternal ? myQuarterLaneWidth : myHalfLaneWidth; + mustDrawMarkings = !isInternal && myPermissions != 0 && myPermissions != SVC_PEDESTRIAN && exaggeration == 1.0 && !isWaterway(myPermissions); + const int cornerDetail = drawDetails && !isInternal ? s.scale * exaggeration : 0; + const SUMOReal offset = halfWidth * MAX2((SUMOReal)0, (exaggeration - 1)); + if (myShapeColors.size() > 0) { + GLHelper::drawBoxLines(myShape, myShapeRotations, myShapeLengths, myShapeColors, halfWidth * exaggeration, cornerDetail, offset); + } else { + GLHelper::drawBoxLines(myShape, myShapeRotations, myShapeLengths, halfWidth * exaggeration, cornerDetail, offset); + } } glPopMatrix(); + // draw ROWs (not for inner lanes) + if ((!isInternal || isCrossing) && drawDetails) { + glPushMatrix(); + glTranslated(0, 0, GLO_JUNCTION); // must draw on top of junction shape + glTranslated(0, 0, .5); + drawLinkRules(s, *net); + if (s.showLinkDecals && !drawAsRailway(s) && !drawAsWaterway(s) && myPermissions != SVC_PEDESTRIAN) { + drawArrows(); + } + if (s.showLane2Lane) { + // this should be independent to the geometry: + // draw from end of first to the begin of second + drawLane2LaneConnections(); + } + glTranslated(0, 0, .1); + if (s.drawLinkJunctionIndex) { + drawLinkNo(); + } + if (s.drawLinkTLIndex) { + drawTLSLinkNo(*net); + } + glPopMatrix(); + } } - } - if (mustDrawMarkings && drawDetails) { // needs matrix reset - drawMarkings(s); + if (mustDrawMarkings && drawDetails) { // needs matrix reset + drawMarkings(s, exaggeration); + } + if (drawDetails && isInternal && myPermissions == SVC_BICYCLE && exaggeration == 1.0 && s.showLinkDecals) { + drawBikeMarkings(); + } + } else { + glPopMatrix(); } // draw vehicles - if (s.scale > s.minVehicleSize) { + if (s.scale * s.vehicleSize.getExaggeration(s) > s.vehicleSize.minSize) { // retrieve vehicles from lane; disallow simulation const MSLane::VehCont& vehicles = getVehiclesSecure(); for (MSLane::VehCont::const_iterator v = vehicles.begin(); v != vehicles.end(); ++v) { @@ -535,32 +545,33 @@ // allow lane simulation releaseVehicles(); } + glPopName(); } void -GUILane::drawMarkings(const GUIVisualizationSettings& s) const { +GUILane::drawMarkings(const GUIVisualizationSettings& s, SUMOReal scale) const { glPushMatrix(); - glPushName(0); glTranslated(0, 0, GLO_EDGE); #ifdef HAVE_INTERNAL if (!MSGlobals::gUseMesoSim) #endif setColor(s); // optionally draw inverse markings - if (myIndex > 0) { - SUMOReal mw = myHalfLaneWidth + SUMO_const_laneOffset + .01; + if (myIndex > 0 && (myEdge->getLanes()[myIndex - 1]->getPermissions() & myPermissions) != 0) { + SUMOReal mw = (myHalfLaneWidth + SUMO_const_laneOffset + .01) * scale; int e = (int) getShape().size() - 1; for (int i = 0; i < e; ++i) { glPushMatrix(); glTranslated(getShape()[i].x(), getShape()[i].y(), 0.1); glRotated(myShapeRotations[i], 0, 0, 1); for (SUMOReal t = 0; t < myShapeLengths[i]; t += 6) { + const SUMOReal length = MIN2((SUMOReal)3, myShapeLengths[i] - t); glBegin(GL_QUADS); glVertex2d(-mw, -t); - glVertex2d(-mw, -t - 3.); - glVertex2d(myQuarterLaneWidth, -t - 3.); - glVertex2d(myQuarterLaneWidth, -t); + glVertex2d(-mw, -t - length); + glVertex2d(myQuarterLaneWidth * scale, -t - length); + glVertex2d(myQuarterLaneWidth * scale, -t); glEnd(); } glPopMatrix(); @@ -572,38 +583,57 @@ getShape(), getShapeRotations(), getShapeLengths(), - getHalfWidth() + SUMO_const_laneOffset); + (getHalfWidth() + SUMO_const_laneOffset) * scale); glPopMatrix(); - glPopName(); } void -GUILane::drawCrossties(const GUIVisualizationSettings& s) const { - glPushMatrix(); - glPushName(0); - if (!MSGlobals::gUseMesoSim) { - setColor(s); +GUILane::drawBikeMarkings() const { + // draw bike lane markings onto the intersection + glColor3d(1, 1, 1); + int e = (int) getShape().size() - 1; + SUMOReal mw = (myHalfLaneWidth + SUMO_const_laneOffset); + for (int i = 0; i < e; ++i) { + glPushMatrix(); + glTranslated(getShape()[i].x(), getShape()[i].y(), GLO_JUNCTION + 0.1); + glRotated(myShapeRotations[i], 0, 0, 1); + for (SUMOReal t = 0; t < myShapeLengths[i]; t += 0.5) { + // left and right marking + for (int side = -1; side <= 1; side += 2) { + glBegin(GL_QUADS); + glVertex2d(side * mw, -t); + glVertex2d(side * mw, -t - 0.35); + glVertex2d(side * (mw + SUMO_const_laneOffset), -t - 0.35); + glVertex2d(side * (mw + SUMO_const_laneOffset), -t); + glEnd(); + } + } + glPopMatrix(); } +} + +void +GUILane::drawCrossties(SUMOReal length, SUMOReal spacing, SUMOReal halfWidth) const { + glPushMatrix(); // draw on top of of the white area between the rails glTranslated(0, 0, 0.1); int e = (int) getShape().size() - 1; for (int i = 0; i < e; ++i) { glPushMatrix(); - glTranslated(getShape()[i].x(), getShape()[i].y(), 0.1); + glTranslated(getShape()[i].x(), getShape()[i].y(), 0.0); glRotated(myShapeRotations[i], 0, 0, 1); - for (SUMOReal t = 0; t < myShapeLengths[i]; t += 1) { + for (SUMOReal t = 0; t < myShapeLengths[i]; t += spacing) { glBegin(GL_QUADS); - glVertex2d(-1, -t); - glVertex2d(-1, -t - 0.3); - glVertex2d(1.0, -t - 0.3); - glVertex2d(1.0, -t); + glVertex2d(-halfWidth, -t); + glVertex2d(-halfWidth, -t - length); + glVertex2d(halfWidth, -t - length); + glVertex2d(halfWidth, -t); glEnd(); } glPopMatrix(); } glPopMatrix(); - glPopName(); } // ------ inherited from GUIGlObject @@ -619,7 +649,8 @@ // buildShowParamsPopupEntry(ret, false); const SUMOReal pos = interpolateGeometryPosToLanePos(myShape.nearest_offset_to_point2D(parent.getPositionInformation())); - new FXMenuCommand(ret, ("pos: " + toString(pos)).c_str(), 0, 0, 0); + const SUMOReal height = myShape.positionAtOffset2D(myShape.nearest_offset_to_point2D(parent.getPositionInformation())).z(); + new FXMenuCommand(ret, ("pos: " + toString(pos) + " height: " + toString(height)).c_str(), 0, 0, 0); new FXMenuSeparator(ret); buildPositionCopyEntry(ret, false); return ret; @@ -629,14 +660,20 @@ GUIParameterTableWindow* GUILane::getParameterWindow(GUIMainWindow& app, GUISUMOAbstractView&) { - GUIParameterTableWindow* ret = - new GUIParameterTableWindow(app, *this, 4); + GUIParameterTableWindow* ret = new GUIParameterTableWindow(app, *this, 11); // add items ret->mkItem("maxspeed [m/s]", false, getSpeedLimit()); ret->mkItem("length [m]", false, myLength); - ret->mkItem("permissions", false, getAllowedVehicleClassNames(myPermissions)); + ret->mkItem("width [m]", false, myWidth); ret->mkItem("street name", false, myEdge->getStreetName()); ret->mkItem("stored traveltime [s]", true, new FunctionBinding(this, &GUILane::getStoredEdgeTravelTime)); + ret->mkItem("loaded weight", true, new FunctionBinding(this, &GUILane::getLoadedEdgeWeight)); + ret->mkItem("occupancy [%]", true, new FunctionBinding(this, &GUILane::getBruttoOccupancy, 100.)); + ret->mkItem("edge type", false, myEdge->getEdgeType()); + ret->mkItem("priority", false, myEdge->getPriority()); + ret->mkItem("allowed vehicle class", false, getVehicleClassNames(myPermissions)); + ret->mkItem("disallowed vehicle class", false, getVehicleClassNames(~myPermissions)); + ret->mkItem("permission code", false, myPermissions); // close building ret->closeBuilding(); return ret; @@ -688,94 +725,195 @@ } -// ------------ Current state retrieval SUMOReal -GUILane::getNormedHBEFA_CO2Emissions() const { - return getHBEFA_CO2Emissions() / getLength(); -} - - -SUMOReal -GUILane::getNormedHBEFA_COEmissions() const { - return getHBEFA_COEmissions() / getLength(); -} - - -SUMOReal -GUILane::getNormedHBEFA_PMxEmissions() const { - return getHBEFA_PMxEmissions() / getLength(); -} - - -SUMOReal -GUILane::getNormedHBEFA_NOxEmissions() const { - return getHBEFA_NOxEmissions() / getLength(); +GUILane::getStoredEdgeTravelTime() const { + MSEdgeWeightsStorage& ews = MSNet::getInstance()->getWeightsStorage(); + if (!ews.knowsTravelTime(myEdge)) { + return -1; + } else { + SUMOReal value(0); + ews.retrieveExistingTravelTime(myEdge, STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()), value); + return value; + } } SUMOReal -GUILane::getNormedHBEFA_HCEmissions() const { - return getHBEFA_HCEmissions() / getLength(); +GUILane::getLoadedEdgeWeight() const { + MSEdgeWeightsStorage& ews = MSNet::getInstance()->getWeightsStorage(); + if (!ews.knowsEffort(myEdge)) { + return -1; + } else { + SUMOReal value(0); + ews.retrieveExistingEffort(myEdge, STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()), value); + return value; + } } -SUMOReal -GUILane::getNormedHBEFA_FuelConsumption() const { - return getHBEFA_FuelConsumption() / getLength(); +void +GUILane::setColor(const GUIVisualizationSettings& s) const { + const GUIColorer& c = s.laneColorer; + if (!setFunctionalColor(c.getActive()) && !setMultiColor(c)) { + GLHelper::setColor(c.getScheme().getColor(getColorValue(c.getActive()))); + } } -void -GUILane::setColor(const GUIVisualizationSettings& s) const { - GLHelper::setColor(s.laneColorer.getScheme().getColor(getColorValue(s.laneColorer.getActive()))); +bool +GUILane::setFunctionalColor(size_t activeScheme) const { + switch (activeScheme) { + case 18: { + SUMOReal hue = RAD2DEG(myShape.beginEndAngle()) + 180; // [0-360] + GLHelper::setColor(RGBColor::fromHSV(hue, 1., 1.)); + return true; + } + default: + return false; + } } -SUMOReal -GUILane::getStoredEdgeTravelTime() const { - MSEdgeWeightsStorage& ews = MSNet::getInstance()->getWeightsStorage(); - if (!ews.knowsTravelTime(myEdge)) { - return -1; - } else { - SUMOReal value(0); - ews.retrieveExistingTravelTime(myEdge, 0, STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()), value); - return value; +bool +GUILane::setMultiColor(const GUIColorer& c) const { + const size_t activeScheme = c.getActive(); + myShapeColors.clear(); + switch (activeScheme) { + case 22: // color by height at segment start + for (PositionVector::const_iterator ii = myShape.begin(); ii != myShape.end() - 1; ++ii) { + myShapeColors.push_back(c.getScheme().getColor(ii->z())); + } + return true; + case 24: // color by inclination at segment start + for (int ii = 1; ii < (int)myShape.size(); ++ii) { + const SUMOReal inc = (myShape[ii].z() - myShape[ii - 1].z()) / MAX2(POSITION_EPS, myShape[ii].distanceTo2D(myShape[ii - 1])); + myShapeColors.push_back(c.getScheme().getColor(inc)); + } + return true; + default: + return false; } } + SUMOReal GUILane::getColorValue(size_t activeScheme) const { switch (activeScheme) { + case 0: + switch (myPermissions) { + case SVC_PEDESTRIAN: + return 1; + case SVC_BICYCLE: + return 2; + case 0: + return 3; + case SVC_SHIP: + return 4; + default: + return 0; + } case 1: return gSelected.isSelected(getType(), getGlID()) || gSelected.isSelected(GLO_EDGE, dynamic_cast(myEdge)->getGlID()); - case 2: { - if (allowsVehicleClass(SVC_PASSENGER)) { - return 0; + case 2: + return (SUMOReal)myPermissions; + case 3: + return getSpeedLimit(); + case 4: + return getBruttoOccupancy(); + case 5: + return getNettoOccupancy(); + case 6: + return firstWaitingTime(); + case 7: + return getEdgeLaneNumber(); + case 8: + return getCO2Emissions() / myLength; + case 9: + return getCOEmissions() / myLength; + case 10: + return getPMxEmissions() / myLength; + case 11: + return getNOxEmissions() / myLength; + case 12: + return getHCEmissions() / myLength; + case 13: + return getFuelConsumption() / myLength; + case 14: + return getHarmonoise_NoiseEmissions(); + case 15: { + return getStoredEdgeTravelTime(); + } + case 16: { + MSEdgeWeightsStorage& ews = MSNet::getInstance()->getWeightsStorage(); + if (!ews.knowsTravelTime(myEdge)) { + return -1; } else { - return 1; + SUMOReal value(0); + ews.retrieveExistingTravelTime(myEdge, 0, value); + return 100 * myLength / value / getSpeedLimit(); } } - case 3: + case 17: { + return 1 / myLengthGeometryFactor; + } + case 19: { + return getLoadedEdgeWeight(); + } + case 20: { + return myEdge->getPriority(); + } + case 21: { + // color by z of first shape point + return getShape()[0].z(); + } + case 23: { + // color by incline + return (getShape()[-1].z() - getShape()[0].z()) / getLength(); + } + case 25: { + // color by average speed + return getMeanSpeed(); + } + case 26: { + // color by average relative speed + return getMeanSpeed() / myMaxSpeed; + } + } + return 0; +} + + +SUMOReal +GUILane::getScaleValue(size_t activeScheme) const { + switch (activeScheme) { + case 0: + return 0; + case 1: + return gSelected.isSelected(getType(), getGlID()) || + gSelected.isSelected(GLO_EDGE, dynamic_cast(myEdge)->getGlID()); + case 2: return getSpeedLimit(); + case 3: + return getBruttoOccupancy(); case 4: - return getOccupancy(); + return getNettoOccupancy(); case 5: return firstWaitingTime(); case 6: return getEdgeLaneNumber(); case 7: - return getNormedHBEFA_CO2Emissions(); + return getCO2Emissions() / myLength; case 8: - return getNormedHBEFA_COEmissions(); + return getCOEmissions() / myLength; case 9: - return getNormedHBEFA_PMxEmissions(); + return getPMxEmissions() / myLength; case 10: - return getNormedHBEFA_NOxEmissions(); + return getNOxEmissions() / myLength; case 11: - return getNormedHBEFA_HCEmissions(); + return getHCEmissions() / myLength; case 12: - return getNormedHBEFA_FuelConsumption(); + return getFuelConsumption() / myLength; case 13: return getHarmonoise_NoiseEmissions(); case 14: { @@ -787,17 +925,44 @@ return -1; } else { SUMOReal value(0); - ews.retrieveExistingTravelTime(myEdge, 0, 0, value); + ews.retrieveExistingTravelTime(myEdge, 0, value); return 100 * myLength / value / getSpeedLimit(); } } case 16: { return 1 / myLengthGeometryFactor; } + case 17: { + return getLoadedEdgeWeight(); + } + case 18: { + return myEdge->getPriority(); + } + case 19: { + // scale by average speed + return getMeanSpeed(); + } + case 20: { + // scale by average relative speed + return getMeanSpeed() / myMaxSpeed; + } } return 0; } + +bool +GUILane::drawAsRailway(const GUIVisualizationSettings& s) const { + return isRailway(myPermissions) && s.showRails; +} + + +bool +GUILane::drawAsWaterway(const GUIVisualizationSettings& s) const { + return isWaterway(myPermissions) && s.showRails; // reusing the showRails setting +} + + #ifdef HAVE_OSG void GUILane::updateColor(const GUIVisualizationSettings& s) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUILane.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUILane.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUILane.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUILane.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUILane.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUILane.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Representation of a lane in the micro simulation (gui-version) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -41,7 +41,7 @@ #include #include #include -#include +#include // =========================================================================== @@ -137,12 +137,12 @@ /** the same as in MSLane, but locks the access for the visualisation first; the access will be granted at the end of this method */ - void detectCollisions(SUMOTime timestep, int stage); + void detectCollisions(SUMOTime timestep, const std::string& stage); /** the same as in MSLane, but locks the access for the visualisation first; the access will be granted at the end of this method */ - MSVehicle* removeVehicle(MSVehicle* remVehicle, MSMoveReminder::Notification notification); + MSVehicle* removeVehicle(MSVehicle* remVehicle, MSMoveReminder::Notification notification, bool notify); @@ -195,62 +195,29 @@ SUMOReal firstWaitingTime() const; /// @brief draw lane borders and white markings - void drawMarkings(const GUIVisualizationSettings& s) const; + void drawMarkings(const GUIVisualizationSettings& s, SUMOReal scale) const; - /// @brief draw crossties for railroads - void drawCrossties(const GUIVisualizationSettings& s) const; + /// @brief bike lane markings on top of an intersection + void drawBikeMarkings() const; + + /// @brief draw crossties for railroads or pedestrian crossings + void drawCrossties(SUMOReal length, SUMOReal spacing, SUMOReal halfWidth) const; SUMOReal getHalfWidth() const { return myHalfLaneWidth; } - /// @name Current state retrieval - //@{ - - /** @brief Returns the sum of last step CO2 emissions normed by the lane's length - * @return CO2 emissions of vehicles on this lane during the last step, normed by the lane length - */ - SUMOReal getNormedHBEFA_CO2Emissions() const; - - - /** @brief Returns the sum of last step CO emissions normed by the lane's length - * @return CO emissions of vehicles on this lane during the last step, normed by the lane length - */ - SUMOReal getNormedHBEFA_COEmissions() const; - - - /** @brief Returns the sum of last step PMx emissions normed by the lane's length - * @return PMx emissions of vehicles on this lane during the last step, normed by the lane length - */ - SUMOReal getNormedHBEFA_PMxEmissions() const; - - - /** @brief Returns the sum of last step NOx emissions normed by the lane's length - * @return NOx emissions of vehicles on this lane during the last step, normed by the lane length - */ - SUMOReal getNormedHBEFA_NOxEmissions() const; - - - /** @brief Returns the sum of last step HC emissions normed by the lane's length - * @return HC emissions of vehicles on this lane during the last step, normed by the lane length - */ - SUMOReal getNormedHBEFA_HCEmissions() const; - - - /** @brief Returns the sum of last step fuel comsumption normed by the lane's length - * @return Fuel comsumption of vehicles on this lane during the last step, normed by the lane length - */ - SUMOReal getNormedHBEFA_FuelConsumption() const; - /// @} - - SUMOReal getEdgeLaneNumber() const; /** @brief Returns the stored traveltime for the edge of this lane */ SUMOReal getStoredEdgeTravelTime() const; + /** @brief Returns the loaded weight (effort) for the edge of this lane + */ + SUMOReal getLoadedEdgeWeight() const; + #ifdef HAVE_OSG void setGeometry(osg::Geometry* geom) { myGeom = geom; @@ -281,7 +248,9 @@ /// @brief helper methods void drawLinkNo() const; void drawTLSLinkNo(const GUINet& net) const; - void drawLinkRules(const GUINet& net) const; + void drawTextAtEnd(const std::string& text, const PositionVector& shape, SUMOReal x) const; + void drawLinkRules(const GUIVisualizationSettings& s, const GUINet& net) const; + void drawLinkRule(const GUIVisualizationSettings& s, const GUINet& net, MSLink* link, const PositionVector& shape, SUMOReal x1, SUMOReal x2) const; void drawArrows() const; void drawLane2LaneConnections() const; @@ -291,15 +260,33 @@ /// @brief gets the color value according to the current scheme index SUMOReal getColorValue(size_t activeScheme) const; + /// @brief gets the scaling value according to the current scheme index + SUMOReal getScaleValue(size_t activeScheme) const; + + /// @brief sets the color according to the current scheme index and some lane function + bool setFunctionalColor(size_t activeScheme) const; + + /// @brief sets multiple colors according to the current scheme index and some lane function + bool setMultiColor(const GUIColorer& c) const; + /// @brief sets the color according to the currente settings void setColor(const GUIVisualizationSettings& s) const; + /// @brief whether to draw this lane as a railway + bool drawAsRailway(const GUIVisualizationSettings& s) const; + + /// @brief whether to draw this lane as a waterway + bool drawAsWaterway(const GUIVisualizationSettings& s) const; + /// The rotations of the shape parts std::vector myShapeRotations; /// The lengths of the shape parts std::vector myShapeLengths; + /// The color of the shape parts (cached) + mutable std::vector myShapeColors; + /// @brief Half of lane width, for speed-up SUMOReal myHalfLaneWidth; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUILaneSpeedTrigger.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUILaneSpeedTrigger.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUILaneSpeedTrigger.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUILaneSpeedTrigger.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 26.04.2004 -/// @version $Id: GUILaneSpeedTrigger.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUILaneSpeedTrigger.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Changes the speed allowed on a set of lanes (gui version) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -330,11 +330,12 @@ glPushName(getGlID()); glPushMatrix(); glTranslated(0, 0, getType()); + const SUMOReal exaggeration = s.addSize.getExaggeration(s); for (size_t i = 0; i < myFGPositions.size(); ++i) { const Position& pos = myFGPositions[i]; SUMOReal rot = myFGRotations[i]; glPushMatrix(); - glScaled(s.addExaggeration, s.addExaggeration, 1); + glScaled(exaggeration, exaggeration, 1); glTranslated(pos.x(), pos.y(), 0); glRotated(rot, 0, 0, 1); glTranslated(0, -1.5, 0); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUILaneSpeedTrigger.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUILaneSpeedTrigger.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUILaneSpeedTrigger.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUILaneSpeedTrigger.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 26.04.2004 -/// @version $Id: GUILaneSpeedTrigger.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUILaneSpeedTrigger.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Changes the speed allowed on a set of lanes (gui version) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUINet.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUINet.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUINet.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUINet.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Sept 2002 -/// @version $Id: GUINet.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: GUINet.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A MSNet extended by some values for usage within the gui /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -45,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -52,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -59,7 +62,6 @@ #include #include #include "GUINet.h" -#include "GUIShapeContainer.h" #ifdef HAVE_INTERNAL #include @@ -130,6 +132,15 @@ } +MSContainerControl& +GUINet::getContainerControl() { + if (myContainerControl == 0) { + myContainerControl = new GUIContainerControl(); + } + return *myContainerControl; +} + + void GUINet::initTLMap() { // get the list of loaded tl-logics @@ -215,6 +226,7 @@ GUINet::guiSimulationStep() { GLObjectValuePassConnector::updateAll(); GLObjectValuePassConnector >::updateAll(); + GUIParameterTableWindow::updateAll(); } @@ -255,8 +267,9 @@ void GUINet::initGUIStructures() { // initialise detector storage for gui - for (std::map >::const_iterator i = myDetectorControl->myDetectors.begin(); i != myDetectorControl->myDetectors.end(); ++i) { - const std::map& dets = myDetectorControl->getTypedDetectors((*i).first).getMyMap(); + const std::vector types = myDetectorControl->getAvailableTypes(); + for (std::vector::const_iterator i = types.begin(); i != types.end(); ++i) { + const std::map& dets = myDetectorControl->getTypedDetectors(*i).getMyMap(); for (std::map::const_iterator j = dets.begin(); j != dets.end(); ++j) { GUIDetectorWrapper* wrapper = (*j).second->buildDetectorGUIRepresentation(); if (wrapper != 0) { @@ -287,7 +300,7 @@ b.add((*j)->getShape().getBoxBoundary()); } // make sure persons are always drawn and selectable since they depend on their edge being drawn - b.grow(MSPerson::SIDEWALK_OFFSET + 1); + b.grow(MSPModel::SIDEWALK_OFFSET + 1); cmin[0] = b.xmin(); cmin[1] = b.ymin(); cmax[0] = b.xmax(); @@ -415,7 +428,7 @@ GUINet::getParameterWindow(GUIMainWindow& app, GUISUMOAbstractView&) { GUIParameterTableWindow* ret = - new GUIParameterTableWindow(app, *this, 15); + new GUIParameterTableWindow(app, *this, 19); // add items ret->mkItem("loaded vehicles [#]", true, new FunctionBinding(&getVehicleControl(), &MSVehicleControl::getLoadedVehicleNo)); @@ -452,6 +465,11 @@ ret->mkItem("ups [#]", true, new FunctionBinding(this, &GUINet::getUPS)); ret->mkItem("mean ups [#]", true, new FunctionBinding(this, &GUINet::getMeanUPS)); } + ret->mkItem("nodes [#]", false, (int)myJunctions->size()); + ret->mkItem("edges [#]", false, (int)GUIEdge::getIDs(false).size()); + ret->mkItem("total edge length [km]", false, GUIEdge::getTotalLength(false, false) / 1000); + ret->mkItem("total lane length [km]", false, GUIEdge::getTotalLength(false, true) / 1000); + // close building ret->closeBuilding(); return ret; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUINet.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUINet.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUINet.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUINet.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUINet.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUINet.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A MSNet extended by some values for usage within the gui /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -220,6 +220,17 @@ MSPersonControl& getPersonControl(); + /** @brief Returns the container control + * + * If the container control does not exist, yet, it is created. + * + * @return The container control + * @see MSContainerControl + * @see myContainerControl + */ + MSContainerControl& getContainerControl(); + + /** Returns the gl-id of the traffic light that controls the given link * valid only if the link is controlled by a tls */ unsigned int getLinkTLID(MSLink* link) const; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIPersonControl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIPersonControl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIPersonControl.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIPersonControl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file GUIPersonControl.cpp /// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch /// @date Wed, 13.06.2012 -/// @version $Id: GUIPersonControl.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIPersonControl.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // GUI-version of the person control for building gui persons /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -55,4 +57,13 @@ } +void +GUIPersonControl::insertPersonIDs(std::vector& into) { + into.reserve(myPersons.size()); + for (std::map::const_iterator it = myPersons.begin(); it != myPersons.end(); ++it) { + into.push_back(static_cast((*it).second)->getGlID()); + } +} + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIPersonControl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIPersonControl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIPersonControl.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIPersonControl.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file GUIPersonControl.h /// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch /// @date Wed, 13.06.2012 -/// @version $Id: GUIPersonControl.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIPersonControl.h 18095 2015-03-17 09:39:00Z behrisch $ /// // GUI-version of the person control for building gui persons /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -57,6 +59,11 @@ */ virtual MSPerson* buildPerson(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSPerson::MSPersonPlan* plan) const; + /** @brief Returns the list of all known persons by gl-id + * @param[fill] into The list to fill with vehicle ids + * @todo Well, what about concurrent modifications? + */ + void insertPersonIDs(std::vector& into); }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIPerson.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIPerson.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIPerson.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIPerson.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIPerson.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIPerson.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // A MSPerson extended by some values for usage within the gui /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,14 +34,16 @@ #include #include #include -#include +#include +#include #include #include #include -#include +//#include #include #include -#include +#include +#include #include #include #include @@ -60,27 +62,18 @@ #include #endif // CHECK_MEMORY_LEAKS +//#define GUIPerson_DEBUG_DRAW_WALKINGAREA_PATHS 1 // =========================================================================== // FOX callback mapping // =========================================================================== -/* FXDEFMAP(GUIPerson::GUIPersonPopupMenu) GUIPersonPopupMenuMap[] = { - FXMAPFUNC(SEL_COMMAND, MID_SHOW_ALLROUTES, GUIPerson::GUIPersonPopupMenu::onCmdShowAllRoutes), - FXMAPFUNC(SEL_COMMAND, MID_HIDE_ALLROUTES, GUIPerson::GUIPersonPopupMenu::onCmdHideAllRoutes), - FXMAPFUNC(SEL_COMMAND, MID_SHOW_CURRENTROUTE, GUIPerson::GUIPersonPopupMenu::onCmdShowCurrentRoute), - FXMAPFUNC(SEL_COMMAND, MID_HIDE_CURRENTROUTE, GUIPerson::GUIPersonPopupMenu::onCmdHideCurrentRoute), - FXMAPFUNC(SEL_COMMAND, MID_SHOW_BEST_LANES, GUIPerson::GUIPersonPopupMenu::onCmdShowBestLanes), - FXMAPFUNC(SEL_COMMAND, MID_HIDE_BEST_LANES, GUIPerson::GUIPersonPopupMenu::onCmdHideBestLanes), - FXMAPFUNC(SEL_COMMAND, MID_START_TRACK, GUIPerson::GUIPersonPopupMenu::onCmdStartTrack), - FXMAPFUNC(SEL_COMMAND, MID_STOP_TRACK, GUIPerson::GUIPersonPopupMenu::onCmdStopTrack), - FXMAPFUNC(SEL_COMMAND, MID_SHOW_LFLINKITEMS, GUIPerson::GUIPersonPopupMenu::onCmdShowLFLinkItems), - FXMAPFUNC(SEL_COMMAND, MID_HIDE_LFLINKITEMS, GUIPerson::GUIPersonPopupMenu::onCmdHideLFLinkItems), + FXMAPFUNC(SEL_COMMAND, MID_SHOW_WALKINGAREA_PATH, GUIPerson::GUIPersonPopupMenu::onCmdShowWalkingareaPath), + FXMAPFUNC(SEL_COMMAND, MID_HIDE_WALKINGAREA_PATH, GUIPerson::GUIPersonPopupMenu::onCmdHideWalkingareaPath), }; // Object implementation FXIMPLEMENT(GUIPerson::GUIPersonPopupMenu, GUIGLObjectPopupMenu, GUIPersonPopupMenuMap, ARRAYNUMBER(GUIPersonPopupMenuMap)) -*/ @@ -99,6 +92,23 @@ GUIPerson::GUIPersonPopupMenu::~GUIPersonPopupMenu() {} +long +GUIPerson::GUIPersonPopupMenu::onCmdShowWalkingareaPath(FXObject*, FXSelector, void*) { + assert(myObject->getType() == GLO_PERSON); + if (!static_cast(myObject)->hasActiveAddVisualisation(myParent, VO_SHOW_WALKINGAREA_PATH)) { + static_cast(myObject)->addActiveAddVisualisation(myParent, VO_SHOW_WALKINGAREA_PATH); + } + return 1; +} + +long +GUIPerson::GUIPersonPopupMenu::onCmdHideWalkingareaPath(FXObject*, FXSelector, void*) { + assert(myObject->getType() == GLO_PERSON); + static_cast(myObject)->removeActiveAddVisualisation(myParent, VO_SHOW_WALKINGAREA_PATH); + return 1; +} + + /* ------------------------------------------------------------------------- @@ -106,8 +116,7 @@ * ----------------------------------------------------------------------- */ GUIPerson::GUIPerson(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSPerson::MSPersonPlan* plan) : MSPerson(pars, vtype, plan), - GUIGlObject(GLO_PERSON, pars->id), - myAmVisualizedAsStopped(false) + GUIGlObject(GLO_PERSON, pars->id) { } @@ -123,6 +132,12 @@ buildCenterPopupEntry(ret); buildNameCopyPopupEntry(ret); buildSelectionPopupEntry(ret); + + if (hasActiveAddVisualisation(&parent, VO_SHOW_WALKINGAREA_PATH)) { + new FXMenuCommand(ret, "Hide Walkingarea Path", 0, ret, MID_HIDE_WALKINGAREA_PATH); + } else { + new FXMenuCommand(ret, "Show Walkingarea Path", 0, ret, MID_SHOW_WALKINGAREA_PATH); + } // buildShowParamsPopupEntry(ret); buildPositionCopyEntry(ret, false); @@ -134,12 +149,17 @@ GUIPerson::getParameterWindow(GUIMainWindow& app, GUISUMOAbstractView&) { GUIParameterTableWindow* ret = - new GUIParameterTableWindow(app, *this, 3); + new GUIParameterTableWindow(app, *this, 8); // add items //ret->mkItem("type [NAME]", false, myType->getID()); - ret->mkItem("stage", false, getCurrentStageTypeName()); - ret->mkItem("from", false, getFromEdge()->getID()); - ret->mkItem("to", false, getDestination().getID()); + ret->mkItem("stage", false, getCurrentStageDescription()); + ret->mkItem("start edge [id]", false, getFromEdge()->getID()); + ret->mkItem("dest edge [id]", false, getDestination().getID()); + ret->mkItem("edge [id]", false, getEdge()->getID()); + ret->mkItem("position [m]", true, new FunctionBinding(this, &GUIPerson::getEdgePos)); + ret->mkItem("speed [m/s]", true, new FunctionBinding(this, &GUIPerson::getSpeed)); + ret->mkItem("angle [degree]", true, new FunctionBinding(this, &GUIPerson::getAngle)); + ret->mkItem("waiting time [s]", true, new FunctionBinding(this, &GUIPerson::getWaitingSeconds)); // close building ret->closeBuilding(); return ret; @@ -149,7 +169,7 @@ Boundary GUIPerson::getCenteringBoundary() const { Boundary b; - b.add(getPosition(MSNet::getInstance()->getCurrentTimeStep())); + b.add(getPosition()); b.grow(20); return b; } @@ -159,14 +179,14 @@ GUIPerson::drawGL(const GUIVisualizationSettings& s) const { glPushName(getGlID()); glPushMatrix(); - const SUMOTime now = MSNet::getInstance()->getCurrentTimeStep(); - Position p1 = getPosition(now); + Position p1 = getPosition(); glTranslated(p1.x(), p1.y(), getType()); + glRotated(90, 0, 0, 1); // XXX use person specific gui settings // set person color setColor(s); // scale - SUMOReal upscale = s.personExaggeration; + const SUMOReal upscale = s.personSize.getExaggeration(s); glScaled(upscale, upscale, 1); switch (s.personQuality) { case 0: @@ -182,62 +202,39 @@ break; } glPopMatrix(); +#ifdef GUIPerson_DEBUG_DRAW_WALKINGAREA_PATHS + drawAction_drawWalkingareaPath(s); +#endif drawName(p1, s.scale, s.personName); glPopName(); } +void +GUIPerson::drawAction_drawWalkingareaPath(const GUIVisualizationSettings& s) const { + MSPersonStage_Walking* stage = dynamic_cast(getCurrentStage()); + if (stage != 0) { + setColor(s); + MSPModel_Striping::PState* stripingState = dynamic_cast(stage->getPedestrianState()); + if (stripingState != 0) { + MSPModel_Striping::WalkingAreaPath* waPath = stripingState->myWalkingAreaPath; + if (waPath != 0) { + glPushMatrix(); + glTranslated(0, 0, getType()); + GLHelper::drawBoxLines(waPath->shape, 0.05); + glPopMatrix(); + } + } + } +} void -GUIPerson::drawGLAdditional(GUISUMOAbstractView* const /* parent */, const GUIVisualizationSettings& /* s */) const { +GUIPerson::drawGLAdditional(GUISUMOAbstractView* const parent, const GUIVisualizationSettings& s) const { glPushName(getGlID()); glPushMatrix(); - /* glTranslated(0, 0, getType() - .1); // don't draw on top of other cars - if (hasActiveAddVisualisation(parent, VO_SHOW_BEST_LANES)) { - drawBestLanes(); - } - if (hasActiveAddVisualisation(parent, VO_SHOW_ROUTE)) { - drawRoute(s, 0, 0.25); + if (hasActiveAddVisualisation(parent, VO_SHOW_WALKINGAREA_PATH)) { + drawAction_drawWalkingareaPath(s); } - if (hasActiveAddVisualisation(parent, VO_SHOW_ALL_ROUTES)) { - if (getNumberReroutes() > 0) { - const int noReroutePlus1 = getNumberReroutes() + 1; - for (int i = noReroutePlus1 - 1; i >= 0; i--) { - SUMOReal darken = SUMOReal(0.4) / SUMOReal(noReroutePlus1) * SUMOReal(i); - drawRoute(s, i, darken); - } - } else { - drawRoute(s, 0, 0.25); - } - } - if (hasActiveAddVisualisation(parent, VO_SHOW_LFLINKITEMS)) { - for (DriveItemVector::const_iterator i = myLFLinkLanes.begin(); i != myLFLinkLanes.end(); ++i) { - if((*i).myLink==0) { - continue; - } - MSLink* link = (*i).myLink; - #ifdef HAVE_INTERNAL_LANES - MSLane *via = link->getViaLane(); - if (via == 0) { - via = link->getLane(); - } - #else - MSLane *via = link->getLane(); - #endif - if (via != 0) { - Position p = via->getShape()[0]; - if((*i).mySetRequest) { - glColor3f(0, 1, 0); - } else { - glColor3f(1, 0, 0); - } - glTranslated(p.x(), p.y(), -.1); - GLHelper::drawFilledCircle(1); - glTranslated(-p.x(), -p.y(), .1); - } - } - } - */ glPopMatrix(); glPopName(); } @@ -282,6 +279,17 @@ } return false; } + case 8: { // color by angle + SUMOReal hue = getAngle() + 180; // [0-360] + GLHelper::setColor(RGBColor::fromHSV(hue, 1., 1.)); + return true; + } + case 9: { // color randomly (by pointer) + const SUMOReal hue = (long)this % 360; // [0-360] + const SUMOReal sat = (((long)this / 360) % 67) / 100.0 + 0.33; // [0.33-1] + GLHelper::setColor(RGBColor::fromHSV(hue, sat, 1.)); + return true; + } default: return false; } @@ -292,67 +300,120 @@ GUIPerson::getColorValue(size_t activeScheme) const { switch (activeScheme) { case 4: + return getSpeed(); + case 5: if (isWaiting4Vehicle()) { return 3; } else { return (SUMOReal)getCurrentStageType(); } - case 5: - return STEPS2TIME(timeWaiting4Vehicle(MSNet::getInstance()->getCurrentTimeStep())); + case 6: + return getWaitingSeconds(); + case 7: + return gSelected.isSelected(GLO_PERSON, getGlID()); } return 0; } +SUMOReal +GUIPerson::getEdgePos() const { + AbstractMutex::ScopedLocker locker(myLock); + return MSPerson::getEdgePos(); +} + + Position -GUIPerson::getPosition(SUMOTime now) const { +GUIPerson::getPosition() const { + AbstractMutex::ScopedLocker locker(myLock); if (getCurrentStageType() == DRIVING && !isWaiting4Vehicle()) { return myPositionInVehicle; } - return MSPerson::getPosition(now); + return MSPerson::getPosition(); +} + + +SUMOReal +GUIPerson::getAngle() const { + AbstractMutex::ScopedLocker locker(myLock); + return MSPerson::getAngle(); +} + + +SUMOReal +GUIPerson::getWaitingSeconds() const { + AbstractMutex::ScopedLocker locker(myLock); + return MSPerson::getWaitingSeconds(); +} + + +SUMOReal +GUIPerson::getSpeed() const { + AbstractMutex::ScopedLocker locker(myLock); + return MSPerson::getSpeed(); } void GUIPerson::drawAction_drawAsTriangle(const GUIVisualizationSettings& /* s */) const { - // draw triangle pointing down + // draw triangle pointing forward + glRotated(getAngle(), 0, 0, 1); + glScaled(getVehicleType().getLength(), getVehicleType().getWidth(), 1); + glBegin(GL_TRIANGLES); + glVertex2d(0., 0.); + glVertex2d(1, -0.5); + glVertex2d(1, 0.5); + glEnd(); + // draw a smaller triangle to indicate facing + GLHelper::setColor(GLHelper::getColor().changedBrightness(-64)); + glTranslated(0, 0, .045); glBegin(GL_TRIANGLES); glVertex2d(0., 0.); - glVertex2d(-.5, 1.); - glVertex2d(.5, 1.); + glVertex2d(0.5, -0.25); + glVertex2d(0.5, 0.25); glEnd(); + glTranslated(0, 0, -.045); } void GUIPerson::drawAction_drawAsPoly(const GUIVisualizationSettings& /* s */) const { // draw pedestrian shape - const SUMOTime now = MSNet::getInstance()->getCurrentTimeStep(); - glRotated(getAngle(now), 0, 0, 1); + glRotated(getAngle(), 0, 0, 1); + glScaled(getVehicleType().getLength(), getVehicleType().getWidth(), 1); RGBColor lighter = GLHelper::getColor().changedBrightness(51); glTranslated(0, 0, .045); - GLHelper::drawFilledCircle(0.3); + // head + glScaled(1, 0.5, 1.); + GLHelper::drawFilledCircle(0.5); + // nose + glBegin(GL_TRIANGLES); + glVertex2d(0.0, -0.2); + glVertex2d(0.0, 0.2); + glVertex2d(-0.6, 0.0); + glEnd(); glTranslated(0, 0, -.045); - glScaled(.7, 2, 1); + // body + glScaled(0.9, 2.0, 1); glTranslated(0, 0, .04); GLHelper::setColor(lighter); - GLHelper::drawFilledCircle(0.3); + GLHelper::drawFilledCircle(0.5); glTranslated(0, 0, -.04); } void GUIPerson::drawAction_drawAsImage(const GUIVisualizationSettings& s) const { - if (getVehicleType().getGuiShape() == SVS_PEDESTRIAN) { - const SUMOTime now = MSNet::getInstance()->getCurrentTimeStep(); - glRotated(getAngle(now), 0, 0, 1); - } const std::string& file = getVehicleType().getImgFile(); if (file != "") { + if (getVehicleType().getGuiShape() == SVS_PEDESTRIAN) { + glRotated(getAngle(), 0, 0, 1); + } int textureID = GUITexturesHelper::getTextureID(file); if (textureID > 0) { - const SUMOReal halfLength = getVehicleType().getLength() / 2.0 * s.vehicleExaggeration; - const SUMOReal halfWidth = getVehicleType().getWidth() / 2.0 * s.vehicleExaggeration; + const SUMOReal exaggeration = s.personSize.getExaggeration(s); + const SUMOReal halfLength = getVehicleType().getLength() / 2.0 * exaggeration; + const SUMOReal halfWidth = getVehicleType().getWidth() / 2.0 * exaggeration; GUITexturesHelper::drawTexturedBox(textureID, -halfWidth, -halfLength, halfWidth, halfLength); } } else { @@ -360,5 +421,29 @@ drawAction_drawAsPoly(s); } } + + +// ------------ Additional visualisations +bool +GUIPerson::hasActiveAddVisualisation(GUISUMOAbstractView* const parent, int which) const { + return myAdditionalVisualizations.find(parent) != myAdditionalVisualizations.end() && (myAdditionalVisualizations.find(parent)->second & which) != 0; +} + + +void +GUIPerson::addActiveAddVisualisation(GUISUMOAbstractView* const parent, int which) { + if (myAdditionalVisualizations.find(parent) == myAdditionalVisualizations.end()) { + myAdditionalVisualizations[parent] = 0; + } + myAdditionalVisualizations[parent] |= which; + parent->addAdditionalGLVisualisation(this); +} + + +void +GUIPerson::removeActiveAddVisualisation(GUISUMOAbstractView* const parent, int which) { + myAdditionalVisualizations[parent] &= ~which; + parent->removeAdditionalGLVisualisation(this); +} /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIPerson.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIPerson.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIPerson.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIPerson.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIPerson.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIPerson.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A MSVehicle extended by some values for usage within the gui /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -38,10 +38,10 @@ #include #include #include -#include +#include #include #include -#include +#include // =========================================================================== @@ -121,9 +121,27 @@ myPositionInVehicle = pos; } + /// @name inherited from MSPerson with added locking + //@{ + + /// @brief return the offset from the start of the current edge + SUMOReal getEdgePos() const; + + /// @brief return the Network coordinate of the person + // @note overrides the base method and returns myPositionInVehicle while in driving stage + Position getPosition() const; + + /// @brief return the current angle of the person + SUMOReal getAngle() const; + + /// @brief the time this person spent waiting in seconds + SUMOReal getWaitingSeconds() const; + + /// @brief the current speed of the person + SUMOReal getSpeed() const; + + //@} - /// @brief overrides the base method and returns myPositionInVehicle while in driving stage - Position getPosition(SUMOTime now) const; /** * @class GUIPersonPopupMenu @@ -132,7 +150,7 @@ * also allows to trigger further visualisations and to track the vehicle. */ class GUIPersonPopupMenu : public GUIGLObjectPopupMenu { - //FXDECLARE(GUIPersonPopupMenu) + FXDECLARE(GUIPersonPopupMenu) public: /** @brief Constructor * @param[in] app The main window for instantiation of other windows @@ -146,6 +164,11 @@ /// @brief Destructor ~GUIPersonPopupMenu(); + /// @brief Called if the walkingarea path of the person shall be shown + long onCmdShowWalkingareaPath(FXObject*, FXSelector, void*); + /// @brief Called if the walkingarea path of the person shall be hidden + long onCmdHideWalkingareaPath(FXObject*, FXSelector, void*); + protected: /// @brief Information which additional visualisations are enabled (per view) @@ -160,11 +183,47 @@ }; + /** @brief Additional visualisation feature ids + */ + enum VisualisationFeatures { + /// @brief show the current walkingarea path + VO_SHOW_WALKINGAREA_PATH = 1, + /// @brief show persons's current route + VO_SHOW_ROUTE = 2, + /// @brief track person + VO_TRACKED = 8 + }; /// @brief Enabled visualisations, per view std::map myAdditionalVisualizations; + /// @name Additional visualisations + /// @{ + + /** @brief Returns whether the named feature is enabled in the given view + * @param[in] parent The view for which the feature may be enabled + * @param[in] which The visualisation feature + * @return see comment + */ + bool hasActiveAddVisualisation(GUISUMOAbstractView* const parent, int which) const; + + + /** @brief Adds the named visualisation feature to the given view + * @param[in] parent The view for which the feature shall be enabled + * @param[in] which The visualisation feature to enable + * @see GUISUMOAbstractView::addAdditionalGLVisualisation + */ + void addActiveAddVisualisation(GUISUMOAbstractView* const parent, int which); + + + /** @brief Adds the named visualisation feature to the given view + * @param[in] parent The view for which the feature shall be enabled + * @param[in] which The visualisation feature to enable + * @see GUISUMOAbstractView::removeAdditionalGLVisualisation + */ + void removeActiveAddVisualisation(GUISUMOAbstractView* const parent, int which); + /// @} private: @@ -183,14 +242,13 @@ /// @brief sets the color according to the current scheme index and some vehicle function bool setFunctionalColor(size_t activeScheme) const; - /// @brief whether the person is visualized as stopped - bool myAmVisualizedAsStopped; - /// @name drawing helper methods /// @{ void drawAction_drawAsTriangle(const GUIVisualizationSettings& s) const; void drawAction_drawAsPoly(const GUIVisualizationSettings& s) const; void drawAction_drawAsImage(const GUIVisualizationSettings& s) const; + + void drawAction_drawWalkingareaPath(const GUIVisualizationSettings& s) const; /// @} }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIShapeContainer.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIShapeContainer.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIShapeContainer.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIShapeContainer.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,161 +0,0 @@ -/****************************************************************************/ -/// @file GUIShapeContainer.cpp -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date 08.10.2009 -/// @version $Id: GUIShapeContainer.cpp 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Storage for geometrical objects extended by mutexes -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include "GUIShapeContainer.h" -#include -#include -#include -#include -#include - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// method definitions -// =========================================================================== -GUIShapeContainer::GUIShapeContainer(SUMORTree& vis) - : myVis(vis) {} - - -GUIShapeContainer::~GUIShapeContainer() {} - - -bool -GUIShapeContainer::addPOI(const std::string& id, const std::string& type, - const RGBColor& color, SUMOReal layer, SUMOReal angle, const std::string& imgFile, - const Position& pos, SUMOReal width, SUMOReal height) { - GUIPointOfInterest* p = new GUIPointOfInterest(id, type, color, pos, layer, angle, imgFile, width, height); - AbstractMutex::ScopedLocker locker(myLock); - if (!myPOIs.add(id, p)) { - delete p; - return false; - } else { - myVis.addAdditionalGLObject(p); - return true; - } -} - - -bool -GUIShapeContainer::addPolygon(const std::string& id, const std::string& type, - const RGBColor& color, SUMOReal layer, - SUMOReal angle, const std::string& imgFile, - const PositionVector& shape, bool fill) { - GUIPolygon* p = new GUIPolygon(id, type, color, shape, fill, layer, angle, imgFile); - AbstractMutex::ScopedLocker locker(myLock); - if (!myPolygons.add(id, p)) { - delete p; - return false; - } else { - myVis.addAdditionalGLObject(p); - return true; - } -} - - -bool -GUIShapeContainer::removePolygon(const std::string& id) { - AbstractMutex::ScopedLocker locker(myLock); - GUIPolygon* p = dynamic_cast(myPolygons.get(id)); - if (p == 0) { - return false; - } - myVis.removeAdditionalGLObject(p); - return myPolygons.remove(id); -} - - -bool -GUIShapeContainer::removePOI(const std::string& id) { - AbstractMutex::ScopedLocker locker(myLock); - GUIPointOfInterest* p = dynamic_cast(myPOIs.get(id)); - if (p == 0) { - return false; - } - myVis.removeAdditionalGLObject(p); - return myPOIs.remove(id); -} - - -void -GUIShapeContainer::movePOI(const std::string& id, const Position& pos) { - AbstractMutex::ScopedLocker locker(myLock); - GUIPointOfInterest* p = dynamic_cast(myPOIs.get(id)); - if (p != 0) { - myVis.removeAdditionalGLObject(p); - static_cast(p)->set(pos); - myVis.addAdditionalGLObject(p); - } -} - - -void -GUIShapeContainer::reshapePolygon(const std::string& id, const PositionVector& shape) { - AbstractMutex::ScopedLocker locker(myLock); - GUIPolygon* p = dynamic_cast(myPolygons.get(id)); - if (p != 0) { - myVis.removeAdditionalGLObject(p); - p->setShape(shape); - myVis.addAdditionalGLObject(p); - } -} - - - -std::vector -GUIShapeContainer::getPOIIds() const { - AbstractMutex::ScopedLocker locker(myLock); - std::vector ret; - const std::map& pois = getPOIs().getMyMap(); - for (std::map::const_iterator it = pois.begin(); it != pois.end(); ++it) { - ret.push_back(static_cast(it->second)->getGlID()); - } - return ret; -} - - -std::vector -GUIShapeContainer::getPolygonIDs() const { - AbstractMutex::ScopedLocker locker(myLock); - std::vector ret; - const std::map& polygons = getPolygons().getMyMap(); - for (std::map::const_iterator it = polygons.begin(); it != polygons.end(); ++it) { - ret.push_back(static_cast(it->second)->getGlID()); - } - return ret; -} - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIShapeContainer.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIShapeContainer.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIShapeContainer.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIShapeContainer.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,147 +0,0 @@ -/****************************************************************************/ -/// @file GUIShapeContainer.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date 08.10.2009 -/// @version $Id: GUIShapeContainer.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Storage for geometrical objects extended by mutexes -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef GUIShapeContainer_h -#define GUIShapeContainer_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include - -// =========================================================================== -// class declarations -// =========================================================================== -class SUMORTree; -class Position; -class MFXMutex; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class GUIShapeContainer - * @brief Storage for geometrical objects extended by mutexes - * @see ShapeContainer - */ -class GUIShapeContainer : public ShapeContainer { -public: - /// @brief Constructor - GUIShapeContainer(SUMORTree& vis); - - - /// @brief Destructor - virtual ~GUIShapeContainer(); - - /** @brief Builds a polygon using the given values and adds it to the container - * @param[in] id The name of the polygon - * @param[in] type The (abstract) type of the polygon - * @param[in] color The color of the polygon - * @param[in] layer The layer of the polygon - * @param[in] angle The rotation of the polygon - * @param[in] imgFile The raster image of the polygon - * @param[in] shape The shape of the polygon - * @param[in] fill Whether the polygon shall be filled - * @return whether the polygon could be added - */ - virtual bool addPolygon(const std::string& id, const std::string& type, - const RGBColor& color, SUMOReal layer, - SUMOReal angle, const std::string& imgFile, - const PositionVector& shape, bool fill); - - - /** @brief Builds a POI using the given values and adds it to the container - * @param[in] id The name of the POI - * @param[in] type The (abstract) type of the POI - * @param[in] color The color of the POI - * @param[in] layer The layer of the POI - * @param[in] angle The rotation of the POI - * @param[in] imgFile The raster image of the POI - * @param[in] pos The position of the POI - * @param[in] width The width of the POI image - * @param[in] height The height of the POI image - * @return whether the poi could be added - */ - virtual bool addPOI(const std::string& id, const std::string& type, - const RGBColor& color, SUMOReal layer, SUMOReal angle, const std::string& imgFile, - const Position& pos, SUMOReal width, SUMOReal height); - - - - /** @brief Removes a polygon from the container - * @param[in] id The id of the polygon - * @return Whether the polygon could be removed - */ - virtual bool removePolygon(const std::string& id); - - - /** @brief Removes a PoI from the container - * @param[in] id The id of the PoI - * @return Whether the poi could be removed - */ - virtual bool removePOI(const std::string& id); - - - - /** @brief Assigns a new position to the named PoI - * @param[in] id The id of the PoI to move - * @param[in] pos The PoI's new position - */ - virtual void movePOI(const std::string& id, const Position& pos); - - - /** @brief Assigns a shape to the named polygon - * @param[in] id The id of the polygon to reshape - * @param[in] shape The polygon's new shape - */ - virtual void reshapePolygon(const std::string& id, const PositionVector& shape); - - - - /// Returns the gl-ids of all pois - std::vector getPOIIds() const; - /// Returns the gl-ids of all polygons - std::vector getPolygonIDs() const; - - -private: - /// @brief The mutex for adding/removing operations - mutable MFXMutex myLock; - - /// @brief The RTree structure to add and remove visualization elements - SUMORTree& myVis; - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUITrafficLightLogicWrapper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUITrafficLightLogicWrapper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUITrafficLightLogicWrapper.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUITrafficLightLogicWrapper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Oct/Nov 2003 -/// @version $Id: GUITrafficLightLogicWrapper.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUITrafficLightLogicWrapper.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A wrapper for tl-logics to allow their visualisation and interaction /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -201,7 +201,7 @@ Boundary GUITrafficLightLogicWrapper::getCenteringBoundary() const { Boundary ret; - const MSTrafficLightLogic::LaneVectorVector& lanes = myTLLogic.getLanes(); + const MSTrafficLightLogic::LaneVectorVector& lanes = myTLLogic.getLaneVectors(); for (MSTrafficLightLogic::LaneVectorVector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) { const MSTrafficLightLogic::LaneVector& lanes2 = (*i); for (MSTrafficLightLogic::LaneVector::const_iterator j = lanes2.begin(); j != lanes2.end(); ++j) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUITrafficLightLogicWrapper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUITrafficLightLogicWrapper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUITrafficLightLogicWrapper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUITrafficLightLogicWrapper.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Oct/Nov 2003 -/// @version $Id: GUITrafficLightLogicWrapper.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUITrafficLightLogicWrapper.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A wrapper for tl-logics to allow their visualisation and interaction /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUITriggeredRerouter.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUITriggeredRerouter.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUITriggeredRerouter.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUITriggeredRerouter.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 25.07.2005 -/// @version $Id: GUITriggeredRerouter.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: GUITriggeredRerouter.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Reroutes vehicles passing an edge (gui version) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -228,27 +228,16 @@ * ----------------------------------------------------------------------- */ GUITriggeredRerouter::GUITriggeredRerouter( const std::string& id, - const std::vector& edges, + const MSEdgeVector& edges, SUMOReal prob, const std::string& aXMLFilename, bool off, SUMORTree& rtree) : MSTriggeredRerouter(id, edges, prob, aXMLFilename, off), GUIGlObject_AbstractAdd("rerouter", GLO_TRIGGER, id) { // add visualisation objects for edges which trigger the rerouter - for (std::vector::const_iterator it = edges.begin(); it != edges.end(); ++it) { + for (MSEdgeVector::const_iterator it = edges.begin(); it != edges.end(); ++it) { myEdgeVisualizations.push_back(new GUITriggeredRerouterEdge(dynamic_cast(*it), this, false)); - } - // add visualisation objects for closed edges - for (std::vector::const_iterator it_interval = myIntervals.begin(); - it_interval != myIntervals.end(); ++it_interval) { - const std::vector& closed = it_interval->closed; - for (std::vector::const_iterator it = closed.begin(); it != closed.end(); ++it) { - myEdgeVisualizations.push_back(new GUITriggeredRerouterEdge(dynamic_cast(*it), this, true)); - } - } - // register with rtree and rerouter boundary - for (std::vector::iterator it = myEdgeVisualizations.begin(); it != myEdgeVisualizations.end(); ++it) { - rtree.addAdditionalGLObject(*it); - myBoundary.add((*it)->getCenteringBoundary()); + rtree.addAdditionalGLObject(myEdgeVisualizations.back()); + myBoundary.add(myEdgeVisualizations.back()->getCenteringBoundary()); } } @@ -261,6 +250,21 @@ } +void +GUITriggeredRerouter::myEndElement(int element) { + MSTriggeredRerouter::myEndElement(element); + if (element == SUMO_TAG_INTERVAL) { + // add visualisation objects for closed edges + const RerouteInterval& ri = myIntervals.back(); + for (MSEdgeVector::const_iterator it = ri.closed.begin(); it != ri.closed.end(); ++it) { + myEdgeVisualizations.push_back(new GUITriggeredRerouterEdge(dynamic_cast(*it), this, true)); + dynamic_cast(GUINet::getInstance())->getVisualisationSpeedUp().addAdditionalGLObject(myEdgeVisualizations.back()); + myBoundary.add(myEdgeVisualizations.back()->getCenteringBoundary()); + } + } +} + + GUIGLObjectPopupMenu* GUITriggeredRerouter::getPopUpMenu(GUIMainWindow& app, GUISUMOAbstractView& parent) { @@ -348,16 +352,17 @@ void GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(const GUIVisualizationSettings& s) const { - if (s.scale * s.addExaggeration >= 3) { + const SUMOReal exaggeration = s.addSize.getExaggeration(s); + if (s.scale * exaggeration >= 3) { glPushName(getGlID()); const SUMOReal prob = myParent->getProbability(); if (myAmClosedEdge) { // draw closing symbol onto all lanes - if (myParent->hasCurrentReroute(MSNet::getInstance()->getCurrentTimeStep()) && prob > 0) { - const RerouteInterval& ri = - myParent->getCurrentReroute(MSNet::getInstance()->getCurrentTimeStep()); + const RerouteInterval* const ri = + myParent->getCurrentReroute(MSNet::getInstance()->getCurrentTimeStep()); + if (ri != 0 && prob > 0) { // draw only if the edge is closed at this time - if (std::find(ri.closed.begin(), ri.closed.end(), myEdge) != ri.closed.end()) { + if (std::find(ri->closed.begin(), ri->closed.end(), myEdge) != ri->closed.end()) { const size_t noLanes = myFGPositions.size(); for (size_t j = 0; j < noLanes; ++j) { Position pos = myFGPositions[j]; @@ -374,7 +379,7 @@ } } glTranslated(0, 0, getType()); - //glScaled(s.addExaggeration, s.addExaggeration, 1); + //glScaled(exaggeration, exaggeration, 1); glColor3d(0.7, 0, 0); GLHelper::drawFilledCircle((SUMOReal) 1.3, noPoints); glTranslated(0, 0, .1); @@ -405,7 +410,7 @@ glTranslated(pos.x(), pos.y(), 0); glRotated(rot, 0, 0, 1); glTranslated(0, 0, getType()); - glScaled(s.addExaggeration, s.addExaggeration, 1); + glScaled(exaggeration, exaggeration, 1); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glBegin(GL_TRIANGLES); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUITriggeredRerouter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUITriggeredRerouter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUITriggeredRerouter.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUITriggeredRerouter.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 25.07.2005 -/// @version $Id: GUITriggeredRerouter.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUITriggeredRerouter.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Reroutes vehicles passing an edge (gui-version) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -64,7 +64,7 @@ * @param[in] off Whether the rerouter is off (not working) initially */ GUITriggeredRerouter(const std::string& id, - const std::vector& edges, SUMOReal prob, + const MSEdgeVector& edges, SUMOReal prob, const std::string& aXMLFilename, bool off, SUMORTree& rtree); @@ -73,6 +73,14 @@ ~GUITriggeredRerouter(); + /** @brief Called when a closing tag occurs + * + * @param[in] element ID of the currently opened element + * @exception ProcessError If something fails + * @see GenericSAXHandler::myEndElement + */ + void myEndElement(int element); + /// @name inherited from GUIGlObject //@{ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIVehicleControl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIVehicleControl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIVehicleControl.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIVehicleControl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Wed, 10. Dec 2003 -/// @version $Id: GUIVehicleControl.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIVehicleControl.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The class responsible for building and deletion of vehicles (gui-version) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -31,6 +31,7 @@ #endif #include +#include #include "GUIVehicleControl.h" #include "GUIVehicle.h" #include "GUINet.h" @@ -58,9 +59,14 @@ SUMOVehicle* GUIVehicleControl::buildVehicle(SUMOVehicleParameter* defs, - const MSRoute* route, const MSVehicleType* type) { + const MSRoute* route, const MSVehicleType* type, + const bool ignoreStopErrors, const bool fromRouteFile) { myLoadedVehNo++; - MSVehicle* built = new GUIVehicle(defs, route, type, type->computeChosenSpeedDeviation(myVehicleParamsRNG), myLoadedVehNo - 1); + if (fromRouteFile) { + defs->depart += computeRandomDepartOffset(); + } + MSVehicle* built = new GUIVehicle(defs, route, type, type->computeChosenSpeedDeviation(fromRouteFile ? MSRouteHandler::getParsingRNG() : 0)); + built->addStops(ignoreStopErrors); MSNet::getInstance()->informVehicleStateListener(built, MSNet::VEHICLE_STATE_BUILT); return built; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIVehicleControl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIVehicleControl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIVehicleControl.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIVehicleControl.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file GUIVehicleControl.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Wed, 10. Dec 2003 -/// @version $Id: GUIVehicleControl.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIVehicleControl.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The class responsible for building and deletion of vehicles (gui-version) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -75,11 +76,14 @@ * @param[in] defs The parameter defining the vehicle * @param[in] route The route of this vehicle * @param[in] type The type of this vehicle - * @return The built vehicle (MSVehicle instance) + * @param[in] ignoreStopErrors whether invalid stops trigger a warning only + * @param[in] fromRouteFile whether we are just reading the route file or creating via trigger, traci, ... + * @return The built vehicle (GUIVehicle instance) * @see MSVehicleControl::buildVehicle */ SUMOVehicle* buildVehicle(SUMOVehicleParameter* defs, - const MSRoute* route, const MSVehicleType* type); + const MSRoute* route, const MSVehicleType* type, + const bool ignoreStopErrors, const bool fromRouteFile = true); /// @} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIVehicle.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIVehicle.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIVehicle.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIVehicle.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIVehicle.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: GUIVehicle.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // A MSVehicle extended by some values for usage within the gui /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,13 +33,10 @@ #include #include #include -#ifdef HAVE_OSG -#include -#include -#endif #include #include -#include +#include +#include #include #include #include @@ -54,13 +51,16 @@ #include #include #include -#include +#include #include #include +#include +#include #include #include #include "GUIVehicle.h" #include "GUIPerson.h" +#include "GUIContainer.h" #include "GUINet.h" #include "GUIEdge.h" #include "GUILane.h" @@ -131,6 +131,11 @@ //double vehiclePoly_EVehicleFrontGlass[] = { 0.35,0, 0.1,0, 0.1,0.4, 0.43,0.3, 0.43,-0.3, 0.1,-0.4, 0.1,0, -10000 }; double vehiclePoly_EVehicleBackGlass[] = { 0.65, 0, 0.9, 0, 0.9, 0.4, 0.57, 0.3, 0.57, -0.3, 0.9, -0.4, 0.9, 0, -10000 }; +double vehiclePoly_Ship[] = { 0.25, 0, 0, 0, 0.1, 0.25, 0.2, 0.45, 0.25, 0.5, 0.95, 0.5, 1.0, 0.45, 1.0, -0.45, 0.95, -0.5, 0.25, -0.5, 0.2, -0.45, 0.1, -0.25, 0, 0, -10000 }; +double vehiclePoly_ShipDeck[] = { 0.5, 0, 0.25, 0.4, 0.95, 0.4, 0.95, -0.4, 0.25, -0.4, 0.25, 0.4, -10000 }; +double vehiclePoly_ShipSuperStructure[] = { 0.8, 0, 0.5, 0.3, 0.85, 0.3, 0.85, -0.3, 0.5, -0.3, 0.5, 0.3, -10000 }; + +double vehiclePoly_Cyclist[] = { 0.5, 0, 0.25, 0.45, 0.25, 0.5, 0.8, 0.15, 0.8, -0.15, 0.25, -0.5, 0.25, -0.45, -10000 }; // =========================================================================== // method definitions @@ -246,9 +251,8 @@ * GUIVehicle - methods * ----------------------------------------------------------------------- */ GUIVehicle::GUIVehicle(SUMOVehicleParameter* pars, const MSRoute* route, - const MSVehicleType* type, - SUMOReal speedFactor, int vehicleIndex) : - MSVehicle(pars, route, type, speedFactor, vehicleIndex), + const MSVehicleType* type, const SUMOReal speedFactor) : + MSVehicle(pars, route, type, speedFactor), GUIGlObject(GLO_VEHICLE, pars->id) { // as it is possible to show all vehicle routes, we have to store them... (bug [ 2519761 ]) myRoutes = MSDevice_Vehroutes::buildVehicleDevices(*this, myDevices, 5); @@ -262,11 +266,6 @@ for (std::map::iterator i = myAdditionalVisualizations.begin(); i != myAdditionalVisualizations.end(); ++i) { while (i->first->removeAdditionalGLVisualisation(this)); } -#ifdef HAVE_OSG - for (std::map::iterator i = myGeom.begin(); i != myGeom.end(); ++i) { - i->first->remove(this); - } -#endif myLock.unlock(); GLObjectValuePassConnector::removeObject(*this); delete myRoutes; @@ -323,45 +322,74 @@ GUIVehicle::getParameterWindow(GUIMainWindow& app, GUISUMOAbstractView&) { GUIParameterTableWindow* ret = - new GUIParameterTableWindow(app, *this, 21); + new GUIParameterTableWindow(app, *this, 36); // add items - ret->mkItem("type [NAME]", false, myType->getID()); - if (getParameter().repetitionNumber > 0) { - ret->mkItem("left same route [#]", false, (unsigned int) getParameter().repetitionNumber); - } - if (getParameter().repetitionOffset > 0) { - ret->mkItem("insertion period [s]", false, time2string(getParameter().repetitionOffset)); - } + ret->mkItem("lane [id]", false, myLane->getID()); + ret->mkItem("position [m]", true, + new FunctionBinding(this, &GUIVehicle::getPositionOnLane)); + ret->mkItem("speed [m/s]", true, + new FunctionBinding(this, &GUIVehicle::getSpeed)); + ret->mkItem("angle [degree]", true, + new FunctionBinding(this, &MSVehicle::getAngle)); if (getChosenSpeedFactor() != 1) { ret->mkItem("speed factor", false, getChosenSpeedFactor()); } - ret->mkItem("insertion period [s]", false, time2string(getParameter().repetitionOffset)); + ret->mkItem("time gap [s]", true, + new FunctionBinding(this, &MSVehicle::getTimeGap)); ret->mkItem("waiting time [s]", true, new FunctionBinding(this, &MSVehicle::getWaitingSeconds)); + ret->mkItem("impatience", true, + new FunctionBinding(this, &MSVehicle::getImpatience)); ret->mkItem("last lane change [s]", true, new FunctionBinding(this, &GUIVehicle::getLastLaneChangeOffset)); ret->mkItem("desired depart [s]", false, time2string(getParameter().depart)); - ret->mkItem("position [m]", true, - new FunctionBinding(this, &GUIVehicle::getPositionOnLane)); - ret->mkItem("speed [m/s]", true, - new FunctionBinding(this, &GUIVehicle::getSpeed)); - ret->mkItem("angle", true, - new FunctionBinding(this, &MSVehicle::getAngle)); + if (getParameter().repetitionNumber < INT_MAX) { + ret->mkItem("remaining [#]", false, (unsigned int) getParameter().repetitionNumber - getParameter().repetitionsDone); + } + if (getParameter().repetitionOffset > 0) { + ret->mkItem("insertion period [s]", false, time2string(getParameter().repetitionOffset)); + } + if (getParameter().repetitionProbability > 0) { + ret->mkItem("insertion probability", false, getParameter().repetitionProbability); + } ret->mkItem("stop info", false, getStopInfo()); - ret->mkItem("CO2 (HBEFA) [mg/s]", true, - new FunctionBinding(this, &GUIVehicle::getHBEFA_CO2Emissions)); - ret->mkItem("CO (HBEFA) [mg/s]", true, - new FunctionBinding(this, &GUIVehicle::getHBEFA_COEmissions)); - ret->mkItem("HC (HBEFA) [mg/s]", true, - new FunctionBinding(this, &GUIVehicle::getHBEFA_HCEmissions)); - ret->mkItem("NOx (HBEFA) [mg/s]", true, - new FunctionBinding(this, &GUIVehicle::getHBEFA_NOxEmissions)); - ret->mkItem("PMx (HBEFA) [mg/s]", true, - new FunctionBinding(this, &GUIVehicle::getHBEFA_PMxEmissions)); - ret->mkItem("fuel (HBEFA) [ml/s]", true, - new FunctionBinding(this, &GUIVehicle::getHBEFA_FuelConsumption)); + ret->mkItem("line", false, myParameter->line); + ret->mkItem("CO2 [mg/s]", true, + new FunctionBinding(this, &GUIVehicle::getCO2Emissions)); + ret->mkItem("CO [mg/s]", true, + new FunctionBinding(this, &GUIVehicle::getCOEmissions)); + ret->mkItem("HC [mg/s]", true, + new FunctionBinding(this, &GUIVehicle::getHCEmissions)); + ret->mkItem("NOx [mg/s]", true, + new FunctionBinding(this, &GUIVehicle::getNOxEmissions)); + ret->mkItem("PMx [mg/s]", true, + new FunctionBinding(this, &GUIVehicle::getPMxEmissions)); + ret->mkItem("fuel [ml/s]", true, + new FunctionBinding(this, &GUIVehicle::getFuelConsumption)); ret->mkItem("noise (Harmonoise) [dB]", true, new FunctionBinding(this, &GUIVehicle::getHarmonoise_NoiseEmissions)); + std::ostringstream str; + for (std::vector::const_iterator i = myDevices.begin(); i != myDevices.end(); ++i) { + if (i != myDevices.begin()) { + str << ' '; + } + str << (*i)->getID().substr(0, (*i)->getID().find(getID())); + } + ret->mkItem("devices", false, str.str()); + ret->mkItem("parameters [key:val]", false, toString(getParameter().getMap())); + ret->mkItem("", false, ""); + ret->mkItem("Type Information:", false, ""); + ret->mkItem("type [id]", false, myType->getID()); + ret->mkItem("length", false, myType->getLength()); + ret->mkItem("minGap", false, myType->getMinGap()); + ret->mkItem("vehicle class", false, SumoVehicleClassStrings.getString(myType->getVehicleClass())); + ret->mkItem("emission class", false, PollutantsInterface::getName(myType->getEmissionClass())); + ret->mkItem("maximum speed [m/s]", false, getMaxSpeed()); + ret->mkItem("maximum acceleration [m/s^2]", false, getCarFollowModel().getMaxAccel()); + ret->mkItem("maximum deceleration [m/s^2]", false, getCarFollowModel().getMaxDecel()); + ret->mkItem("imperfection (sigma)", false, getCarFollowModel().getImperfection()); + ret->mkItem("reaction time (tau)", false, getCarFollowModel().getHeadwayTime()); + ret->mkItem("type parameters [key:val]", false, toString(myType->getParameter().getMap())); // close building ret->closeBuilding(); return ret; @@ -459,18 +487,30 @@ glTranslated(0, 0, -.04); break; case SVS_BICYCLE: + case SVS_MOPED: case SVS_MOTORCYCLE: { + RGBColor darker = current.changedBrightness(-50); + // body + drawPoly(vehiclePoly_Cyclist, 4); + // head glPushMatrix(); - glTranslated(.5, 0, 0); - glScaled(.25 / (length), 1, 1.); - glTranslated(0, 0, .045); + glTranslated(0.4, 0, .5); + glScaled(0.1, 0.2, 1); + GLHelper::setColor(darker); GLHelper::drawFilledCircle(1); - glScaled(.7, 2, 1); - glTranslated(0, 0, -.045); - glTranslated(0, 0, .04); - GLHelper::setColor(lighter); + glPopMatrix(); + // bike frame + GLHelper::setColor(RGBColor::GREY); + glPushMatrix(); + glTranslated(0.5, 0, .3); + glScaled(0.5, 0.05, 1); + GLHelper::drawFilledCircle(1); + glPopMatrix(); + // handle bar + glPushMatrix(); + glTranslated(0.25, 0, .3); + glScaled(0.02, 0.5, 1); GLHelper::drawFilledCircle(1); - glTranslated(0, 0, -.04); glPopMatrix(); } break; @@ -503,9 +543,9 @@ drawPoly(vehiclePoly_DeliveryMediumRightGlass, 4.5); drawPoly(vehiclePoly_DeliveryMediumLeftGlass, 4.5); break; - case SVS_TRANSPORT: - case SVS_TRANSPORT_SEMITRAILER: - case SVS_TRANSPORT_1TRAILER: + case SVS_TRUCK: + case SVS_TRUCK_SEMITRAILER: + case SVS_TRUCK_1TRAILER: glScaled(1. / (length), 1, 1.); drawPoly(vehiclePoly_TransportBody, 4); glColor3d(0, 0, 0); @@ -514,9 +554,8 @@ drawPoly(vehiclePoly_TransportLeftGlass, 4.5); break; case SVS_BUS: - case SVS_BUS_TROLLEY: - case SVS_BUS_CITY_FLEXIBLE: - case SVS_BUS_CITY: { + case SVS_BUS_COACH: + case SVS_BUS_TROLLEY: { SUMOReal ml = length; glScaled(1. / (length), 1, 1.); glTranslated(0, 0, .04); @@ -562,24 +601,11 @@ glTranslated(0, 0, -.045); } break; - case SVS_BUS_OVERLAND: + case SVS_BUS_FLEXIBLE: case SVS_RAIL: - drawAction_drawRailCarriages(s, 25.0, 1); - break; - case SVS_RAIL_LIGHT: - drawAction_drawRailCarriages(s, 38.0); - break; - case SVS_RAIL_CITY: - drawAction_drawRailCarriages(s, 25.0); - break; - case SVS_RAIL_SLOW: - drawAction_drawRailCarriages(s, 15.0, 1); - break; - case SVS_RAIL_FAST: - drawAction_drawRailCarriages(s, 40.0, 1); - break; + case SVS_RAIL_CAR: case SVS_RAIL_CARGO: - drawAction_drawRailCarriages(s, 20.0); + drawAction_drawCarriageClass(s, shape, false); break; case SVS_E_VEHICLE: drawPoly(vehiclePoly_EVehicleBody, 4); @@ -638,6 +664,16 @@ GLHelper::drawFilledCircle(.3, 16); glPopMatrix(); break; + case SVS_SHIP: { + RGBColor darker = current.changedBrightness(-30); + RGBColor darker2 = current.changedBrightness(-70); + drawPoly(vehiclePoly_Ship, 4); + GLHelper::setColor(darker); + drawPoly(vehiclePoly_ShipDeck, 5); + GLHelper::setColor(darker2); + drawPoly(vehiclePoly_ShipSuperStructure, 6); + break; + } default: // same as passenger drawPoly(vehiclePoly_PassengerCarBody, 4); glColor3d(1, 1, 1); @@ -667,6 +703,7 @@ glVertex2d(0, 0); glEnd(); break; + case SVS_MOPED: case SVS_MOTORCYCLE: //glScaled(length, 1, 1.); glBegin(GL_TRIANGLE_FAN); @@ -702,15 +739,15 @@ case SVS_PASSENGER_VAN: case SVS_DELIVERY: break; - case SVS_TRANSPORT: + case SVS_TRUCK: GLHelper::setColor(current); GLHelper::drawBoxLine(Position(2.3, 0), 90., length - 2.3, .5); break; - case SVS_TRANSPORT_SEMITRAILER: + case SVS_TRUCK_SEMITRAILER: GLHelper::setColor(current); GLHelper::drawBoxLine(Position(2.8, 0), 90., length - 2.8, .5); break; - case SVS_TRANSPORT_1TRAILER: { + case SVS_TRUCK_1TRAILER: { GLHelper::setColor(current); SUMOReal l = length - 2.3; l = l / 2.; @@ -732,17 +769,14 @@ glPopMatrix(); break; case SVS_BUS: - case SVS_BUS_CITY: - case SVS_BUS_CITY_FLEXIBLE: - case SVS_BUS_OVERLAND: + case SVS_BUS_COACH: + case SVS_BUS_FLEXIBLE: case SVS_RAIL: - case SVS_RAIL_LIGHT: - case SVS_RAIL_CITY: - case SVS_RAIL_SLOW: - case SVS_RAIL_FAST: + case SVS_RAIL_CAR: case SVS_RAIL_CARGO: case SVS_E_VEHICLE: case SVS_ANT: + case SVS_SHIP: break; default: // same as passenger/sedan drawPoly(vehiclePoly_PassengerSedanRightGlass, 4.5); @@ -829,10 +863,11 @@ if (file != "") { int textureID = GUITexturesHelper::getTextureID(file); if (textureID > 0) { + const SUMOReal exaggeration = s.vehicleSize.getExaggeration(s); if (length < 0) { - length = getVehicleType().getLength() * s.vehicleExaggeration; + length = getVehicleType().getLength() * exaggeration; } - const SUMOReal halfWidth = getVehicleType().getWidth() / 2.0 * s.vehicleExaggeration; + const SUMOReal halfWidth = getVehicleType().getWidth() / 2.0 * exaggeration; GUITexturesHelper::drawTexturedBox(textureID, -halfWidth, 0, halfWidth, length); return true; } @@ -841,54 +876,78 @@ } +bool +GUIVehicle::drawAction_drawCarriageClass(const GUIVisualizationSettings& s, SUMOVehicleShape guiShape, bool asImage) const { + switch (guiShape) { + case SVS_BUS_FLEXIBLE: + drawAction_drawRailCarriages(s, 8.25, 0, 0, asImage); // 16.5 overall, 2 modules http://de.wikipedia.org/wiki/Ikarus_180 + break; + case SVS_RAIL: + drawAction_drawRailCarriages(s, 24.5, 1, 1, asImage); // http://de.wikipedia.org/wiki/UIC-Y-Wagen_%28DR%29 + break; + case SVS_RAIL_CAR: + drawAction_drawRailCarriages(s, 16.85, 1, 0, asImage); // 67.4m overall, 4 carriages http://de.wikipedia.org/wiki/DB-Baureihe_423 +// drawAction_drawRailCarriages(s, 5.71, 0, 0, asImage); // 40.0m overall, 7 modules http://de.wikipedia.org/wiki/Bombardier_Flexity_Berlin +// drawAction_drawRailCarriages(s, 9.44, 1, 1, asImage); // actually length of the locomotive http://de.wikipedia.org/wiki/KJI_Nr._20_und_21 +// drawAction_drawRailCarriages(s, 24.775, 0, 0, asImage); // http://de.wikipedia.org/wiki/ICE_3 + break; + case SVS_RAIL_CARGO: + drawAction_drawRailCarriages(s, 13.86, 1, 0, asImage); // UIC 571-1 http://de.wikipedia.org/wiki/Flachwagen + break; + default: + return false; + } + return true; +} + #define BLINKER_POS_FRONT .5 #define BLINKER_POS_BACK .5 inline void -drawAction_drawBlinker(const GUIVehicle& veh, double dir) { +drawAction_drawBlinker(double dir, SUMOReal length) { glColor3d(1.f, .8f, 0); glPushMatrix(); glTranslated(dir, BLINKER_POS_FRONT, -0.1); GLHelper::drawFilledCircle(.5, 6); glPopMatrix(); glPushMatrix(); - glTranslated(dir, veh.getVehicleType().getLength() - BLINKER_POS_BACK, -0.1); + glTranslated(dir, length - BLINKER_POS_BACK, -0.1); GLHelper::drawFilledCircle(.5, 6); glPopMatrix(); } inline void -drawAction_drawVehicleBlinker(const GUIVehicle& veh) { +drawAction_drawVehicleBlinker(const GUIVehicle& veh, SUMOReal length) { if (!veh.signalSet(MSVehicle::VEH_SIGNAL_BLINKER_RIGHT | MSVehicle::VEH_SIGNAL_BLINKER_LEFT | MSVehicle::VEH_SIGNAL_BLINKER_EMERGENCY)) { return; } const double offset = MAX2(.5 * veh.getVehicleType().getWidth(), .4); if (veh.signalSet(MSVehicle::VEH_SIGNAL_BLINKER_RIGHT)) { - drawAction_drawBlinker(veh, -offset); + drawAction_drawBlinker(-offset, length); } if (veh.signalSet(MSVehicle::VEH_SIGNAL_BLINKER_LEFT)) { - drawAction_drawBlinker(veh, offset);; + drawAction_drawBlinker(offset, length);; } if (veh.signalSet(MSVehicle::VEH_SIGNAL_BLINKER_EMERGENCY)) { - drawAction_drawBlinker(veh, -offset); - drawAction_drawBlinker(veh, offset); + drawAction_drawBlinker(-offset, length); + drawAction_drawBlinker(offset, length); } } inline void -drawAction_drawVehicleBrakeLight(const GUIVehicle& veh) { +drawAction_drawVehicleBrakeLight(const GUIVehicle& veh, SUMOReal length) { if (!veh.signalSet(MSVehicle::VEH_SIGNAL_BRAKELIGHT)) { return; } glColor3f(1.f, .2f, 0); glPushMatrix(); - glTranslated(-veh.getVehicleType().getWidth() * 0.5, veh.getVehicleType().getLength(), -0.1); + glTranslated(-veh.getVehicleType().getWidth() * 0.5, length, -0.1); GLHelper::drawFilledCircle(.5, 6); glPopMatrix(); glPushMatrix(); - glTranslated(veh.getVehicleType().getWidth() * 0.5, veh.getVehicleType().getLength(), -0.1); + glTranslated(veh.getVehicleType().getWidth() * 0.5, length, -0.1); GLHelper::drawFilledCircle(.5, 6); glPopMatrix(); } @@ -906,7 +965,7 @@ // set lane color setColor(s); // scale - SUMOReal upscale = s.vehicleExaggeration; + const SUMOReal upscale = s.vehicleSize.getExaggeration(s); glScaled(upscale, upscale, 1); /* MSLCM_DK2004 &m2 = static_cast(veh->getLaneChangeModel()); @@ -919,6 +978,7 @@ } */ // draw the vehicle + myCarriageLength = getVehicleType().getLength(); switch (s.vehicleQuality) { case 0: drawAction_drawVehicleAsTrianglePlus(); @@ -932,36 +992,16 @@ case 3: default: // draw as image but take special care for drawing trains - // XXX handle default carriage lenghts someplace else - switch (getVehicleType().getGuiShape()) { - case SVS_RAIL: - drawAction_drawRailCarriages(s, 25.0, 1, true); - break; - case SVS_RAIL_LIGHT: - drawAction_drawRailCarriages(s, 38.0, true); - break; - case SVS_RAIL_CITY: - drawAction_drawRailCarriages(s, 25.0, true); - break; - case SVS_RAIL_SLOW: - drawAction_drawRailCarriages(s, 15.0, 1, true); - break; - case SVS_RAIL_FAST: - drawAction_drawRailCarriages(s, 40.0, 1, true); - break; - case SVS_RAIL_CARGO: - drawAction_drawRailCarriages(s, 20.0, true); - break; - default: - // draw normal vehicle - if (!drawAction_drawVehicleAsImage(s)) { - drawAction_drawVehicleAsPoly(s); - }; - }; + // fallback to simple shapes + if (!drawAction_drawCarriageClass(s, getVehicleType().getGuiShape(), true)) { + if (!drawAction_drawVehicleAsImage(s)) { + drawAction_drawVehicleAsPoly(s); + }; + } break; } if (s.drawMinGap) { - SUMOReal minGap = -getVehicleType().getMinGap(); + const SUMOReal minGap = -getVehicleType().getMinGap(); glColor3d(0., 1., 0.); glBegin(GL_LINES); glVertex2d(0., 0); @@ -970,6 +1010,11 @@ glVertex2d(.5, minGap); glEnd(); } + MSDevice_BTreceiver* dev = static_cast(getDevice(typeid(MSDevice_BTreceiver))); + if (dev != 0 && s.showBTRange) { + glColor3d(1., 0., 0.); + GLHelper::drawOutlineCircle(dev->getRange(), dev->getRange() - .2, 32); + } // draw the blinker and brakelights if wished if (s.showBlinker) { glTranslated(0, 0, .1); @@ -977,16 +1022,14 @@ case SVS_PEDESTRIAN: case SVS_BICYCLE: case SVS_ANT: + case SVS_SHIP: case SVS_RAIL: - case SVS_RAIL_LIGHT: - case SVS_RAIL_SLOW: - case SVS_RAIL_FAST: case SVS_RAIL_CARGO: - // only SVS_RAIL_CITY has blinkers and brake lights + // only SVS_RAIL_CAR has blinkers and brake lights break; default: - drawAction_drawVehicleBlinker(*this); - drawAction_drawVehicleBrakeLight(*this); + drawAction_drawVehicleBlinker(*this, myCarriageLength); + drawAction_drawVehicleBrakeLight(*this, myCarriageLength); break; } } @@ -1038,9 +1081,13 @@ } */ glPopMatrix(); - drawName(getPosition(-MIN2(getVehicleType().getLength() / 2, SUMOReal(5))), - s.scale, + const Position namePos = getPosition(-MIN2(getVehicleType().getLength() / 2, SUMOReal(5))); + drawName(namePos, s.scale, getVehicleType().getGuiShape() == SVS_PEDESTRIAN ? s.personName : s.vehicleName); + if (s.vehicleName.show && myParameter->line != "") { + GLHelper::drawText("line:" + myParameter->line, namePos + Position(0, -0.6 * s.vehicleName.size / s.scale), + GLO_MAX, s.vehicleName.size / s.scale, s.vehicleName.color); + } glPopName(); if (myPersonDevice != 0) { const std::vector& ps = myPersonDevice->getPersons(); @@ -1052,6 +1099,16 @@ person->drawGL(s); } } + if (myContainerDevice != 0) { + const std::vector& cs = myContainerDevice->getContainers(); + size_t containerIndex = 0; + for (std::vector::const_iterator i = cs.begin(); i != cs.end(); ++i) { + GUIContainer* container = dynamic_cast(*i); + assert(container != 0); + container->setPositionInVehicle(getSeatPosition(containerIndex++)); + container->drawGL(s); + } + } } @@ -1093,11 +1150,12 @@ } const SUMOTime leaveTime = (*i).myLink->getLeaveTime( (*i).myArrivalTime, (*i).myArrivalSpeed, (*i).getLeaveSpeed(), getVehicleType().getLengthWithGap()); - drawLinkItem(p, (*i).myArrivalTime, leaveTime, s.addExaggeration); + drawLinkItem(p, (*i).myArrivalTime, leaveTime, s.vehicleSize.getExaggeration(s)); // the time slot that ego vehicle uses when checking opened may // differ from the one it requests in setApproaching MSLink::ApproachingVehicleInformation avi = (*i).myLink->getApproaching(this); assert(avi.arrivalTime == (*i).myArrivalTime && avi.leavingTime == leaveTime); + UNUSED_PARAMETER(avi); // only used for assertion } } } @@ -1115,65 +1173,57 @@ glTranslated(-pos.x(), -pos.y(), .1); } -const std::vector& -GUIVehicle::getBestLanes() const { - myLock.lock(); - const std::vector& ret = MSVehicle::getBestLanes(); - myLock.unlock(); - return ret; -} - void GUIVehicle::setColor(const GUIVisualizationSettings& s) const { const GUIColorer& c = s.vehicleColorer; - if (!setFunctionalColor(c.getActive())) { + if (!setFunctionalColor(c.getActive(), this)) { GLHelper::setColor(c.getScheme().getColor(getColorValue(c.getActive()))); } } bool -GUIVehicle::setFunctionalColor(size_t activeScheme) const { +GUIVehicle::setFunctionalColor(size_t activeScheme, const MSBaseVehicle* veh) { switch (activeScheme) { case 0: { - if (getParameter().wasSet(VEHPARS_COLOR_SET)) { - GLHelper::setColor(getParameter().color); + if (veh->getParameter().wasSet(VEHPARS_COLOR_SET)) { + GLHelper::setColor(veh->getParameter().color); return true; } - if (getVehicleType().wasSet(VTYPEPARS_COLOR_SET)) { - GLHelper::setColor(getVehicleType().getColor()); + if (veh->getVehicleType().wasSet(VTYPEPARS_COLOR_SET)) { + GLHelper::setColor(veh->getVehicleType().getColor()); return true; } - if (&getRoute().getColor() != &RGBColor::DEFAULT_COLOR) { - GLHelper::setColor(getRoute().getColor()); + if (&(veh->getRoute().getColor()) != &RGBColor::DEFAULT_COLOR) { + GLHelper::setColor(veh->getRoute().getColor()); return true; } return false; } case 2: { - if (getParameter().wasSet(VEHPARS_COLOR_SET)) { - GLHelper::setColor(getParameter().color); + if (veh->getParameter().wasSet(VEHPARS_COLOR_SET)) { + GLHelper::setColor(veh->getParameter().color); return true; } return false; } case 3: { - if (getVehicleType().wasSet(VTYPEPARS_COLOR_SET)) { - GLHelper::setColor(getVehicleType().getColor()); + if (veh->getVehicleType().wasSet(VTYPEPARS_COLOR_SET)) { + GLHelper::setColor(veh->getVehicleType().getColor()); return true; } return false; } case 4: { - if (&getRoute().getColor() != &RGBColor::DEFAULT_COLOR) { - GLHelper::setColor(getRoute().getColor()); + if (&(veh->getRoute().getColor()) != &RGBColor::DEFAULT_COLOR) { + GLHelper::setColor(veh->getRoute().getColor()); return true; } return false; } case 5: { - Position p = getRoute().getEdges()[0]->getLanes()[0]->getShape()[0]; + Position p = veh->getRoute().getEdges()[0]->getLanes()[0]->getShape()[0]; const Boundary& b = ((GUINet*) MSNet::getInstance())->getBoundary(); Position center = b.getCenter(); SUMOReal hue = 180. + atan2(center.x() - p.x(), center.y() - p.y()) * 180. / PI; @@ -1182,7 +1232,7 @@ return true; } case 6: { - Position p = getRoute().getEdges().back()->getLanes()[0]->getShape()[-1]; + Position p = veh->getRoute().getEdges().back()->getLanes()[0]->getShape()[-1]; const Boundary& b = ((GUINet*) MSNet::getInstance())->getBoundary(); Position center = b.getCenter(); SUMOReal hue = 180. + atan2(center.x() - p.x(), center.y() - p.y()) * 180. / PI; @@ -1191,8 +1241,8 @@ return true; } case 7: { - Position pb = getRoute().getEdges()[0]->getLanes()[0]->getShape()[0]; - Position pe = getRoute().getEdges().back()->getLanes()[0]->getShape()[-1]; + Position pb = veh->getRoute().getEdges()[0]->getLanes()[0]->getShape()[0]; + Position pe = veh->getRoute().getEdges().back()->getLanes()[0]->getShape()[-1]; const Boundary& b = ((GUINet*) MSNet::getInstance())->getBoundary(); SUMOReal hue = 180. + atan2(pb.x() - pe.x(), pb.y() - pe.y()) * 180. / PI; Position minp(b.xmin(), b.ymin()); @@ -1201,6 +1251,12 @@ GLHelper::setColor(RGBColor::fromHSV(hue, sat, 1.)); return true; } + case 24: { // color randomly (by pointer) + const SUMOReal hue = (long)veh % 360; // [0-360] + const SUMOReal sat = (((long)veh / 360) % 67) / 100.0 + 0.33; // [0.33-1] + GLHelper::setColor(RGBColor::fromHSV(hue, sat, 1.)); + return true; + } } return false; } @@ -1216,28 +1272,34 @@ case 10: return getLastLaneChangeOffset(); case 11: - return getMaxSpeed(); + return MIN2(getMaxSpeed(), getLane()->getVehicleMaxSpeed(this)); case 12: - return getHBEFA_CO2Emissions(); + return getCO2Emissions(); case 13: - return getHBEFA_COEmissions(); + return getCOEmissions(); case 14: - return getHBEFA_PMxEmissions(); + return getPMxEmissions(); case 15: - return getHBEFA_NOxEmissions(); + return getNOxEmissions(); case 16: - return getHBEFA_HCEmissions(); + return getHCEmissions(); case 17: - return getHBEFA_FuelConsumption(); + return getFuelConsumption(); case 18: return getHarmonoise_NoiseEmissions(); - case 19: + case 19: // !!! unused!? if (getNumberReroutes() == 0) { return -1; } return getNumberReroutes(); case 20: return gSelected.isSelected(GLO_VEHICLE, getGlID()); + case 21: + return getBestLaneOffset(); + case 22: + return getAcceleration(); + case 23: + return getTimeGap(); } return 0; } @@ -1289,12 +1351,13 @@ colors[3] = 0; } glColor3dv(colors); + const SUMOReal exaggeration = s.vehicleSize.getExaggeration(s); if (routeNo == 0) { - drawRouteHelper(*myRoute, s.vehicleExaggeration); + drawRouteHelper(*myRoute, exaggeration); return; } --routeNo; // only prior routes are stored - drawRouteHelper(*myRoutes->getRoute(routeNo), s.vehicleExaggeration); + drawRouteHelper(*myRoutes->getRoute(routeNo), exaggeration); } @@ -1338,55 +1401,49 @@ void GUIVehicle::drawRouteHelper(const MSRoute& r, SUMOReal exaggeration) const { MSRouteIterator i = r.begin(); + const std::vector& bestLaneConts = getBestLanesContinuation(); + // draw continuation lanes when drawing the current route where available + size_t bestLaneIndex = (&r == myRoute ? 0 : bestLaneConts.size()); for (; i != r.end(); ++i) { - const GUILane* lane = static_cast((*i)->getLanes()[0]); + const GUILane* lane; + if (bestLaneIndex < bestLaneConts.size() && bestLaneConts[bestLaneIndex] != 0 && (*i) == &(bestLaneConts[bestLaneIndex]->getEdge())) { + lane = static_cast(bestLaneConts[bestLaneIndex]); + ++bestLaneIndex; + } else { + lane = static_cast((*i)->getLanes()[0]); + } GLHelper::drawBoxLines(lane->getShape(), lane->getShapeRotations(), lane->getShapeLengths(), exaggeration); } } MSLane* -GUIVehicle::getPreviousLane(MSLane* current, int& routeIndex) const { - const bool isInternal = current->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL; - if (isInternal) { - // route pointer still points to the previous lane - return myRoute->getEdges()[routeIndex]->getLanes()[0]; - } else if (routeIndex == 0) { - // there is no previous lane because the route has just begun - return current; +GUIVehicle::getPreviousLane(MSLane* current, int& furtherIndex) const { + if (furtherIndex < (int)myFurtherLanes.size()) { + return myFurtherLanes[furtherIndex++]; } else { - // retrieve the previous internal edge - routeIndex -= 1; - const MSEdge* previous = myRoute->getEdges()[routeIndex]; -#ifdef HAVE_INTERNAL_LANES - const MSEdge* previousInternal = previous->getInternalFollowingEdge(¤t->getEdge()); -#else - const MSEdge* previousInternal = 0; -#endif - if (previousInternal != 0) { - return previousInternal->getLanes()[0]; - } else { - // network without internal links, use previous edge instead - return previous->getLanes()[0]; - } + return current; } } void -GUIVehicle::drawAction_drawRailCarriages(const GUIVisualizationSettings& s, SUMOReal defaultLength, int firstPassengerCarriage, bool asImage) const { +GUIVehicle::drawAction_drawRailCarriages(const GUIVisualizationSettings& s, SUMOReal defaultLength, SUMOReal carriageGap, int firstPassengerCarriage, bool asImage) const { RGBColor current = GLHelper::getColor(); RGBColor darker = current.changedBrightness(-51); - const SUMOReal length = getVehicleType().getLength() * s.vehicleExaggeration; - const SUMOReal halfWidth = getVehicleType().getWidth() / 2.0 * s.vehicleExaggeration; + const SUMOReal exaggeration = s.vehicleSize.getExaggeration(s); + defaultLength *= exaggeration; + if (exaggeration == 0) { + return; + } + carriageGap *= exaggeration; + const SUMOReal length = getVehicleType().getLength() * exaggeration; + const SUMOReal halfWidth = getVehicleType().getWidth() / 2.0 * exaggeration; glPopMatrix(); // undo scaling and 90 degree rotation glPopMatrix(); // undo initial translation and rotation - glPushMatrix(); - glPushMatrix(); GLHelper::setColor(darker); - const SUMOReal carriageGap = 1; - const SUMOReal xCornerCut = 0.3; - const SUMOReal yCornerCut = 0.4; + const SUMOReal xCornerCut = 0.3 * exaggeration; + const SUMOReal yCornerCut = 0.4 * exaggeration; // round to closest integer const int numCarriages = floor(length / (defaultLength + carriageGap) + 0.5); assert(numCarriages > 0); @@ -1394,10 +1451,10 @@ const SUMOReal carriageLength = carriageLengthWithGap - carriageGap; // lane on which the carriage front is situated MSLane* lane = myLane; - int routeIndex = myCurrEdge - myRoute->begin(); + int furtherIndex = 0; // lane on which the carriage back is situated MSLane* backLane = myLane; - int backRouteIndex = routeIndex; + int backFurtherIndex = furtherIndex; // offsets of front and back SUMOReal carriageOffset = myState.pos(); SUMOReal carriageBackOffset = myState.pos() - carriageLength; @@ -1406,19 +1463,37 @@ if (requiredSeats > 0) { mySeatPositions.clear(); } + Position front, back; + SUMOReal angle = 0.; // draw individual carriages for (int i = 0; i < numCarriages; ++i) { while (carriageOffset < 0) { - lane = getPreviousLane(lane, routeIndex); - carriageOffset += lane->getLength(); + MSLane* prev = getPreviousLane(lane, furtherIndex); + if (prev != lane) { + carriageOffset += prev->getLength(); + } else { + // no lane available for drawing. + carriageOffset = 0; + } + lane = prev; } while (carriageBackOffset < 0) { - backLane = getPreviousLane(backLane, backRouteIndex); - carriageBackOffset += backLane->getLength(); + MSLane* prev = getPreviousLane(backLane, backFurtherIndex); + if (prev != backLane) { + carriageBackOffset += prev->getLength(); + } else { + // no lane available for drawing. + carriageBackOffset = 0; + } + backLane = prev; + } + front = lane->getShape().positionAtOffset2D(carriageOffset); + back = backLane->getShape().positionAtOffset2D(carriageBackOffset); + if (front == back) { + // no place for drawing available + continue; } - const Position front = lane->getShape().positionAtOffset2D(carriageOffset); - const Position back = backLane->getShape().positionAtOffset2D(carriageBackOffset); - const SUMOReal angle = atan2((front.x() - back.x()), (back.y() - front.y())) * (SUMOReal) 180.0 / (SUMOReal) PI; + angle = atan2((front.x() - back.x()), (back.y() - front.y())) * (SUMOReal) 180.0 / (SUMOReal) PI; if (i >= firstPassengerCarriage) { computeSeats(front, back, requiredSeats); } @@ -1442,6 +1517,12 @@ carriageBackOffset -= carriageLengthWithGap; GLHelper::setColor(current); } + myCarriageLength = front.distanceTo2D(back); + // restore matrices + glPushMatrix(); + glTranslated(front.x(), front.y(), getType()); + glRotated(angle, 0, 0, 1); + glPushMatrix(); } @@ -1499,6 +1580,8 @@ } if (myStops.front().triggered) { result += ", triggered"; + } else if (myStops.front().containerTriggered) { + result += ", containerTriggered"; } else { result += ", duration=" + time2string(myStops.front().duration); } @@ -1508,41 +1591,43 @@ void GUIVehicle::selectBlockingFoes() const { - if (myLFLinkLanes.size() == 0) { - return; - } - const DriveProcessItem& dpi = myLFLinkLanes[0]; - if (dpi.myLink == 0) { - return; - } - std::vector blockingFoes; - dpi.myLink->opened(dpi.myArrivalTime, dpi.myArrivalSpeed, dpi.getLeaveSpeed(), getVehicleType().getLengthWithGap(), - getImpatience(), getCarFollowModel().getMaxDecel(), getWaitingTime(), &blockingFoes); - for (std::vector::const_iterator it = blockingFoes.begin(); it != blockingFoes.end(); ++it) { - gSelected.select(static_cast(*it)->getGlID()); - } + SUMOReal dist = myLane->getLength() - getPositionOnLane(); + for (DriveItemVector::const_iterator i = myLFLinkLanes.begin(); i != myLFLinkLanes.end(); ++i) { + const DriveProcessItem& dpi = *i; + if (dpi.myLink == 0) { + continue; + } + std::vector blockingFoes; + std::vector blockingPersons; + dpi.myLink->opened(dpi.myArrivalTime, dpi.myArrivalSpeed, dpi.getLeaveSpeed(), getVehicleType().getLength(), + getImpatience(), getCarFollowModel().getMaxDecel(), getWaitingTime(), &blockingFoes); + for (std::vector::const_iterator it = blockingFoes.begin(); it != blockingFoes.end(); ++it) { + gSelected.select(static_cast(*it)->getGlID()); + } #ifdef HAVE_INTERNAL_LANES - const MSLink::LinkLeaders linkLeaders = (dpi.myLink)->getLeaderInfo(myLane->getLength() - getPositionOnLane() - getVehicleType().getMinGap()); - for (MSLink::LinkLeaders::const_iterator it = linkLeaders.begin(); it != linkLeaders.end(); ++it) { - // the vehicle to enter the junction first has priority - const MSVehicle* leader = it->first; - if ((static_cast(leader))->myLinkLeaders.count(getID()) == 0) { - // leader isn't already following us, now we follow it - gSelected.select(static_cast(leader)->getGlID()); + const MSLink::LinkLeaders linkLeaders = (dpi.myLink)->getLeaderInfo(dist, getVehicleType().getMinGap(), &blockingPersons); + for (MSLink::LinkLeaders::const_iterator it = linkLeaders.begin(); it != linkLeaders.end(); ++it) { + // the vehicle to enter the junction first has priority + const GUIVehicle* leader = dynamic_cast(it->vehAndGap.first); + if (leader != 0) { + if (leader->myLinkLeaders[dpi.myLink->getJunction()].count(getID()) == 0) { + // leader isn't already following us, now we follow it + gSelected.select(leader->getGlID()); + } + } else { + for (std::vector::iterator it_p = blockingPersons.begin(); it_p != blockingPersons.end(); ++it_p) { + const GUIPerson* foe = dynamic_cast(*it_p); + if (foe != 0) { + gSelected.select(foe->getGlID()); + //std::cout << SIMTIME << " veh=" << getID() << " is blocked on link " << dpi.myLink->getRespondIndex() << " to " << dpi.myLink->getViaLaneOrLane()->getID() << " by pedestrian. dist=" << it->second << "\n"; + } + } + } } - } #endif + dist += dpi.myLink->getViaLaneOrLane()->getLength(); + } } - -#ifdef HAVE_OSG -void -GUIVehicle::updateColor(GUIOSGView* view) { - const GUIVisualizationSettings* s = view->getVisualisationSettings(); - const RGBColor& col = s->vehicleColorer.getScheme().getColor(getColorValue(s->vehicleColorer.getActive())); - myGeom[view]->setColor(osg::Vec4(col.red() / 255., col.green() / 255., col.blue() / 255., col.alpha() / 255.)); -} -#endif - /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIVehicle.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIVehicle.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/GUIVehicle.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/GUIVehicle.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIVehicle.h 14441 2013-08-19 10:11:57Z namdre $ +/// @version $Id: GUIVehicle.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A MSVehicle extended by some values for usage within the gui /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -42,7 +42,7 @@ #include #include #include -#include +#include // =========================================================================== @@ -51,12 +51,6 @@ class GUISUMOAbstractView; class GUIGLObjectPopupMenu; class MSDevice_Vehroutes; -#ifdef HAVE_OSG -class GUIOSGView; -namespace osg { -class ShapeDrawable; -} -#endif // =========================================================================== @@ -78,11 +72,10 @@ * @param[in] route The vehicle's route * @param[in] type The vehicle's type * @param[in] speedFactor The factor for driven lane's speed limits - * @param[in] vehicleIndex The vehicle's running index * @exception ProcessError If a value is wrong */ GUIVehicle(SUMOVehicleParameter* pars, const MSRoute* route, - const MSVehicleType* type, SUMOReal speedFactor, int vehicleIndex); + const MSVehicleType* type, const SUMOReal speedFactor); /// @brief destructor @@ -173,16 +166,6 @@ SUMOReal getLastLaneChangeOffset() const; - /** @brief Returns the description of best lanes to use in order to continue the route - * - * Prevents parallel reading and generation of the information by locking - * "myLock" before calling MSVehicle::getBestLanes. - * @return The best lanes structure holding matching the current vehicle position and state ahead - * @see MSVehicle::getBestLanes - */ - const std::vector& getBestLanes() const; - - /** * @class GUIVehiclePopupMenu * @@ -284,24 +267,16 @@ /// @brief adds the blocking foes to the current selection void selectBlockingFoes() const; -#ifdef HAVE_OSG - void setGeometry(GUIOSGView* view, osg::ShapeDrawable* geom) { - myGeom[view] = geom; - } - - void updateColor(GUIOSGView* view); -#endif + /// @brief gets the color value according to the current scheme index + SUMOReal getColorValue(size_t activeScheme) const; + /// @brief sets the color according to the current scheme index and some vehicle function + static bool setFunctionalColor(size_t activeScheme, const MSBaseVehicle* veh); private: /// @brief sets the color according to the currente settings void setColor(const GUIVisualizationSettings& s) const; - /// @brief gets the color value according to the current scheme index - SUMOReal getColorValue(size_t activeScheme) const; - - /// @brief sets the color according to the current scheme index and some vehicle function - bool setFunctionalColor(size_t activeScheme) const; /// @name drawing helper methods /// @{ @@ -320,14 +295,18 @@ /* @brief draw train with individual carriages. The number of carriages is * determined from defaultLength of carriages and vehicle length * passengerSeats are computed beginning at firstPassengerCarriage */ - void drawAction_drawRailCarriages(const GUIVisualizationSettings& s, SUMOReal defaultLength, int firstPassengerCarriage = 0, bool asImage = false) const; + void drawAction_drawRailCarriages(const GUIVisualizationSettings& s, SUMOReal defaultLength, SUMOReal carriageGap, + int firstPassengerCarriage, bool asImage) const; /// @} + /// @brief draws the given guiShape if it has distinc carriages/modules and eturns true if so + bool drawAction_drawCarriageClass(const GUIVisualizationSettings& s, SUMOVehicleShape guiShape, bool asImage) const; + /* @brief return the previous lane in this vehicles route including internal lanes * @param[in] current The lane of which the predecessor should be returned * @param[in,out] routeIndex The index of the current or previous non-internal edge in the route */ - MSLane* getPreviousLane(MSLane* current, int& routeIndex) const; + MSLane* getPreviousLane(MSLane* current, int& furtherIndex) const; /// @brief returns the seat position for the person with the given index const Position& getSeatPosition(size_t personIndex) const; @@ -347,15 +326,14 @@ /// The mutex used to avoid concurrent updates of the vehicle buffer mutable MFXMutex myLock; + /// Variable to set with the length of the last drawn carriage or the vehicle length + mutable SUMOReal myCarriageLength; + MSDevice_Vehroutes* myRoutes; /// @brief positions of seats in the vehicle (updated at every drawing step) mutable PositionVector mySeatPositions; -#ifdef HAVE_OSG - std::map myGeom; -#endif - }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,9 @@ noinst_LIBRARIES = libguisim.a libguisim_a_SOURCES = GUIBusStop.cpp GUIBusStop.h \ +GUIContainer.cpp GUIContainer.h \ +GUIContainerControl.cpp GUIContainerControl.h \ +GUIContainerStop.cpp GUIContainerStop.h \ GUIDetectorWrapper.cpp GUIDetectorWrapper.h \ GUIE3Collector.cpp GUIE3Collector.h GUIEdge.cpp GUIEdge.h \ GUIEventControl.cpp GUIEventControl.h \ @@ -11,7 +14,6 @@ GUILaneSpeedTrigger.cpp GUILaneSpeedTrigger.h \ GUIPerson.cpp GUIPerson.h GUIPersonControl.cpp GUIPersonControl.h \ GUINet.cpp GUINet.h \ -GUIShapeContainer.cpp GUIShapeContainer.h \ GUITrafficLightLogicWrapper.cpp GUITrafficLightLogicWrapper.h \ GUITriggeredRerouter.cpp GUITriggeredRerouter.h \ GUICalibrator.cpp GUICalibrator.h \ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/guisim -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,46 +92,106 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libguisim_a_AR = $(AR) $(ARFLAGS) libguisim_a_LIBADD = -am_libguisim_a_OBJECTS = GUIBusStop.$(OBJEXT) \ +am_libguisim_a_OBJECTS = GUIBusStop.$(OBJEXT) GUIContainer.$(OBJEXT) \ + GUIContainerControl.$(OBJEXT) GUIContainerStop.$(OBJEXT) \ GUIDetectorWrapper.$(OBJEXT) GUIE3Collector.$(OBJEXT) \ GUIEdge.$(OBJEXT) GUIEventControl.$(OBJEXT) \ GUIInductLoop.$(OBJEXT) GUIInstantInductLoop.$(OBJEXT) \ GUIJunctionWrapper.$(OBJEXT) GUILane.$(OBJEXT) \ GUILaneSpeedTrigger.$(OBJEXT) GUIPerson.$(OBJEXT) \ GUIPersonControl.$(OBJEXT) GUINet.$(OBJEXT) \ - GUIShapeContainer.$(OBJEXT) \ GUITrafficLightLogicWrapper.$(OBJEXT) \ GUITriggeredRerouter.$(OBJEXT) GUICalibrator.$(OBJEXT) \ GUIVehicle.$(OBJEXT) GUIVehicleControl.$(OBJEXT) \ GUI_E2_ZS_Collector.$(OBJEXT) \ GUI_E2_ZS_CollectorOverLanes.$(OBJEXT) libguisim_a_OBJECTS = $(am_libguisim_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libguisim_a_SOURCES) DIST_SOURCES = $(libguisim_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -95,6 +200,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -121,9 +227,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -134,10 +244,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -233,6 +339,9 @@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libguisim.a libguisim_a_SOURCES = GUIBusStop.cpp GUIBusStop.h \ +GUIContainer.cpp GUIContainer.h \ +GUIContainerControl.cpp GUIContainerControl.h \ +GUIContainerStop.cpp GUIContainerStop.h \ GUIDetectorWrapper.cpp GUIDetectorWrapper.h \ GUIE3Collector.cpp GUIE3Collector.h GUIEdge.cpp GUIEdge.h \ GUIEventControl.cpp GUIEventControl.h \ @@ -243,7 +352,6 @@ GUILaneSpeedTrigger.cpp GUILaneSpeedTrigger.h \ GUIPerson.cpp GUIPerson.h GUIPersonControl.cpp GUIPersonControl.h \ GUINet.cpp GUINet.h \ -GUIShapeContainer.cpp GUIShapeContainer.h \ GUITrafficLightLogicWrapper.cpp GUITrafficLightLogicWrapper.h \ GUITriggeredRerouter.cpp GUITriggeredRerouter.h \ GUICalibrator.cpp GUICalibrator.h \ @@ -289,10 +397,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libguisim.a: $(libguisim_a_OBJECTS) $(libguisim_a_DEPENDENCIES) - -rm -f libguisim.a - $(libguisim_a_AR) libguisim.a $(libguisim_a_OBJECTS) $(libguisim_a_LIBADD) - $(RANLIB) libguisim.a + +libguisim.a: $(libguisim_a_OBJECTS) $(libguisim_a_DEPENDENCIES) $(EXTRA_libguisim_a_DEPENDENCIES) + $(AM_V_at)-rm -f libguisim.a + $(AM_V_AR)$(libguisim_a_AR) libguisim.a $(libguisim_a_OBJECTS) $(libguisim_a_LIBADD) + $(AM_V_at)$(RANLIB) libguisim.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -302,6 +411,9 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIBusStop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUICalibrator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIContainer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIContainerControl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIContainerStop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIDetectorWrapper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIE3Collector.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIEdge.Po@am__quote@ @@ -314,7 +426,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUINet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIPerson.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIPersonControl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIShapeContainer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUITrafficLightLogicWrapper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUITriggeredRerouter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIVehicle.Po@am__quote@ @@ -323,25 +434,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUI_E2_ZS_CollectorOverLanes.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -349,26 +460,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -380,15 +480,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -397,6 +493,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -445,10 +556,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -533,18 +649,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/guisim_main.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/guisim_main.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Felix Brack /// @date Tue, 20 Nov 2001 -/// @version $Id: guisim_main.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: guisim_main.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Main for GUISIM /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -72,7 +72,7 @@ OptionsCont& oc = OptionsCont::getOptions(); // give some application descriptions oc.setApplicationDescription("GUI version of the simulation SUMO."); - oc.setApplicationName("sumo-gui.exe", "SUMO gui Version " + (std::string)VERSION_STRING); + oc.setApplicationName("sumo-gui.exe", "SUMO gui Version " + getBuildName(VERSION_STRING)); int ret = 0; try { // initialise subsystems @@ -83,7 +83,7 @@ SystemFrame::close(); return 0; } - XMLSubSys::setValidation(oc.getBool("xml-validation")); + XMLSubSys::setValidation(oc.getString("xml-validation"), oc.getString("xml-validation.net")); // Make application FXApp application("SUMO GUISimulation", "DLR"); // Open display @@ -96,8 +96,8 @@ // build the main window GUIApplicationWindow* window = new GUIApplicationWindow(&application, "*.sumo.cfg,*.sumocfg"); - window->dependentBuild(oc.getBool("game")); gSchemeStorage.init(&application); + window->dependentBuild(oc.getBool("game")); // Create app application.addSignal(SIGINT, window, MID_QUIT); application.create(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/jtrrouter_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/jtrrouter_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/jtrrouter_main.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/jtrrouter_main.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Jan 2004 -/// @version $Id: jtrrouter_main.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: jtrrouter_main.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Main for JTRROUTER /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -149,11 +149,13 @@ // prepare the output net.openOutput(oc.getString("output-file"), "", oc.getString("vtype-output")); // build the router - ROJTRRouter router(net, oc.getBool("ignore-errors"), oc.getBool("accept-all-destinations"), - (int)(((SUMOReal) net.getEdgeNo()) * OptionsCont::getOptions().getFloat("max-edges-factor")), - oc.getBool("ignore-vclasses"), oc.getBool("allow-loops")); - loader.processRoutes(string2time(oc.getString("begin")), string2time(oc.getString("end")), net, router); - net.closeOutput(); + ROJTRRouter* router = new ROJTRRouter(oc.getBool("ignore-errors"), oc.getBool("accept-all-destinations"), + (int)(((SUMOReal) net.getEdgeNo()) * OptionsCont::getOptions().getFloat("max-edges-factor")), + oc.getBool("ignore-vclasses"), oc.getBool("allow-loops")); + RORouteDef::setUsingJTRR(); + loader.processRoutes(string2time(oc.getString("begin")), string2time(oc.getString("end")), + string2time(oc.getString("route-steps")), net, *router); + net.cleanup(router); } @@ -165,7 +167,7 @@ OptionsCont& oc = OptionsCont::getOptions(); // give some application descriptions oc.setApplicationDescription("Router for the microscopic road traffic simulation SUMO based on junction turning ratios."); - oc.setApplicationName("jtrrouter", "SUMO jtrrouter Version " + (std::string)VERSION_STRING); + oc.setApplicationName("jtrrouter", "SUMO jtrrouter Version " + getBuildName(VERSION_STRING)); int ret = 0; RONet* net = 0; try { @@ -177,7 +179,7 @@ SystemFrame::close(); return 0; } - XMLSubSys::setValidation(oc.getBool("xml-validation")); + XMLSubSys::setValidation(oc.getString("xml-validation"), oc.getString("xml-validation.net")); MsgHandler::initOutputOptions(); if (!ROJTRFrame::checkOptions()) { throw ProcessError(); @@ -230,5 +232,4 @@ } - /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -16,11 +16,12 @@ jtrrouter_LDADD = ../router/librouter.a \ ../utils/options/liboptions.a \ ../utils/xml/libxml.a \ +../utils/vehicle/libvehicle.a \ ../utils/common/libcommon.a \ ../utils/importio/libimportio.a \ ../utils/iodevices/libiodevices.a \ ../utils/geom/libgeom.a \ +../utils/emissions/libemissions.a \ ../foreign/tcpip/libtcpip.a \ $(MEM_LIBS) \ --l$(LIB_XERCES) - +-l$(LIB_XERCES) $(FOX_LDFLAGS) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -37,7 +81,8 @@ target_triplet = @target@ bin_PROGRAMS = jtrrouter$(EXEEXT) subdir = src/jtrrouter -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -52,38 +97,97 @@ ROJTREdgeBuilder.$(OBJEXT) ROJTRRouter.$(OBJEXT) \ ROJTRTurnDefLoader.$(OBJEXT) ROJTRFrame.$(OBJEXT) jtrrouter_OBJECTS = $(am_jtrrouter_OBJECTS) +am__DEPENDENCIES_1 = jtrrouter_DEPENDENCIES = ../router/librouter.a \ ../utils/options/liboptions.a ../utils/xml/libxml.a \ - ../utils/common/libcommon.a ../utils/importio/libimportio.a \ + ../utils/vehicle/libvehicle.a ../utils/common/libcommon.a \ + ../utils/importio/libimportio.a \ ../utils/iodevices/libiodevices.a ../utils/geom/libgeom.a \ - ../foreign/tcpip/libtcpip.a $(MEM_LIBS) -jtrrouter_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + ../utils/emissions/libemissions.a ../foreign/tcpip/libtcpip.a \ + $(MEM_LIBS) $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +jtrrouter_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(jtrrouter_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(jtrrouter_SOURCES) DIST_SOURCES = $(jtrrouter_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -92,6 +196,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -118,9 +223,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -131,10 +240,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -239,13 +344,15 @@ jtrrouter_LDADD = ../router/librouter.a \ ../utils/options/liboptions.a \ ../utils/xml/libxml.a \ +../utils/vehicle/libvehicle.a \ ../utils/common/libcommon.a \ ../utils/importio/libimportio.a \ ../utils/iodevices/libiodevices.a \ ../utils/geom/libgeom.a \ +../utils/emissions/libemissions.a \ ../foreign/tcpip/libtcpip.a \ $(MEM_LIBS) \ --l$(LIB_XERCES) +-l$(LIB_XERCES) $(FOX_LDFLAGS) all: all-am @@ -283,14 +390,19 @@ $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -311,7 +423,8 @@ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -324,9 +437,10 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -jtrrouter$(EXEEXT): $(jtrrouter_OBJECTS) $(jtrrouter_DEPENDENCIES) + +jtrrouter$(EXEEXT): $(jtrrouter_OBJECTS) $(jtrrouter_DEPENDENCIES) $(EXTRA_jtrrouter_DEPENDENCIES) @rm -f jtrrouter$(EXEEXT) - $(jtrrouter_LINK) $(jtrrouter_OBJECTS) $(jtrrouter_LDADD) $(LIBS) + $(AM_V_CXXLD)$(jtrrouter_LINK) $(jtrrouter_OBJECTS) $(jtrrouter_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -342,25 +456,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jtrrouter_main.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -368,26 +482,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -399,15 +502,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -416,6 +515,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -467,10 +581,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -554,19 +673,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTREdgeBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTREdgeBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTREdgeBuilder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTREdgeBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file ROJTREdgeBuilder.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Yun-Pang Floetteroed /// @date Tue, 20 Jan 2004 -/// @version $Id: ROJTREdgeBuilder.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROJTREdgeBuilder.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The builder for jtrrouter-edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTREdgeBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTREdgeBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTREdgeBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTREdgeBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file ROJTREdgeBuilder.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Yun-Pang Floetteroed /// @date Tue, 20 Jan 2004 -/// @version $Id: ROJTREdgeBuilder.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROJTREdgeBuilder.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Interface for building instances of jtrrouter-edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTREdge.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTREdge.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTREdge.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTREdge.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @author Michael Behrisch +/// @author Yun-Pang Floetteroed /// @date Tue, 20 Jan 2004 -/// @version $Id: ROJTREdge.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROJTREdge.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // An edge the jtr-router may route through /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -57,8 +58,8 @@ void -ROJTREdge::addFollower(ROEdge* s, std::string) { - ROEdge::addFollower(s); +ROJTREdge::addSuccessor(ROEdge* s, std::string) { + ROEdge::addSuccessor(s); ROJTREdge* js = static_cast(s); if (myFollowingDefs.find(js) == myFollowingDefs.end()) { myFollowingDefs[js] = new ValueTimeLine(); @@ -67,8 +68,8 @@ void -ROJTREdge::addFollowerProbability(ROJTREdge* follower, SUMOTime begTime, - SUMOTime endTime, SUMOReal probability) { +ROJTREdge::addFollowerProbability(ROJTREdge* follower, SUMOReal begTime, + SUMOReal endTime, SUMOReal probability) { FollowerUsageCont::iterator i = myFollowingDefs.find(follower); if (i == myFollowingDefs.end()) { WRITE_ERROR("The edges '" + getID() + "' and '" + follower->getID() + "' are not connected."); @@ -79,7 +80,7 @@ ROJTREdge* -ROJTREdge::chooseNext(const ROVehicle* const veh, SUMOTime time) const { +ROJTREdge::chooseNext(const ROVehicle* const veh, SUMOReal time, const std::set& avoid) const { // if no usable follower exist, return 0 // their probabilities are not yet regarded if (myFollowingEdges.size() == 0 || (veh != 0 && allFollowersProhibit(veh))) { @@ -89,15 +90,19 @@ RandomDistributor dist; // use the loaded definitions, first for (FollowerUsageCont::const_iterator i = myFollowingDefs.begin(); i != myFollowingDefs.end(); ++i) { - if ((veh == 0 || !(*i).first->prohibits(veh)) && (*i).second->describesTime(time)) { - dist.add((*i).second->getValue(time), (*i).first); + if (avoid.count(i->first) == 0) { + if ((veh == 0 || !(*i).first->prohibits(veh)) && (*i).second->describesTime(time)) { + dist.add((*i).second->getValue(time), (*i).first); + } } } // if no loaded definitions are valid for this time, try to use the defaults if (dist.getOverallProb() == 0) { for (size_t i = 0; i < myParsedTurnings.size(); ++i) { - if (veh == 0 || !myFollowingEdges[i]->prohibits(veh)) { - dist.add(myParsedTurnings[i], static_cast(myFollowingEdges[i])); + if (avoid.count(myFollowingEdges[i]) == 0) { + if (veh == 0 || !myFollowingEdges[i]->prohibits(veh)) { + dist.add(myParsedTurnings[i], static_cast(myFollowingEdges[i])); + } } } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTREdge.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTREdge.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTREdge.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTREdge.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file ROJTREdge.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Yun-Pang Floetteroed /// @date Tue, 20 Jan 2004 -/// @version $Id: ROJTREdge.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROJTREdge.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An edge the jtr-router may route through /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -80,26 +81,27 @@ * @param[in] s The following edge * @see ROEdge::addFollower */ - void addFollower(ROEdge* s, std::string dir = ""); + void addSuccessor(ROEdge* s, std::string dir = ""); /** @brief adds the information about the percentage of using a certain follower * * @param[in] follower The following edge - * @param[in] begTime Time begin for which this probability is valid - * @param[in] endTime Time end for which this probability is valid + * @param[in] begTime Time begin (in seconds) for which this probability is valid + * @param[in] endTime Time end (in seconds) for which this probability is valid * @param[in] probability The probability to use the given follower */ void addFollowerProbability(ROJTREdge* follower, - SUMOTime begTime, SUMOTime endTime, SUMOReal probability); + SUMOReal begTime, SUMOReal endTime, SUMOReal probability); /** @brief Returns the next edge to use * @param[in] veh The vehicle to choose the next edge for - * @param[in] time The time at which the next edge shall be entered + * @param[in] time The time at which the next edge shall be entered (in seconds) + * @param[in] avoid The set of edges to avoid * @return The chosen edge */ - ROJTREdge* chooseNext(const ROVehicle* const veh, SUMOTime time) const; + ROJTREdge* chooseNext(const ROVehicle* const veh, SUMOReal time, const std::set& avoid) const; /** @brief Sets the turning definition defaults diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTRFrame.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTRFrame.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTRFrame.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTRFrame.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: ROJTRFrame.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROJTRFrame.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for jtr-routing /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -42,7 +42,7 @@ #include #include #include -#include +#include #ifdef CHECK_MEMORY_LEAKS #include @@ -76,12 +76,12 @@ oc.addDescription("exit-times", "Output", "Write exit times (weights) for each edge"); oc.doRegister("max-edges-factor", new Option_Float(2.0)); - oc.addDescription("max-edges-factor", "Processing", ""); + oc.addDescription("max-edges-factor", "Processing", "Routes are cut off when the route edges to net edges ratio is larger than FLOAT"); oc.doRegister("turn-defaults", 'T', new Option_String("30,50,20")); oc.addDescription("turn-defaults", "Processing", "Use STR as default turn definition"); - oc.doRegister("sink-edges", 's', new Option_String()); + oc.doRegister("sink-edges", new Option_String()); oc.addSynonyme("sink-edges", "sinks"); oc.addDescription("sink-edges", "Processing", "Use STR as list of sink edges"); @@ -134,6 +134,4 @@ } - /****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTRFrame.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTRFrame.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTRFrame.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTRFrame.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: ROJTRFrame.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROJTRFrame.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for jtr-routing /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTRRouter.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTRRouter.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTRRouter.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTRRouter.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Jan 2004 -/// @version $Id: ROJTRRouter.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROJTRRouter.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Computes routes using junction turning percentages /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -43,10 +43,10 @@ // =========================================================================== // method definitions // =========================================================================== -ROJTRRouter::ROJTRRouter(RONet& net, bool unbuildIsWarningOnly, bool acceptAllDestinations, +ROJTRRouter::ROJTRRouter(bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops) : - SUMOAbstractRouter("JTRRouter"), - myNet(net), myUnbuildIsWarningOnly(unbuildIsWarningOnly), + SUMOAbstractRouter(0, "JTRRouter"), + myUnbuildIsWarningOnly(unbuildIsWarningOnly), myAcceptAllDestination(acceptAllDestinations), myMaxEdges(maxEdges), myIgnoreClasses(ignoreClasses), myAllowLoops(allowLoops) { } @@ -56,24 +56,26 @@ void -ROJTRRouter::compute(const ROEdge* from, const ROEdge* /*to*/, +ROJTRRouter::compute(const ROEdge* from, const ROEdge* to, const ROVehicle* const vehicle, - SUMOTime time, std::vector& into) { + SUMOTime time, ConstROEdgeVector& into) { const ROJTREdge* current = static_cast(from); + SUMOReal timeS = STEPS2TIME(time); + std::set avoidEdges; // route until a sinks has been found - while (current != 0 - && - current->getType() != ROEdge::ET_SINK - && - (int) into.size() < myMaxEdges) { - + while (current != 0 && current != to && + current->getType() != ROEdge::ET_SINK && + (int)into.size() < myMaxEdges) { into.push_back(current); - time += (SUMOTime) current->getTravelTime(vehicle, time); - current = current->chooseNext(myIgnoreClasses ? 0 : vehicle, time); + if (!myAllowLoops) { + avoidEdges.insert(current); + } + timeS += current->getTravelTime(vehicle, timeS); + current = current->chooseNext(myIgnoreClasses ? 0 : vehicle, timeS, avoidEdges); assert(myIgnoreClasses || current == 0 || !current->prohibits(vehicle)); } // check whether no valid ending edge was found - if ((int) into.size() >= myMaxEdges) { + if (current == 0 || (int) into.size() >= myMaxEdges) { if (myAcceptAllDestination) { return; } else { @@ -89,9 +91,9 @@ SUMOReal -ROJTRRouter::recomputeCosts(const std::vector& edges, const ROVehicle* const v, SUMOTime time) const { +ROJTRRouter::recomputeCosts(const ConstROEdgeVector& edges, const ROVehicle* const v, SUMOTime time) const { SUMOReal costs = 0; - for (std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + for (ConstROEdgeVector::const_iterator i = edges.begin(); i != edges.end(); ++i) { costs += (*i)->getTravelTime(v, time); } return costs; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTRRouter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTRRouter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTRRouter.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTRRouter.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Tue, 20 Jan 2004 -/// @version $Id: ROJTRRouter.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROJTRRouter.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Computes routes using junction turning percentages /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -31,7 +31,7 @@ #include #endif -#include +#include // =========================================================================== @@ -52,14 +52,13 @@ class ROJTRRouter : public SUMOAbstractRouter { public: /** @brief Constructor - * @param[in] net The net used for routing * @param[in] unbuildIsWarningOnly Whether not closed routes shall not yield in an error * @param[in] acceptAllDestinations If false, only sinks will be used as final edges * @param[in] maxEdges The maximum number of edges a route may have * @param[in] ignoreClasses Whether routing shall be done without regarding vehicle classes * @param[in] allowLoops Whether a vehicle may reuse a road */ - ROJTRRouter(RONet& net, bool unbuildIsWarningOnly, + ROJTRRouter(bool unbuildIsWarningOnly, bool acceptAllDestinations, int maxEdges, bool ignoreClasses, bool allowLoops); @@ -67,7 +66,9 @@ /// @brief Destructor ~ROJTRRouter(); - + virtual SUMOAbstractRouter* clone() const { + return new ROJTRRouter(myUnbuildIsWarningOnly, myAcceptAllDestination, myMaxEdges, myIgnoreClasses, myAllowLoops); + } /// @name Implementatios of SUMOAbstractRouter /// @{ @@ -82,7 +83,7 @@ * @param[filled] into The list of edges to store the route into */ void compute(const ROEdge* from, const ROEdge* to, const ROVehicle* const vehicle, - SUMOTime time, std::vector& into); + SUMOTime time, ConstROEdgeVector& into); /** @brief Recomputes the costs of a route @@ -91,14 +92,11 @@ * @param[in] time The departure time of the vehicle * @return The route costs */ - SUMOReal recomputeCosts(const std::vector& edges, const ROVehicle* const v, SUMOTime time) const; + SUMOReal recomputeCosts(const ConstROEdgeVector& edges, const ROVehicle* const v, SUMOTime time) const; /// @} private: - /// @brief The network to use - RONet& myNet; - /// @brief Whether unbuildable routes shall be reported as warniings, not errors const bool myUnbuildIsWarningOnly; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTRTurnDefLoader.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTRTurnDefLoader.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTRTurnDefLoader.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTRTurnDefLoader.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Jan 2004 -/// @version $Id: ROJTRTurnDefLoader.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROJTRTurnDefLoader.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Loader for the of turning percentages and source/sink definitions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -65,8 +65,8 @@ bool ok = true; switch (element) { case SUMO_TAG_INTERVAL: - myIntervalBegin = attrs.getSUMOTimeReporting(SUMO_ATTR_BEGIN, 0, ok); - myIntervalEnd = attrs.getSUMOTimeReporting(SUMO_ATTR_END, 0, ok); + myIntervalBegin = attrs.get(SUMO_ATTR_BEGIN, 0, ok); + myIntervalEnd = attrs.get(SUMO_ATTR_END, 0, ok); break; case SUMO_TAG_FROMEDGE: beginFromEdge(attrs); @@ -143,7 +143,7 @@ WRITE_ERROR("The edge '" + id + "' is not known within the network (within a 'to-edge' tag)."); return; } - SUMOReal probability = attrs.get(SUMO_ATTR_PROB, id.c_str(), ok); + const SUMOReal probability = attrs.get(SUMO_ATTR_PROB, id.c_str(), ok); if (ok) { if (probability < 0) { WRITE_ERROR("'probability' must be positive (in definition of to-edge '" + id + "')."); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTRTurnDefLoader.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTRTurnDefLoader.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/jtrrouter/ROJTRTurnDefLoader.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/jtrrouter/ROJTRTurnDefLoader.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Jan 2004 -/// @version $Id: ROJTRTurnDefLoader.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROJTRTurnDefLoader.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Loader for the of turning percentages and source/sink definitions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -122,7 +122,7 @@ RONet& myNet; /// @brief The begin and the end of the current interval - SUMOTime myIntervalBegin, myIntervalEnd; + SUMOReal myIntervalBegin, myIntervalEnd; /// @brief The current incoming edge the turning probabilities are set into ROJTREdge* myEdge; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/Makefile.am 2014-03-16 09:53:43.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/Makefile.am 2015-04-17 00:20:33.000000000 +0000 @@ -1,17 +1,8 @@ XERCES_LIBS = -l$(LIB_XERCES) -lpthread -lGLU -lGL -if WITH_PROJ -PROJ_LIBS = -l$(LIB_PROJ) -endif - -if WITH_GDAL -GDAL_LIBS = -l$(LIB_GDAL) -endif - if INTERNAL MESO_LIBS = ./mesosim/libmesosim.a MESOGUI_LIBS = ./mesogui/libmesogui.a ./osgview/libosgview.a -INTERNAL_LIBS = ./internal/libinternal.a endif if WITH_GUI @@ -28,7 +19,7 @@ TRACI_DIRS = traci-server traci_testclient endif -bin_PROGRAMS = sumo netconvert $(GUI_APPS) +bin_PROGRAMS = od2trips sumo netconvert $(GUI_APPS) COMMON_LIBS = ./utils/options/liboptions.a \ ./utils/xml/libxml.a \ @@ -40,32 +31,43 @@ $(XERCES_LIBS) -sumo_SOURCES = sumo_main.cpp +od2trips_SOURCES = od2trips_main.cpp -sumo_LDFLAGS = $(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) +od2trips_LDADD = ./od/libod.a \ +./utils/options/liboptions.a \ +./utils/distribution/libdistribution.a \ +./utils/vehicle/libvehicle.a \ +./utils/common/libcommon.a \ +./utils/geom/libgeom.a \ +$(COMMON_LIBS) $(XERCES_LDFLAGS) + + +sumo_SOURCES = sumo_main.cpp sumo_LDADD = ./netload/libnetload.a \ ./microsim/libmicrosim.a \ ./microsim/cfmodels/libmicrosimcfmodels.a \ +./microsim/lcmodels/libmicrosimlcmodels.a \ ./microsim/devices/libmicrosimdevs.a \ ./microsim/output/libmicrosimoutput.a \ ./microsim/MSMoveReminder.o \ ./microsim/trigger/libmicrosimtrigger.a \ ./microsim/actions/libmsactions.a \ ./microsim/traffic_lights/libmicrosimtls.a \ +./microsim/pedestrians/libmicrosimpeds.a \ $(MESO_LIBS) \ ./utils/geom/libgeom.a \ +./utils/vehicle/libvehicle.a \ ./utils/shapes/libshapes.a \ +./utils/emissions/libemissions.a \ $(TRACI_LIBS) \ $(COMMON_LIBS) \ $(PYTHON_LIBS) \ -$(PROJ_LIBS) +$(FOX_LDFLAGS) $(XERCES_LDFLAGS) $(PROJ_LDFLAGS) netconvert_SOURCES = netconvert_main.cpp -netconvert_LDFLAGS = $(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) - netconvert_LDADD = ./netimport/libnetimport.a \ ./netimport/vissim/libvissimimport.a \ ./netimport/vissim/typeloader/libvissimtypeload.a \ @@ -76,16 +78,12 @@ ./utils/geom/libgeom.a \ ./foreign/eulerspiral/libeulerspiral.a \ $(COMMON_LIBS) \ -$(INTERNAL_LIBS) \ -$(GDAL_LIBS) \ -$(PROJ_LIBS) +$(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) if WITH_GUI sumo_gui_SOURCES = guisim_main.cpp -sumo_gui_LDFLAGS = $(FOX_LDFLAGS) $(sumo_LDFLAGS) $(X_LDFLAGS) - sumo_gui_LDADD = ./gui/libgui.a \ ./guinetload/libguinetload.a \ ./guisim/libguisim.a \ @@ -103,14 +101,13 @@ ./gui/GUIManipulator.o \ ./gui/GUITLLogicPhasesTrackerWindow.o \ $(OSG_LIBS) \ -$(GDAL_LIBS) \ --l$(LIB_FOX) +$(sumo_LDFLAGS) $(GDAL_LDFLAGS) $(X_LDFLAGS) endif -SUBDIRS = foreign utils microsim router od2trips $(INTERNAL_DIRS) \ +SUBDIRS = foreign utils microsim router od marouter $(INTERNAL_DIRS) \ netbuild netwrite netgen netimport netload \ -polyconvert dfrouter duarouter jtrrouter activitygen \ +polyconvert dfrouter duarouter jtrrouter activitygen tools \ $(TRACI_DIRS) $(GUI_DIRS) EXTRA_DIST = config.h config.h.in \ @@ -119,6 +116,6 @@ if WITH_VERSION_H all: version.h -version.h: ../.svn/entries +version.h: ../.svn ../tools/build/version.py $(CURDIR) endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/Makefile.in 2014-03-16 09:53:43.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/Makefile.in 2015-04-17 00:20:33.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,10 +79,11 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -bin_PROGRAMS = sumo$(EXEEXT) netconvert$(EXEEXT) $(am__EXEEXT_1) +bin_PROGRAMS = od2trips$(EXEEXT) sumo$(EXEEXT) netconvert$(EXEEXT) \ + $(am__EXEEXT_1) subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/config.h.in $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -64,39 +109,53 @@ ./netbuild/libnetbuild.a ./netwrite/libnetwrite.a \ ./utils/distribution/libdistribution.a ./utils/geom/libgeom.a \ ./foreign/eulerspiral/libeulerspiral.a $(am__DEPENDENCIES_2) \ - $(INTERNAL_LIBS) $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -netconvert_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(netconvert_LDFLAGS) $(LDFLAGS) -o $@ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_od2trips_OBJECTS = od2trips_main.$(OBJEXT) +od2trips_OBJECTS = $(am_od2trips_OBJECTS) +od2trips_DEPENDENCIES = ./od/libod.a ./utils/options/liboptions.a \ + ./utils/distribution/libdistribution.a \ + ./utils/vehicle/libvehicle.a ./utils/common/libcommon.a \ + ./utils/geom/libgeom.a $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) am_sumo_OBJECTS = sumo_main.$(OBJEXT) sumo_OBJECTS = $(am_sumo_OBJECTS) sumo_DEPENDENCIES = ./netload/libnetload.a ./microsim/libmicrosim.a \ ./microsim/cfmodels/libmicrosimcfmodels.a \ + ./microsim/lcmodels/libmicrosimlcmodels.a \ ./microsim/devices/libmicrosimdevs.a \ ./microsim/output/libmicrosimoutput.a \ ./microsim/MSMoveReminder.o \ ./microsim/trigger/libmicrosimtrigger.a \ ./microsim/actions/libmsactions.a \ - ./microsim/traffic_lights/libmicrosimtls.a $(MESO_LIBS) \ - ./utils/geom/libgeom.a ./utils/shapes/libshapes.a \ + ./microsim/traffic_lights/libmicrosimtls.a \ + ./microsim/pedestrians/libmicrosimpeds.a $(MESO_LIBS) \ + ./utils/geom/libgeom.a ./utils/vehicle/libvehicle.a \ + ./utils/shapes/libshapes.a ./utils/emissions/libemissions.a \ $(TRACI_LIBS) $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) -sumo_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(sumo_LDFLAGS) $(LDFLAGS) -o $@ am__sumo_gui_SOURCES_DIST = guisim_main.cpp @WITH_GUI_TRUE@am_sumo_gui_OBJECTS = guisim_main.$(OBJEXT) sumo_gui_OBJECTS = $(am_sumo_gui_OBJECTS) am__DEPENDENCIES_3 = ./netload/libnetload.a ./microsim/libmicrosim.a \ ./microsim/cfmodels/libmicrosimcfmodels.a \ + ./microsim/lcmodels/libmicrosimlcmodels.a \ ./microsim/devices/libmicrosimdevs.a \ ./microsim/output/libmicrosimoutput.a \ ./microsim/MSMoveReminder.o \ ./microsim/trigger/libmicrosimtrigger.a \ ./microsim/actions/libmsactions.a \ - ./microsim/traffic_lights/libmicrosimtls.a $(MESO_LIBS) \ - ./utils/geom/libgeom.a ./utils/shapes/libshapes.a \ + ./microsim/traffic_lights/libmicrosimtls.a \ + ./microsim/pedestrians/libmicrosimpeds.a $(MESO_LIBS) \ + ./utils/geom/libgeom.a ./utils/vehicle/libvehicle.a \ + ./utils/shapes/libshapes.a ./utils/emissions/libemissions.a \ $(TRACI_LIBS) $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) @WITH_GUI_TRUE@sumo_gui_DEPENDENCIES = ./gui/libgui.a \ @WITH_GUI_TRUE@ ./guinetload/libguinetload.a \ @@ -114,43 +173,89 @@ @WITH_GUI_TRUE@ ./gui/GUIManipulator.o \ @WITH_GUI_TRUE@ ./gui/GUITLLogicPhasesTrackerWindow.o \ @WITH_GUI_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -sumo_gui_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(sumo_gui_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(netconvert_SOURCES) $(sumo_SOURCES) $(sumo_gui_SOURCES) -DIST_SOURCES = $(netconvert_SOURCES) $(sumo_SOURCES) \ - $(am__sumo_gui_SOURCES_DIST) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +SOURCES = $(netconvert_SOURCES) $(od2trips_SOURCES) $(sumo_SOURCES) \ + $(sumo_gui_SOURCES) +DIST_SOURCES = $(netconvert_SOURCES) $(od2trips_SOURCES) \ + $(sumo_SOURCES) $(am__sumo_gui_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = foreign utils microsim router od2trips netbuild \ +DIST_SUBDIRS = foreign utils microsim router od marouter netbuild \ netwrite netgen netimport netload polyconvert dfrouter \ - duarouter jtrrouter activitygen traci-server traci_testclient \ - gui guinetload guisim + duarouter jtrrouter activitygen tools traci-server \ + traci_testclient gui guinetload guisim DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -182,6 +287,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -208,9 +314,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -221,10 +331,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -318,11 +424,8 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -@WITH_PROJ_TRUE@PROJ_LIBS = -l$(LIB_PROJ) -@WITH_GDAL_TRUE@GDAL_LIBS = -l$(LIB_GDAL) @INTERNAL_TRUE@MESO_LIBS = ./mesosim/libmesosim.a @INTERNAL_TRUE@MESOGUI_LIBS = ./mesogui/libmesogui.a ./osgview/libosgview.a -@INTERNAL_TRUE@INTERNAL_LIBS = ./internal/libinternal.a @WITH_GUI_TRUE@GUI_APPS = sumo-gui @WITH_GUI_TRUE@GUI_DIRS = gui guinetload guisim $(GUI_INTERNAL_DIRS) @CHECK_MEMORY_LEAKS_TRUE@MEM_LIBS = ./foreign/nvwa/libnvwa.a @@ -337,27 +440,38 @@ $(MEM_LIBS) \ $(XERCES_LIBS) +od2trips_SOURCES = od2trips_main.cpp +od2trips_LDADD = ./od/libod.a \ +./utils/options/liboptions.a \ +./utils/distribution/libdistribution.a \ +./utils/vehicle/libvehicle.a \ +./utils/common/libcommon.a \ +./utils/geom/libgeom.a \ +$(COMMON_LIBS) $(XERCES_LDFLAGS) + sumo_SOURCES = sumo_main.cpp -sumo_LDFLAGS = $(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) sumo_LDADD = ./netload/libnetload.a \ ./microsim/libmicrosim.a \ ./microsim/cfmodels/libmicrosimcfmodels.a \ +./microsim/lcmodels/libmicrosimlcmodels.a \ ./microsim/devices/libmicrosimdevs.a \ ./microsim/output/libmicrosimoutput.a \ ./microsim/MSMoveReminder.o \ ./microsim/trigger/libmicrosimtrigger.a \ ./microsim/actions/libmsactions.a \ ./microsim/traffic_lights/libmicrosimtls.a \ +./microsim/pedestrians/libmicrosimpeds.a \ $(MESO_LIBS) \ ./utils/geom/libgeom.a \ +./utils/vehicle/libvehicle.a \ ./utils/shapes/libshapes.a \ +./utils/emissions/libemissions.a \ $(TRACI_LIBS) \ $(COMMON_LIBS) \ $(PYTHON_LIBS) \ -$(PROJ_LIBS) +$(FOX_LDFLAGS) $(XERCES_LDFLAGS) $(PROJ_LDFLAGS) netconvert_SOURCES = netconvert_main.cpp -netconvert_LDFLAGS = $(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) netconvert_LDADD = ./netimport/libnetimport.a \ ./netimport/vissim/libvissimimport.a \ ./netimport/vissim/typeloader/libvissimtypeload.a \ @@ -368,12 +482,9 @@ ./utils/geom/libgeom.a \ ./foreign/eulerspiral/libeulerspiral.a \ $(COMMON_LIBS) \ -$(INTERNAL_LIBS) \ -$(GDAL_LIBS) \ -$(PROJ_LIBS) +$(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) @WITH_GUI_TRUE@sumo_gui_SOURCES = guisim_main.cpp -@WITH_GUI_TRUE@sumo_gui_LDFLAGS = $(FOX_LDFLAGS) $(sumo_LDFLAGS) $(X_LDFLAGS) @WITH_GUI_TRUE@sumo_gui_LDADD = ./gui/libgui.a \ @WITH_GUI_TRUE@./guinetload/libguinetload.a \ @WITH_GUI_TRUE@./guisim/libguisim.a \ @@ -391,12 +502,11 @@ @WITH_GUI_TRUE@./gui/GUIManipulator.o \ @WITH_GUI_TRUE@./gui/GUITLLogicPhasesTrackerWindow.o \ @WITH_GUI_TRUE@$(OSG_LIBS) \ -@WITH_GUI_TRUE@$(GDAL_LIBS) \ -@WITH_GUI_TRUE@-l$(LIB_FOX) +@WITH_GUI_TRUE@$(sumo_LDFLAGS) $(GDAL_LDFLAGS) $(X_LDFLAGS) -SUBDIRS = foreign utils microsim router od2trips $(INTERNAL_DIRS) \ +SUBDIRS = foreign utils microsim router od marouter $(INTERNAL_DIRS) \ netbuild netwrite netgen netimport netload \ -polyconvert dfrouter duarouter jtrrouter activitygen \ +polyconvert dfrouter duarouter jtrrouter activitygen tools \ $(TRACI_DIRS) $(GUI_DIRS) EXTRA_DIST = config.h config.h.in \ @@ -440,10 +550,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -457,14 +565,19 @@ -rm -f config.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -485,7 +598,8 @@ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -498,15 +612,22 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -netconvert$(EXEEXT): $(netconvert_OBJECTS) $(netconvert_DEPENDENCIES) + +netconvert$(EXEEXT): $(netconvert_OBJECTS) $(netconvert_DEPENDENCIES) $(EXTRA_netconvert_DEPENDENCIES) @rm -f netconvert$(EXEEXT) - $(netconvert_LINK) $(netconvert_OBJECTS) $(netconvert_LDADD) $(LIBS) -sumo$(EXEEXT): $(sumo_OBJECTS) $(sumo_DEPENDENCIES) + $(AM_V_CXXLD)$(CXXLINK) $(netconvert_OBJECTS) $(netconvert_LDADD) $(LIBS) + +od2trips$(EXEEXT): $(od2trips_OBJECTS) $(od2trips_DEPENDENCIES) $(EXTRA_od2trips_DEPENDENCIES) + @rm -f od2trips$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(od2trips_OBJECTS) $(od2trips_LDADD) $(LIBS) + +sumo$(EXEEXT): $(sumo_OBJECTS) $(sumo_DEPENDENCIES) $(EXTRA_sumo_DEPENDENCIES) @rm -f sumo$(EXEEXT) - $(sumo_LINK) $(sumo_OBJECTS) $(sumo_LDADD) $(LIBS) -sumo-gui$(EXEEXT): $(sumo_gui_OBJECTS) $(sumo_gui_DEPENDENCIES) + $(AM_V_CXXLD)$(CXXLINK) $(sumo_OBJECTS) $(sumo_LDADD) $(LIBS) + +sumo-gui$(EXEEXT): $(sumo_gui_OBJECTS) $(sumo_gui_DEPENDENCIES) $(EXTRA_sumo_gui_DEPENDENCIES) @rm -f sumo-gui$(EXEEXT) - $(sumo_gui_LINK) $(sumo_gui_OBJECTS) $(sumo_gui_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(sumo_gui_OBJECTS) $(sumo_gui_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -516,28 +637,29 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guisim_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netconvert_main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/od2trips_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sumo_main.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -546,22 +668,25 @@ -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -576,57 +701,12 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -642,12 +722,7 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -659,15 +734,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -676,6 +747,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -712,13 +798,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -756,10 +839,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -841,28 +929,26 @@ uninstall-am: uninstall-binPROGRAMS -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) all install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-binPROGRAMS +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-binPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS @WITH_VERSION_H_TRUE@all: version.h -@WITH_VERSION_H_TRUE@version.h: ../.svn/entries +@WITH_VERSION_H_TRUE@version.h: ../.svn @WITH_VERSION_H_TRUE@ ../tools/build/version.py $(CURDIR) # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,28 @@ +if CHECK_MEMORY_LEAKS +MEM_LIBS = ../foreign/nvwa/libnvwa.a +endif + +bin_PROGRAMS = marouter + +marouter_SOURCES = marouter_main.cpp \ +ROMAAssignments.cpp ROMAAssignments.h \ +ROMAEdge.cpp ROMAEdge.h \ +ROMAEdgeBuilder.cpp ROMAEdgeBuilder.h \ +ROMAFrame.cpp ROMAFrame.h + +marouter_LDFLAGS = $(XERCES_LDFLAGS) + +marouter_LDADD = ../router/librouter.a \ +../od/libod.a \ +../utils/distribution/libdistribution.a \ +../utils/options/liboptions.a \ +../utils/xml/libxml.a \ +../utils/vehicle/libvehicle.a \ +../utils/common/libcommon.a \ +../utils/importio/libimportio.a \ +../utils/iodevices/libiodevices.a \ +../utils/geom/libgeom.a \ +../utils/emissions/libemissions.a \ +../foreign/tcpip/libtcpip.a \ +$(MEM_LIBS) \ +-l$(LIB_XERCES) $(FOX_LDFLAGS) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,695 @@ +# Makefile.in generated by automake 1.13.4 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +bin_PROGRAMS = marouter$(EXEEXT) +subdir = src/marouter +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_marouter_OBJECTS = marouter_main.$(OBJEXT) \ + ROMAAssignments.$(OBJEXT) ROMAEdge.$(OBJEXT) \ + ROMAEdgeBuilder.$(OBJEXT) ROMAFrame.$(OBJEXT) +marouter_OBJECTS = $(am_marouter_OBJECTS) +am__DEPENDENCIES_1 = +marouter_DEPENDENCIES = ../router/librouter.a ../od/libod.a \ + ../utils/distribution/libdistribution.a \ + ../utils/options/liboptions.a ../utils/xml/libxml.a \ + ../utils/vehicle/libvehicle.a ../utils/common/libcommon.a \ + ../utils/importio/libimportio.a \ + ../utils/iodevices/libiodevices.a ../utils/geom/libgeom.a \ + ../utils/emissions/libemissions.a ../foreign/tcpip/libtcpip.a \ + $(MEM_LIBS) $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +marouter_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(marouter_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(marouter_SOURCES) +DIST_SOURCES = $(marouter_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_CPPFLAGS = @AM_CPPFLAGS@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ +FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ +GDAL_LDFLAGS = @GDAL_LDFLAGS@ +GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_XERCES = @LIB_XERCES@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OSG_LIBS = @OSG_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJ_LDFLAGS = @PROJ_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XERCES_CFLAGS = @XERCES_CFLAGS@ +XERCES_LDFLAGS = @XERCES_LDFLAGS@ +XERCES_LIBS = @XERCES_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@CHECK_MEMORY_LEAKS_TRUE@MEM_LIBS = ../foreign/nvwa/libnvwa.a +marouter_SOURCES = marouter_main.cpp \ +ROMAAssignments.cpp ROMAAssignments.h \ +ROMAEdge.cpp ROMAEdge.h \ +ROMAEdgeBuilder.cpp ROMAEdgeBuilder.h \ +ROMAFrame.cpp ROMAFrame.h + +marouter_LDFLAGS = $(XERCES_LDFLAGS) +marouter_LDADD = ../router/librouter.a \ +../od/libod.a \ +../utils/distribution/libdistribution.a \ +../utils/options/liboptions.a \ +../utils/xml/libxml.a \ +../utils/vehicle/libvehicle.a \ +../utils/common/libcommon.a \ +../utils/importio/libimportio.a \ +../utils/iodevices/libiodevices.a \ +../utils/geom/libgeom.a \ +../utils/emissions/libemissions.a \ +../foreign/tcpip/libtcpip.a \ +$(MEM_LIBS) \ +-l$(LIB_XERCES) $(FOX_LDFLAGS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/marouter/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/marouter/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +marouter$(EXEEXT): $(marouter_OBJECTS) $(marouter_DEPENDENCIES) $(EXTRA_marouter_DEPENDENCIES) + @rm -f marouter$(EXEEXT) + $(AM_V_CXXLD)$(marouter_LINK) $(marouter_OBJECTS) $(marouter_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROMAAssignments.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROMAEdge.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROMAEdgeBuilder.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROMAFrame.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/marouter_main.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/marouter_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/marouter_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/marouter_main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/marouter_main.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,406 @@ +/****************************************************************************/ +/// @file marouter_main.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date Thu, 06 Jun 2002 +/// @version $Id: marouter_main.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Main for MAROUTER +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#ifdef HAVE_VERSION_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ROMAFrame.h" +#include "ROMAAssignments.h" +#include "ROMAEdgeBuilder.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// functions +// =========================================================================== +/* ------------------------------------------------------------------------- + * data processing methods + * ----------------------------------------------------------------------- */ +/** + * loads the net + * The net is in this meaning made up by the net itself and the dynamic + * weights which may be supplied in a separate file + */ +void +initNet(RONet& net, ROLoader& loader, OptionsCont& oc) { + // load the net + ROMAEdgeBuilder builder(oc.getBool("weights.expand"), oc.getBool("weights.interpolate")); + loader.loadNet(net, builder); + // load the weights when wished/available + if (oc.isSet("weight-files")) { + loader.loadWeights(net, "weight-files", oc.getString("weight-attribute"), false); + } + if (oc.isSet("lane-weight-files")) { + loader.loadWeights(net, "lane-weight-files", oc.getString("weight-attribute"), true); + } +} + +SUMOReal +getTravelTime(const ROEdge* const edge, const ROVehicle* const /* veh */, SUMOReal /* time */) { + return edge->getLength() / edge->getSpeed(); +} + + +/** + * Computes all pair shortest paths, saving them + */ +void +computeAllPairs(RONet& net, OptionsCont& oc) { + std::ofstream outFile(oc.getString("all-pairs-output").c_str(), std::ios::binary); + // build the router + typedef DijkstraRouterTT > Dijkstra; + Dijkstra router(net.getEdgeNo(), oc.getBool("ignore-errors"), &getTravelTime); + ConstROEdgeVector into; + const int numInternalEdges = net.getInternalEdgeNumber(); + const int numTotalEdges = (int)net.getEdgeNo(); + for (int i = numInternalEdges; i < numTotalEdges; i++) { + const Dijkstra::EdgeInfo& ei = router.getEdgeInfo(i); + if (ei.edge->getType() != ROEdge::ET_INTERNAL) { + router.compute(ei.edge, 0, 0, 0, into); + for (int j = numInternalEdges; j < numTotalEdges; j++) { + FileHelpers::writeFloat(outFile, router.getEdgeInfo(j).traveltime); + } + } + } +} + +/** + * Computes the routes saving them + */ +void +computeRoutes(RONet& net, OptionsCont& oc, ODMatrix& matrix) { + // build the router + SUMOAbstractRouter* router; + const std::string measure = oc.getString("weight-attribute"); + const std::string routingAlgorithm = oc.getString("routing-algorithm"); + if (measure == "traveltime") { + if (routingAlgorithm == "dijkstra") { + if (net.hasRestrictions()) { + if (oc.getInt("paths") > 1) { + router = new DijkstraRouterTT >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROMAAssignments::getPenalizedTT); + } else { + router = new DijkstraRouterTT >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic); + } + } else { + if (oc.getInt("paths") > 1) { + router = new DijkstraRouterTT >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROMAAssignments::getPenalizedTT); + } else { + router = new DijkstraRouterTT >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic); + } + } + } else if (routingAlgorithm == "astar") { + if (net.hasRestrictions()) { + if (oc.getInt("paths") > 1) { + router = new AStarRouter >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROMAAssignments::getPenalizedTT); + } else { + router = new AStarRouter >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic); + } + } else { + if (oc.getInt("paths") > 1) { + router = new AStarRouter >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROMAAssignments::getPenalizedTT); + } else { + router = new AStarRouter >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic); + } + } + } else if (routingAlgorithm == "bulkstar") { + if (net.hasRestrictions()) { + router = new BulkStarRouter >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic, &ROEdge::getMinimumTravelTime); + } else { + router = new BulkStarRouter >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic, &ROEdge::getMinimumTravelTime); + } + } else if (routingAlgorithm == "CH") { + const SUMOTime weightPeriod = (oc.isSet("weight-files") ? + string2time(oc.getString("weight-period")) : + std::numeric_limits::max()); + if (net.hasRestrictions()) { + router = new CHRouter >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic, SVC_IGNORING, weightPeriod, true); + } else { + router = new CHRouter >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic, SVC_IGNORING, weightPeriod, false); + } + } else if (routingAlgorithm == "CHWrapper") { + const SUMOTime begin = string2time(oc.getString("begin")); + const SUMOTime weightPeriod = (oc.isSet("weight-files") ? + string2time(oc.getString("weight-period")) : + std::numeric_limits::max()); + + router = new CHRouterWrapper >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROEdge::getTravelTimeStatic, begin, weightPeriod); + } else { + throw ProcessError("Unknown routing Algorithm '" + routingAlgorithm + "'!"); + } + + } else { + DijkstraRouterEffort >::Operation op; + if (measure == "CO") { + op = &ROEdge::getEmissionEffort; + } else if (measure == "CO2") { + op = &ROEdge::getEmissionEffort; + } else if (measure == "PMx") { + op = &ROEdge::getEmissionEffort; + } else if (measure == "HC") { + op = &ROEdge::getEmissionEffort; + } else if (measure == "NOx") { + op = &ROEdge::getEmissionEffort; + } else if (measure == "fuel") { + op = &ROEdge::getEmissionEffort; + } else if (measure == "noise") { + op = &ROEdge::getNoiseEffort; + } else { + throw ProcessError("Unknown measure (weight attribute '" + measure + "')!"); + } + if (net.hasRestrictions()) { + if (oc.getInt("paths") > 1) { + router = new DijkstraRouterEffort >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROMAAssignments::getPenalizedEffort, &ROMAAssignments::getTravelTime); + } else { + router = new DijkstraRouterEffort >( + net.getEdgeNo(), oc.getBool("ignore-errors"), op, &ROEdge::getTravelTimeStatic); + } + } else { + if (oc.getInt("paths") > 1) { + router = new DijkstraRouterEffort >( + net.getEdgeNo(), oc.getBool("ignore-errors"), &ROMAAssignments::getPenalizedEffort, &ROMAAssignments::getTravelTime); + } else { + router = new DijkstraRouterEffort >( + net.getEdgeNo(), oc.getBool("ignore-errors"), op, &ROEdge::getTravelTimeStatic); + } + } + } + // prepare the output + net.openOutput(oc.isSet("output-file") ? oc.getString("output-file") : "", + oc.isSet("flow-output") ? oc.getString("flow-output") : "", ""); + // process route definitions + try { + if (oc.isSet("timeline")) { + matrix.applyCurve(matrix.parseTimeLine(oc.getStringVector("timeline"), oc.getBool("timeline.day-in-hours"))); + } + ROVehicle defaultVehicle(SUMOVehicleParameter(), 0, net.getVehicleTypeSecure(DEFAULT_VTYPE_ID), &net); + ROMAAssignments a(string2time(oc.getString("begin")), string2time(oc.getString("end")), net, matrix, *router); + const std::string assignMethod = oc.getString("assignment-method"); + if (assignMethod == "incremental") { + a.incremental(oc.getInt("max-iterations")); + } else if (assignMethod == "SUE") { + a.sue(oc.getInt("max-iterations"), oc.getInt("max-inner-iterations"), + oc.getInt("paths"), oc.getFloat("paths.penalty"), oc.getFloat("tolerance"), oc.getString("route-choice-method")); + } + // update path costs and output + bool haveOutput = false; + OutputDevice* dev = net.getRouteOutput(); + if (dev != 0) { + for (std::vector::const_iterator i = matrix.getCells().begin(); i != matrix.getCells().end(); ++i) { + const ODCell* const c = *i; + dev->openTag(SUMO_TAG_ROUTE_DISTRIBUTION).writeAttr(SUMO_ATTR_ID, c->origin + "_" + c->destination + "_" + time2string(c->begin) + "_" + time2string(c->end)); + for (std::vector::const_iterator j = c->pathsVector.begin(); j != c->pathsVector.end(); ++j) { + (*j)->setCosts(router->recomputeCosts((*j)->getEdgeVector(), &defaultVehicle, string2time(oc.getString("begin")))); + (*j)->writeXMLDefinition(*dev, 0, true, false); + } + dev->closeTag(); + } + haveOutput = true; + } + dev = net.getRouteOutput(true); + if (dev != 0) { + int num = 0; + for (std::vector::const_iterator i = matrix.getCells().begin(); i != matrix.getCells().end(); ++i) { + const ODCell* const c = *i; + dev->openTag(SUMO_TAG_FLOW).writeAttr(SUMO_ATTR_ID, oc.getString("prefix") + toString(num++)); + dev->writeAttr(SUMO_ATTR_BEGIN, time2string(c->begin)).writeAttr(SUMO_ATTR_END, time2string(c->end)); + dev->writeAttr(SUMO_ATTR_NUMBER, int(c->vehicleNumber)); + matrix.writeDefaultAttrs(*dev, oc.getBool("ignore-vehicle-type"), c); + dev->openTag(SUMO_TAG_ROUTE_DISTRIBUTION); + for (std::vector::const_iterator j = c->pathsVector.begin(); j != c->pathsVector.end(); ++j) { + (*j)->setCosts(router->recomputeCosts((*j)->getEdgeVector(), &defaultVehicle, string2time(oc.getString("begin")))); + (*j)->writeXMLDefinition(*dev, 0, true, false); + } + dev->closeTag(); + dev->closeTag(); + } + haveOutput = true; + } + if (!haveOutput) { + throw ProcessError("No output file given."); + } + // end the processing + net.cleanup(router); + } catch (ProcessError&) { + net.cleanup(router); + throw; + } +} + + +/* ------------------------------------------------------------------------- + * main + * ----------------------------------------------------------------------- */ +int +main(int argc, char** argv) { + OptionsCont& oc = OptionsCont::getOptions(); + oc.setApplicationDescription("Import O/D-matrices for macroscopic traffic assignment"); + oc.setApplicationName("marouter", "SUMO marouter Version " + getBuildName(VERSION_STRING)); + int ret = 0; + RONet* net = 0; + try { + XMLSubSys::init(); + ROMAFrame::fillOptions(); + OptionsIO::getOptions(true, argc, argv); + if (oc.processMetaOptions(argc < 2)) { + SystemFrame::close(); + return 0; + } + XMLSubSys::setValidation(oc.getString("xml-validation"), oc.getString("xml-validation.net")); + MsgHandler::initOutputOptions(); + if (!ROMAFrame::checkOptions()) { + throw ProcessError(); + } + RandHelper::initRandGlobal(); + // load data + ROLoader loader(oc, false, false); + net = new RONet(); + initNet(*net, loader, oc); + if (oc.isSet("all-pairs-output")) { + computeAllPairs(*net, oc); + if (net->getDistricts().empty()) { + delete net; + SystemFrame::close(); + if (ret == 0) { + std::cout << "Success." << std::endl; + } + return ret; + } + } + if (net->getDistricts().empty()) { + throw ProcessError("No districts loaded."); + } + // load districts + ODDistrictCont districts; + districts.makeDistricts(net->getDistricts()); + // load the matrix + ODMatrix matrix(districts); + matrix.loadMatrix(oc); + if (matrix.getNoLoaded() == 0) { + throw ProcessError("No vehicles loaded."); + } + if (MsgHandler::getErrorInstance()->wasInformed() && !oc.getBool("ignore-errors")) { + throw ProcessError("Loading failed."); + } + MsgHandler::getErrorInstance()->clear(); + WRITE_MESSAGE(toString(matrix.getNoLoaded()) + " vehicles loaded."); + + // build routes and parse the incremental rates if the incremental method is choosen. + try { + computeRoutes(*net, oc, matrix); + } catch (XERCES_CPP_NAMESPACE::SAXParseException& e) { + WRITE_ERROR(toString(e.getLineNumber())); + ret = 1; + } catch (XERCES_CPP_NAMESPACE::SAXException& e) { + WRITE_ERROR(TplConvert::_2str(e.getMessage())); + ret = 1; + } + if (MsgHandler::getErrorInstance()->wasInformed() || ret != 0) { + throw ProcessError(); + } + } catch (const ProcessError& e) { + if (std::string(e.what()) != std::string("Process Error") && std::string(e.what()) != std::string("")) { + WRITE_ERROR(e.what()); + } + MsgHandler::getErrorInstance()->inform("Quitting (on error).", false); + ret = 1; + } + + delete net; + SystemFrame::close(); + if (ret == 0) { + std::cout << "Success." << std::endl; + } + return ret; +} + + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAAssignments.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAAssignments.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAAssignments.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAAssignments.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,292 @@ +/****************************************************************************/ +/// @file ROMAAssignments.cpp +/// @author Yun-Pang Floetteroed +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date Feb 2013 +/// @version $Id: ROMAAssignments.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Assignment methods +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "ROMAEdge.h" +#include "ROMAAssignments.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// static member variables +// =========================================================================== +std::map ROMAAssignments::myPenalties; +ROVehicle* ROMAAssignments::myDefaultVehicle = 0; + + +// =========================================================================== +// method definitions +// =========================================================================== + +ROMAAssignments::ROMAAssignments(const SUMOTime begin, const SUMOTime end, + RONet& net, ODMatrix& matrix, + SUMOAbstractRouter& router) : myBegin(begin), myEnd(end), myNet(net), myMatrix(matrix), myRouter(router) { + myDefaultVehicle = new ROVehicle(SUMOVehicleParameter(), 0, net.getVehicleTypeSecure(DEFAULT_VTYPE_ID), &net); +} + + +ROMAAssignments::~ROMAAssignments() { + delete myDefaultVehicle; +} + +// based on the definitions in PTV-Validate and in the VISUM-Köln network +SUMOReal +ROMAAssignments::capacityConstraintFunction(const ROEdge* edge, const SUMOReal flow) const { + if (edge->getType() == ROEdge::ET_DISTRICT) { + return 0; + } + const int roadClass = -edge->getPriority(); + // TODO: differ road class 1 from the unknown road class 1!!! + if (edge->getLaneNo() == 0) { + // TAZ have no cost + return 0; + } else if (roadClass == 0 || roadClass == 1) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 2000.*1.3)) * 2.); //CR13 in table.py + } else if (roadClass == 2 && edge->getSpeed() <= 11.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 1333.33 * 0.9)) * 3.); //CR5 in table.py + } else if (roadClass == 2 && edge->getSpeed() > 11. && edge->getSpeed() <= 16.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 1500.*1.)) * 2.); //CR3 in table.py + } else if (roadClass == 2 && edge->getSpeed() > 16.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 2000.*1.3)) * 2.); //CR13 in table.py + } else if (roadClass == 3 && edge->getSpeed() <= 11.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 800.*0.9)) * 3.); //CR5 in table.py + } else if (roadClass == 3 && edge->getSpeed() > 11. && edge->getSpeed() <= 13.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 875.*0.9)) * 3.); //CR5 in table.py + } else if (roadClass == 3 && edge->getSpeed() > 13. && edge->getSpeed() <= 16.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.7 * (flow / (edge->getLaneNo() * 1500.*1.)) * 2.); //CR4 in table.py + } else if (roadClass == 3 && edge->getSpeed() > 16.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 1800.*1.3)) * 2.); //CR13 in table.py + } else if ((roadClass >= 4 || roadClass == -1) && edge->getSpeed() <= 5.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 200.*0.5)) * 3.); //CR7 in table.py + } else if ((roadClass >= 4 || roadClass == -1) && edge->getSpeed() > 5. && edge->getSpeed() <= 7.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 412.5 * 0.5)) * 3.); //CR7 in table.py + } else if ((roadClass >= 4 || roadClass == -1) && edge->getSpeed() > 7. && edge->getSpeed() <= 9.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 600.*0.8)) * 3.); //CR6 in table.py + } else if ((roadClass >= 4 || roadClass == -1) && edge->getSpeed() > 9. && edge->getSpeed() <= 11.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 800.*0.9)) * 3.); //CR5 in table.py + } else if ((roadClass >= 4 || roadClass == -1) && edge->getSpeed() > 11. && edge->getSpeed() <= 13.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 1125.*0.9)) * 3.); //CR5 in table.py + } else if ((roadClass >= 4 || roadClass == -1) && edge->getSpeed() > 13. && edge->getSpeed() <= 16.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.7 * (flow / (edge->getLaneNo() * 1583.*1.)) * 2.); //CR4 in table.py + } else if ((roadClass >= 4 || roadClass == -1) && edge->getSpeed() > 16. && edge->getSpeed() <= 18.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 1100.*1.)) * 2.); //CR3 in table.py + } else if ((roadClass >= 4 || roadClass == -1) && edge->getSpeed() > 18. && edge->getSpeed() <= 22.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 1200.*1.)) * 2.); //CR3 in table.py + } else if ((roadClass >= 4 || roadClass == -1) && edge->getSpeed() > 22. && edge->getSpeed() <= 26.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 1300.*1.)) * 2.); //CR3 in table.py + } else if ((roadClass >= 4 || roadClass == -1) && edge->getSpeed() > 26.) { + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 1400.*1.)) * 2.); //CR3 in table.py + } + return edge->getLength() / edge->getSpeed() * (1. + 1.*(flow / (edge->getLaneNo() * 800.*0.9)) * 3.); //CR5 in table.py +} + + +bool +ROMAAssignments::addRoute(ConstROEdgeVector& edges, std::vector& paths, std::string routeId, SUMOReal costs, SUMOReal prob) { + RORoute* dup = 0; + for (std::vector::const_iterator p = paths.begin(); p != paths.end(); p++) { + if (edges == (*p)->getEdgeVector()) { + dup = *p; + break; + } + } + if (dup == 0) { + paths.push_back(new RORoute(routeId, costs, prob, edges, 0, std::vector())); + return true; + } + dup->addProbability(prob); + return false; +} + + +void +ROMAAssignments::getKPaths(const int kPaths, const SUMOReal penalty) { + for (std::vector::const_iterator i = myMatrix.getCells().begin(); i != myMatrix.getCells().end(); ++i) { + ODCell* c = *i; + myPenalties.clear(); + for (int k = 0; k < kPaths; k++) { + ConstROEdgeVector edges; + myRouter.compute(myNet.getEdge(c->origin + "-source"), myNet.getEdge(c->destination + "-sink"), myDefaultVehicle, 0, edges); + for (ConstROEdgeVector::iterator e = edges.begin(); e != edges.end(); e++) { + myPenalties[*e] = penalty; + } + addRoute(edges, c->pathsVector, c->origin + c->destination + toString(c->pathsVector.size()), 0, 0); + } + } + myPenalties.clear(); +} + + +void +ROMAAssignments::incremental(const int numIter) { + for (int t = 0; t < numIter; t++) { + for (std::vector::const_iterator i = myMatrix.getCells().begin(); i != myMatrix.getCells().end(); i++) { + ODCell* c = *i; + ConstROEdgeVector edges; + SUMOReal linkFlow = c->vehicleNumber / numIter; + myRouter.compute(myNet.getEdge(c->origin + "-source"), myNet.getEdge(c->destination + "-sink"), myDefaultVehicle, 0, edges); + SUMOReal costs = 0.; + for (ConstROEdgeVector::iterator e = edges.begin(); e != edges.end(); e++) { + ROEdge* edge = myNet.getEdge((*e)->getID()); + edge->addEffort(linkFlow, STEPS2TIME(myBegin), STEPS2TIME(myEnd)); + const SUMOReal travelTime = capacityConstraintFunction(edge, linkFlow); + edge->addTravelTime(travelTime, STEPS2TIME(myBegin), STEPS2TIME(myEnd)); + costs += travelTime; + } + addRoute(edges, c->pathsVector, c->origin + c->destination + toString(c->pathsVector.size()), costs, linkFlow); + } + } +} + + +void +ROMAAssignments::sue(const int maxOuterIteration, const int maxInnerIteration, const int kPaths, const SUMOReal penalty, const SUMOReal tolerance, const std::string /* routeChoiceMethod */) { + getKPaths(kPaths, penalty); + for (int outer = 0; outer < maxOuterIteration; outer++) { + for (int inner = 0; inner < maxInnerIteration; inner++) { + for (std::vector::const_iterator i = myMatrix.getCells().begin(); i != myMatrix.getCells().end(); ++i) { + ODCell* c = *i; + // update path cost + for (std::vector::const_iterator j = c->pathsVector.begin(); j != c->pathsVector.end(); ++j) { + RORoute* r = *j; + r->setCosts(myRouter.recomputeCosts(r->getEdgeVector(), myDefaultVehicle, 0)); +// std::cout << std::setprecision(20) << r->getID() << ":" << r->getCosts() << std::endl; + } + // calculate route utilities and probabilities + RouteCostCalculator::getCalculator().calculateProbabilities(c->pathsVector, myDefaultVehicle, 0); + // calculate route flows + for (std::vector::const_iterator j = c->pathsVector.begin(); j != c->pathsVector.end(); ++j) { + RORoute* r = *j; + const SUMOReal pathFlow = r->getProbability() * c->vehicleNumber; + // assign edge flow deltas + for (ConstROEdgeVector::const_iterator e = r->getEdgeVector().begin(); e != r->getEdgeVector().end(); e++) { + ROMAEdge* edge = static_cast(myNet.getEdge((*e)->getID())); + edge->setHelpFlow(edge->getHelpFlow() + pathFlow); + } + } + } + // calculate new edge flows and check for stability + int unstableEdges = 0; + for (std::map::const_iterator i = myNet.getEdgeMap().begin(); i != myNet.getEdgeMap().end(); ++i) { + ROMAEdge* edge = static_cast((*i).second); + const SUMOReal oldFlow = edge->getEffort(myDefaultVehicle, 0.); + SUMOReal newFlow = oldFlow; + if (inner == 0 && outer == 0) { + newFlow += edge->getHelpFlow(); + } else { + newFlow += (edge->getHelpFlow() - oldFlow) / (inner + 1); + } +// if not lohse: + if (newFlow > 0.) { + if (abs(newFlow - oldFlow) / newFlow > tolerance) { + unstableEdges++; + } + } else if (newFlow == 0.) { + if (oldFlow != 0. && (abs(newFlow - oldFlow) / oldFlow > tolerance)) { + unstableEdges++; + } + } else { // newFlow < 0. + unstableEdges++; + newFlow = 0.; + } + edge->addEffort(newFlow, STEPS2TIME(myBegin), STEPS2TIME(myEnd)); + const SUMOReal travelTime = capacityConstraintFunction(edge, newFlow); + edge->addTravelTime(travelTime, STEPS2TIME(myBegin), STEPS2TIME(myEnd)); + edge->setHelpFlow(0.); + } + // if stable break + if (unstableEdges == 0) { + break; + } + // additional stability check from python script: if notstable < math.ceil(net.geteffEdgeCounts()*0.005) or notstable < 3: stable = True + } + // check for a new route, if none available, break + // several modifications about when a route is new and when to break are in the original script + bool newRoute = false; + for (std::vector::const_iterator i = myMatrix.getCells().begin(); i != myMatrix.getCells().end(); ++i) { + ODCell* c = *i; + ConstROEdgeVector edges; + myRouter.compute(myNet.getEdge(c->origin + "-source"), myNet.getEdge(c->destination + "-sink"), myDefaultVehicle, 0, edges); + newRoute |= addRoute(edges, c->pathsVector, c->origin + c->destination + toString(c->pathsVector.size()), 0, 0); + } + if (!newRoute) { + break; + } + } + // final round of assignment + for (std::vector::const_iterator i = myMatrix.getCells().begin(); i != myMatrix.getCells().end(); ++i) { + ODCell* c = *i; + // update path cost + for (std::vector::const_iterator j = c->pathsVector.begin(); j != c->pathsVector.end(); ++j) { + RORoute* r = *j; + r->setCosts(myRouter.recomputeCosts(r->getEdgeVector(), myDefaultVehicle, 0)); + } + // calculate route utilities and probabilities + RouteCostCalculator::getCalculator().calculateProbabilities(c->pathsVector, myDefaultVehicle, 0); + // calculate route flows + for (std::vector::const_iterator j = c->pathsVector.begin(); j != c->pathsVector.end(); ++j) { + RORoute* r = *j; + r->setProbability(r->getProbability() * c->vehicleNumber); + } + } +} + + +SUMOReal +ROMAAssignments::getPenalizedEffort(const ROEdge* const e, const ROVehicle* const v, SUMOReal t) { + const std::map::const_iterator i = myPenalties.find(e); + return i == myPenalties.end() ? e->getEffort(v, t) : e->getEffort(v, t) + i->second; +} + + +SUMOReal +ROMAAssignments::getPenalizedTT(const ROEdge* const e, const ROVehicle* const v, SUMOReal t) { + const std::map::const_iterator i = myPenalties.find(e); + return i == myPenalties.end() ? e->getTravelTime(v, t) : e->getTravelTime(v, t) + i->second; +} + + +SUMOReal +ROMAAssignments::getTravelTime(const ROEdge* const e, const ROVehicle* const v, SUMOReal t) { + return e->getTravelTime(v, t); +} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAAssignments.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAAssignments.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAAssignments.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAAssignments.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,139 @@ +/****************************************************************************/ +/// @file ROMAAssignments.h +/// @author Yun-Pang Floetteroed +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date Feb 2013 +/// @version $Id: ROMAAssignments.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Assignment methods +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef ROMAAssignments_h +#define ROMAAssignments_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include + +// =========================================================================== +// class declarations +// =========================================================================== +class RONet; +class ODMatrix; +class Distribution_Points; +class ROEdge; +class ROMAEdge; +class ROVehicle; + + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class ROMAAssignments + * @brief assignment methods + * + */ +class ROMAAssignments { +public: + /// Constructor + ROMAAssignments(const SUMOTime begin, const SUMOTime end, RONet& net, ODMatrix& matrix, SUMOAbstractRouter& router); + + /// Destructor + ~ROMAAssignments(); + + // @brief calculate edge travel time with the given road class and max link speed + SUMOReal capacityConstraintFunction(const ROEdge* edge, const SUMOReal flow) const; + + // @brief incremental method + void incremental(const int numIter); + + // @brief UE method + void ue(); + + // @brief SUE method + void sue(const int maxOuterIteration, const int maxInnerIteration, const int kPaths, const SUMOReal penalty, const SUMOReal tolerance, const std::string routeChoiceMethod); + + /** @brief Returns the effort to pass an edge including penalties + * + * This method is given to the used router in order to obtain the efforts + * to pass an edge from the internal edge weights container. + * + * @param[in] e The edge for which the effort to be passed shall be returned + * @param[in] v The (default) vehicle that is routed + * @param[in] t The time for which the effort shall be returned + * @return The effort (time to pass in this case) for an edge + * @see DijkstraRouterTT_ByProxi + */ + static SUMOReal getPenalizedEffort(const ROEdge* const e, const ROVehicle* const v, SUMOReal t); + + /** @brief Returns the traveltime on an edge including penalties + * + * This method is given to the used router in order to obtain the efforts + * to pass an edge from the internal edge weights container. + * + * @param[in] e The edge for which the effort to be passed shall be returned + * @param[in] v The (default) vehicle that is routed + * @param[in] t The time for which the effort shall be returned + * @return The effort (time to pass in this case) for an edge + * @see DijkstraRouterTT_ByProxi + */ + static SUMOReal getPenalizedTT(const ROEdge* const e, const ROVehicle* const v, SUMOReal t); + + /** @brief Returns the traveltime on an edge without penalties + * + * This method is given to the used router in order to obtain the efforts + * to pass an edge from the internal edge weights container. + * + * @param[in] e The edge for which the effort to be passed shall be returned + * @param[in] v The (default) vehicle that is routed + * @param[in] t The time for which the effort shall be returned + * @return The effort (time to pass in this case) for an edge + * @see DijkstraRouterTT_ByProxi + */ + static SUMOReal getTravelTime(const ROEdge* const e, const ROVehicle* const v, SUMOReal t); + +private: + /// @brief add a route and check for duplicates + bool addRoute(ConstROEdgeVector& edges, std::vector& paths, std::string routeId, SUMOReal costs, SUMOReal prob); + + /// @brief get the k shortest paths + void getKPaths(const int kPaths, const SUMOReal penalty); + +private: + const SUMOTime myBegin; + const SUMOTime myEnd; + RONet& myNet; + ODMatrix& myMatrix; + SUMOAbstractRouter& myRouter; + static std::map myPenalties; + static ROVehicle* myDefaultVehicle; + +private: + /// @brief Invalidated assignment operator + ROMAAssignments& operator=(const ROMAAssignments& src); + +}; + +#endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAEdgeBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAEdgeBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAEdgeBuilder.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAEdgeBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,59 @@ +/****************************************************************************/ +/// @file ROMAEdgeBuilder.cpp +/// @author Daniel Krajzewicz +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date Tue, 20 Jan 2004 +/// @version $Id: ROMAEdgeBuilder.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Interface for building instances of duarouter-edges +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include "ROMAEdgeBuilder.h" +#include "ROMAEdge.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +ROMAEdgeBuilder::ROMAEdgeBuilder(bool useBoundariesOnOverride, bool interpolate) { + ROEdge::setTimeLineOptions(useBoundariesOnOverride, useBoundariesOnOverride, interpolate); +} + + +ROMAEdgeBuilder::~ROMAEdgeBuilder() {} + + +ROEdge* +ROMAEdgeBuilder::buildEdge(const std::string& name, RONode* from, RONode* to, const int priority) { + return new ROMAEdge(name, from, to, getNextIndex(), priority); +} + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAEdgeBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAEdgeBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAEdgeBuilder.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAEdgeBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,96 @@ +/****************************************************************************/ +/// @file ROMAEdgeBuilder.h +/// @author Daniel Krajzewicz +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date Tue, 20 Jan 2004 +/// @version $Id: ROMAEdgeBuilder.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Interface for building instances of duarouter-edges +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef ROMAEdgeBuilder_h +#define ROMAEdgeBuilder_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class ROEdge; +class RONode; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class ROMAEdgeBuilder + * @brief Interface for building instances of duarouter-edges + * + * This ROAbstractEdgeBuilder implementation builds edges for the duarouter + * (instances of ROEdge). + * + * @see ROEdge + */ +class ROMAEdgeBuilder : public ROAbstractEdgeBuilder { +public: + /** @brief Constructor + * + * @param[in] useBoundariesOnOverride Whether edges shall use a boundary value if the requested is beyond known time scale + * @param[in] interpolate Whether edges shall interpolate at interval boundaries + * @todo useBoundariesOnOverride should not be a member of the edges + */ + ROMAEdgeBuilder(bool useBoundariesOnOverride, bool interpolate); + + + /// @brief Destructor + ~ROMAEdgeBuilder(); + + + /// @name Methods to be implemented, inherited from ROAbstractEdgeBuilder + /// @{ + + /** @brief Builds an edge with the given name + * + * This implementation builds a ROEdge. + * + * @param[in] name The name of the edge + * @param[in] from The node the edge begins at + * @param[in] to The node the edge ends at + * @param[in] priority The edge priority (road class) + * @return A proper instance of the named edge + * @see ROEdge + */ + ROEdge* buildEdge(const std::string& name, RONode* from, RONode* to, const int priority); + /// @} + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAEdge.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAEdge.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAEdge.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAEdge.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,64 @@ +/****************************************************************************/ +/// @file ROMAEdge.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Christian Roessel +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date Sept 2002 +/// @version $Id: ROMAEdge.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A basic edge for routing applications +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include "ROMAEdge.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +ROMAEdge::ROMAEdge(const std::string& id, RONode* from, RONode* to, unsigned int index, const int priority) + : ROEdge(id, from, to, index, priority), myHelpFlow(0.) { +} + + +ROMAEdge::~ROMAEdge() { +} + + +void +ROMAEdge::addSuccessor(ROEdge* s, std::string dir) { + ROEdge::addSuccessor(s, dir); + if (dir == "l" || dir == "L") { + myLeftTurns.insert(static_cast(s)); + } +} + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAEdge.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAEdge.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAEdge.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAEdge.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,113 @@ +/****************************************************************************/ +/// @file ROMAEdge.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Christian Roessel +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date Sept 2002 +/// @version $Id: ROMAEdge.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A basic edge for routing applications +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef ROMAEdge_h +#define ROMAEdge_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class ROLane; +class ROVehicle; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class ROMAEdge + * @brief A basic edge for routing applications + * + * The edge contains two time lines, one for the travel time and one for a second + * measure which may be used for computing the costs of a route. After loading + * the weights, it is needed to call "buildTimeLines" in order to initialise + * these time lines. + */ +class ROMAEdge : public ROEdge { +public: + /** @brief Constructor + * + * @param[in] id The id of the edge + * @param[in] from The node the edge begins at + * @param[in] to The node the edge ends at + * @param[in] index The numeric id of the edge + */ + ROMAEdge(const std::string& id, RONode* from, RONode* to, unsigned int index, const int priority); + + + /// Destructor + virtual ~ROMAEdge(); + + /** @brief Adds information about a connected edge. + * + * In addition to ROEdge::addSuccessor it keeps track of left turns. + * + * @param[in] s The edge to add + * @todo What about vehicle-type aware connections? + */ + virtual void addSuccessor(ROEdge* s, std::string dir = ""); + + void setHelpFlow(const SUMOReal flow) { + myHelpFlow = flow; + } + + SUMOReal getHelpFlow() const { + return myHelpFlow; + } + +private: + std::set myLeftTurns; + SUMOReal myHelpFlow; + +private: + /// @brief Invalidated copy constructor + ROMAEdge(const ROMAEdge& src); + + /// @brief Invalidated assignment operator + ROMAEdge& operator=(const ROMAEdge& src); + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAFrame.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAFrame.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAFrame.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAFrame.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,288 @@ +/****************************************************************************/ +/// @file ROMAFrame.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date Sept 2002 +/// @version $Id: ROMAFrame.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Sets and checks options for dua-routing +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include "ROMAFrame.h" +#include +#include +#include +#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +void +ROMAFrame::fillOptions() { + OptionsCont& oc = OptionsCont::getOptions(); + oc.addCallExample("-c ", "run routing with options from file"); + + // insert options sub-topics + SystemFrame::addConfigurationOptions(oc); // fill this subtopic, too + oc.addOptionSubTopic("Input"); + oc.addOptionSubTopic("Output"); + oc.addOptionSubTopic("Processing"); + oc.addOptionSubTopic("Defaults"); + oc.addOptionSubTopic("Time"); + SystemFrame::addReportOptions(oc); // fill this subtopic, too + + // insert options + addImportOptions(); + addAssignmentOptions(); + // add rand options + RandHelper::insertRandOptions(); +} + + +void +ROMAFrame::addImportOptions() { + OptionsCont& oc = OptionsCont::getOptions(); + // register import options + oc.doRegister("output-file", 'o', new Option_FileName()); + oc.addSynonyme("output-file", "output"); + oc.addDescription("output-file", "Output", "Write route distributions to FILE"); + + oc.doRegister("flow-output", new Option_FileName()); + oc.addDescription("flow-output", "Output", "Writes flow definitions into FILE"); + + oc.doRegister("ignore-vehicle-type", new Option_Bool(false)); + oc.addSynonyme("ignore-vehicle-type", "no-vtype", true); + oc.addDescription("ignore-vehicle-type", "Output", "Does not save vtype information"); + + oc.doRegister("netload-output", new Option_FileName()); + oc.addDescription("netload-output", "Output", "Writes edge loads and final costs into FILE"); + + oc.doRegister("all-pairs-output", new Option_FileName()); + oc.addDescription("all-pairs-output", "Output", "Writes complete distance matrix into FILE"); + + oc.doRegister("net-file", 'n', new Option_FileName()); + oc.addSynonyme("net-file", "net"); + oc.addDescription("net-file", "Input", "Use FILE as SUMO-network to route on"); + + oc.doRegister("additional-files", 'd', new Option_FileName()); + oc.addSynonyme("additional-files", "additional"); + oc.addSynonyme("additional-files", "taz-files"); + oc.addSynonyme("additional-files", "districts", true); + oc.addDescription("additional-files", "Input", "Read additional network data (districts, bus stops) from FILE"); + + oc.doRegister("od-matrix-files", 'm', new Option_FileName()); + oc.addSynonyme("od-matrix-files", "od-files"); + oc.addDescription("od-matrix-files", "Input", "Loads O/D-files from FILE(s)"); + + oc.doRegister("od-amitran-files", new Option_FileName()); + oc.addSynonyme("od-amitran-files", "amitran-files"); + oc.addSynonyme("od-amitran-files", "amitran"); + oc.addDescription("od-amitran-files", "Input", "Loads O/D-matrix in Amitran format from FILE(s)"); + + oc.doRegister("weight-files", 'w', new Option_FileName()); + oc.addSynonyme("weight-files", "weights"); + oc.addDescription("weight-files", "Input", "Read network weights from FILE(s)"); + + oc.doRegister("lane-weight-files", new Option_FileName()); + oc.addDescription("lane-weight-files", "Input", "Read lane-based network weights from FILE(s)"); + + oc.doRegister("weight-attribute", 'x', new Option_String("traveltime")); + oc.addSynonyme("weight-attribute", "measure", true); + oc.addDescription("weight-attribute", "Input", "Name of the xml attribute which gives the edge weight"); + + // register the time settings + oc.doRegister("begin", 'b', new Option_String("0", "TIME")); + oc.addDescription("begin", "Time", "Defines the begin time; Previous trips will be discarded"); + + oc.doRegister("end", 'e', new Option_String(SUMOTIME_MAXSTRING, "TIME")); + oc.addDescription("end", "Time", "Defines the end time; Later trips will be discarded; Defaults to the maximum time that SUMO can represent"); + + // register the processing options + oc.doRegister("ignore-errors", new Option_Bool(false)); + oc.addSynonyme("ignore-errors", "continue-on-unbuild", true); + oc.addSynonyme("ignore-errors", "dismiss-loading-errors", true); + oc.addDescription("ignore-errors", "Processing", "Continue if a route could not be build"); + + oc.doRegister("max-alternatives", new Option_Integer(5)); + oc.addDescription("max-alternatives", "Processing", "Prune the number of alternatives to INT"); + + oc.doRegister("weights.interpolate", new Option_Bool(false)); + oc.addSynonyme("weights.interpolate", "interpolate", true); + oc.addDescription("weights.interpolate", "Processing", "Interpolate edge weights at interval boundaries"); + + oc.doRegister("weights.expand", new Option_Bool(false)); + oc.addSynonyme("weights.expand", "expand-weights", true); + oc.addDescription("weights.expand", "Processing", "Expand weights behind the simulation's end"); + + oc.doRegister("routing-algorithm", new Option_String("dijkstra")); + oc.addDescription("routing-algorithm", "Processing", "Select among routing algorithms ['dijkstra', 'astar', 'bulkstar', 'CH', 'CHWrapper']"); + + oc.doRegister("weight-period", new Option_String("3600", "TIME")); + oc.addDescription("weight-period", "Processing", "Aggregation period for the given weight files; triggers rebuilding of Contraction Hierarchy"); + + // register defaults options + oc.doRegister("flow-output.departlane", new Option_String("free")); + oc.addSynonyme("flow-output.departlane", "departlane"); + oc.addDescription("flow-output.departlane", "Defaults", "Assigns a default depart lane"); + + oc.doRegister("flow-output.departpos", new Option_String()); + oc.addSynonyme("flow-output.departpos", "departpos"); + oc.addDescription("flow-output.departpos", "Defaults", "Assigns a default depart position"); + + oc.doRegister("flow-output.departspeed", new Option_String("max")); + oc.addSynonyme("flow-output.departspeed", "departspeed"); + oc.addDescription("flow-output.departspeed", "Defaults", "Assigns a default depart speed"); + + oc.doRegister("flow-output.arrivallane", new Option_String()); + oc.addSynonyme("flow-output.arrivallane", "arrivallane"); + oc.addDescription("flow-output.arrivallane", "Defaults", "Assigns a default arrival lane"); + + oc.doRegister("flow-output.arrivalpos", new Option_String()); + oc.addSynonyme("flow-output.arrivalpos", "arrivalpos"); + oc.addDescription("flow-output.arrivalpos", "Defaults", "Assigns a default arrival position"); + + oc.doRegister("flow-output.arrivalspeed", new Option_String()); + oc.addSynonyme("flow-output.arrivalspeed", "arrivalspeed"); + oc.addDescription("flow-output.arrivalspeed", "Defaults", "Assigns a default arrival speed"); + +} + + +void +ROMAFrame::addAssignmentOptions() { + OptionsCont& oc = OptionsCont::getOptions(); + // register the data processing options + oc.doRegister("scale", 's', new Option_Float(1)); + oc.addDescription("scale", "Processing", "Scales the loaded flows by FLOAT"); + + oc.doRegister("vtype", new Option_String("")); + oc.addDescription("vtype", "Processing", "Defines the name of the vehicle type to use"); + + oc.doRegister("prefix", new Option_String("")); + oc.addDescription("prefix", "Processing", "Defines the prefix for vehicle flow names"); + + oc.doRegister("timeline", new Option_String()); + oc.addDescription("timeline", "Processing", "Uses STR as a timeline definition"); + + oc.doRegister("timeline.day-in-hours", new Option_Bool(false)); + oc.addDescription("timeline.day-in-hours", "Processing", "Uses STR as a 24h-timeline definition"); + + // register macroscopic SUE-settings + oc.doRegister("assignment-method", new Option_String("incremental")); + oc.addDescription("assignment-method", "Processing", "Choose a assignment method: incremental, UE or SUE"); + + oc.doRegister("tolerance", new Option_Float(SUMOReal(0.001))); + oc.addDescription("tolerance", "Processing", "Use FLOAT as tolerance when checking for SUE stability"); + + oc.doRegister("left-turn-penalty", new Option_Float(SUMOReal(0))); + oc.addDescription("left-turn-penalty", "Processing", "Use left-turn penalty FLOAT to calculate link travel time when searching routes"); + + oc.doRegister("paths", new Option_Integer(1)); + oc.addDescription("paths", "Processing", "Use INTEGER as the number of paths needed to be searched for each OD pair at each iteration"); + + oc.doRegister("paths.penalty", new Option_Float(SUMOReal(1))); + oc.addDescription("paths.penalty", "Processing", "Penalize existing routes with FLOAT to find secondary routes"); + + oc.doRegister("upperbound", new Option_Float(SUMOReal(0.5))); + oc.addSynonyme("upperbound", "upper", true); + oc.addDescription("upperbound", "Processing", "Use FLOAT as the upper bound to determine auxiliary link cost"); + + oc.doRegister("lowerbound", new Option_Float(SUMOReal(0.15))); + oc.addSynonyme("lowerbound", "lower", true); + oc.addDescription("lowerbound", "Processing", "Use FLOAT as the lower bound to determine auxiliary link cost"); + + oc.doRegister("max-iterations", 'i', new Option_Integer(20)); + oc.addDescription("max-iterations", "Processing", "maximal number of iterations for new route searching in incremental and stochastic user assignment"); + + oc.doRegister("max-inner-iterations", new Option_Integer(1000)); + oc.addDescription("max-inner-iterations", "Processing", "maximal number of inner iterations for user equilibrium calcuation in the stochastic user assignment"); + + // register route choice settings + oc.doRegister("route-choice-method", new Option_String("logit")); + oc.addDescription("route-choice-method", "Processing", "Choose a route choice method: gawron, logit, or lohse"); + + oc.doRegister("gawron.beta", new Option_Float(SUMOReal(0.3))); + oc.addSynonyme("gawron.beta", "gBeta", true); + oc.addDescription("gawron.beta", "Processing", "Use FLOAT as Gawron's beta"); + + oc.doRegister("gawron.a", new Option_Float(SUMOReal(0.05))); + oc.addSynonyme("gawron.a", "gA", true); + oc.addDescription("gawron.a", "Processing", "Use FLOAT as Gawron's a"); + + oc.doRegister("exit-times", new Option_Bool(false)); + oc.addDescription("exit-times", "Output", "Write exit times (weights) for each edge"); + + oc.doRegister("keep-all-routes", new Option_Bool(false)); + oc.addDescription("keep-all-routes", "Processing", "Save routes with near zero probability"); + + oc.doRegister("skip-new-routes", new Option_Bool(false)); + oc.addDescription("skip-new-routes", "Processing", "Only reuse routes from input, do not calculate new ones"); + + oc.doRegister("logit.beta", new Option_Float(SUMOReal(0.15))); // check: remove the default? + oc.addSynonyme("logit.beta", "lBeta", true); + oc.addDescription("logit.beta", "Processing", "Use FLOAT as (c-)logit's beta for the commonality factor"); + + oc.doRegister("logit.gamma", new Option_Float(SUMOReal(1))); + oc.addSynonyme("logit.gamma", "lGamma", true); + oc.addDescription("logit.gamma", "Processing", "Use FLOAT as (c-)logit's gamma for the commonality factor"); + + oc.doRegister("logit.theta", new Option_Float(SUMOReal(0.01))); + oc.addSynonyme("logit.theta", "lTheta", true); + oc.addDescription("logit.theta", "Processing", "Use FLOAT as (c-)logit's theta"); +} + + +bool +ROMAFrame::checkOptions() { + OptionsCont& oc = OptionsCont::getOptions(); + if (oc.isSet("assignment-method") && oc.getString("assignment-method") != "incremental" && oc.getString("assignment-method") != "UE" && oc.getString("assignment-method") != "SUE") { + WRITE_ERROR("invalid assignment method"); + return false; + } + if (oc.getString("route-choice-method") != "gawron" && oc.getString("route-choice-method") != "logit" && oc.getString("route-choice-methods") != "lohse") { + WRITE_ERROR("invalid route choice method"); + return false; + } + return true; +} + + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAFrame.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAFrame.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/marouter/ROMAFrame.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/marouter/ROMAFrame.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,83 @@ +/****************************************************************************/ +/// @file ROMAFrame.h +/// @author Daniel Krajzewicz +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date Sept 2002 +/// @version $Id: ROMAFrame.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Sets and checks options for dua-routing +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef ROMAFrame_h +#define ROMAFrame_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class ROMAFrame + * @brief Sets and checks options for dua-routing + */ +class ROMAFrame { +public: + /** @brief Inserts options used by duarouter into the OptionsCont-singleton + * + * As duarouter shares several options with other routing appplications, the + * insertion of these is done via a call to ROFrame::fillOptions. + * + * duarouter-specific options are added afterwards via calls to + * "addImportOptions" and "addDUAOptions". + */ + static void fillOptions(); + + + /** @brief Checks set options from the OptionsCont-singleton for being valid for usage within duarouter + * + * Currently, this is done via a call to "ROFrame::checkOptions". + * + * @return Whether all needed options are set + * @todo probably, more things should be checked... + */ + static bool checkOptions(); + + +protected: + /** @brief Inserts import options used by duarouter into the OptionsCont-singleton + */ + static void addImportOptions(); + + + /** @brief Inserts dua options used by duarouter into the OptionsCont-singleton + */ + static void addAssignmentOptions(); + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledDet.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledDet.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledDet.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledDet.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 15 Feb 2004 -/// @version $Id: Command_SaveTLCoupledDet.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Command_SaveTLCoupledDet.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Writes e2 state on each tls switch /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledDet.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledDet.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledDet.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledDet.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 15 Feb 2004 -/// @version $Id: Command_SaveTLCoupledDet.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Command_SaveTLCoupledDet.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Writes e2 state on each tls switch /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledLaneDet.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledLaneDet.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledLaneDet.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledLaneDet.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date 15 Feb 2004 -/// @version $Id: Command_SaveTLCoupledLaneDet.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Command_SaveTLCoupledLaneDet.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Writes e2 state of a link for the time the link has yellow/red /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledLaneDet.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledLaneDet.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledLaneDet.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLCoupledLaneDet.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date 15 Feb 2004 -/// @version $Id: Command_SaveTLCoupledLaneDet.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Command_SaveTLCoupledLaneDet.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Writes e2 state of a link for the time the link has yellow/red /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSState.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSState.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSState.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSState.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 15 Feb 2004 -/// @version $Id: Command_SaveTLSState.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Command_SaveTLSState.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Writes the state of the tls to a file (in each second) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -46,7 +46,7 @@ Command_SaveTLSState::Command_SaveTLSState(const MSTLLogicControl::TLSLogicVariants& logics, OutputDevice& od) : myOutputDevice(od), myLogics(logics) { - MSNet::getInstance()->getEndOfTimestepEvents().addEvent(this, 0, MSEventControl::ADAPT_AFTER_EXECUTION); + MSNet::getInstance()->getEndOfTimestepEvents()->addEvent(this, 0, MSEventControl::ADAPT_AFTER_EXECUTION); myOutputDevice.writeXMLHeader("tls-states"); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSState.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSState.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSState.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSState.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 15 Feb 2004 -/// @version $Id: Command_SaveTLSState.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Command_SaveTLSState.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Writes the state of the tls to a file (in each second) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitches.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitches.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitches.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitches.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date 06 Jul 2006 -/// @version $Id: Command_SaveTLSSwitches.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Command_SaveTLSSwitches.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Writes information about the green durations of a tls /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -49,7 +49,7 @@ Command_SaveTLSSwitches::Command_SaveTLSSwitches(const MSTLLogicControl::TLSLogicVariants& logics, OutputDevice& od) : myOutputDevice(od), myLogics(logics) { - MSNet::getInstance()->getEndOfTimestepEvents().addEvent(this, 0, MSEventControl::ADAPT_AFTER_EXECUTION); + MSNet::getInstance()->getEndOfTimestepEvents()->addEvent(this, 0, MSEventControl::ADAPT_AFTER_EXECUTION); myOutputDevice.writeXMLHeader("tls-switches"); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitches.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitches.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitches.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitches.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 06 Jul 2006 -/// @version $Id: Command_SaveTLSSwitches.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Command_SaveTLSSwitches.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Writes information about the green durations of a tls /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitchStates.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitchStates.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitchStates.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitchStates.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 08.05.2007 -/// @version $Id: Command_SaveTLSSwitchStates.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Command_SaveTLSSwitchStates.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Writes the switch times of a tls into a file when the tls switches /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -46,7 +46,7 @@ Command_SaveTLSSwitchStates::Command_SaveTLSSwitchStates(const MSTLLogicControl::TLSLogicVariants& logics, OutputDevice& od) : myOutputDevice(od), myLogics(logics) { - MSNet::getInstance()->getEndOfTimestepEvents().addEvent(this, 0, MSEventControl::ADAPT_AFTER_EXECUTION); + MSNet::getInstance()->getEndOfTimestepEvents()->addEvent(this, 0, MSEventControl::ADAPT_AFTER_EXECUTION); myOutputDevice.writeXMLHeader("tls-switch-states"); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitchStates.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitchStates.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitchStates.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Command_SaveTLSSwitchStates.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 08.05.2007 -/// @version $Id: Command_SaveTLSSwitchStates.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Command_SaveTLSSwitchStates.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Writes the switch times of a tls into a file when the tls switches /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/actions/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/actions/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/microsim/actions -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,6 +92,10 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libmsactions_a_AR = $(AR) $(ARFLAGS) libmsactions_a_LIBADD = am_libmsactions_a_OBJECTS = Command_SaveTLSState.$(OBJEXT) \ @@ -55,30 +104,86 @@ Command_SaveTLCoupledLaneDet.$(OBJEXT) \ Command_SaveTLCoupledDet.$(OBJEXT) libmsactions_a_OBJECTS = $(am_libmsactions_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libmsactions_a_SOURCES) DIST_SOURCES = $(libmsactions_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -87,6 +192,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -113,9 +219,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -126,10 +236,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -268,10 +374,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libmsactions.a: $(libmsactions_a_OBJECTS) $(libmsactions_a_DEPENDENCIES) - -rm -f libmsactions.a - $(libmsactions_a_AR) libmsactions.a $(libmsactions_a_OBJECTS) $(libmsactions_a_LIBADD) - $(RANLIB) libmsactions.a + +libmsactions.a: $(libmsactions_a_OBJECTS) $(libmsactions_a_DEPENDENCIES) $(EXTRA_libmsactions_a_DEPENDENCIES) + $(AM_V_at)-rm -f libmsactions.a + $(AM_V_AR)$(libmsactions_a_AR) libmsactions.a $(libmsactions_a_OBJECTS) $(libmsactions_a_LIBADD) + $(AM_V_at)$(RANLIB) libmsactions.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -286,25 +393,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Command_SaveTLSSwitches.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -312,26 +419,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -343,15 +439,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -360,6 +452,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -408,10 +515,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -496,18 +608,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -6,6 +6,7 @@ MSCFModel_IDM.cpp MSCFModel_IDM.h \ MSCFModel_Kerner.cpp MSCFModel_Kerner.h \ MSCFModel_Krauss.cpp MSCFModel_Krauss.h \ +MSCFModel_KraussAccelBound.cpp MSCFModel_KraussAccelBound.h \ MSCFModel_KraussOrig1.cpp MSCFModel_KraussOrig1.h \ MSCFModel_KraussPS.cpp MSCFModel_KraussPS.h \ MSCFModel_PWag2009.cpp MSCFModel_PWag2009.h \ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/microsim/cfmodels -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,39 +92,100 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libmicrosimcfmodels_a_AR = $(AR) $(ARFLAGS) libmicrosimcfmodels_a_LIBADD = am_libmicrosimcfmodels_a_OBJECTS = MSCFModel.$(OBJEXT) \ MSCFModel_Daniel1.$(OBJEXT) MSCFModel_IDM.$(OBJEXT) \ MSCFModel_Kerner.$(OBJEXT) MSCFModel_Krauss.$(OBJEXT) \ + MSCFModel_KraussAccelBound.$(OBJEXT) \ MSCFModel_KraussOrig1.$(OBJEXT) MSCFModel_KraussPS.$(OBJEXT) \ MSCFModel_PWag2009.$(OBJEXT) MSCFModel_SmartSK.$(OBJEXT) \ MSCFModel_Wiedemann.$(OBJEXT) libmicrosimcfmodels_a_OBJECTS = $(am_libmicrosimcfmodels_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libmicrosimcfmodels_a_SOURCES) DIST_SOURCES = $(libmicrosimcfmodels_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -88,6 +194,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -114,9 +221,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -127,10 +238,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -231,6 +338,7 @@ MSCFModel_IDM.cpp MSCFModel_IDM.h \ MSCFModel_Kerner.cpp MSCFModel_Kerner.h \ MSCFModel_Krauss.cpp MSCFModel_Krauss.h \ +MSCFModel_KraussAccelBound.cpp MSCFModel_KraussAccelBound.h \ MSCFModel_KraussOrig1.cpp MSCFModel_KraussOrig1.h \ MSCFModel_KraussPS.cpp MSCFModel_KraussPS.h \ MSCFModel_PWag2009.cpp MSCFModel_PWag2009.h \ @@ -274,10 +382,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libmicrosimcfmodels.a: $(libmicrosimcfmodels_a_OBJECTS) $(libmicrosimcfmodels_a_DEPENDENCIES) - -rm -f libmicrosimcfmodels.a - $(libmicrosimcfmodels_a_AR) libmicrosimcfmodels.a $(libmicrosimcfmodels_a_OBJECTS) $(libmicrosimcfmodels_a_LIBADD) - $(RANLIB) libmicrosimcfmodels.a + +libmicrosimcfmodels.a: $(libmicrosimcfmodels_a_OBJECTS) $(libmicrosimcfmodels_a_DEPENDENCIES) $(EXTRA_libmicrosimcfmodels_a_DEPENDENCIES) + $(AM_V_at)-rm -f libmicrosimcfmodels.a + $(AM_V_AR)$(libmicrosimcfmodels_a_AR) libmicrosimcfmodels.a $(libmicrosimcfmodels_a_OBJECTS) $(libmicrosimcfmodels_a_LIBADD) + $(AM_V_at)$(RANLIB) libmicrosimcfmodels.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -290,6 +399,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_IDM.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_Kerner.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_Krauss.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_KraussAccelBound.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_KraussOrig1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_KraussPS.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_PWag2009.Po@am__quote@ @@ -297,25 +407,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCFModel_Wiedemann.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -323,26 +433,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -354,15 +453,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -371,6 +466,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -419,10 +529,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -507,18 +622,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Mon, 27 Jul 2009 -/// @version $Id: MSCFModel.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The car-following model abstraction /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include "MSCFModel.h" @@ -89,17 +89,60 @@ SUMOReal -MSCFModel::freeSpeed(const MSVehicle* const /* veh */, SUMOReal /* speed */, SUMOReal seen, SUMOReal maxSpeed) const { - // adapt speed to succeeding lane, no reaction time is involved - // when breaking for y steps the following distance g is covered - // (drive with v in the final step) - // g = (y^2 + y) * 0.5 * b + y * v - // y = ((((sqrt((b + 2.0*v)*(b + 2.0*v) + 8.0*b*g)) - b)*0.5 - v)/b) +MSCFModel::freeSpeed(const MSVehicle* const /* veh */, SUMOReal /* speed */, SUMOReal seen, SUMOReal maxSpeed, const bool onInsertion) const { + return freeSpeed(myDecel, seen, maxSpeed, onInsertion); +} + + +SUMOReal +MSCFModel::insertionFollowSpeed(const MSVehicle* const, SUMOReal, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const { + return maximumSafeFollowSpeed(gap2pred, predSpeed, predMaxDecel); +} + + + +SUMOReal +MSCFModel::maximumSafeStopSpeed(SUMOReal gap) const { + gap -= NUMERICAL_EPS; // lots of code relies on some slack + if (gap <= 0) { + return 0; + } else if (gap <= ACCEL2SPEED(myDecel)) { + return gap; + } + const SUMOReal g = gap; const SUMOReal b = ACCEL2SPEED(myDecel); - const SUMOReal y = MAX2(0.0, ((sqrt((b + 2.0 * maxSpeed) * (b + 2.0 * maxSpeed) + 8.0 * b * seen) - b) * 0.5 - maxSpeed) / b); - const SUMOReal yFull = floor(y); - const SUMOReal exactGap = (yFull * yFull + yFull) * 0.5 * b + yFull * maxSpeed + (y > yFull ? maxSpeed : 0.0); - return MAX2((SUMOReal)0.0, seen - exactGap) / (yFull + 1) + yFull * myDecel + maxSpeed; + const SUMOReal t = myHeadwayTime; + const SUMOReal s = TS; + // h = the distance that would be covered if it were possible to stop + // exactly after gap and decelerate with b every simulation step + // h = 0.5 * n * (n-1) * b * s + n * b * t (solve for n) + //n = ((1.0/2.0) - ((t + (pow(((s*s) + (4.0*((s*((2.0*h/b) - t)) + (t*t)))), (1.0/2.0))*sign/2.0))/s)); + const SUMOReal n = floor(.5 - ((t + (sqrt(((s * s) + (4.0 * ((s * (2.0 * g / b - t)) + (t * t))))) * -0.5)) / s)); + const SUMOReal h = 0.5 * n * (n - 1) * b * s + n * b * t; + assert(h <= g + NUMERICAL_EPS); + // compute the additional speed that must be used during deceleration to fix + // the discrepancy between g and h + const SUMOReal r = (g - h) / (n * s + t); + const SUMOReal x = n * b + r; + assert(x >= 0); + return x; } + +/** Returns the SK-vsafe. */ +SUMOReal +MSCFModel::maximumSafeFollowSpeed(SUMOReal gap, SUMOReal predSpeed, SUMOReal predMaxDecel) const { + // the speed is safe if allows the ego vehicle to come to a stop behind the leader even if + // the leaders starts braking hard until stopped + // unfortunately it is not sufficent to compare stopping distances if the follower can brake harder than the leader + // (the trajectories might intersect before both vehicles are stopped even if the follower has a shorter stopping distance than the leader) + // To make things safe, we ensure that the leaders brake distance is computed with an deceleration that is at least as high as the follower's. + // @todo: this is a conservative estimate for safe speed which could be increased + const SUMOReal x = maximumSafeStopSpeed(gap + brakeGap(predSpeed, MAX2(myDecel, predMaxDecel), 0)); + assert(x >= 0); + assert(!ISNAN(x)); + return x; +} + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Daniel1.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Daniel1.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Daniel1.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Daniel1.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file MSCFModel_Daniel1.cpp /// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch /// @date Tue, 05 Jun 2012 -/// @version $Id: MSCFModel_Daniel1.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_Daniel1.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The original Krauss (1998) car-following model and parameter /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -31,7 +33,7 @@ #include #include #include "MSCFModel_Daniel1.h" -#include +#include #include diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Daniel1.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Daniel1.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Daniel1.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Daniel1.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file MSCFModel_Daniel1.h /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date Tue, 05 Jun 2012 -/// @version $Id: MSCFModel_Daniel1.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_Daniel1.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The original Krauss (1998) car-following model and parameter /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -18,7 +19,7 @@ // /****************************************************************************/ #ifndef MSCFModel_Daniel1_h -#define MSCFModel_Daniel1_h +#define MSCFModel_Daniel1_h // =========================================================================== // included modules @@ -169,5 +170,5 @@ }; -#endif /* MSCFModel_Daniel1_H */ +#endif /* MSCFModel_Daniel1_H */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 27 Jul 2009 -/// @version $Id: MSCFModel.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The car-following model abstraction /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -21,7 +21,7 @@ // /****************************************************************************/ #ifndef MSCFModel_h -#define MSCFModel_h +#define MSCFModel_h // =========================================================================== // included modules @@ -32,6 +32,7 @@ #include #endif +#include #include #include #include @@ -85,17 +86,20 @@ /** @brief Computes the vehicle's safe speed without a leader * * Returns the velocity of the vehicle in dependence to the length of the free street and the target - * velocity at the end of the free range. + * velocity at the end of the free range. If onInsertion is true, the vehicle may still brake + * before the next movement. * @param[in] veh The vehicle (EGO) * @param[in] speed The vehicle's speed * @param[in] seen The look ahead distance * @param[in] maxSpeed The maximum allowed speed + * @param[in] onInsertion whether speed at insertion is asked for * @return EGO's safe speed */ - virtual SUMOReal freeSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal seen, SUMOReal maxSpeed) const; + virtual SUMOReal freeSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal seen, + SUMOReal maxSpeed, const bool onInsertion = false) const; - /** @brief Computes the vehicle's safe speed (no dawdling) + /** @brief Computes the vehicle's follow speed (no dawdling) * * Returns the velocity of the vehicle in dependence to the vehicle's and its leader's values and the distance between them. * @param[in] veh The vehicle (EGO) @@ -107,6 +111,21 @@ virtual SUMOReal followSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const = 0; + /** @brief Computes the vehicle's safe speed (no dawdling) + * This method is used during the insertion stage. Whereas the method + * followSpeed returns the desired speed which may be lower than the safe + * speed, this method only considers safety constraints + * + * Returns the velocity of the vehicle in dependence to the vehicle's and its leader's values and the distance between them. + * @param[in] veh The vehicle (EGO) + * @param[in] speed The vehicle's speed + * @param[in] gap2pred The (netto) distance to the LEADER + * @param[in] predSpeed The speed of LEADER + * @return EGO's safe speed + */ + virtual SUMOReal insertionFollowSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const; + + /** @brief Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling) * * Returns the velocity of the vehicle when approaching a static object (such as the end of a lane) assuming no reaction time is needed. @@ -211,11 +230,35 @@ * @return The distance needed to halt */ inline SUMOReal brakeGap(const SUMOReal speed) const { + return brakeGap(speed, myDecel, myHeadwayTime); + } + + + inline static SUMOReal brakeGap(const SUMOReal speed, const SUMOReal decel, const SUMOReal headwayTime) { /* one possiblity to speed this up is to precalculate speedReduction * steps * (steps+1) / 2 for small values of steps (up to 10 maybe) and store them in an array */ - const SUMOReal speedReduction = ACCEL2SPEED(getMaxDecel()); + const SUMOReal speedReduction = ACCEL2SPEED(decel); const int steps = int(speed / speedReduction); - return SPEED2DIST(steps * speed - speedReduction * steps * (steps + 1) / 2) + speed * myHeadwayTime; + return SPEED2DIST(steps * speed - speedReduction * steps * (steps + 1) / 2) + speed * headwayTime; + } + + + inline static SUMOReal freeSpeed(const SUMOReal decel, const SUMOReal seen, const SUMOReal maxSpeed, const bool onInsertion) { + // adapt speed to succeeding lane, no reaction time is involved + // when breaking for y steps the following distance g is covered + // (drive with v in the final step) + // g = (y^2 + y) * 0.5 * b + y * v + // y = ((((sqrt((b + 2.0*v)*(b + 2.0*v) + 8.0*b*g)) - b)*0.5 - v)/b) + const SUMOReal v = SPEED2DIST(maxSpeed); + if (seen < v) { + return maxSpeed; + } + const SUMOReal b = ACCEL2DIST(decel); + const SUMOReal y = MAX2(0.0, ((sqrt((b + 2.0 * v) * (b + 2.0 * v) + 8.0 * b * seen) - b) * 0.5 - v) / b); + const SUMOReal yFull = floor(y); + const SUMOReal exactGap = (yFull * yFull + yFull) * 0.5 * b + yFull * v + (y > yFull ? v : 0.0); + const SUMOReal fullSpeedGain = (yFull + (onInsertion ? 1. : 0.)) * ACCEL2SPEED(decel); + return DIST2SPEED(MAX2((SUMOReal)0.0, seen - exactGap) / (yFull + 1)) + fullSpeedGain + maxSpeed; } @@ -225,9 +268,11 @@ * @param[in] leaderMaxDecel LEADER's max. deceleration rate */ inline SUMOReal getSecureGap(const SUMOReal speed, const SUMOReal leaderSpeed, const SUMOReal leaderMaxDecel) const { - const int leaderSteps = int(leaderSpeed / ACCEL2SPEED(leaderMaxDecel)); - const SUMOReal leaderBreak = SPEED2DIST(leaderSteps * leaderSpeed - ACCEL2SPEED(leaderMaxDecel) * leaderSteps * (leaderSteps + 1) / 2); - return MAX2((SUMOReal) 0, brakeGap(speed) - leaderBreak); + // The solution approach leaderBrakeGap >= followerBrakeGap is not + // secure when the follower can brake harder than the leader because the paths may still cross. + // As a workaround we lower the value of followerDecel which errs on the side of caution + const SUMOReal followDecel = MIN2(myDecel, leaderMaxDecel); + return MAX2((SUMOReal) 0, brakeGap(speed, followDecel, myHeadwayTime) - brakeGap(leaderSpeed, leaderMaxDecel, 0)); } @@ -276,6 +321,21 @@ } /// @} +protected: + /** @brief Returns the maximum safe velocity for following the given leader + * @param[in] gap2pred The (netto) distance to the LEADER + * @param[in] predSpeed The LEADER's speed + * @param[in] predMaxDecel The LEADER's maximum deceleration + * @return the safe velocity + */ + SUMOReal maximumSafeFollowSpeed(SUMOReal gap, SUMOReal predSpeed, SUMOReal predMaxDecel) const; + + + /** @brief Returns the maximum velocity for stopping within gap + * This depends stronlgy on the position update model + * @param[in] gap The (netto) distance to the LEADER + */ + SUMOReal maximumSafeStopSpeed(SUMOReal gap) const; protected: /// @brief The type to which this model definition belongs to @@ -292,5 +352,5 @@ }; -#endif /* MSCFModel_h */ +#endif /* MSCFModel_h */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_IDM.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_IDM.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_IDM.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_IDM.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Thu, 03 Sep 2009 -/// @version $Id: MSCFModel_IDM.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_IDM.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The Intelligent Driver Model (IDM) car-following model /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,7 +45,7 @@ SUMOReal headwayTime, SUMOReal delta, SUMOReal internalStepping) : MSCFModel(vtype, accel, decel, headwayTime), myDelta(delta), - myAdaptationFactor(1.), myAdaptationTime(0.), myExpFactor(0), + myAdaptationFactor(1.), myAdaptationTime(0.), myIterations(MAX2(1, int(TS / internalStepping + .5))), myTwoSqrtAccelDecel(SUMOReal(2 * sqrt(accel* decel))) { } @@ -58,7 +58,6 @@ SUMOReal internalStepping) : MSCFModel(vtype, accel, decel, headwayTime), myDelta(4.), myAdaptationFactor(adaptationFactor), myAdaptationTime(adaptationTime), - myExpFactor(exp(-TS / adaptationTime)), myIterations(MAX2(1, int(TS / internalStepping + .5))), myTwoSqrtAccelDecel(SUMOReal(2 * sqrt(accel* decel))) { } @@ -70,10 +69,9 @@ SUMOReal MSCFModel_IDM::moveHelper(MSVehicle* const veh, SUMOReal vPos) const { const SUMOReal vNext = MSCFModel::moveHelper(veh, vPos); - if (myExpFactor > 0.) { + if (myAdaptationFactor != 1.) { VehicleVariables* vars = (VehicleVariables*)veh->getCarFollowVariables(); - vars->levelOfService *= myExpFactor; - vars->levelOfService += vNext / desiredSpeed(veh) * myAdaptationTime * (1. - myExpFactor); + vars->levelOfService += (vNext / desiredSpeed(veh) - vars->levelOfService) / myAdaptationTime * TS; } return vNext; } @@ -90,7 +88,7 @@ if (gap2pred < 0.01) { return 0; } - return _v(veh, gap2pred, speed, 0, desiredSpeed(veh)); + return _v(veh, gap2pred, speed, 0, desiredSpeed(veh), false); } @@ -100,9 +98,9 @@ // Resolve the IDM equation to gap. Assume predecessor has // speed != 0 and that vsafe will be the current speed plus acceleration, // i.e that with this gap there will be no interaction. - SUMOReal acc = myAccel * (1. - pow(veh->getSpeed() / desiredSpeed(veh), myDelta)); - SUMOReal vNext = veh->getSpeed() + acc; - SUMOReal gap = (vNext - vL) * (veh->getSpeed() + vL) / (2 * myDecel) + vL; + const SUMOReal acc = myAccel * (1. - pow(veh->getSpeed() / desiredSpeed(veh), myDelta)); + const SUMOReal vNext = veh->getSpeed() + acc; + const SUMOReal gap = (vNext - vL) * (veh->getSpeed() + vL) / (2 * myDecel) + vL; // Don't allow timeHeadWay < deltaT situations. return MAX2(gap, SPEED2DIST(vNext)); @@ -110,20 +108,31 @@ SUMOReal -MSCFModel_IDM::_v(const MSVehicle* const veh, SUMOReal gap2pred, SUMOReal egoSpeed, SUMOReal predSpeed, SUMOReal desSpeed) const { +MSCFModel_IDM::_v(const MSVehicle* const veh, const SUMOReal gap2pred, const SUMOReal egoSpeed, + const SUMOReal predSpeed, const SUMOReal desSpeed, const bool respectMinGap) const { +// this is more or less based on http://www.vwi.tu-dresden.de/~treiber/MicroApplet/IDM.html +// and http://arxiv.org/abs/cond-mat/0304337 +// we assume however constant speed for the leader SUMOReal headwayTime = myHeadwayTime; - if (myExpFactor > 0.) { + if (myAdaptationFactor != 1.) { const VehicleVariables* vars = (VehicleVariables*)veh->getCarFollowVariables(); headwayTime *= myAdaptationFactor + vars->levelOfService * (1. - myAdaptationFactor); } + SUMOReal newSpeed = egoSpeed; + SUMOReal gap = gap2pred; for (int i = 0; i < myIterations; i++) { - const SUMOReal delta_v = egoSpeed - predSpeed; - const SUMOReal s = myType->getMinGap() + MAX2(SUMOReal(0), egoSpeed * headwayTime + egoSpeed * delta_v / myTwoSqrtAccelDecel); - const SUMOReal acc = myAccel * (1. - pow(egoSpeed / desSpeed, myDelta) - (s * s) / (gap2pred * gap2pred)); - egoSpeed += ACCEL2SPEED(acc) / myIterations; - gap2pred -= MAX2(SUMOReal(0), SPEED2DIST(egoSpeed - predSpeed) / myIterations); + const SUMOReal delta_v = newSpeed - predSpeed; + SUMOReal s = MAX2(SUMOReal(0), newSpeed * headwayTime + newSpeed * delta_v / myTwoSqrtAccelDecel); + if (respectMinGap) { + s += myType->getMinGap(); + } + const SUMOReal acc = myAccel * (1. - pow(newSpeed / desSpeed, myDelta) - (s * s) / (gap * gap)); + newSpeed += ACCEL2SPEED(acc) / myIterations; + //TODO use more realistic position update which takes accelerated motion into account + gap -= MAX2(SUMOReal(0), SPEED2DIST(newSpeed - predSpeed) / myIterations); } - return MAX2(SUMOReal(0), egoSpeed); +// return MAX2(getSpeedAfterMaxDecel(egoSpeed), newSpeed); + return MAX2(SUMOReal(0), newSpeed); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_IDM.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_IDM.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_IDM.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_IDM.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Thu, 03 Sep 2009 -/// @version $Id: MSCFModel_IDM.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_IDM.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The Intelligent Driver Model (IDM) car-following model /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -20,7 +20,7 @@ // /****************************************************************************/ #ifndef MSCFMODEL_IDM_H -#define MSCFMODEL_IDM_H +#define MSCFMODEL_IDM_H // =========================================================================== // included modules @@ -124,7 +124,7 @@ * @see MSCFModel::getModelName */ int getModelID() const { - return myExpFactor > 0. ? SUMO_TAG_CF_IDMM : SUMO_TAG_CF_IDM; + return myAdaptationFactor == 1. ? SUMO_TAG_CF_IDM : SUMO_TAG_CF_IDMM; } /// @} @@ -138,7 +138,7 @@ VehicleVariables* createVehicleVariables() const { - if (myExpFactor > 0.) { + if (myAdaptationFactor != 1.) { return new VehicleVariables(); } return 0; @@ -155,7 +155,8 @@ private: - SUMOReal _v(const MSVehicle* const veh, SUMOReal gap2pred, SUMOReal mySpeed, SUMOReal predSpeed, SUMOReal desSpeed) const; + SUMOReal _v(const MSVehicle* const veh, const SUMOReal gap2pred, const SUMOReal mySpeed, + const SUMOReal predSpeed, const SUMOReal desSpeed, const bool respectMinGap = true) const; SUMOReal desiredSpeed(const MSVehicle* const veh) const { return MIN2(myType->getMaxSpeed(), veh->getLane()->getVehicleMaxSpeed(veh)); @@ -172,9 +173,6 @@ /// @brief The IDMM adaptation time tau const SUMOReal myAdaptationTime; - /// @brief A computational shortcut for IDMM - const SUMOReal myExpFactor; - /// @brief The number of iterations in speed calculations const int myIterations; @@ -186,4 +184,4 @@ MSCFModel_IDM& operator=(const MSCFModel_IDM& s); }; -#endif /* MSCFMODEL_IDM_H */ +#endif /* MSCFMODEL_IDM_H */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Kerner.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Kerner.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Kerner.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Kerner.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Laura Bieker /// @author Michael Behrisch /// @date 03.04.2010 -/// @version $Id: MSCFModel_Kerner.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSCFModel_Kerner.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // car-following model by B. Kerner /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Kerner.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Kerner.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Kerner.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Kerner.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 03.04.2010 -/// @version $Id: MSCFModel_Kerner.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_Kerner.h 18095 2015-03-17 09:39:00Z behrisch $ /// // car-following model by B. Kerner /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -19,7 +19,7 @@ // /****************************************************************************/ #ifndef MSCFModel_Kerner_h -#define MSCFModel_Kerner_h +#define MSCFModel_Kerner_h // =========================================================================== // included modules @@ -136,10 +136,7 @@ SUMOReal myTauDecel; /// @} - /// @brief The random deviation (constant between two calls of movehelper) - SUMOReal myRand; - }; -#endif /* MSCFModel_Kerner_H */ +#endif /* MSCFModel_Kerner_H */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussAccelBound.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussAccelBound.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussAccelBound.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussAccelBound.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,69 @@ +/****************************************************************************/ +/// @file MSCFModel_KraussAccelBound.cpp +/// @author Daniel Krajzewicz +/// @date Fri, 07 Mar 2014 +/// @version $Id: MSCFModel_KraussAccelBound.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// Krauss car-following model, with PHEMlight-based acceleration limits +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include "MSCFModel_KraussAccelBound.h" + + +// =========================================================================== +// method definitions +// =========================================================================== +MSCFModel_KraussAccelBound::MSCFModel_KraussAccelBound(const MSVehicleType* vtype, SUMOReal accel, SUMOReal decel, + SUMOReal dawdle, SUMOReal headwayTime) + : MSCFModel_Krauss(vtype, accel, decel, dawdle, headwayTime) { +} + + +MSCFModel_KraussAccelBound::~MSCFModel_KraussAccelBound() {} + + + +SUMOReal +MSCFModel_KraussAccelBound::maxNextSpeed(SUMOReal speed, const MSVehicle* const veh) const { + const MSLane* const lane = veh->getLane(); + const SUMOReal gp = lane->interpolateLanePosToGeometryPos(veh->getPositionOnLane()); + const SUMOReal slope = lane->getShape().slopeDegreeAtOffset(gp); + const SUMOReal aMax = PollutantsInterface::getMaxAccel(veh->getVehicleType().getEmissionClass(), speed, 0, slope); + return MIN2(speed + (SUMOReal) ACCEL2SPEED(aMax), veh->getVehicleType().getMaxSpeed()); +} + + + +MSCFModel* +MSCFModel_KraussAccelBound::duplicate(const MSVehicleType* vtype) const { + return new MSCFModel_KraussAccelBound(vtype, myAccel, myDecel, myDawdle, myHeadwayTime); +} + + +//void MSCFModel::saveState(std::ostream &os) {} + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussAccelBound.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussAccelBound.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussAccelBound.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussAccelBound.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,96 @@ +/****************************************************************************/ +/// @file MSCFModel_KraussAccelBound.h +/// @author Daniel Krajzewicz +/// @date Fri, 07 Mar 2014 +/// @version $Id: MSCFModel_KraussAccelBound.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Krauss car-following model, with PHEMlight-based acceleration limits +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSCFModel_KraussAccelBound_h +#define MSCFModel_KraussAccelBound_h + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include "MSCFModel_Krauss.h" +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** @class MSCFModel_KraussAccelBound + * @brief Krauss car-following model, with PHEMlight-based acceleration limits + * @see MSCFModel + */ +class MSCFModel_KraussAccelBound : public MSCFModel_Krauss { +public: + /** @brief Constructor + * @param[in] accel The maximum acceleration + * @param[in] decel The maximum deceleration + * @param[in] dawdle The driver imperfection + * @param[in] headwayTime The driver's reaction time + */ + MSCFModel_KraussAccelBound(const MSVehicleType* vtype, SUMOReal accel, SUMOReal decel, SUMOReal dawdle, SUMOReal headwayTime); + + + /// @brief Destructor + ~MSCFModel_KraussAccelBound(); + + + /// @name Implementations of the MSCFModel interface + /// @{ + + /** @brief Returns the maximum speed given the current speed + * + * The implementation of this method must take into account the time step + * duration. + * + * Justification: Due to air brake or other influences, the vehicle's next maximum + * speed may depend on the vehicle's current speed (given). + * + * @param[in] speed The vehicle's current speed + * @param[in] speed The vehicle itself, for obtaining other values + * @return The maximum possible speed for the next step + */ + SUMOReal maxNextSpeed(SUMOReal speed, const MSVehicle* const veh) const; + + + /** @brief Returns the model's name + * @return The model's name + * @see MSCFModel::getModelName + */ + int getModelID() const { + return SUMO_TAG_CF_KRAUSS_ACCEL_BOUND; + } + /// @} + + + /** @brief Duplicates the car-following model + * @param[in] vtype The vehicle type this model belongs to (1:1) + * @return A duplicate of this car-following model + */ + MSCFModel* duplicate(const MSVehicleType* vtype) const; + + +}; + +#endif /* MSCFModel_KraussAccelBound_H */ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Krauss.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Krauss.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Krauss.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Krauss.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Mon, 04 Aug 2009 -/// @version $Id: MSCFModel_Krauss.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSCFModel_Krauss.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Krauss car-following model, with acceleration decrease and faster start /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,7 +36,7 @@ #include #include #include "MSCFModel_Krauss.h" -#include +#include #include @@ -53,21 +53,21 @@ SUMOReal -MSCFModel_Krauss::followSpeed(const MSVehicle* const veh, const SUMOReal speed, SUMOReal gap, SUMOReal predSpeed, SUMOReal predMaxDecel) const { - return MIN2(_vsafe(gap, predSpeed, predMaxDecel), maxNextSpeed(speed, veh)); +MSCFModel_Krauss::stopSpeed(const MSVehicle* const veh, const SUMOReal speed, SUMOReal gap) const { + return MIN2(maximumSafeStopSpeed(gap), maxNextSpeed(speed, veh)); } SUMOReal -MSCFModel_Krauss::stopSpeed(const MSVehicle* const veh, const SUMOReal speed, SUMOReal gap) const { - return MIN2(_vsafe(gap, 0, 0), maxNextSpeed(speed, veh)); +MSCFModel_Krauss::followSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap, SUMOReal predSpeed, SUMOReal predMaxDecel) const { + return MIN2(maximumSafeFollowSpeed(gap, predSpeed, predMaxDecel), maxNextSpeed(speed, veh)); } SUMOReal MSCFModel_Krauss::dawdle(SUMOReal speed) const { - // generate random number out of [0,1] - SUMOReal random = RandHelper::rand(); + // generate random number out of [0,1) + const SUMOReal random = RandHelper::rand(); // Dawdle. if (speed < myAccel) { // we should not prevent vehicles from driving just due to dawdling @@ -81,47 +81,10 @@ } -/** Returns the SK-vsafe. */ -SUMOReal -MSCFModel_Krauss::_vsafe(SUMOReal gap, SUMOReal predSpeed, SUMOReal predMaxDecel) const { - if (predSpeed < predMaxDecel) { - // avoid discretization error at low speeds - predSpeed = 0; - } - if (predSpeed == 0) { - if (gap < 0.01) { - return 0; - } - return (SUMOReal)(-myTauDecel + sqrt(myTauDecel * myTauDecel + 2. * myDecel * gap)); - } - // follow the leader - // g=gap, t=myHeadwayTime, a=predMaxDecel, b=myDecel, v=predSpeed, x=vSafe - // Solution approach: equal distances after leader and follower have stopped (partly discretized). - // g + (v^2 - a*v)/(2*a) = x*t + (x^2 - b*x)/(2*b) + 0.5 - // The term (+ 0.5) gives an upper bound for the follower stopping distance to handle discretization errors. - // Unfortunately, the solution approach is not correct when b > a since the - // follower path may cross the leader path even with equal stopping distances. - // As a workaround we lower the value of b to get a collision free model - // This approach should be refined to get a higher (still safe) following speed. - const SUMOReal egoDecel = MIN2(myDecel, predMaxDecel); - const SUMOReal result = (SUMOReal)(0.5 * sqrt( - 4.0 * egoDecel * (2.0 * gap + predSpeed * predSpeed / predMaxDecel - predSpeed - 1.0) - + (egoDecel * (2.0 * myHeadwayTime - 1.0)) - * (egoDecel * (2.0 * myHeadwayTime - 1.0))) - + myDecel * (0.5 - myHeadwayTime)); - if (ISNAN(result)) { - return 0; - } else { - return result; - } -} - - MSCFModel* MSCFModel_Krauss::duplicate(const MSVehicleType* vtype) const { return new MSCFModel_Krauss(vtype, myAccel, myDecel, myDawdle, myHeadwayTime); } -//void MSCFModel::saveState(std::ostream &os) {} - +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Krauss.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Krauss.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Krauss.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Krauss.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 28 Jul 2009 -/// @version $Id: MSCFModel_Krauss.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_Krauss.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Krauss car-following model, with acceleration decrease and faster start /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -21,7 +21,7 @@ // /****************************************************************************/ #ifndef MSCFModel_Krauss_h -#define MSCFModel_Krauss_h +#define MSCFModel_Krauss_h // =========================================================================== // included modules @@ -61,27 +61,27 @@ /// @name Implementations of the MSCFModel interface /// @{ + /** @brief Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling) + * this uses the maximumSafeStopSpeed + * @param[in] veh The vehicle (EGO) + * @param[in] gap2pred The (netto) distance to the the obstacle + * @return EGO's safe speed for approaching a non-moving obstacle + * @todo generic Interface, models can call for the values they need + */ + SUMOReal stopSpeed(const MSVehicle* const veh, const SUMOReal speed, SUMOReal gap2pred) const; + + /** @brief Computes the vehicle's safe speed (no dawdling) + * this uses the maximumSafeFollowSpeed * @param[in] veh The vehicle (EGO) * @param[in] speed The vehicle's speed * @param[in] gap2pred The (netto) distance to the LEADER * @param[in] predSpeed The speed of LEADER * @return EGO's safe speed - * @see MSCFModel::ffeV */ SUMOReal followSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const; - /** @brief Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling) - * @param[in] veh The vehicle (EGO) - * @param[in] gap2pred The (netto) distance to the the obstacle - * @return EGO's safe speed for approaching a non-moving obstacle - * @see MSCFModel::ffeS - * @todo generic Interface, models can call for the values they need - */ - SUMOReal stopSpeed(const MSVehicle* const veh, const SUMOReal speed, SUMOReal gap2pred) const; - - /** @brief Returns the model's name * @return The model's name * @see MSCFModel::getModelName @@ -100,13 +100,6 @@ private: - /** @brief Returns the "safe" velocity - * @param[in] gap2pred The (netto) distance to the LEADER - * @param[in] predSpeed The LEADER's speed - * @return the safe velocity - */ - SUMOReal _vsafe(SUMOReal gap, SUMOReal predSpeed, SUMOReal predMaxDecel) const; - /** @brief Applies driver imperfection (dawdling / sigma) * @param[in] speed The speed with no dawdling @@ -116,5 +109,5 @@ }; -#endif /* MSCFMODEL_KRAUSS_H */ +#endif /* MSCFMODEL_KRAUSS_H */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussOrig1.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussOrig1.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussOrig1.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussOrig1.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Mon, 04 Aug 2009 -/// @version $Id: MSCFModel_KraussOrig1.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_KraussOrig1.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The original Krauss (1998) car-following model and parameter /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,7 +35,7 @@ #include #include #include "MSCFModel_KraussOrig1.h" -#include +#include #include @@ -73,14 +73,24 @@ SUMOReal -MSCFModel_KraussOrig1::followSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap, SUMOReal predSpeed, SUMOReal /*predMaxDecel*/) const { - return MIN2(_vsafe(gap, predSpeed), maxNextSpeed(speed, veh)); +MSCFModel_KraussOrig1::followSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap, SUMOReal predSpeed, SUMOReal predMaxDecel) const { + return MIN2(vsafe(gap, predSpeed, predMaxDecel), maxNextSpeed(speed, veh)); +} + + +SUMOReal +MSCFModel_KraussOrig1::insertionFollowSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const { + // since the Krauss model tries to compute the maximum follow speed in + // method followSpeed this is also used for insertionFollowSpeed + // (due to discretization error this may not always be the same value as + // returned by maximumSafeFollowSpeed) + return followSpeed(veh, speed, gap2pred, predSpeed, predMaxDecel); } SUMOReal MSCFModel_KraussOrig1::stopSpeed(const MSVehicle* const veh, const SUMOReal speed, SUMOReal gap) const { - return MIN2(_vsafe(gap, 0), maxNextSpeed(speed, veh)); + return MIN2(vsafe(gap, 0., 0.), maxNextSpeed(speed, veh)); } @@ -91,7 +101,7 @@ /** Returns the SK-vsafe. */ -SUMOReal MSCFModel_KraussOrig1::_vsafe(SUMOReal gap, SUMOReal predSpeed) const { +SUMOReal MSCFModel_KraussOrig1::vsafe(SUMOReal gap, SUMOReal predSpeed, SUMOReal /* predMaxDecel */) const { if (predSpeed == 0 && gap < 0.01) { return 0; } @@ -110,3 +120,6 @@ MSCFModel_KraussOrig1::duplicate(const MSVehicleType* vtype) const { return new MSCFModel_KraussOrig1(vtype, myAccel, myDecel, myDawdle, myHeadwayTime); } + + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussOrig1.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussOrig1.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussOrig1.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussOrig1.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 28 Jul 2009 -/// @version $Id: MSCFModel_KraussOrig1.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_KraussOrig1.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The original Krauss (1998) car-following model and parameter /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -21,7 +21,7 @@ // /****************************************************************************/ #ifndef MSCFModel_KraussOrig1_h -#define MSCFModel_KraussOrig1_h +#define MSCFModel_KraussOrig1_h // =========================================================================== // included modules @@ -77,7 +77,7 @@ * @return EGO's safe speed * @see MSCFModel::ffeV */ - virtual SUMOReal followSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const; + SUMOReal followSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const; /** @brief Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling) @@ -90,6 +90,21 @@ virtual SUMOReal stopSpeed(const MSVehicle* const veh, const SUMOReal speed, SUMOReal gap2pred) const; + /** @brief Computes the vehicle's safe speed (no dawdling) + * This method is used during the insertion stage. Whereas the method + * followSpeed returns the desired speed which may be lower than the safe + * speed, this method only considers safety constraints + * + * Returns the velocity of the vehicle in dependence to the vehicle's and its leader's values and the distance between them. + * @param[in] veh The vehicle (EGO) + * @param[in] speed The vehicle's speed + * @param[in] gap2pred The (netto) distance to the LEADER + * @param[in] predSpeed The speed of LEADER + * @return EGO's safe speed + */ + SUMOReal insertionFollowSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const; + + /** @brief Returns the model's name * @return The model's name * @see MSCFModel::getModelName @@ -148,9 +163,10 @@ /** @brief Returns the "safe" velocity * @param[in] gap2pred The (netto) distance to the LEADER * @param[in] predSpeed The LEADER's speed + * @param[in] predMaxDecel The LEADER's maximum deceleration * @return the safe velocity */ - virtual SUMOReal _vsafe(SUMOReal gap, SUMOReal predSpeed) const; + virtual SUMOReal vsafe(SUMOReal gap, SUMOReal predSpeed, SUMOReal predMaxDecel) const; /** @brief Applies driver imperfection (dawdling / sigma) @@ -167,5 +183,5 @@ SUMOReal myTauDecel; }; -#endif /* MSCFModel_KraussOrig1_H */ +#endif /* MSCFModel_KraussOrig1_H */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussPS.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussPS.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussPS.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussPS.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Mon, 04 Aug 2009 -/// @version $Id: MSCFModel_KraussPS.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_KraussPS.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Krauss car-following model, changing accel and speed by slope /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -54,10 +54,7 @@ SUMOReal MSCFModel_KraussPS::maxNextSpeed(SUMOReal speed, const MSVehicle* const veh) const { const SUMOReal gravity = 9.80665; - const MSLane* const lane = veh->getLane(); - const SUMOReal gp = lane->interpolateLanePosToGeometryPos(veh->getPositionOnLane()); - const SUMOReal slope = lane->getShape().slopeDegreeAtOffset(gp); - const SUMOReal aMax = MAX2(0., getMaxAccel() - gravity * sin(DEG2RAD(slope))); + const SUMOReal aMax = MAX2(0., getMaxAccel() - gravity * sin(DEG2RAD(veh->getSlope()))); // assuming drag force is proportional to the square of speed const SUMOReal vMax = sqrt(aMax / getMaxAccel()) * myType->getMaxSpeed(); return MIN2(speed + (SUMOReal) ACCEL2SPEED(aMax), vMax); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussPS.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussPS.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussPS.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_KraussPS.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 28 Jul 2009 -/// @version $Id: MSCFModel_KraussPS.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_KraussPS.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Krauss car-following model, changing accel and speed by slope /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -21,7 +21,7 @@ // /****************************************************************************/ #ifndef MSCFModel_KraussPS_h -#define MSCFModel_KraussPS_h +#define MSCFModel_KraussPS_h // =========================================================================== // included modules @@ -96,5 +96,5 @@ }; -#endif /* MSCFModel_KraussPS_H */ +#endif /* MSCFModel_KraussPS_H */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_PWag2009.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_PWag2009.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_PWag2009.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_PWag2009.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,15 +1,16 @@ /****************************************************************************/ /// @file MSCFModel_PWag2009.cpp +/// @author Peter Wagner /// @author Daniel Krajzewicz /// @author Laura Bieker /// @author Michael Behrisch /// @date 03.04.2010 -/// @version $Id: MSCFModel_PWag2009.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_PWag2009.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Scalable model based on Krauß by Peter Wagner /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -118,19 +119,19 @@ // return 0; // } // const SUMOReal vsafe = -myTauLastDecel + sqrt(myTauLastDecel * myTauLastDecel + predSpeed * predSpeed + 2.0 * myDecel * gap); -// const SUMOReal asafe = SPEED2ACCEL(vsafe - speed); +// const SUMOReal asafe = SPEED2ACCEL(vsafe - speed); // VehicleVariables* vars = (VehicleVariables*)veh->getCarFollowVariables(); -// SUMOReal apref = vars->aOld; -// if (apref <= asafe && RandHelper::rand() <= myActionPointProbability * TS) { -// apref = myDecelDivTau * (gap + (predSpeed - speed) * myHeadwayTime - speed * myHeadwayTime) / (speed + myTauDecel); -// if (apref>myAccel) -// apref = myAccel; -// if (apref<-myDecel) -// apref = -myDecel; -// apref += myDawdle * RandHelper::rand((SUMOReal) - 1., (SUMOReal)1.); -// } -// if (apref > asafe) -// apref = asafe; +// SUMOReal apref = vars->aOld; +// if (apref <= asafe && RandHelper::rand() <= myActionPointProbability * TS) { +// apref = myDecelDivTau * (gap + (predSpeed - speed) * myHeadwayTime - speed * myHeadwayTime) / (speed + myTauDecel); +// if (apref>myAccel) +// apref = myAccel; +// if (apref<-myDecel) +// apref = -myDecel; +// apref += myDawdle * RandHelper::rand((SUMOReal) - 1., (SUMOReal)1.); +// } +// if (apref > asafe) +// apref = asafe; // return MAX2((SUMOReal)0, vsafe+ACCEL2SPEED(apref)); //} // diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_PWag2009.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_PWag2009.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_PWag2009.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_PWag2009.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,14 +1,15 @@ /****************************************************************************/ /// @file MSCFModel_PWag2009.h +/// @author Peter Wagner /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 03.04.2010 -/// @version $Id: MSCFModel_PWag2009.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_PWag2009.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Scalable model based on Krauß by Peter Wagner /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -19,7 +20,7 @@ // /****************************************************************************/ #ifndef MSCFModel_PWag2009_h -#define MSCFModel_PWag2009_h +#define MSCFModel_PWag2009_h // =========================================================================== // included modules @@ -163,4 +164,4 @@ }; -#endif /* MSCFModel_PWag2009_H */ +#endif /* MSCFModel_PWag2009_H */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_SmartSK.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_SmartSK.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_SmartSK.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_SmartSK.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,16 @@ /****************************************************************************/ /// @file MSCFModel_SmartSK.cpp /// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @author Peter Wagner /// @date Tue, 05 Jun 2012 -/// @version $Id: MSCFModel_SmartSK.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_SmartSK.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A smarter SK /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -31,7 +34,7 @@ #include #include #include "MSCFModel_SmartSK.h" -#include +#include #include @@ -56,7 +59,7 @@ if (myS2Sspeed > 5.0) { myS2Sspeed = 5.0; } -// SUMOReal maxDeltaGap = -0.5*ACCEL2DIST(myDecel + myAccel); +// SUMOReal maxDeltaGap = -0.5*ACCEL2DIST(myDecel + myAccel); maxDeltaGap = -0.5 * (myDecel + myAccel) * TS * TS; std::cout << "# maxDeltaGap = " << maxDeltaGap << std::endl; myTmp2 = TS / myTmp2; @@ -102,7 +105,7 @@ MSCFModel_SmartSK::followSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap, SUMOReal predSpeed, SUMOReal /*predMaxDecel*/) const { SSKVehicleVariables* vars = (SSKVehicleVariables*)veh->getCarFollowVariables(); -// if (((gap - vars->gOld) < maxDeltaGap) && (speed>=5.0) && gap>=5.0) { +// if (((gap - vars->gOld) < maxDeltaGap) && (speed>=5.0) && gap>=5.0) { if ((gap - vars->gOld) < maxDeltaGap) { SUMOReal tTauTest = gap / speed; // allow headway only to decrease only, never to increase. Increase is handled automatically by the headway dynamics in moveHelper()!!! @@ -127,7 +130,7 @@ MSCFModel_SmartSK::stopSpeed(const MSVehicle* const veh, const SUMOReal speed, SUMOReal gap) const { SSKVehicleVariables* vars = (SSKVehicleVariables*)veh->getCarFollowVariables(); -// if (((gap - vars->gOld) < maxDeltaGap) && (speed>=5.0) && gap>=5.0) { +// if (((gap - vars->gOld) < maxDeltaGap) && (speed>=5.0) && gap>=5.0) { if ((gap - vars->gOld) < maxDeltaGap) { SUMOReal tTauTest = gap / speed; // allow headway only to decrease only, never to increase. Increase is handled automatically by the headway dynamics in moveHelper()!!! diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_SmartSK.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_SmartSK.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_SmartSK.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_SmartSK.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file MSCFModel_SmartSK.h /// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Peter Wagner /// @date Tue, 05 Jun 2012 -/// @version $Id: MSCFModel_SmartSK.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_SmartSK.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A smarter SK /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -18,7 +20,7 @@ // /****************************************************************************/ #ifndef MSCFModel_SmartSK_h -#define MSCFModel_SmartSK_h +#define MSCFModel_SmartSK_h // =========================================================================== // included modules @@ -201,5 +203,5 @@ }; -#endif /* MSCFModel_SmartSK_H */ +#endif /* MSCFModel_SmartSK_H */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Wiedemann.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Wiedemann.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Wiedemann.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Wiedemann.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,10 @@ /****************************************************************************/ /// @file MSCFModel_Wiedemann.cpp +/// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @author Michael Behrisch /// @date June 2011 -/// @version $Id: MSCFModel_Wiedemann.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_Wiedemann.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The psycho-physical model of Wiedemann // references: @@ -11,8 +12,8 @@ // Werner - Integration von Fahrzeugfolge- und Fahrstreifenwechselmodellen in die Nachtfahrsimulation LucidDrive // Olstam, Tapani - Comparison of Car-following models /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Wiedemann.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Wiedemann.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Wiedemann.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/cfmodels/MSCFModel_Wiedemann.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date June 2011 -/// @version $Id: MSCFModel_Wiedemann.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCFModel_Wiedemann.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The psycho-physical model of Wiedemann /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -19,7 +19,7 @@ // /****************************************************************************/ #ifndef MSCFModel_Wiedemann_H -#define MSCFModel_Wiedemann_H +#define MSCFModel_Wiedemann_H // =========================================================================== // included modules @@ -187,4 +187,4 @@ MSCFModel_Wiedemann& operator=(const MSCFModel_Wiedemann& s); }; -#endif /* MSCFModel_Wiedemann_H */ +#endif /* MSCFModel_Wiedemann_H */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -3,7 +3,8 @@ libmicrosimdevs_a_SOURCES = MSDevice.cpp MSDevice.h \ MSDevice_BTreceiver.cpp MSDevice_BTreceiver.h \ MSDevice_BTsender.cpp MSDevice_BTsender.h \ -MSDevice_HBEFA.cpp MSDevice_HBEFA.h \ +MSDevice_Container.cpp MSDevice_Container.h \ +MSDevice_Emissions.cpp MSDevice_Emissions.h \ MSDevice_Person.cpp MSDevice_Person.h \ MSDevice_Routing.cpp MSDevice_Routing.h \ MSDevice_Tripinfo.cpp MSDevice_Tripinfo.h \ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/microsim/devices -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,38 +92,99 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libmicrosimdevs_a_AR = $(AR) $(ARFLAGS) libmicrosimdevs_a_LIBADD = am_libmicrosimdevs_a_OBJECTS = MSDevice.$(OBJEXT) \ MSDevice_BTreceiver.$(OBJEXT) MSDevice_BTsender.$(OBJEXT) \ - MSDevice_HBEFA.$(OBJEXT) MSDevice_Person.$(OBJEXT) \ - MSDevice_Routing.$(OBJEXT) MSDevice_Tripinfo.$(OBJEXT) \ - MSDevice_Example.$(OBJEXT) MSDevice_Vehroutes.$(OBJEXT) + MSDevice_Container.$(OBJEXT) MSDevice_Emissions.$(OBJEXT) \ + MSDevice_Person.$(OBJEXT) MSDevice_Routing.$(OBJEXT) \ + MSDevice_Tripinfo.$(OBJEXT) MSDevice_Example.$(OBJEXT) \ + MSDevice_Vehroutes.$(OBJEXT) libmicrosimdevs_a_OBJECTS = $(am_libmicrosimdevs_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libmicrosimdevs_a_SOURCES) DIST_SOURCES = $(libmicrosimdevs_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -87,6 +193,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -113,9 +220,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -126,10 +237,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -227,7 +334,8 @@ libmicrosimdevs_a_SOURCES = MSDevice.cpp MSDevice.h \ MSDevice_BTreceiver.cpp MSDevice_BTreceiver.h \ MSDevice_BTsender.cpp MSDevice_BTsender.h \ -MSDevice_HBEFA.cpp MSDevice_HBEFA.h \ +MSDevice_Container.cpp MSDevice_Container.h \ +MSDevice_Emissions.cpp MSDevice_Emissions.h \ MSDevice_Person.cpp MSDevice_Person.h \ MSDevice_Routing.cpp MSDevice_Routing.h \ MSDevice_Tripinfo.cpp MSDevice_Tripinfo.h \ @@ -271,10 +379,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libmicrosimdevs.a: $(libmicrosimdevs_a_OBJECTS) $(libmicrosimdevs_a_DEPENDENCIES) - -rm -f libmicrosimdevs.a - $(libmicrosimdevs_a_AR) libmicrosimdevs.a $(libmicrosimdevs_a_OBJECTS) $(libmicrosimdevs_a_LIBADD) - $(RANLIB) libmicrosimdevs.a + +libmicrosimdevs.a: $(libmicrosimdevs_a_OBJECTS) $(libmicrosimdevs_a_DEPENDENCIES) $(EXTRA_libmicrosimdevs_a_DEPENDENCIES) + $(AM_V_at)-rm -f libmicrosimdevs.a + $(AM_V_AR)$(libmicrosimdevs_a_AR) libmicrosimdevs.a $(libmicrosimdevs_a_OBJECTS) $(libmicrosimdevs_a_LIBADD) + $(AM_V_at)$(RANLIB) libmicrosimdevs.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -285,33 +394,34 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_BTreceiver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_BTsender.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_Container.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_Emissions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_Example.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_HBEFA.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_Person.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_Routing.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_Tripinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDevice_Vehroutes.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -319,26 +429,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -350,15 +449,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -367,6 +462,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -415,10 +525,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -503,18 +618,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_BTreceiver.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_BTreceiver.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_BTreceiver.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_BTreceiver.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file MSDevice_BTreceiver.cpp /// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch /// @date 14.08.2013 -/// @version $Id: MSDevice_BTreceiver.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSDevice_BTreceiver.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // A BT sender /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -27,16 +29,20 @@ #include #endif -#include +#include #include #include -#include +#include +#include +#include +#include #include #include #include #include #include "MSDevice_Tripinfo.h" #include "MSDevice_BTreceiver.h" +#include "MSDevice_BTsender.h" #ifdef CHECK_MEMORY_LEAKS #include @@ -44,6 +50,16 @@ // =========================================================================== +// static members +// =========================================================================== +bool MSDevice_BTreceiver::myWasInitialised = false; +SUMOReal MSDevice_BTreceiver::myRange = -1.; +SUMOReal MSDevice_BTreceiver::myOffTime = -1.; +MTRand MSDevice_BTreceiver::sRecognitionRNG; +std::map MSDevice_BTreceiver::sVehicles; + + +// =========================================================================== // method definitions // =========================================================================== // --------------------------------------------------------------------------- @@ -51,12 +67,18 @@ // --------------------------------------------------------------------------- void MSDevice_BTreceiver::insertOptions(OptionsCont& oc) { - oc.addOptionSubTopic("Communication"); - insertDefaultAssignmentOptions("btreceiver", "Communication", oc); - oc.doRegister("device.btreceiver.range", new Option_String("0", "TIME")); - oc.addDescription("device.btreceiver.range", "Communication", "The period with which the vehicle shall be rerouted"); + oc.doRegister("device.btreceiver.range", new Option_Float(300)); + oc.addDescription("device.btreceiver.range", "Communication", "The range of the bt receiver"); + + oc.doRegister("device.btreceiver.all-recognitions", new Option_Bool(false)); + oc.addDescription("device.btreceiver.all-recognitions", "Communication", "Whether all recognition point shall be written"); + + oc.doRegister("device.btreceiver.offtime", new Option_Float(0.64)); + oc.addDescription("device.btreceiver.offtime", "Communication", "The offtime used for calculating detection probability (in seconds)"); + + myWasInitialised = false; } @@ -64,84 +86,367 @@ MSDevice_BTreceiver::buildVehicleDevices(SUMOVehicle& v, std::vector& into) { OptionsCont& oc = OptionsCont::getOptions(); if (equippedByDefaultAssignmentOptions(oc, "btreceiver", v)) { - MSDevice_BTreceiver* device = new MSDevice_BTreceiver(v, "btreceiver_" + v.getID(), oc.getFloat("device.btreceiver.range")); + MSDevice_BTreceiver* device = new MSDevice_BTreceiver(v, "btreceiver_" + v.getID()); into.push_back(device); + if (!myWasInitialised) { + new BTreceiverUpdate(); + myWasInitialised = true; + myRange = oc.getFloat("device.btreceiver.range"); + myOffTime = oc.getFloat("device.btreceiver.offtime"); + sRecognitionRNG.seed(oc.getInt("seed")); + } } } // --------------------------------------------------------------------------- -// MSDevice_BTreceiver-methods +// MSDevice_BTreceiver::BTreceiverUpdate-methods // --------------------------------------------------------------------------- -MSDevice_BTreceiver::MSDevice_BTreceiver(SUMOVehicle& holder, const std::string& id, SUMOReal range) - : MSDevice(holder, id), myRange(range) { +MSDevice_BTreceiver::BTreceiverUpdate::BTreceiverUpdate() { + MSNet::getInstance()->getEndOfTimestepEvents()->addEvent(this, 0, MSEventControl::ADAPT_AFTER_EXECUTION); } -MSDevice_BTreceiver::~MSDevice_BTreceiver() { +MSDevice_BTreceiver::BTreceiverUpdate::~BTreceiverUpdate() { + for (std::map::const_iterator i = MSDevice_BTsender::sVehicles.begin(); i != MSDevice_BTsender::sVehicles.end(); ++i) { + (*i).second->amOnNet = false; + (*i).second->haveArrived = true; + } + for (std::map::const_iterator i = MSDevice_BTreceiver::sVehicles.begin(); i != MSDevice_BTreceiver::sVehicles.end(); ++i) { + (*i).second->amOnNet = false; + (*i).second->haveArrived = true; + } + execute(MSNet::getInstance()->getCurrentTimeStep()); } -bool -MSDevice_BTreceiver::notifyMove(SUMOVehicle& veh, SUMOReal oldPos, - SUMOReal newPos, SUMOReal newSpeed) { - Position p = static_cast(veh).getPosition(); - // collect edges around - std::set tmp; - Named::StoringVisitor sv(tmp); - std::set inRange; - //!!!myObjects[CMD_GET_LANE_VARIABLE]->Search(cmin, cmax, sv); - - // check vehicles in range first; - // determine when they've entered range - for (std::set::const_iterator i = tmp.begin(); i != tmp.end(); ++i) { - MSLane* l = MSLane::dictionary(*i); - if (l == 0) { - continue; - } - - const MSLane::VehCont& vehs = l->getVehiclesSecure(); - for (MSLane::VehCont::const_iterator j = vehs.begin(); j != vehs.end(); ++j) { - if (static_cast(myHolder).getPosition().distanceTo((*j)->getPosition()) > myRange) { +SUMOTime +MSDevice_BTreceiver::BTreceiverUpdate::execute(SUMOTime /*currentTime*/) { + // build rtree with senders + NamedRTree rt; + for (std::map::const_iterator i = MSDevice_BTsender::sVehicles.begin(); i != MSDevice_BTsender::sVehicles.end(); ++i) { + MSDevice_BTsender::VehicleInformation* vi = (*i).second; + Boundary b = vi->getBoxBoundary(); + b.grow(POSITION_EPS); + const float cmin[2] = {(float) b.xmin(), (float) b.ymin()}; + const float cmax[2] = {(float) b.xmax(), (float) b.ymax()}; + rt.Insert(cmin, cmax, vi); + } + + // check visibility for all receivers + OptionsCont& oc = OptionsCont::getOptions(); + bool allRecognitions = oc.getBool("device.btreceiver.all-recognitions"); + bool haveOutput = oc.isSet("bt-output"); + for (std::map::iterator i = MSDevice_BTreceiver::sVehicles.begin(); i != MSDevice_BTreceiver::sVehicles.end();) { + // collect surrounding vehicles + MSDevice_BTreceiver::VehicleInformation* vi = (*i).second; + Boundary b = vi->getBoxBoundary(); + b.grow(vi->range); + const float cmin[2] = {(float) b.xmin(), (float) b.ymin()}; + const float cmax[2] = {(float) b.xmax(), (float) b.ymax()}; + std::set surroundingVehicles; + Named::StoringVisitor sv(surroundingVehicles); + rt.Search(cmin, cmax, sv); + + // loop over surrounding vehicles, check visibility status + for (std::set::const_iterator j = surroundingVehicles.begin(); j != surroundingVehicles.end(); ++j) { + if ((*i).first == *j) { + // seeing oneself? skip continue; } - // save, we have to investigate vehicles we do not see anymore - inRange.insert((*j)->getID()); - // add new vehicles to myCurrentlySeen - if (myCurrentlySeen.find((*j)->getID()) == myCurrentlySeen.end()) { - MeetingPoint mp(MSNet::getInstance()->getCurrentTimeStep(), - static_cast(myHolder).getPosition(), myHolder.getSpeed(), (*j)->getPosition(), (*j)->getSpeed()); - SeenDevice* sd = new SeenDevice(mp); - myCurrentlySeen[(*j)->getID()] = sd; + updateVisibility(*vi, *MSDevice_BTsender::sVehicles.find(*j)->second); + } + + if (vi->haveArrived) { + // vehicle has left the simulation; remove + if (haveOutput) { + writeOutput((*i).first, vi->seen, allRecognitions); } + delete vi; + MSDevice_BTreceiver::sVehicles.erase(i++); + } else { + // vehicle is still in the simulation; reset state + vi->updates.erase(vi->updates.begin(), vi->updates.end() - 1); + ++i; } - l->releaseVehicles(); } - // check vehicles that are not longer in range - // set their range exit information - for (std::map::const_iterator i = myCurrentlySeen.begin(); i != myCurrentlySeen.end(); ++i) { - if (inRange.find((*i).first) != inRange.end()) { - continue; + + // remove arrived senders / reset state + for (std::map::iterator i = MSDevice_BTsender::sVehicles.begin(); i != MSDevice_BTsender::sVehicles.end();) { + MSDevice_BTsender::VehicleInformation* vi = (*i).second; + if (vi->haveArrived) { + delete vi; + MSDevice_BTsender::sVehicles.erase(i++); + } else { + vi->updates.erase(vi->updates.begin(), vi->updates.end() - 1); + ++i; + } + } + return DELTA_T; +} + + +void +MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(MSDevice_BTreceiver::VehicleInformation& receiver, + MSDevice_BTsender::VehicleInformation& sender) { + const MSDevice_BTsender::VehicleState& receiverData = receiver.updates.back(); + const MSDevice_BTsender::VehicleState& senderData = sender.updates.back(); + if (!receiver.amOnNet || !sender.amOnNet) { + // at least one of the vehicles has left the simulation area for any reason + if (receiver.currentlySeen.find(sender.getID()) != receiver.currentlySeen.end()) { + leaveRange(receiver, receiverData, sender, senderData, 0); } - MSVehicle* v = static_cast(MSNet::getInstance()->getVehicleControl().getVehicle((*i).first)); - MeetingPoint mp(MSNet::getInstance()->getCurrentTimeStep(), - static_cast(myHolder).getPosition(), myHolder.getSpeed(), v->getPosition(), v->getSpeed()); - myCurrentlySeen[(*i).first]->meetingEnd = mp; - if (mySeen.find((*i).first) == mySeen.end()) { - mySeen[(*i).first] = std::vector(); + } + + const Position& oldReceiverPosition = receiver.updates.front().position; + const Position& oldSenderPosition = sender.updates.front().position; + + // let the other's current position be the one obtained by applying the relative direction vector to the initial position + const Position senderDelta = senderData.position - oldSenderPosition; + const Position receiverDelta = receiverData.position - oldReceiverPosition; + const Position translatedSender = senderData.position - receiverDelta; + // find crossing points + std::vector intersections; + GeomHelper::FindLineCircleIntersections(oldReceiverPosition, receiver.range, oldSenderPosition, translatedSender, intersections); + switch (intersections.size()) { + case 0: + // no intersections -> other vehicle either stays within or beyond range + if (receiver.amOnNet && sender.amOnNet && receiverData.position.distanceTo(senderData.position) < receiver.range) { + if (receiver.currentlySeen.find(sender.getID()) == receiver.currentlySeen.end()) { + enterRange(0., receiverData, sender.getID(), senderData, receiver.currentlySeen); + } else { + addRecognitionPoint(SIMTIME, receiverData, senderData, receiver.currentlySeen[sender.getID()]); + } + } else { + if (receiver.currentlySeen.find(sender.getID()) != receiver.currentlySeen.end()) { + leaveRange(receiver, receiverData, sender, senderData, 0.); + } + } + break; + case 1: { + // one intersection -> other vehicle either enters or leaves the range + MSDevice_BTsender::VehicleState intersection1ReceiverData(receiverData); + intersection1ReceiverData.position = oldReceiverPosition + receiverDelta * intersections.front(); + MSDevice_BTsender::VehicleState intersection1SenderData(senderData); + intersection1SenderData.position = oldSenderPosition + senderDelta * intersections.front(); + if (receiver.currentlySeen.find(sender.getID()) != receiver.currentlySeen.end()) { + leaveRange(receiver, intersection1ReceiverData, + sender, intersection1SenderData, (intersections.front() - 1.) * TS); + } else { + enterRange((intersections.front() - 1.) * TS, intersection1ReceiverData, + sender.getID(), intersection1SenderData, receiver.currentlySeen); + } } - mySeen[(*i).first].push_back(myCurrentlySeen[(*i).first]); - myCurrentlySeen.erase(myCurrentlySeen.find((*i).first)); + break; + case 2: + // two intersections -> other vehicle enters and leaves the range + if (receiver.currentlySeen.find(sender.getID()) == receiver.currentlySeen.end()) { + MSDevice_BTsender::VehicleState intersectionReceiverData(receiverData); + intersectionReceiverData.position = oldReceiverPosition + receiverDelta * intersections.front(); + MSDevice_BTsender::VehicleState intersectionSenderData(senderData); + intersectionSenderData.position = oldSenderPosition + senderDelta * intersections.front(); + enterRange((intersections.front() - 1.) * TS, intersectionReceiverData, + sender.getID(), intersectionSenderData, receiver.currentlySeen); + intersectionReceiverData.position = oldReceiverPosition + receiverDelta * intersections.back(); + intersectionSenderData.position = oldSenderPosition + senderDelta * intersections.back(); + leaveRange(receiver, intersectionReceiverData, + sender, intersectionSenderData, (intersections.back() - 1.) * TS); + } else { + WRITE_WARNING("The vehicle '" + sender.getID() + "' cannot be in the range of '" + receiver.getID() + "', leave, and enter it in one step."); + } + break; + default: + WRITE_WARNING("Nope, a circle cannot be crossed more often than twice by a line."); + break; } - return true; // keep the device } void -MSDevice_BTreceiver::generateOutput() const { +MSDevice_BTreceiver::BTreceiverUpdate::enterRange(SUMOReal atOffset, const MSDevice_BTsender::VehicleState& receiverState, + const std::string& senderID, const MSDevice_BTsender::VehicleState& senderState, + std::map& currentlySeen) { + MeetingPoint mp(SIMTIME + atOffset, receiverState, senderState); + SeenDevice* sd = new SeenDevice(mp); + currentlySeen[senderID] = sd; + addRecognitionPoint(SIMTIME, receiverState, senderState, sd); } +void +MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(VehicleInformation& receiverInfo, const MSDevice_BTsender::VehicleState& receiverState, + MSDevice_BTsender::VehicleInformation& senderInfo, const MSDevice_BTsender::VehicleState& senderState, + SUMOReal tOffset) { + std::map::iterator i = receiverInfo.currentlySeen.find(senderInfo.getID()); + // check whether the other was recognized + addRecognitionPoint(SIMTIME + tOffset, receiverState, senderState, i->second); + // build leaving point + i->second->meetingEnd = new MeetingPoint(STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + tOffset, receiverState, senderState); + ConstMSEdgeVector::const_iterator begin = receiverInfo.route.begin() + i->second->meetingBegin.observerState.routePos; + ConstMSEdgeVector::const_iterator end = receiverInfo.route.begin() + receiverState.routePos + 1; + i->second->receiverRoute = toString(begin, end); + begin = senderInfo.route.begin() + i->second->meetingBegin.seenState.routePos; + end = senderInfo.route.begin() + senderState.routePos + 1; + i->second->senderRoute = toString(begin, end); + receiverInfo.seen[senderInfo.getID()].push_back(i->second); + receiverInfo.currentlySeen.erase(i); +} + + +SUMOReal +MSDevice_BTreceiver::inquiryDelaySlots(const int backoffLimit) { + const int phaseOffset = sRecognitionRNG.randInt(2047); + const bool interlaced = sRecognitionRNG.rand() < 0.7; + const SUMOReal delaySlots = sRecognitionRNG.rand() * 15; + const int backoff = sRecognitionRNG.randInt(backoffLimit); + if (interlaced) { + return sRecognitionRNG.rand() * 31 + backoff; + } + if (sRecognitionRNG.randInt(31) < 16) { + // correct train for f0 + return delaySlots + backoff; + } + if (sRecognitionRNG.randInt(30) < 16) { + // correct train for f1 + return 2048 - phaseOffset + delaySlots + backoff; + } + if (sRecognitionRNG.randInt(29) < 16) { + // f2 is in train A but has overlap with both trains + if (2 * 2048 - phaseOffset + backoff < 4096) { + return 2 * 2048 - phaseOffset + delaySlots + backoff; + } + // the following is wrong but should only happen in about 3% of the non-interlaced cases + return 2 * 2048 - phaseOffset + delaySlots + backoff; + } + return 2 * 2048 + delaySlots + backoff; +} + + +void +MSDevice_BTreceiver::BTreceiverUpdate::addRecognitionPoint(const SUMOReal tEnd, const MSDevice_BTsender::VehicleState& receiverState, + const MSDevice_BTsender::VehicleState& senderState, + SeenDevice* senderDevice) const { + if (senderDevice->nextView == -1.) { + senderDevice->nextView = senderDevice->lastView + inquiryDelaySlots(int(myOffTime / 0.000625 + .5)) * 0.000625; + } + if (tEnd > senderDevice->nextView) { + senderDevice->lastView = senderDevice->nextView; + MeetingPoint* mp = new MeetingPoint(tEnd, receiverState, senderState); + senderDevice->recognitionPoints.push_back(mp); + senderDevice->nextView = senderDevice->lastView + inquiryDelaySlots(int(myOffTime / 0.000625 + .5)) * 0.000625; + } +} + + +void +MSDevice_BTreceiver::BTreceiverUpdate::writeOutput(const std::string& id, const std::map >& seen, bool allRecognitions) { + OutputDevice& os = OutputDevice::getDeviceByOption("bt-output"); + os.openTag("bt").writeAttr("id", id); + for (std::map >::const_iterator j = seen.begin(); j != seen.end(); ++j) { + const std::vector& sts = (*j).second; + for (std::vector::const_iterator k = sts.begin(); k != sts.end(); ++k) { + os.openTag("seen").writeAttr("id", (*j).first); + const MSDevice_BTsender::VehicleState& obsBeg = (*k)->meetingBegin.observerState; + const MSDevice_BTsender::VehicleState& seenBeg = (*k)->meetingBegin.seenState; + os.writeAttr("tBeg", (*k)->meetingBegin.t) + .writeAttr("observerPosBeg", obsBeg.position).writeAttr("observerSpeedBeg", obsBeg.speed) + .writeAttr("observerLaneIDBeg", obsBeg.laneID).writeAttr("observerLanePosBeg", obsBeg.lanePos) + .writeAttr("seenPosBeg", seenBeg.position).writeAttr("seenSpeedBeg", seenBeg.speed) + .writeAttr("seenLaneIDBeg", seenBeg.laneID).writeAttr("seenLanePosBeg", seenBeg.lanePos); + const MSDevice_BTsender::VehicleState& obsEnd = (*k)->meetingEnd->observerState; + const MSDevice_BTsender::VehicleState& seenEnd = (*k)->meetingEnd->seenState; + os.writeAttr("tEnd", (*k)->meetingEnd->t) + .writeAttr("observerPosEnd", obsEnd.position).writeAttr("observerSpeedEnd", obsEnd.speed) + .writeAttr("observerLaneIDEnd", obsEnd.laneID).writeAttr("observerLanePosEnd", obsEnd.lanePos) + .writeAttr("seenPosEnd", seenEnd.position).writeAttr("seenSpeedEnd", seenEnd.speed) + .writeAttr("seenLaneIDEnd", seenEnd.laneID).writeAttr("seenLanePosEnd", seenEnd.lanePos) + .writeAttr("observerRoute", (*k)->receiverRoute).writeAttr("seenRoute", (*k)->senderRoute); + for (std::vector::iterator l = (*k)->recognitionPoints.begin(); l != (*k)->recognitionPoints.end(); ++l) { + os.openTag("recognitionPoint").writeAttr("t", (*l)->t) + .writeAttr("observerPos", (*l)->observerState.position).writeAttr("observerSpeed", (*l)->observerState.speed) + .writeAttr("observerLaneID", (*l)->observerState.laneID).writeAttr("observerLanePos", (*l)->observerState.lanePos) + .writeAttr("seenPos", (*l)->seenState.position).writeAttr("seenSpeed", (*l)->seenState.speed) + .writeAttr("seenLaneID", (*l)->seenState.laneID).writeAttr("seenLanePos", (*l)->seenState.lanePos) + .closeTag(); + if (!allRecognitions) { + break; + } + } + os.closeTag(); + } + } + os.closeTag(); +} + + + + +// --------------------------------------------------------------------------- +// MSDevice_BTreceiver-methods +// --------------------------------------------------------------------------- +MSDevice_BTreceiver::MSDevice_BTreceiver(SUMOVehicle& holder, const std::string& id) + : MSDevice(holder, id) { +} + + +MSDevice_BTreceiver::~MSDevice_BTreceiver() { +} + + +bool +MSDevice_BTreceiver::notifyEnter(SUMOVehicle& veh, Notification reason) { + if (reason == MSMoveReminder::NOTIFICATION_DEPARTED && sVehicles.find(veh.getID()) == sVehicles.end()) { + sVehicles[veh.getID()] = new VehicleInformation(veh.getID(), myRange); + sVehicles[veh.getID()]->route.push_back(veh.getEdge()); + } + if (reason == MSMoveReminder::NOTIFICATION_TELEPORT && sVehicles.find(veh.getID()) != sVehicles.end()) { + sVehicles[veh.getID()]->amOnNet = true; + } + if (reason == MSMoveReminder::NOTIFICATION_TELEPORT || reason == MSMoveReminder::NOTIFICATION_JUNCTION) { + sVehicles[veh.getID()]->route.push_back(veh.getEdge()); + } + const MSVehicle& v = static_cast(veh); + sVehicles[veh.getID()]->updates.push_back(MSDevice_BTsender::VehicleState(veh.getSpeed(), veh.getPosition(), v.getLane()->getID(), veh.getPositionOnLane(), v.getRoutePosition())); + return true; +} + + +bool +MSDevice_BTreceiver::notifyMove(SUMOVehicle& veh, SUMOReal /* oldPos */, SUMOReal newPos, SUMOReal newSpeed) { + if (sVehicles.find(veh.getID()) == sVehicles.end()) { + WRITE_WARNING("btreceiver: Can not update position of a vehicle that is not within the road network (" + veh.getID() + ")."); + return true; + } + const MSVehicle& v = static_cast(veh); + sVehicles[veh.getID()]->updates.push_back(MSDevice_BTsender::VehicleState(newSpeed, veh.getPosition(), v.getLane()->getID(), newPos, v.getRoutePosition())); + return true; +} + + +bool +MSDevice_BTreceiver::notifyLeave(SUMOVehicle& veh, SUMOReal /* lastPos */, Notification reason) { + if (reason < MSMoveReminder::NOTIFICATION_TELEPORT) { + return true; + } + if (sVehicles.find(veh.getID()) == sVehicles.end()) { + WRITE_WARNING("btreceiver: Can not update position of a vehicle that is not within the road network (" + veh.getID() + ")."); + return true; + } + const MSVehicle& v = static_cast(veh); + sVehicles[veh.getID()]->updates.push_back(MSDevice_BTsender::VehicleState(veh.getSpeed(), veh.getPosition(), v.getLane()->getID(), veh.getPositionOnLane(), v.getRoutePosition())); + if (reason == MSMoveReminder::NOTIFICATION_TELEPORT) { + sVehicles[veh.getID()]->amOnNet = false; + } + if (reason >= MSMoveReminder::NOTIFICATION_ARRIVED) { + sVehicles[veh.getID()]->amOnNet = false; + sVehicles[veh.getID()]->haveArrived = true; + } + return true; +} + + + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_BTreceiver.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_BTreceiver.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_BTreceiver.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_BTreceiver.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file MSDevice_BTreceiver.h /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date 14.08.2013 -/// @version $Id: MSDevice_BTreceiver.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSDevice_BTreceiver.h 18095 2015-03-17 09:39:00Z behrisch $ /// -// A BT sender +// A BT receiver /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -31,7 +32,11 @@ #endif #include "MSDevice.h" +#include "MSDevice_BTsender.h" +#include #include +#include +#include // =========================================================================== @@ -45,118 +50,317 @@ // =========================================================================== /** * @class MSDevice_BTreceiver - * @brief A BT sender + * @brief A BT receiver * * @see MSDevice */ class MSDevice_BTreceiver : public MSDevice { public: /** @brief Inserts MSDevice_BTreceiver-options + * @param[filled] oc The options container to add the options to */ static void insertOptions(OptionsCont& oc); /** @brief Build devices for the given vehicle, if needed * - * The options are read and evaluated whether a example-device shall be built + * The options are read and evaluated whether a bt-receiver-device shall be built * for the given vehicle. * * The built device is stored in the given vector. * * @param[in] v The vehicle for which a device may be built - * @param[in, filled] into The vector to store the built device in + * @param[filled] into The vector to store the built device in */ static void buildVehicleDevices(SUMOVehicle& v, std::vector& into); + /** @brief Returns the configured range + * @return the device range + */ + static SUMOReal getRange() { + return myRange; + } + + + public: - /// @name Methods called on vehicle movement / state change, overwriting MSDevice + /// @brief Destructor. + ~MSDevice_BTreceiver(); + + + + /// @name Methods inherited from MSMoveReminder. /// @{ - /** @brief Checks for waiting steps when the vehicle moves + /** @brief Adds the vehicle to running vehicles if it (re-) enters the network + * + * @param[in] veh The entering vehicle. + * @param[in] reason how the vehicle enters the lane + * @return Always true + * @see MSMoveReminder::notifyEnter + * @see MSMoveReminder::Notification + */ + bool notifyEnter(SUMOVehicle& veh, Notification reason); + + + /** @brief Checks whether the reminder still has to be notified about the vehicle moves + * + * Indicator if the reminders is still active for the passed + * vehicle/parameters. If false, the vehicle will erase this reminder + * from it's reminder-container. * * @param[in] veh Vehicle that asks this reminder. * @param[in] oldPos Position before move. * @param[in] newPos Position after move with newSpeed. * @param[in] newSpeed Moving speed. * - * @return True (always). + * @return True if vehicle hasn't passed the reminder completely. */ - bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos, - SUMOReal newPos, SUMOReal newSpeed); - /// @} + bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed); - /** @brief Called on writing tripinfo output + /** @brief Moves (the known) vehicle from running to arrived vehicles' list * - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - * @see MSDevice::generateOutput + * @param[in] veh The leaving vehicle. + * @param[in] lastPos Position on the lane when leaving. + * @param[in] isArrival whether the vehicle arrived at its destination + * @param[in] isLaneChange whether the vehicle changed from the lane + * @see leaveDetectorByLaneChange + * @see MSMoveReminder + * @see MSMoveReminder::notifyLeave */ - void generateOutput() const; + bool notifyLeave(SUMOVehicle& veh, SUMOReal lastPos, Notification reason); + //@} - /// @brief Destructor. - ~MSDevice_BTreceiver(); + /** @class MeetingPoint + * @brief Holds the information about exact positions/speeds/time of the begin/end of a meeting + */ + class MeetingPoint { + public: + /** @brief Constructor + * @param[in] _t The time of the meeting + * @param[in] _observerState The position, speed, lane etc. the observer had at the time + * @param[in] _seenState The position, speed, lane etc. the seen vehicle had at the time + */ + MeetingPoint(SUMOReal _t, const MSDevice_BTsender::VehicleState& _observerState, + const MSDevice_BTsender::VehicleState& _seenState) + : t(_t), observerState(_observerState), seenState(_seenState) {} + + /// @brief Destructor + ~MeetingPoint() {} -private: + public: + /// @brief The time of the meeting + const SUMOReal t; + /// @brief The state the observer had at the time + const MSDevice_BTsender::VehicleState observerState; + /// @brief The state the seen vehicle had at the time + const MSDevice_BTsender::VehicleState seenState; + + private: + /// @brief Invalidated assignment operator. + MeetingPoint& operator=(const MeetingPoint&); + + }; + + + + /** @class SeenDevice + * @brief Class representing a single seen device + */ + class SeenDevice { + public: + /** @brief Constructor + * @param[in] meetingBegin_ Description of the meeting's begin + */ + SeenDevice(const MeetingPoint& meetingBegin_) + : meetingBegin(meetingBegin_), meetingEnd(0), lastView(meetingBegin_.t), nextView(-1.) {} + + /// @brief Destructor + ~SeenDevice() { + delete meetingEnd; + for (std::vector::iterator i = recognitionPoints.begin(); i != recognitionPoints.end(); ++i) { + delete *i; + } + recognitionPoints.clear(); + } + + + public: + /// @brief Description of the meeting's begin + const MeetingPoint meetingBegin; + /// @brief Description of the meeting's end + MeetingPoint* meetingEnd; + /// @brief Last recognition point + SUMOReal lastView; + /// @brief Next possible recognition point + SUMOReal nextView; + /// @brief List of recognition points + std::vector recognitionPoints; + /// @brief string of travelled receiver edges + std::string receiverRoute; + /// @brief string of travelled sender edges + std::string senderRoute; + + private: + /// @brief Invalidated assignment operator. + SeenDevice& operator=(const SeenDevice&); + + }; + + + + /** @brief Clears the given containers deleting the stored items + * @param[in] c The currently seen container to clear + * @param[in] s The seen container to clear + */ + static void cleanUp(std::map& c, std::map >& s); + + + +protected: /** @brief Constructor * * @param[in] holder The vehicle that holds this device * @param[in] id The ID of the device */ - MSDevice_BTreceiver(SUMOVehicle& holder, const std::string& id, SUMOReal range); + MSDevice_BTreceiver(SUMOVehicle& holder, const std::string& id); + private: + /// @brief Whether the bt-system was already initialised + static bool myWasInitialised; + /// @brief The range of the device - SUMOReal myRange; + static SUMOReal myRange; + /// @brief The offtime of the device + static SUMOReal myOffTime; - class MeetingPoint { + + /** @class VehicleInformation + * @brief Stores the information of a vehicle + */ + class VehicleInformation : public MSDevice_BTsender::VehicleInformation { public: - MeetingPoint(SUMOTime t_, const Position& observerPos_, SUMOReal observerSpeed_, - const Position& seenPos_, SUMOReal seenSpeed_) - : t(t_), observerPos(observerPos_), observerSpeed(observerSpeed_), - seenPos(seenPos_), seenSpeed(seenSpeed_) {} + /** @brief Constructor + * @param[in] id The id of the vehicle + * @param[in] range Recognition range of the vehicle + */ + VehicleInformation(const std::string& id, const SUMOReal _range) : MSDevice_BTsender::VehicleInformation(id), range(_range) {} - ~MeetingPoint() {} + /// @brief Destructor + ~VehicleInformation() {} + + /// @brief Recognition range of the vehicle + const SUMOReal range; + + /// @brief The map of devices seen by the vehicle at removal time + std::map currentlySeen; + + /// @brief The past episodes of removed vehicle + std::map > seen; + + private: + /// @brief Invalidated copy constructor. + VehicleInformation(const VehicleInformation&); + + /// @brief Invalidated assignment operator. + VehicleInformation& operator=(const VehicleInformation&); - public: - SUMOTime t; - Position observerPos; - SUMOReal observerSpeed; - Position seenPos; - SUMOReal seenSpeed; }; - /** @class SeenDevice - * @brief Class representing a single seen device + + + /** @class BTreceiverUpdate + * @brief A global update performer */ - class SeenDevice { + class BTreceiverUpdate : public Command { public: - /** @brief Constructor - * @param[in] tBegin_ The first time the device was seen - * @param[in] observerPos_ The position of the observer at tBegin - * @param[in] observerSpeed_ The speed of the observer at tBegin - * @param[in] seenPos_ The position of the seen device at tBegin - * @param[in] seenSpeed_ The position of the seen device at tBegin + /// @brief Constructor + BTreceiverUpdate(); + + /// @brief Destructor + ~BTreceiverUpdate(); + + /** @brief Performs the update + * @param[in] currentTime The current simulation time + * @return Always DELTA_T - the time to being called back */ - SeenDevice(const MeetingPoint& meetingBegin_) - : meetingBegin(meetingBegin_), meetingEnd(meetingBegin_) {} + SUMOTime execute(SUMOTime currentTime); + + + /** @brief Rechecks the visibility for a given receiver/sender pair + * @param[in] receiver Definition of the receiver vehicle + * @param[in] sender Definition of the sender vehicle + */ + void updateVisibility(VehicleInformation& receiver, MSDevice_BTsender::VehicleInformation& sender); + + + /** @brief Informs the receiver about a sender entering it's radius + * @param[in] atOffset The time offset to the current time step + * @param[in] receiverState The position, speed, lane etc. the observer had at the time + * @param[in] senderID The ID of the entering sender + * @param[in] senderState The position, speed, lane etc. the seen vehicle had at the time + * @param[in] currentlySeen The container storing episodes + */ + void enterRange(SUMOReal atOffset, const MSDevice_BTsender::VehicleState& receiverState, + const std::string& senderID, const MSDevice_BTsender::VehicleState& senderState, + std::map& currentlySeen); + + + /** @brief Removes the sender from the currently seen devices to past episodes + * @param[in] receiverInfo The static information of the observer (id, route, etc.) + * @param[in] receiverState The position, speed, lane etc. the observer had at the time + * @param[in] senderInfo The static information of the seen vehicle (id, route, etc.) + * @param[in] senderState The position, speed, lane etc. the seen vehicle had at the time + * @param[in] tOffset The time offset to the current time step + */ + void leaveRange(VehicleInformation& receiverInfo, const MSDevice_BTsender::VehicleState& receiverState, + MSDevice_BTsender::VehicleInformation& senderInfo, const MSDevice_BTsender::VehicleState& senderState, + SUMOReal tOffset); + + + + + /** @brief Adds a point of recognition + * @param[in] tEnd The time of the recognition + * @param[in] receiverState The position, speed, lane etc. the observer had at the time + * @param[in] senderState The position, speed, lane etc. the seen vehicle had at the time + * @param[in] senderDevice The device of the entering sender + */ + void addRecognitionPoint(const SUMOReal tEnd, const MSDevice_BTsender::VehicleState& receiverState, + const MSDevice_BTsender::VehicleState& senderState, + SeenDevice* senderDevice) const; + + + /** @brief Writes the output + * @param[in] id The id of the receiver + * @param[in] seen The information about seen senders + * @param[in] allRecognitions Whether all recognitions shall be written + */ + void writeOutput(const std::string& id, const std::map >& seen, + bool allRecognitions); + - ~SeenDevice() {} - public: - MeetingPoint meetingBegin; - MeetingPoint meetingEnd; }; - std::map myCurrentlySeen; - std::map > mySeen; + static SUMOReal inquiryDelaySlots(const int backoffLimit); + + /// @brief A random number generator used to determine whether the opposite was recognized + static MTRand sRecognitionRNG; + + /// @brief The list of arrived receivers + static std::map sVehicles; + + private: /// @brief Invalidated copy constructor. @@ -168,7 +372,6 @@ }; - #endif /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_BTsender.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_BTsender.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_BTsender.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_BTsender.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file MSDevice_BTsender.cpp /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date 14.08.2013 -/// @version $Id: MSDevice_BTsender.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSDevice_BTsender.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A BT sender /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -30,13 +31,14 @@ #include #include #include -#include +#include #include #include #include #include #include "MSDevice_Tripinfo.h" #include "MSDevice_BTsender.h" +#include "MSDevice_BTreceiver.h" #ifdef CHECK_MEMORY_LEAKS #include @@ -44,6 +46,12 @@ // =========================================================================== +// static members +// =========================================================================== +std::map MSDevice_BTsender::sVehicles; + + +// =========================================================================== // method definitions // =========================================================================== // --------------------------------------------------------------------------- @@ -51,15 +59,13 @@ // --------------------------------------------------------------------------- void MSDevice_BTsender::insertOptions(OptionsCont& oc) { - oc.addOptionSubTopic("Communication"); insertDefaultAssignmentOptions("btsender", "Communication", oc); } void MSDevice_BTsender::buildVehicleDevices(SUMOVehicle& v, std::vector& into) { - OptionsCont& oc = OptionsCont::getOptions(); - if (equippedByDefaultAssignmentOptions(oc, "btsender", v)) { + if (equippedByDefaultAssignmentOptions(OptionsCont::getOptions(), "btsender", v)) { MSDevice_BTsender* device = new MSDevice_BTsender(v, "btsender_" + v.getID()); into.push_back(device); } @@ -70,7 +76,7 @@ // MSDevice_BTsender-methods // --------------------------------------------------------------------------- MSDevice_BTsender::MSDevice_BTsender(SUMOVehicle& holder, const std::string& id) - : MSDevice(holder, id), myReportRoute(false) { + : MSDevice(holder, id) { } @@ -78,18 +84,57 @@ } -void -MSDevice_BTsender::generateOutput() const { - if (myReportRoute) { - OutputDevice& os = OutputDevice::getDeviceByOption("bt-output"); - os.openTag("found"); - os.writeAttr("id", myHolder.getID()); - os.writeAttr("route", myHolder.getRoute().getEdges()); - os.closeTag(); +bool +MSDevice_BTsender::notifyEnter(SUMOVehicle& veh, Notification reason) { + if (reason == MSMoveReminder::NOTIFICATION_DEPARTED && sVehicles.find(veh.getID()) == sVehicles.end()) { + sVehicles[veh.getID()] = new VehicleInformation(veh.getID()); + sVehicles[veh.getID()]->route.push_back(veh.getEdge()); } + if (reason == MSMoveReminder::NOTIFICATION_TELEPORT && sVehicles.find(veh.getID()) != sVehicles.end()) { + sVehicles[veh.getID()]->amOnNet = true; + } + if (reason == MSMoveReminder::NOTIFICATION_TELEPORT || reason == MSMoveReminder::NOTIFICATION_JUNCTION) { + sVehicles[veh.getID()]->route.push_back(veh.getEdge()); + } + const MSVehicle& v = static_cast(veh); + sVehicles[veh.getID()]->updates.push_back(VehicleState(veh.getSpeed(), veh.getPosition(), v.getLane()->getID(), veh.getPositionOnLane(), v.getRoutePosition())); + return true; } +bool +MSDevice_BTsender::notifyMove(SUMOVehicle& veh, SUMOReal /* oldPos */, SUMOReal newPos, SUMOReal newSpeed) { + if (sVehicles.find(veh.getID()) == sVehicles.end()) { + WRITE_WARNING("btsender: Can not update position of a vehicle that is not within the road network (" + veh.getID() + ")."); + return true; + } + const MSVehicle& v = static_cast(veh); + sVehicles[veh.getID()]->updates.push_back(VehicleState(newSpeed, veh.getPosition(), v.getLane()->getID(), newPos, v.getRoutePosition())); + return true; +} + + +bool +MSDevice_BTsender::notifyLeave(SUMOVehicle& veh, SUMOReal /* lastPos */, Notification reason) { + if (reason < MSMoveReminder::NOTIFICATION_TELEPORT) { + return true; + } + if (sVehicles.find(veh.getID()) == sVehicles.end()) { + WRITE_WARNING("btsender: Can not update position of a vehicle that is not within the road network (" + veh.getID() + ")."); + return true; + } + const MSVehicle& v = static_cast(veh); + sVehicles[veh.getID()]->updates.push_back(VehicleState(veh.getSpeed(), veh.getPosition(), v.getLane()->getID(), veh.getPositionOnLane(), v.getRoutePosition())); + if (reason >= MSMoveReminder::NOTIFICATION_TELEPORT) { + sVehicles[veh.getID()]->amOnNet = false; + } + if (reason >= MSMoveReminder::NOTIFICATION_ARRIVED) { + sVehicles[veh.getID()]->amOnNet = false; + sVehicles[veh.getID()]->haveArrived = true; + } + return true; +} + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_BTsender.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_BTsender.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_BTsender.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_BTsender.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file MSDevice_BTsender.h /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date 14.08.2013 -/// @version $Id: MSDevice_BTsender.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSDevice_BTsender.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A BT sender /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -30,14 +31,19 @@ #include #endif +#include +#include #include "MSDevice.h" #include +#include + // =========================================================================== // class declarations // =========================================================================== class SUMOVehicle; + // =========================================================================== // class definitions // =========================================================================== @@ -50,42 +56,151 @@ class MSDevice_BTsender : public MSDevice { public: /** @brief Inserts MSDevice_BTsender-options + * @param[filled] oc The options container to add the options to */ static void insertOptions(OptionsCont& oc); /** @brief Build devices for the given vehicle, if needed * - * The options are read and evaluated whether a example-device shall be built + * The options are read and evaluated whether a bt-sender-device shall be built * for the given vehicle. * * The built device is stored in the given vector. * * @param[in] v The vehicle for which a device may be built - * @param[in, filled] into The vector to store the built device in + * @param[filled] into The vector to store the built device in */ static void buildVehicleDevices(SUMOVehicle& v, std::vector& into); + /// for accessing the maps of running/arrived vehicles + friend class MSDevice_BTreceiver; + + + public: - /** @brief Called on writing tripinfo output + /// @brief Destructor. + ~MSDevice_BTsender(); + + + + /// @name Methods inherited from MSMoveReminder. + /// @{ + + /** @brief Adds the vehicle to running vehicles if it (re-) enters the network * - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - * @see MSDevice::generateOutput + * @param[in] veh The entering vehicle. + * @param[in] reason how the vehicle enters the lane + * @return Always true + * @see MSMoveReminder::notifyEnter + * @see MSMoveReminder::Notification */ - void generateOutput() const; + bool notifyEnter(SUMOVehicle& veh, Notification reason); - /// @brief Destructor. - ~MSDevice_BTsender(); + /** @brief Checks whether the reminder still has to be notified about the vehicle moves + * + * Indicator if the reminders is still active for the passed + * vehicle/parameters. If false, the vehicle will erase this reminder + * from it's reminder-container. + * + * @param[in] veh Vehicle that asks this reminder. + * @param[in] oldPos Position before move. + * @param[in] newPos Position after move with newSpeed. + * @param[in] newSpeed Moving speed. + * + * @return True if vehicle hasn't passed the reminder completely. + */ + bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed); - /** @brief Says the device the holder shall report his route + /** @brief Moves (the known) vehicle from running to arrived vehicles' list + * + * @param[in] veh The leaving vehicle. + * @param[in] lastPos Position on the lane when leaving. + * @param[in] isArrival whether the vehicle arrived at its destination + * @param[in] isLaneChange whether the vehicle changed from the lane + * @see leaveDetectorByLaneChange + * @see MSMoveReminder + * @see MSMoveReminder::notifyLeave + */ + bool notifyLeave(SUMOVehicle& veh, SUMOReal lastPos, Notification reason); + /// @} + + + + /** @class VehicleState + * @brief A single movement state of the vehicle */ - void reportRoute() { - myReportRoute = true; - } + class VehicleState { + public: + /** @brief Constructor + * @param[in] _speed The speed of the vehicle + * @param[in] _position The position of the vehicle + * @param[in] _laneID The id of the lane the vehicle is located at + * @param[in] _lanePos The position of the vehicle along the lane + */ + VehicleState(const SUMOReal _speed, const Position& _position, const std::string& _laneID, + const SUMOReal _lanePos, const unsigned int _routePos) + : speed(_speed), position(_position), laneID(_laneID), lanePos(_lanePos), routePos(_routePos) {} + + /// @brief Destructor + ~VehicleState() {} + + /// @brief The speed of the vehicle + SUMOReal speed; + /// @brief The position of the vehicle + Position position; + /// @brief The lane the vehicle was at + std::string laneID; + /// @brief The position at the lane of the vehicle + SUMOReal lanePos; + /// @brief The position in the route of the vehicle + unsigned int routePos; + + }; + + + + /** @class VehicleInformation + * @brief Stores the information of a vehicle + */ + class VehicleInformation : public Named { + public: + /** @brief Constructor + * @param[in] id The id of the vehicle + */ + VehicleInformation(const std::string& id) : Named(id), amOnNet(true), haveArrived(false) {} + + /// @brief Destructor + ~VehicleInformation() {} + + /** @brief Returns the boundary of passed positions + * @return The positions boundary + */ + Boundary getBoxBoundary() const { + Boundary ret; + for (std::vector::const_iterator i = updates.begin(); i != updates.end(); ++i) { + ret.add((*i).position); + } + return ret; + } + + /// @brief List of position updates during last step + std::vector updates; + + /// @brief Whether the vehicle is within the simulated network + bool amOnNet; + + /// @brief Whether the vehicle was removed from the simulation + bool haveArrived; + + /// @brief List of edges travelled + ConstMSEdgeVector route; + + }; + private: @@ -97,9 +212,11 @@ MSDevice_BTsender(SUMOVehicle& holder, const std::string& id); -private: - /// @brief Whether the vehicle shall report it's route - bool myReportRoute; + +protected: + /// @brief The list of arrived senders + static std::map sVehicles; + private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Container.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Container.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Container.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Container.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,135 @@ +/****************************************************************************/ +/// @file MSDevice_Container.cpp +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Mon, 16 Jun 2014 +/// @version $Id: MSDevice_Container.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// A device which is used to keep track of containers riding with a vehicle +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifdef _MSC_VER +#include +#else +#include +#endif + +//#include +#include +//#include +#include +#include +#include +#include +#include "MSDevice_Container.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +// --------------------------------------------------------------------------- +// static initialisation methods +// --------------------------------------------------------------------------- +MSDevice_Container* +MSDevice_Container::buildVehicleDevices(SUMOVehicle& v, std::vector& into) { + MSDevice_Container* device = new MSDevice_Container(v, "container_" + v.getID()); + into.push_back(device); + return device; +} + + +// --------------------------------------------------------------------------- +// MSDevice_Container-methods +// --------------------------------------------------------------------------- +MSDevice_Container::MSDevice_Container(SUMOVehicle& holder, const std::string& id) + : MSDevice(holder, id), myContainers(), myStopped(holder.isStopped()) { +} + + +MSDevice_Container::~MSDevice_Container() { +} + + +bool +MSDevice_Container::notifyMove(SUMOVehicle& veh, SUMOReal /*oldPos*/, SUMOReal /*newPos*/, SUMOReal /*newSpeed*/) { + if (myStopped) { + // if veh is not anymore at the stop + if (!veh.isStopped()) { + for (std::vector::iterator i = myContainers.begin(); i != myContainers.end(); ++i) { + (*i)->setDeparted(MSNet::getInstance()->getCurrentTimeStep()); + } + myStopped = false; + } + } else { + if (veh.isStopped()) { + for (std::vector::iterator i = myContainers.begin(); i != myContainers.end();) { + MSContainer* container = *i; + if (&(container->getDestination()) == veh.getEdge()) { + if (!container->proceed(MSNet::getInstance(), MSNet::getInstance()->getCurrentTimeStep())) { + MSNet::getInstance()->getContainerControl().erase(container); + } + i = myContainers.erase(i); + } else { + ++i; + } + } + myStopped = true; + } + } + return true; +} + + +bool +MSDevice_Container::notifyEnter(SUMOVehicle& /*veh*/, MSMoveReminder::Notification reason) { + if (reason == MSMoveReminder::NOTIFICATION_DEPARTED) { + for (std::vector::iterator i = myContainers.begin(); i != myContainers.end(); ++i) { + (*i)->setDeparted(MSNet::getInstance()->getCurrentTimeStep()); + } + } + return true; +} + + +bool +MSDevice_Container::notifyLeave(SUMOVehicle& veh, SUMOReal /*lastPos*/, + MSMoveReminder::Notification reason) { + if (reason >= MSMoveReminder::NOTIFICATION_ARRIVED) { + for (std::vector::iterator i = myContainers.begin(); i != myContainers.end(); ++i) { + MSContainer* container = *i; + if (&(container->getDestination()) != veh.getEdge()) { + WRITE_WARNING("Teleporting container '" + container->getID() + + "' from vehicle destination '" + veh.getEdge()->getID() + + "' to intended destination '" + container->getDestination().getID() + "'"); + } + if (!container->proceed(MSNet::getInstance(), MSNet::getInstance()->getCurrentTimeStep())) { + MSNet::getInstance()->getContainerControl().erase(container); + }; + } + } + return true; +} + + +void +MSDevice_Container::addContainer(MSContainer* container) { + myContainers.push_back(container); +} + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Container.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Container.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Container.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Container.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,172 @@ +/****************************************************************************/ +/// @file MSDevice_Container.h +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Mon, 16 Jun 2014 +/// @version $Id: MSDevice_Container.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A device which is used to keep track of containers riding with a vehicle +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSDevice_Container_h +#define MSDevice_Container_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +//#include +#include +//#include +#include "MSDevice.h" +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class MSLane; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSDevice_Container + * @see MSDevice + */ +class MSDevice_Container : public MSDevice { +public: + /** @brief Build devices for the given vehicle, if needed + * + * The built device is stored in the given vector. + * + * @param[in] v The vehicle for which a device may be built + * @param[filled] into The vector to store the built device in + */ + static MSDevice_Container* buildVehicleDevices(SUMOVehicle& v, std::vector& into); + + + +public: + /// @brief Destructor. + ~MSDevice_Container(); + + + /// @name Methods called on vehicle movement / state change, overwriting MSDevice + /// @{ + + /** @brief Checks whether the vehicle is at a stop and container action is needed. + * @param[in] veh The regarded vehicle + * @param[in] oldPos Position before the move-micro-timestep. + * @param[in] newPos Position after the move-micro-timestep. + * @param[in] newSpeed The vehicle's current speed + * @return false, if the vehicle is beyond the lane, true otherwise + * @see MSMoveReminder + * @see MSMoveReminder::notifyMove + */ + bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed); + + + /** @brief Adds containers on vehicle insertion + * + * @param[in] veh The entering vehicle. + * @param[in] reason how the vehicle enters the lane + * @return Always true + * @see MSMoveReminder::notifyEnter + * @see MSMoveReminder::Notification + */ + bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason); + + + /** @brief Containers leaving on arrival + * + * @param[in] veh The leaving vehicle. + * @param[in] lastPos Position on the lane when leaving. + * @param[in] isArrival whether the vehicle arrived at its destination + * @param[in] isLaneChange whether the vehicle changed from the lane + * + * @return True if it did not leave the net. + */ + bool notifyLeave(SUMOVehicle& veh, SUMOReal lastPos, + MSMoveReminder::Notification reason); + /// @} + + + + /** @brief Add a container + * + * @param[in] container The container to add. + */ + void addContainer(MSContainer* container); + + + /** @brief Return the number of containers + * @return The number of stored containers + */ + unsigned int size() const { + return static_cast(myContainers.size()); + } + + + /** @brief Returns the list of containers using this vehicle + * @return Containers within this vehicle + */ + const std::vector& getContainers() const { + return myContainers; + } + + + +private: + /** @brief Constructor + * + * @param[in] holder The vehicle that holds this device + * @param[in] id The ID of the device + */ + MSDevice_Container(SUMOVehicle& holder, const std::string& id); + + + +private: + /// @brief The containers of the vehicle + std::vector myContainers; + + /// @brief Whether the vehicle is at a stop + bool myStopped; + + + +private: + /// @brief Invalidated copy constructor. + MSDevice_Container(const MSDevice_Container&); + + /// @brief Invalidated assignment operator. + MSDevice_Container& operator=(const MSDevice_Container&); + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file MSDevice.cpp /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date 14.08.2013 -/// @version $Id: MSDevice.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSDevice.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Abstract in-vehicle device /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -28,14 +29,18 @@ #endif #include +#include #include #include "MSDevice.h" -#include -#include -#include -#include -#include -#include +#include "MSDevice_Vehroutes.h" +#include "MSDevice_Tripinfo.h" +#include "MSDevice_Routing.h" +#include "MSDevice_Person.h" +#include "MSDevice_Container.h" +#include "MSDevice_Emissions.h" +#include "MSDevice_BTreceiver.h" +#include "MSDevice_BTsender.h" +#include "MSDevice_Example.h" #ifdef CHECK_MEMORY_LEAKS #include @@ -57,7 +62,9 @@ void MSDevice::insertOptions(OptionsCont& oc) { MSDevice_Routing::insertOptions(oc); - MSDevice_HBEFA::insertOptions(oc); + MSDevice_Emissions::insertOptions(); + MSDevice_BTreceiver::insertOptions(oc); + MSDevice_BTsender::insertOptions(oc); MSDevice_Example::insertOptions(oc); } @@ -67,7 +74,9 @@ MSDevice_Vehroutes::buildVehicleDevices(v, into); MSDevice_Tripinfo::buildVehicleDevices(v, into); MSDevice_Routing::buildVehicleDevices(v, into); - MSDevice_HBEFA::buildVehicleDevices(v, into); + MSDevice_Emissions::buildVehicleDevices(v, into); + MSDevice_BTreceiver::buildVehicleDevices(v, into); + MSDevice_BTsender::buildVehicleDevices(v, into); MSDevice_Example::buildVehicleDevices(v, into); } @@ -91,7 +100,7 @@ // assignment by number bool haveByNumber = false; if (oc.exists("device." + deviceName + ".deterministic") && oc.getBool("device." + deviceName + ".deterministic")) { - haveByNumber = MSNet::getInstance()->getVehicleControl().isInQuota(oc.getFloat("device." + deviceName + ".probability")); + haveByNumber = MSNet::getInstance()->getVehicleControl().getQuota(oc.getFloat("device." + deviceName + ".probability")) == 1; } else { if (oc.exists("device." + deviceName + ".probability") && oc.getFloat("device." + deviceName + ".probability") != 0) { haveByNumber = RandHelper::rand() <= oc.getFloat("device." + deviceName + ".probability"); @@ -107,7 +116,14 @@ } haveByName = myExplicitIDs[deviceName].count(v.getID()) > 0; } - return haveByNumber || haveByName; + // assignment by abstract parameters + bool haveByParameter = false; + if (v.getParameter().knowsParameter("has." + deviceName + ".device")) { + haveByParameter = TplConvert::_2bool(v.getParameter().getParameter("has." + deviceName + ".device", "false").c_str()); + } else { + haveByParameter = TplConvert::_2bool(v.getVehicleType().getParameter().getParameter("has." + deviceName + ".device", "false").c_str()); + } + return haveByNumber || haveByName || haveByParameter; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Emissions.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Emissions.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Emissions.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Emissions.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,107 @@ +/****************************************************************************/ +/// @file MSDevice_Emissions.cpp +/// @author Daniel Krajzewicz +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date Fri, 30.01.2009 +/// @version $Id: MSDevice_Emissions.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A device which collects vehicular emissions +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include "MSDevice_Emissions.h" +#include +#include +#include +#include +#include +#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +// --------------------------------------------------------------------------- +// static initialisation methods +// --------------------------------------------------------------------------- +void +MSDevice_Emissions::insertOptions() { + insertDefaultAssignmentOptions("emissions", "Emissions", OptionsCont::getOptions()); +} + + +void +MSDevice_Emissions::buildVehicleDevices(SUMOVehicle& v, std::vector& into) { + if (equippedByDefaultAssignmentOptions(OptionsCont::getOptions(), "emissions", v)) { + // build the device + MSDevice_Emissions* device = new MSDevice_Emissions(v, "emissions_" + v.getID()); + into.push_back(device); + } +} + + +// --------------------------------------------------------------------------- +// MSDevice_Emissions-methods +// --------------------------------------------------------------------------- +MSDevice_Emissions::MSDevice_Emissions(SUMOVehicle& holder, const std::string& id) + : MSDevice(holder, id), myEmissions() { +} + + +MSDevice_Emissions::~MSDevice_Emissions() { +} + + +bool +MSDevice_Emissions::notifyMove(SUMOVehicle& veh, SUMOReal /*oldPos*/, SUMOReal /*newPos*/, SUMOReal newSpeed) { + const SUMOEmissionClass c = veh.getVehicleType().getEmissionClass(); + const SUMOReal a = veh.getAcceleration(); + const SUMOReal slope = veh.getSlope(); + myEmissions.addScaled(PollutantsInterface::computeAll(c, newSpeed, a, slope), TS); + return true; +} + + +void +MSDevice_Emissions::generateOutput() const { + if (OptionsCont::getOptions().isSet("tripinfo-output")) { + OutputDevice& os = OutputDevice::getDeviceByOption("tripinfo-output"); + (os.openTag("emissions") << + " CO_abs=\"" << OutputDevice::realString(myEmissions.CO, 6) << + "\" CO2_abs=\"" << OutputDevice::realString(myEmissions.CO2, 6) << + "\" HC_abs=\"" << OutputDevice::realString(myEmissions.HC, 6) << + "\" PMx_abs=\"" << OutputDevice::realString(myEmissions.PMx, 6) << + "\" NOx_abs=\"" << OutputDevice::realString(myEmissions.NOx, 6) << + "\" fuel_abs=\"" << OutputDevice::realString(myEmissions.fuel, 6) << + "\"").closeTag(); + } +} + + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Emissions.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Emissions.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Emissions.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Emissions.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,150 @@ +/****************************************************************************/ +/// @file MSDevice_Emissions.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Fri, 30.01.2009 +/// @version $Id: MSDevice_Emissions.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A device which collects vehicular emissions +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSDevice_Emissions_h +#define MSDevice_Emissions_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include "MSDevice.h" + + +// =========================================================================== +// class declarations +// =========================================================================== +class MSLane; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSDevice_Emissions + * @brief A device which collects vehicular emissions + * + * Each device collects the vehicular emissions / fuel consumption by being + * called each time step, computing the current values using + * PollutantsInterface, and aggregating them into internal storages over + * the complete journey. + * + * @see MSDevice + * @see PollutantsInterface + */ +class MSDevice_Emissions : public MSDevice { +public: + /** @brief Inserts MSDevice_Emissions-options + */ + static void insertOptions(); + + + /** @brief Build devices for the given vehicle, if needed + * + * The options are read and evaluated whether emissions-devices shall be built + * for the given vehicle. + * + * For each seen vehicle, the global vehicle index is increased. + * + * The built device is stored in the given vector. + * + * @param[in] v The vehicle for which a device may be built + * @param[in, filled] into The vector to store the built device in + */ + static void buildVehicleDevices(SUMOVehicle& v, std::vector& into); + + +public: + /// @name Methods called on vehicle movement / state change, overwriting MSDevice + /// @{ + + /** @brief Computes current emission values and adds them to their sums + * + * The vehicle's current emission values + * are computed using the current velocity and acceleration. + * + * @param[in] veh The regarded vehicle + * @param[in] oldPos Position before the move-micro-timestep. + * @param[in] newPos Position after the move-micro-timestep. + * @param[in] newSpeed The vehicle's current speed + * @return false, if the vehicle is beyond the lane, true otherwise + * @see MSMoveReminder + * @see MSMoveReminder::notifyMove + * @see PollutantsInterface + */ + bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed); + /// @} + + + /** @brief Called on writing tripinfo output + * + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + * @see MSDevice::tripInfoOutput + */ + void generateOutput() const; + + + /// @brief Destructor. + ~MSDevice_Emissions(); + + +private: + /** @brief Constructor + * + * @param[in] holder The vehicle that holds this device + * @param[in] id The ID of the device + */ + MSDevice_Emissions(SUMOVehicle& holder, const std::string& id); + + +private: + /// @brief Internal storages for pollutant/fuel sum in mg or ml + PollutantsInterface::Emissions myEmissions; + + +private: + /// @brief Invalidated copy constructor. + MSDevice_Emissions(const MSDevice_Emissions&); + + /// @brief Invalidated assignment operator. + MSDevice_Emissions& operator=(const MSDevice_Emissions&); + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Example.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Example.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Example.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Example.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file MSDevice_Example.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @author Jakob Erdmann /// @date 11.06.2013 -/// @version $Id: MSDevice_Example.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSDevice_Example.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A device which stands as an implementation example and which outputs movereminder calls /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -30,7 +32,7 @@ #include #include #include -#include +#include #include #include #include @@ -121,7 +123,7 @@ SUMOReal /* newPos */, SUMOReal newSpeed) { std::cout << "device '" << getID() << "' notifyMove: newSpeed=" << newSpeed << "\n"; // check whether another device is present on the vehicle: - MSDevice_Tripinfo* otherDevice = static_cast(veh.getDevice(MSDevice_Tripinfo::getTypeInfo())); + MSDevice_Tripinfo* otherDevice = static_cast(veh.getDevice(typeid(MSDevice_Tripinfo))); if (otherDevice != 0) { std::cout << " veh '" << veh.getID() << " has device '" << otherDevice->getID() << "'\n"; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Example.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Example.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Example.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Example.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file MSDevice_Example.cpp +/// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @date 11.06.2013 -/// @version $Id: MSDevice_Example.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSDevice_Example.h 17235 2014-11-03 10:53:02Z behrisch $ /// // A device which stands as an implementation example and which outputs movereminder calls /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 200132014 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -67,16 +68,18 @@ * The built device is stored in the given vector. * * @param[in] v The vehicle for which a device may be built - * @param[in, filled] into The vector to store the built device in + * @param[filled] into The vector to store the built device in */ static void buildVehicleDevices(SUMOVehicle& v, std::vector& into); + public: /// @brief Destructor. ~MSDevice_Example(); + /// @name Methods called on vehicle movement / state change, overwriting MSDevice /// @{ @@ -117,6 +120,7 @@ /// @} + /** @brief Called on writing tripinfo output * * @param[in] os The stream to write the information into @@ -126,6 +130,7 @@ void generateOutput() const; + private: /** @brief Constructor * @@ -136,17 +141,21 @@ SUMOReal customValue2, SUMOReal customValue3); + private: // private state members of the Example device /// @brief a value which is initialised based on a commandline/configuration option SUMOReal myCustomValue1; + /// @brief a value which is initialised based on a vehicle parameter SUMOReal myCustomValue2; + /// @brief a value which is initialised based on a vType parameter SUMOReal myCustomValue3; + private: /// @brief Invalidated copy constructor. MSDevice_Example(const MSDevice_Example&); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file MSDevice.h /// @author Michael Behrisch /// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @date Tue, 04 Dec 2007 -/// @version $Id: MSDevice.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSDevice.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Abstract in-vehicle device /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -76,11 +77,12 @@ /** @brief Build devices for the given vehicle, if needed * * @param[in] v The vehicle for which a device may be built - * @param[in, filled] into The vector to store the built device in + * @param[filled] into The vector to store the built device in */ static void buildVehicleDevices(SUMOVehicle& v, std::vector& into); + public: /** @brief Constructor * diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_HBEFA.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_HBEFA.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_HBEFA.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_HBEFA.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -/****************************************************************************/ -/// @file MSDevice_HBEFA.cpp -/// @author Daniel Krajzewicz -/// @author Laura Bieker -/// @author Michael Behrisch -/// @date Fri, 30.01.2009 -/// @version $Id: MSDevice_HBEFA.cpp 14494 2013-08-24 21:47:48Z behrisch $ -/// -// A device which collects vehicular emissions (using HBEFA-reformulation) -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include "MSDevice_HBEFA.h" -#include -#include -#include -#include -#include -#include - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// method definitions -// =========================================================================== -// --------------------------------------------------------------------------- -// static initialisation methods -// --------------------------------------------------------------------------- -void -MSDevice_HBEFA::insertOptions(OptionsCont& oc) { - insertDefaultAssignmentOptions("hbefa", "Emissions", oc); -} - - -void -MSDevice_HBEFA::buildVehicleDevices(SUMOVehicle& v, std::vector& into) { - OptionsCont& oc = OptionsCont::getOptions(); - // route computation is enabled - if (equippedByDefaultAssignmentOptions(oc, "hbefa", v)) { - // build the device - MSDevice_HBEFA* device = new MSDevice_HBEFA(v, "hbefa_" + v.getID()); - into.push_back(device); - } -} - - -// --------------------------------------------------------------------------- -// MSDevice_HBEFA-methods -// --------------------------------------------------------------------------- -MSDevice_HBEFA::MSDevice_HBEFA(SUMOVehicle& holder, const std::string& id) - : MSDevice(holder, id), - myCO2(0), myCO(0), myHC(0), myPMx(0), myNOx(0), myFuel(0) { -} - - -MSDevice_HBEFA::~MSDevice_HBEFA() { -} - - -bool -MSDevice_HBEFA::notifyMove(SUMOVehicle& veh, SUMOReal /*oldPos*/, SUMOReal /*newPos*/, SUMOReal newSpeed) { - const SUMOEmissionClass c = veh.getVehicleType().getEmissionClass(); - const SUMOReal a = veh.getAcceleration(); - myCO2 += TS * HelpersHBEFA::computeCO2(c, newSpeed, a); - myCO += TS * HelpersHBEFA::computeCO(c, newSpeed, a); - myHC += TS * HelpersHBEFA::computeHC(c, newSpeed, a); - myPMx += TS * HelpersHBEFA::computePMx(c, newSpeed, a); - myNOx += TS * HelpersHBEFA::computeNOx(c, newSpeed, a); - myFuel += TS * HelpersHBEFA::computeFuel(c, newSpeed, a); - return true; -} - - -void -MSDevice_HBEFA::generateOutput() const { - if (OptionsCont::getOptions().isSet("tripinfo-output")) { - OutputDevice& os = OutputDevice::getDeviceByOption("tripinfo-output"); - (os.openTag("emissions") << - " CO_abs=\"" << OutputDevice::realString(myCO, 6) << - "\" CO2_abs=\"" << OutputDevice::realString(myCO2, 6) << - "\" HC_abs=\"" << OutputDevice::realString(myHC, 6) << - "\" PMx_abs=\"" << OutputDevice::realString(myPMx, 6) << - "\" NOx_abs=\"" << OutputDevice::realString(myNOx, 6) << - "\" fuel_abs=\"" << OutputDevice::realString(myFuel, 6) << - "\"").closeTag(); - } -} - - - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_HBEFA.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_HBEFA.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_HBEFA.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_HBEFA.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,154 +0,0 @@ -/****************************************************************************/ -/// @file MSDevice_HBEFA.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date Fri, 30.01.2009 -/// @version $Id: MSDevice_HBEFA.h 14494 2013-08-24 21:47:48Z behrisch $ -/// -// A device which collects vehicular emissions (using HBEFA-reformulation) -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef MSDevice_HBEFA_h -#define MSDevice_HBEFA_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include "MSDevice.h" -#include -#include -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class MSLane; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class MSDevice_HBEFA - * @brief A device which collects vehicular emissions (using HBEFA-reformulation) - * - * Each device collects the vehicular emissions / fuel consumption by being - * called each time step, computing the current values using HelpersHBEFA, and - * aggregating them into internal storages over the whol journey. - * - * @see MSDevice - * @see HelpersHBEFA - */ -class MSDevice_HBEFA : public MSDevice { -public: - /** @brief Inserts MSDevice_HBEFA-options - * @param[filled] oc The options container to add the options to - */ - static void insertOptions(OptionsCont& oc); - - - /** @brief Build devices for the given vehicle, if needed - * - * The options are read and evaluated whether hbefa-devices shall be built - * for the given vehicle. - * - * For each seen vehicle, the global vehicle index is increased. - * - * The built device is stored in the given vector. - * - * @param[in] v The vehicle for which a device may be built - * @param[in, filled] into The vector to store the built device in - */ - static void buildVehicleDevices(SUMOVehicle& v, std::vector& into); - - -public: - /// @brief Destructor. - ~MSDevice_HBEFA(); - - - - /// @name Methods called on vehicle movement / state change, overwriting MSDevice - /// @{ - - /** @brief Computes current emission values and adds them to their sums - * - * The vehicle's current emission values - * are computed using the current velocity and acceleration. - * - * @param[in] veh The regarded vehicle - * @param[in] oldPos Position before the move-micro-timestep. - * @param[in] newPos Position after the move-micro-timestep. - * @param[in] newSpeed The vehicle's current speed - * @return false, if the vehicle is beyond the lane, true otherwise - * @see MSMoveReminder - * @see MSMoveReminder::notifyMove - * @see HelpersHBEFA - */ - bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed); - /// @} - - - - /** @brief Called on writing tripinfo output - * - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - * @see MSDevice::tripInfoOutput - */ - void generateOutput() const; - - -private: - /** @brief Constructor - * - * @param[in] holder The vehicle that holds this device - * @param[in] id The ID of the device - */ - MSDevice_HBEFA(SUMOVehicle& holder, const std::string& id); - - -private: - /// @name Internal storages for pollutant/fuel sum in mg or ml - /// @{ - - SUMOReal myCO2, myCO, myHC, myPMx, myNOx, myFuel; - /// @} - - -private: - /// @brief Invalidated copy constructor. - MSDevice_HBEFA(const MSDevice_HBEFA&); - - /// @brief Invalidated assignment operator. - MSDevice_HBEFA& operator=(const MSDevice_HBEFA&); - - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Person.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Person.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Person.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Person.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Fri, 30.01.2009 -/// @version $Id: MSDevice_Person.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSDevice_Person.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A device which is used to keep track of Persons riding with a vehicle /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include "MSDevice_Person.h" diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Person.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Person.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Person.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Person.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Fri, 30.01.2009 -/// @version $Id: MSDevice_Person.h 14471 2013-08-22 10:32:01Z dkrajzew $ +/// @version $Id: MSDevice_Person.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A device which is used to keep track of Persons riding with a vehicle /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -61,11 +61,12 @@ * The built device is stored in the given vector. * * @param[in] v The vehicle for which a device may be built - * @param[in, filled] into The vector to store the built device in + * @param[filled] into The vector to store the built device in */ static MSDevice_Person* buildVehicleDevices(SUMOVehicle& v, std::vector& into); + public: /// @brief Destructor. ~MSDevice_Person(); @@ -82,7 +83,6 @@ * @return false, if the vehicle is beyond the lane, true otherwise * @see MSMoveReminder * @see MSMoveReminder::notifyMove - * @see HelpersHBEFA */ bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed); @@ -136,6 +136,7 @@ } + private: /** @brief Constructor * diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Routing.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Routing.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Routing.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Routing.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,14 @@ /// @author Daniel Krajzewicz /// @author Laura Bieker /// @author Christoph Sommer +/// @author Jakob Erdmann /// @date Tue, 04 Dec 2007 -/// @version $Id: MSDevice_Routing.cpp 14505 2013-08-27 13:09:23Z dkrajzew $ +/// @version $Id: MSDevice_Routing.cpp 18103 2015-03-18 12:05:24Z namdre $ /// // A device that performs vehicle rerouting based on current edge speeds /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,11 +36,15 @@ #include #include #include +#include #include #include #include -#include -#include +#include +#include +#include +#include +#include #ifdef CHECK_MEMORY_LEAKS #include @@ -49,13 +54,18 @@ // =========================================================================== // static member variables // =========================================================================== -std::map MSDevice_Routing::myEdgeEfforts; +std::vector MSDevice_Routing::myEdgeEfforts; Command* MSDevice_Routing::myEdgeWeightSettingCommand = 0; SUMOReal MSDevice_Routing::myAdaptationWeight; -SUMOTime MSDevice_Routing::myAdaptationInterval; +SUMOTime MSDevice_Routing::myAdaptationInterval = -1; +SUMOTime MSDevice_Routing::myLastAdaptation = -1; bool MSDevice_Routing::myWithTaz; std::map, const MSRoute*> MSDevice_Routing::myCachedRoutes; SUMOAbstractRouter* MSDevice_Routing::myRouter = 0; +SUMOReal MSDevice_Routing::myRandomizeWeightsFactor = 0; +#ifdef HAVE_FOX +FXWorkerThread::Pool MSDevice_Routing::myThreadPool; +#endif // =========================================================================== @@ -66,34 +76,47 @@ // --------------------------------------------------------------------------- void MSDevice_Routing::insertOptions(OptionsCont& oc) { - oc.addOptionSubTopic("Routing"); insertDefaultAssignmentOptions("rerouting", "Routing", oc); oc.doRegister("device.rerouting.period", new Option_String("0", "TIME")); oc.addSynonyme("device.rerouting.period", "device.routing.period", true); oc.addDescription("device.rerouting.period", "Routing", "The period with which the vehicle shall be rerouted"); - oc.doRegister("device.rerouting.pre-period", new Option_String("0", "TIME")); + oc.doRegister("device.rerouting.pre-period", new Option_String("1", "TIME")); oc.addSynonyme("device.rerouting.pre-period", "device.routing.pre-period", true); oc.addDescription("device.rerouting.pre-period", "Routing", "The rerouting period before depart"); oc.doRegister("device.rerouting.adaptation-weight", new Option_Float(.5)); oc.addSynonyme("device.rerouting.adaptation-weight", "device.routing.adaptation-weight", true); - oc.addDescription("device.rerouting.adaptation-weight", "Routing", "The weight of prior edge weights."); + oc.addDescription("device.rerouting.adaptation-weight", "Routing", "The weight of prior edge weights"); oc.doRegister("device.rerouting.adaptation-interval", new Option_String("1", "TIME")); oc.addSynonyme("device.rerouting.adaptation-interval", "device.routing.adaptation-interval", true); - oc.addDescription("device.rerouting.adaptation-interval", "Routing", "The interval for updating the edge weights."); + oc.addDescription("device.rerouting.adaptation-interval", "Routing", "The interval for updating the edge weights"); oc.doRegister("device.rerouting.with-taz", new Option_Bool(false)); oc.addSynonyme("device.rerouting.with-taz", "device.routing.with-taz", true); + oc.addSynonyme("device.rerouting.with-taz", "with-taz"); oc.addDescription("device.rerouting.with-taz", "Routing", "Use zones (districts) as routing end points"); oc.doRegister("device.rerouting.init-with-loaded-weights", new Option_Bool(false)); oc.addDescription("device.rerouting.init-with-loaded-weights", "Routing", "Use given weight files for initializing edge weights"); + oc.doRegister("device.rerouting.shortest-path-file", new Option_FileName()); + oc.addDescription("device.rerouting.shortest-path-file", "Routing", "Initialize lookup table for astar from the given distance matrix"); + +#ifdef HAVE_FOX + oc.doRegister("device.rerouting.threads", new Option_Integer(0)); + oc.addDescription("device.rerouting.threads", "Routing", "The number of parallel execution threads used for rerouting"); +#endif + + oc.doRegister("device.rerouting.output", new Option_FileName()); + oc.addDescription("device.rerouting.output", "Routing", "Save adapting weights to FILE"); + myEdgeWeightSettingCommand = 0; myEdgeEfforts.clear(); + myAdaptationInterval = -1; + myLastAdaptation = -1; } @@ -101,50 +124,58 @@ MSDevice_Routing::buildVehicleDevices(SUMOVehicle& v, std::vector& into) { bool needRerouting = v.getParameter().wasSet(VEHPARS_FORCE_REROUTE); OptionsCont& oc = OptionsCont::getOptions(); - if(!needRerouting && oc.getFloat("device.rerouting.probability") == 0 && !oc.isSet("device.rerouting.explicit")) { + if (!needRerouting && oc.getFloat("device.rerouting.probability") == 0 && !oc.isSet("device.rerouting.explicit")) { // no route computation is modelled return; } needRerouting |= equippedByDefaultAssignmentOptions(OptionsCont::getOptions(), "rerouting", v); - if(needRerouting) { + if (needRerouting) { // route computation is enabled myWithTaz = oc.getBool("device.rerouting.with-taz"); - // build the device - MSDevice_Routing* device = new MSDevice_Routing(v, "routing_" + v.getID(), - string2time(oc.getString("device.rerouting.period")), - string2time(oc.getString("device.rerouting.pre-period"))); - into.push_back(device); + const SUMOTime period = string2time(oc.getString("device.rerouting.period")); + const SUMOTime prePeriod = string2time(oc.getString("device.rerouting.pre-period")); // initialise edge efforts if not done before if (myEdgeEfforts.size() == 0) { - const std::vector& edges = MSNet::getInstance()->getEdgeControl().getEdges(); + const MSEdgeVector& edges = MSNet::getInstance()->getEdgeControl().getEdges(); const bool useLoaded = oc.getBool("device.rerouting.init-with-loaded-weights"); - const SUMOReal currentSecond = STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()); - for (std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + const SUMOReal currentSecond = SIMTIME; + for (MSEdgeVector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + while ((*i)->getNumericalID() >= (int)myEdgeEfforts.size()) { + myEdgeEfforts.push_back(0); + } if (useLoaded) { - myEdgeEfforts[*i] = MSNet::getTravelTime(*i, 0, currentSecond); + myEdgeEfforts[(*i)->getNumericalID()] = MSNet::getTravelTime(*i, 0, currentSecond); } else { - myEdgeEfforts[*i] = (*i)->getCurrentTravelTime(); + myEdgeEfforts[(*i)->getNumericalID()] = (*i)->getCurrentTravelTime(); } } + myLastAdaptation = MSNet::getInstance()->getCurrentTimeStep(); + myRandomizeWeightsFactor = oc.isSet("weights.random-factor") ? oc.getFloat("weights.random-factor") : 1; + if (myRandomizeWeightsFactor < 1) { + WRITE_ERROR("weights.random-factor cannot be less than 1"); + } } // make the weights be updated - if (myEdgeWeightSettingCommand == 0) { - myEdgeWeightSettingCommand = new StaticCommand< MSDevice_Routing >(&MSDevice_Routing::adaptEdgeEfforts); - MSNet::getInstance()->getEndOfTimestepEvents().addEvent( - myEdgeWeightSettingCommand, 0, MSEventControl::ADAPT_AFTER_EXECUTION); - myAdaptationWeight = oc.getFloat("device.rerouting.adaptation-weight"); + if (myAdaptationInterval == -1) { myAdaptationInterval = string2time(oc.getString("device.rerouting.adaptation-interval")); - } - if (myWithTaz) { - if (MSEdge::dictionary(v.getParameter().fromTaz + "-source") == 0) { - WRITE_ERROR("Source district '" + v.getParameter().fromTaz + "' not known when rerouting '" + v.getID() + "'!"); - return; + if (myAdaptationInterval < 0) { + WRITE_ERROR("Negative value for device.rerouting.adaptation-interval!"); + } + myAdaptationWeight = oc.getFloat("device.rerouting.adaptation-weight"); + if (myAdaptationWeight < 0. || myAdaptationWeight > 1.) { + WRITE_ERROR("The value for device.rerouting.adaptation-weight must be between 0 and 1!"); } - if (MSEdge::dictionary(v.getParameter().toTaz + "-sink") == 0) { - WRITE_ERROR("Destination district '" + v.getParameter().toTaz + "' not known when rerouting '" + v.getID() + "'!"); - return; + if (myAdaptationWeight < 1. && myAdaptationInterval > 0) { + myEdgeWeightSettingCommand = new StaticCommand(&MSDevice_Routing::adaptEdgeEfforts); + MSNet::getInstance()->getEndOfTimestepEvents()->addEvent( + myEdgeWeightSettingCommand, 0, MSEventControl::ADAPT_AFTER_EXECUTION); + } else if (period > 0) { + WRITE_WARNING("Rerouting is useless if the edge weights do not get updated!"); } + OutputDevice::createDeviceByOption("device.rerouting.output", "weights", "meandata_file.xsd"); } + // build the device + into.push_back(new MSDevice_Routing(v, "routing_" + v.getID(), period, prePeriod)); } } @@ -154,19 +185,20 @@ // --------------------------------------------------------------------------- MSDevice_Routing::MSDevice_Routing(SUMOVehicle& holder, const std::string& id, SUMOTime period, SUMOTime preInsertionPeriod) - : MSDevice(holder, id), myPeriod(period), myPreInsertionPeriod(preInsertionPeriod), myRerouteCommand(0) { - if (myWithTaz) { - myRerouteCommand = new WrappingCommand< MSDevice_Routing >(this, &MSDevice_Routing::preInsertionReroute); - MSNet::getInstance()->getInsertionEvents().addEvent( - myRerouteCommand, holder.getParameter().depart, - MSEventControl::ADAPT_AFTER_EXECUTION); - } + : MSDevice(holder, id), myPeriod(period), myPreInsertionPeriod(preInsertionPeriod), myLastRouting(-1), mySkipRouting(-1), myRerouteCommand(0) { + // we do always a pre insertion reroute to fill the best lanes of the vehicle with somehow meaningful values (especially for deaprtLane="best") + myRerouteCommand = new WrappingCommand(this, &MSDevice_Routing::preInsertionReroute); + // if we don't update the edge weights, we might as well reroute now and hopefully use our threads better + const SUMOTime execTime = myEdgeWeightSettingCommand == 0 ? 0 : holder.getParameter().depart; + MSNet::getInstance()->getInsertionEvents()->addEvent( + myRerouteCommand, execTime, + MSEventControl::ADAPT_AFTER_EXECUTION); } MSDevice_Routing::~MSDevice_Routing() { // make the rerouting command invalid if there is one - if (myRerouteCommand != 0) { + if (myRerouteCommand != 0 && MSNet::getInstance()->getInsertionEvents() != 0) { myRerouteCommand->deschedule(); } } @@ -175,19 +207,15 @@ bool MSDevice_Routing::notifyEnter(SUMOVehicle& /*veh*/, MSMoveReminder::Notification reason) { if (reason == MSMoveReminder::NOTIFICATION_DEPARTED) { - if (myRerouteCommand != 0) { // clean up pre depart rerouting - if (myPreInsertionPeriod > 0) { - myRerouteCommand->deschedule(); - } - myRerouteCommand = 0; - } - if (!myWithTaz) { - wrappedRerouteCommandExecute(MSNet::getInstance()->getCurrentTimeStep()); + // clean up pre depart rerouting + if (myPreInsertionPeriod > 0) { + myRerouteCommand->deschedule(); } + myRerouteCommand = 0; // build repetition trigger if routing shall be done more often if (myPeriod > 0) { - myRerouteCommand = new WrappingCommand< MSDevice_Routing >(this, &MSDevice_Routing::wrappedRerouteCommandExecute); - MSNet::getInstance()->getBeginOfTimestepEvents().addEvent( + myRerouteCommand = new WrappingCommand(this, &MSDevice_Routing::wrappedRerouteCommandExecute); + MSNet::getInstance()->getBeginOfTimestepEvents()->addEvent( myRerouteCommand, myPeriod + MSNet::getInstance()->getCurrentTimeStep(), MSEventControl::ADAPT_AFTER_EXECUTION); } @@ -197,79 +225,207 @@ SUMOTime -MSDevice_Routing::preInsertionReroute(SUMOTime currentTime) { - const MSEdge* source = MSEdge::dictionary(myHolder.getParameter().fromTaz + "-source"); - const MSEdge* dest = MSEdge::dictionary(myHolder.getParameter().toTaz + "-sink"); - if (source && dest) { +MSDevice_Routing::preInsertionReroute(const SUMOTime currentTime) { + if (mySkipRouting == currentTime) { + return DELTA_T; + } + const MSEdge* source = *myHolder.getRoute().begin(); + const MSEdge* dest = myHolder.getRoute().getLastEdge(); + if (source->getPurpose() == MSEdge::EDGEFUNCTION_DISTRICT && dest->getPurpose() == MSEdge::EDGEFUNCTION_DISTRICT) { const std::pair key = std::make_pair(source, dest); - if (myCachedRoutes.find(key) == myCachedRoutes.end()) { - myHolder.reroute(currentTime, getRouter(), true); - myCachedRoutes[key] = &myHolder.getRoute(); - myHolder.getRoute().addReference(); - } else { + if (myCachedRoutes.find(key) != myCachedRoutes.end()) { myHolder.replaceRoute(myCachedRoutes[key], true); + return myPreInsertionPeriod; } } + reroute(currentTime, true); return myPreInsertionPeriod; } SUMOTime MSDevice_Routing::wrappedRerouteCommandExecute(SUMOTime currentTime) { - myHolder.reroute(currentTime, getRouter()); + reroute(currentTime); return myPeriod; } SUMOReal MSDevice_Routing::getEffort(const MSEdge* const e, const SUMOVehicle* const v, SUMOReal) { - if (myEdgeEfforts.find(e) != myEdgeEfforts.end()) { - return MAX2(myEdgeEfforts.find(e)->second, e->getMinimumTravelTime(v)); + const int id = e->getNumericalID(); + if (id < (int)myEdgeEfforts.size()) { + SUMOReal effort = MAX2(myEdgeEfforts[id], e->getMinimumTravelTime(v)); + if (myRandomizeWeightsFactor != 1) { + effort *= RandHelper::rand((SUMOReal)1, myRandomizeWeightsFactor); + } + return effort; } return 0; } SUMOTime -MSDevice_Routing::adaptEdgeEfforts(SUMOTime /*currentTime*/) { +MSDevice_Routing::adaptEdgeEfforts(SUMOTime currentTime) { + if (MSNet::getInstance()->getVehicleControl().getDepartedVehicleNo() == 0) { + return myAdaptationInterval; + } std::map, const MSRoute*>::iterator it = myCachedRoutes.begin(); for (; it != myCachedRoutes.end(); ++it) { it->second->release(); } myCachedRoutes.clear(); - SUMOReal newWeight = (SUMOReal)(1. - myAdaptationWeight); - const std::vector& edges = MSNet::getInstance()->getEdgeControl().getEdges(); - for (std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { - myEdgeEfforts[*i] = myEdgeEfforts[*i] * myAdaptationWeight + (*i)->getCurrentTravelTime() * newWeight; + const SUMOReal newWeightFactor = (SUMOReal)(1. - myAdaptationWeight); + const MSEdgeVector& edges = MSNet::getInstance()->getEdgeControl().getEdges(); + for (MSEdgeVector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + const int id = (*i)->getNumericalID(); + const SUMOReal currTT = (*i)->getCurrentTravelTime(); + if (currTT != myEdgeEfforts[id]) { + myEdgeEfforts[id] = myEdgeEfforts[id] * myAdaptationWeight + currTT * newWeightFactor; + } + } + myLastAdaptation = currentTime + DELTA_T; // because we run at the end of the time step + if (OptionsCont::getOptions().isSet("device.rerouting.output")) { + OutputDevice& dev = OutputDevice::getDeviceByOption("device.rerouting.output"); + dev.openTag(SUMO_TAG_INTERVAL); + dev.writeAttr(SUMO_ATTR_ID, "device.rerouting"); + dev.writeAttr(SUMO_ATTR_BEGIN, STEPS2TIME(currentTime)); + dev.writeAttr(SUMO_ATTR_END, STEPS2TIME(currentTime + myAdaptationInterval)); + for (MSEdgeVector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + const int id = (*i)->getNumericalID(); + dev.openTag(SUMO_TAG_EDGE); + dev.writeAttr(SUMO_ATTR_ID, (*i)->getID()); + dev.writeAttr("traveltime", myEdgeEfforts[id]); + dev.closeTag(); + } + dev.closeTag(); } return myAdaptationInterval; } -SUMOAbstractRouter& -MSDevice_Routing::getRouter() { - if (myRouter == 0) { - const std::string routingAlgorithm = OptionsCont::getOptions().getString("routing-algorithm"); +void +MSDevice_Routing::reroute(const SUMOTime currentTime, const bool onInit) { + //check whether the weights did change since the last reroute + if (myLastRouting >= myLastAdaptation) { + return; + } + myLastRouting = currentTime; +#ifdef HAVE_FOX + const bool needThread = (myRouter == 0 && myThreadPool.isFull()); +#else + const bool needThread = true; +#endif + if (needThread && myRouter == 0) { + OptionsCont& oc = OptionsCont::getOptions(); + const std::string routingAlgorithm = oc.getString("routing-algorithm"); + const bool mayHaveRestrictions = MSNet::getInstance()->hasRestrictions() || oc.getInt("remote-port") != 0; if (routingAlgorithm == "dijkstra") { - myRouter = new DijkstraRouterTT_ByProxi >( - MSEdge::numericalDictSize(), true, &MSDevice_Routing::getEffort); + if (mayHaveRestrictions) { + myRouter = new DijkstraRouterTT >( + MSEdge::numericalDictSize(), true, &MSDevice_Routing::getEffort); + } else { + myRouter = new DijkstraRouterTT >( + MSEdge::numericalDictSize(), true, &MSDevice_Routing::getEffort); + } } else if (routingAlgorithm == "astar") { - myRouter = new AStarRouterTT_ByProxi >( - MSEdge::numericalDictSize(), true, &MSDevice_Routing::getEffort); + if (mayHaveRestrictions) { + typedef AStarRouter > AStar; + const AStar::LookupTable* lookup = 0; + if (oc.isSet("device.rerouting.shortest-path-file")) { + lookup = AStar::createLookupTable(oc.getString("device.rerouting.shortest-path-file"), (int)MSEdge::numericalDictSize()); + } + myRouter = new AStar(MSEdge::numericalDictSize(), true, &MSDevice_Routing::getEffort, lookup); + } else { + typedef AStarRouter > AStar; + const AStar::LookupTable* lookup = 0; + if (oc.isSet("device.rerouting.shortest-path-file")) { + lookup = AStar::createLookupTable(oc.getString("device.rerouting.shortest-path-file"), (int)MSEdge::numericalDictSize()); + } + myRouter = new AStar(MSEdge::numericalDictSize(), true, &MSDevice_Routing::getEffort, lookup); + } + } else if (routingAlgorithm == "CH") { + const SUMOTime weightPeriod = myAdaptationInterval > 0 ? myAdaptationInterval : std::numeric_limits::max(); + if (mayHaveRestrictions) { + myRouter = new CHRouter >( + MSEdge::numericalDictSize(), true, &MSDevice_Routing::getEffort, myHolder.getVClass(), weightPeriod, true); + } else { + myRouter = new CHRouter >( + MSEdge::numericalDictSize(), true, &MSDevice_Routing::getEffort, myHolder.getVClass(), weightPeriod, false); + } + } else if (routingAlgorithm == "CHWrapper") { + const SUMOTime begin = string2time(oc.getString("begin")); + const SUMOTime weightPeriod = myAdaptationInterval > 0 ? myAdaptationInterval : std::numeric_limits::max(); + myRouter = new CHRouterWrapper >( + MSEdge::numericalDictSize(), true, &MSDevice_Routing::getEffort, begin, weightPeriod); } else { - throw ProcessError("Unknown routing Algorithm '" + routingAlgorithm + "'!"); + throw ProcessError("Unknown routing algorithm '" + routingAlgorithm + "'!"); + } + } +#ifdef HAVE_FOX + if (needThread) { + const int numThreads = OptionsCont::getOptions().getInt("device.rerouting.threads"); + if (myThreadPool.size() < numThreads) { + new WorkerThread(myThreadPool, myRouter); + } + if (myThreadPool.size() < numThreads) { + myRouter = 0; } } - return *myRouter; + if (myThreadPool.size() > 0) { + myThreadPool.add(new RoutingTask(myHolder, currentTime, onInit)); + return; + } +#endif + myHolder.reroute(currentTime, *myRouter, onInit, myWithTaz); } void MSDevice_Routing::cleanup() { +#ifdef HAVE_FOX + if (myThreadPool.size() > 0) { + // we cannot wait for the static destructor to do the cleanup + // because the output devices are gone by then + myThreadPool.clear(); + // router deletion is done in thread destructor + myRouter = 0; + return; + } +#endif delete myRouter; myRouter = 0; } +#ifdef HAVE_FOX +void +MSDevice_Routing::waitForAll() { + if (myThreadPool.size() > 0) { + myThreadPool.waitAll(); + } +} + + +// --------------------------------------------------------------------------- +// MSDevice_Routing::RoutingTask-methods +// --------------------------------------------------------------------------- +void +MSDevice_Routing::RoutingTask::run(FXWorkerThread* context) { + myVehicle.reroute(myTime, static_cast(context)->getRouter(), myOnInit, myWithTaz); + const MSEdge* source = *myVehicle.getRoute().begin(); + const MSEdge* dest = myVehicle.getRoute().getLastEdge(); + if (source->getPurpose() == MSEdge::EDGEFUNCTION_DISTRICT && dest->getPurpose() == MSEdge::EDGEFUNCTION_DISTRICT) { + const std::pair key = std::make_pair(source, dest); + lock(); + if (MSDevice_Routing::myCachedRoutes.find(key) == MSDevice_Routing::myCachedRoutes.end()) { + MSDevice_Routing::myCachedRoutes[key] = &myVehicle.getRoute(); + myVehicle.getRoute().addReference(); + } + unlock(); + } +} +#endif + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Routing.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Routing.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Routing.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Routing.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file MSDevice_Routing.h /// @author Michael Behrisch /// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @date Tue, 04 Dec 2007 -/// @version $Id: MSDevice_Routing.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSDevice_Routing.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A device that performs vehicle rerouting based on current edge speeds /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,10 +37,14 @@ #include #include #include -#include +#include #include #include "MSDevice.h" +#ifdef HAVE_FOX +#include +#endif + // =========================================================================== // class declarations @@ -90,7 +95,7 @@ * The built device is stored in the given vector. * * @param[in] v The vehicle for which a device may be built - * @param[in, filled] into The vector to store the built device in + * @param[filled] into The vector to store the built device in */ static void buildVehicleDevices(SUMOVehicle& v, std::vector& into); @@ -98,6 +103,22 @@ /// @brief deletes the router instance static void cleanup(); + /// @brief returns whether any routing actions take place + static bool isEnabled() { + return !myWithTaz && !myEdgeEfforts.empty(); + } + +#ifdef HAVE_FOX + static void waitForAll(); + static void lock() { + myThreadPool.lock(); + } + static void unlock() { + myThreadPool.unlock(); + } +#endif + + public: /// @brief Destructor. @@ -130,7 +151,64 @@ /// @} + /// @brief initiate the rerouting, create router / thread pool on first use + void reroute(const SUMOTime currentTime, const bool onInit = false); + + + /** @brief Labels the current time step as "unroutable". + * + * Sets mySkipRouting to the current time in order to skip rerouting. + * This is useful for pre insertion routing when we know in advance + * we cannot insert. + * + * @param[in] currentTime The current simulation time + */ + void skipRouting(const SUMOTime currentTime) { + mySkipRouting = currentTime; + } + + private: +#ifdef HAVE_FOX + /** + * @class WorkerThread + * @brief the thread which provides the router instance as context + */ + class WorkerThread : public FXWorkerThread { + public: + WorkerThread(FXWorkerThread::Pool& pool, + SUMOAbstractRouter* router) + : FXWorkerThread(pool), myRouter(router) {} + SUMOAbstractRouter& getRouter() const { + return *myRouter; + } + virtual ~WorkerThread() { + stop(); + delete myRouter; + } + private: + SUMOAbstractRouter* myRouter; + }; + + /** + * @class RoutingTask + * @brief the routing task which mainly calls reroute of the vehicle + */ + class RoutingTask : public FXWorkerThread::Task { + public: + RoutingTask(SUMOVehicle& v, const SUMOTime time, const bool onInit) + : myVehicle(v), myTime(time), myOnInit(onInit) {} + void run(FXWorkerThread* context); + private: + SUMOVehicle& myVehicle; + const SUMOTime myTime; + const bool myOnInit; + private: + /// @brief Invalidated assignment operator. + RoutingTask& operator=(const RoutingTask&); + }; +#endif + /** @brief Constructor * * @param[in] holder The vehicle that holds this device @@ -138,23 +216,21 @@ * @param[in] period The period with which a new route shall be searched * @param[in] preInsertionPeriod The route search period before insertion */ - MSDevice_Routing(SUMOVehicle& holder, const std::string& id, SUMOTime period, - SUMOTime preInsertionPeriod); + MSDevice_Routing(SUMOVehicle& holder, const std::string& id, SUMOTime period, SUMOTime preInsertionPeriod); - /** @brief Performs rerouting at insertion into the network + /** @brief Performs rerouting before insertion into the network * - * A new route is computed by calling the vehicle's "reroute" method, supplying - * "getEffort" as the edge effort retrieval method. + * A new route is computed by calling the reroute method. If the routing + * involves taz the internal route cache is asked beforehand. * * @param[in] currentTime The current simulation time - * @return The offset to the next call (the rerouting period "myPeriod") + * @return The offset to the next call (the rerouting period "myPreInsertionPeriod") * @see MSVehicle::reroute * @see MSEventHandler * @see WrappingCommand */ - SUMOTime preInsertionReroute(SUMOTime currentTime); - + SUMOTime preInsertionReroute(const SUMOTime currentTime); /** @brief Performs rerouting after a period * @@ -190,6 +266,7 @@ static SUMOReal getEffort(const MSEdge* const e, const SUMOVehicle* const v, SUMOReal t); + /// @name Network state adaptation /// @{ @@ -208,9 +285,6 @@ /// @} - /// @brief get the router, initialize on first use - static SUMOAbstractRouter& getRouter(); - private: /// @brief The period with which a vehicle shall be rerouted SUMOTime myPeriod; @@ -218,6 +292,12 @@ /// @brief The period with which a vehicle shall be rerouted before insertion SUMOTime myPreInsertionPeriod; + /// @brief The last time a routing took place + SUMOTime myLastRouting; + + /// @brief The time for which routing may be skipped because we cannot be inserted + SUMOTime mySkipRouting; + /// @brief The (optional) command responsible for rerouting WrappingCommand< MSDevice_Routing >* myRerouteCommand; @@ -225,14 +305,17 @@ static Command* myEdgeWeightSettingCommand; /// @brief The container of edge efforts - static std::map myEdgeEfforts; + static std::vector myEdgeEfforts; /// @brief Information which weight prior edge efforts have static SUMOReal myAdaptationWeight; - /// @brief Information which weight prior edge efforts have + /// @brief At which time interval the edge weights get updated static SUMOTime myAdaptationInterval; + /// @brief Information when the last edge weight adaptation occured + static SUMOTime myLastAdaptation; + /// @brief whether taz shall be used at initial rerouting static bool myWithTaz; @@ -242,6 +325,12 @@ /// @brief The router to use static SUMOAbstractRouter* myRouter; + /// @brief Whether to disturb edge weights dynamically + static SUMOReal myRandomizeWeightsFactor; + +#ifdef HAVE_FOX + static FXWorkerThread::Pool myThreadPool; +#endif private: /// @brief Invalidated copy constructor. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Tripinfo.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Tripinfo.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Tripinfo.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Tripinfo.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Laura Bieker /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Fri, 30.01.2009 -/// @version $Id: MSDevice_Tripinfo.cpp 14471 2013-08-22 10:32:01Z dkrajzew $ +/// @version $Id: MSDevice_Tripinfo.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // A device which collects info on the vehicle trip /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2009-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -29,8 +30,10 @@ #include #endif +#include #include #include +#include #include #include #include @@ -40,6 +43,13 @@ #include #endif // CHECK_MEMORY_LEAKS +#define NOT_ARRIVED TIME2STEPS(-1) + + +// =========================================================================== +// static members +// =========================================================================== +MSDevice_Tripinfo::DeviceSet MSDevice_Tripinfo::myPendingOutput; // =========================================================================== // method definitions @@ -52,6 +62,7 @@ if (OptionsCont::getOptions().isSet("tripinfo-output")) { MSDevice_Tripinfo* device = new MSDevice_Tripinfo(v, "tripinfo_" + v.getID()); into.push_back(device); + myPendingOutput.insert(device); } } @@ -59,22 +70,42 @@ // --------------------------------------------------------------------------- // MSDevice_Tripinfo-methods // --------------------------------------------------------------------------- -MSDevice_Tripinfo::MSDevice_Tripinfo(SUMOVehicle& holder, const std::string& id) - : MSDevice(holder, id), myDepartLane(""), myDepartPos(-1), myDepartSpeed(-1), - myWaitingSteps(0), myArrivalTime(-1), myArrivalLane(""), myArrivalPos(-1), myArrivalSpeed(-1) { +MSDevice_Tripinfo::MSDevice_Tripinfo(SUMOVehicle& holder, const std::string& id) : + MSDevice(holder, id), + myDepartLane(""), + myDepartPos(-1), + myDepartSpeed(-1), + myWaitingSteps(0), + myArrivalTime(NOT_ARRIVED), + myArrivalLane(""), + myArrivalPos(-1), + myArrivalSpeed(-1), + myTimeLoss(0) { } MSDevice_Tripinfo::~MSDevice_Tripinfo() { + // ensure clean up for vaporized vehicles which do not generate output + myPendingOutput.erase(this); } bool -MSDevice_Tripinfo::notifyMove(SUMOVehicle& /*veh*/, SUMOReal /*oldPos*/, +MSDevice_Tripinfo::notifyMove(SUMOVehicle& veh, SUMOReal /*oldPos*/, SUMOReal /*newPos*/, SUMOReal newSpeed) { if (newSpeed <= SUMO_const_haltingSpeed) { myWaitingSteps++; } + // @note we are including the speed factor here, thus myTimeLoss can never be + // negative. The value is that of a driver who compares his travel time when + // the road is clear (which includes speed factor) with the actual travel time. + // @todo It might be usefull to recognize a departing vehicle and not + // count the time spent accelerating towards time loss since it is unavoidable + // (current interfaces do not give access to maximum acceleration) + const SUMOReal vmax = MIN2(veh.getMaxSpeed(), veh.getEdge()->getVehicleMaxSpeed(&veh)); + if (vmax > 0) { + myTimeLoss += TIME2STEPS(TS * (vmax - newSpeed) / vmax); + } return true; } @@ -102,7 +133,12 @@ } // @note vehicle may have moved past its arrivalPos during the last step // due to non-zero arrivalspeed but we consider it as arrived at the desired position - myArrivalPos = myHolder.getArrivalPos(); + // However, vaporization may happen anywhere (via TraCI) + if (reason == MSMoveReminder::NOTIFICATION_VAPORIZED) { + myArrivalPos = veh.getPositionOnLane(); + } else { + myArrivalPos = myHolder.getArrivalPos(); + } myArrivalSpeed = veh.getSpeed(); } return true; @@ -111,27 +147,45 @@ void MSDevice_Tripinfo::generateOutput() const { - SUMOReal routeLength = myHolder.getRoute().getLength(); + myPendingOutput.erase(this); + SUMOTime finalTime; + SUMOReal finalPos; + SUMOReal finalPosOnInternal = 0; + if (myArrivalTime == NOT_ARRIVED) { + finalTime = MSNet::getInstance()->getCurrentTimeStep(); + finalPos = myHolder.getPositionOnLane(); + if (!MSGlobals::gUseMesoSim) { + const MSLane* lane = static_cast(myHolder).getLane(); + if (lane->getEdge().isInternal()) { + finalPosOnInternal = finalPos; + finalPos = myHolder.getEdge()->getLength(); + } + } + } else { + finalTime = myArrivalTime; + finalPos = myArrivalPos; + } + const bool includeInternalLengths = MSGlobals::gUsingInternalLanes && MSNet::getInstance()->hasInternalLinks(); + const SUMOReal routeLength = myHolder.getRoute().getDistanceBetween(myDepartPos, finalPos, + myHolder.getRoute().begin(), myHolder.getCurrentRouteEdge(), includeInternalLengths) + finalPosOnInternal; + // write OutputDevice& os = OutputDevice::getDeviceByOption("tripinfo-output"); - os.openTag("tripinfo") << " id=\"" << myHolder.getID() << "\" "; - routeLength -= myDepartPos; - os << "depart=\"" << time2string(myHolder.getDeparture()) << "\" " - << "departLane=\"" << myDepartLane << "\" " - << "departPos=\"" << myDepartPos << "\" " - << "departSpeed=\"" << myDepartSpeed << "\" " - << "departDelay=\"" << time2string(myHolder.getDeparture() - myHolder.getParameter().depart) << "\" "; - if (myArrivalLane != "") { - routeLength -= MSLane::dictionary(myArrivalLane)->getLength() - myArrivalPos; - } - os << "arrival=\"" << time2string(myArrivalTime) << "\" " - << "arrivalLane=\"" << myArrivalLane << "\" " - << "arrivalPos=\"" << myArrivalPos << "\" " - << "arrivalSpeed=\"" << myArrivalSpeed << "\" " - << "duration=\"" << time2string(myArrivalTime - myHolder.getDeparture()) << "\" " - << "routeLength=\"" << routeLength << "\" " - << "waitSteps=\"" << myWaitingSteps << "\" " - << "rerouteNo=\"" << myHolder.getNumberReroutes(); + os.openTag("tripinfo").writeAttr("id", myHolder.getID()); + os.writeAttr("depart", time2string(myHolder.getDeparture())); + os.writeAttr("departLane", myDepartLane); + os.writeAttr("departPos", myDepartPos); + os.writeAttr("departSpeed", myDepartSpeed); + os.writeAttr("departDelay", time2string(myHolder.getDeparture() - myHolder.getParameter().depart)); + os.writeAttr("arrival", time2string(myArrivalTime)); + os.writeAttr("arrivalLane", myArrivalLane); + os.writeAttr("arrivalPos", myArrivalPos); + os.writeAttr("arrivalSpeed", myArrivalSpeed); + os.writeAttr("duration", time2string(finalTime - myHolder.getDeparture())); + os.writeAttr("routeLength", routeLength); + os.writeAttr("waitSteps", myWaitingSteps); + os.writeAttr("timeLoss", time2string(myTimeLoss)); + os.writeAttr("rerouteNo", myHolder.getNumberReroutes()); const std::vector& devices = myHolder.getDevices(); std::ostringstream str; for (std::vector::const_iterator i = devices.begin(); i != devices.end(); ++i) { @@ -140,12 +194,28 @@ } str << (*i)->getID(); } - os << "\" devices=\"" << str.str() - << "\" vType=\"" << myHolder.getVehicleType().getID() - << "\" vaporized=\"" << (myHolder.getEdge() == *(myHolder.getRoute().end() - 1) ? "" : "0") - << "\""; + os.writeAttr("devices", str.str()); + os.writeAttr("vType", myHolder.getVehicleType().getID()); + os.writeAttr("vaporized", (myHolder.getEdge() == *(myHolder.getRoute().end() - 1) ? "" : "0")); + // cannot close tag because emission device output might follow +} + + +void +MSDevice_Tripinfo::generateOutputForUnfinished() { + while (myPendingOutput.size() > 0) { + const MSDevice_Tripinfo* d = *myPendingOutput.begin(); + if (d->myHolder.hasDeparted()) { + d->generateOutput(); + // @todo also generate emission output if holder has a device + OutputDevice::getDeviceByOption("tripinfo-output").closeTag(); + } else { + myPendingOutput.erase(d); + } + } } + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Tripinfo.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Tripinfo.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Tripinfo.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Tripinfo.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file MSDevice_Tripinfo.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Fri, 30.01.2009 -/// @version $Id: MSDevice_Tripinfo.h 14471 2013-08-22 10:32:01Z dkrajzew $ +/// @version $Id: MSDevice_Tripinfo.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A device which collects info on the vehicle trip /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2009-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -60,19 +61,12 @@ * The built device is stored in the given vector. * * @param[in] v The vehicle for which a device may be built - * @param[in, filled] into The vector to store the built device in + * @param[filled] into The vector to store the built device in */ static void buildVehicleDevices(SUMOVehicle& v, std::vector& into); - - /** @brief Returns this device's type information - * @return The c++ type information - */ - static const std::type_info& getTypeInfo() { - return typeid(MSDevice_Tripinfo); - } - - + /// @brief generate output for vehicles which are still in the network + static void generateOutputForUnfinished(); public: /// @brief Destructor. @@ -89,11 +83,9 @@ * @param[in] oldPos Position before move. * @param[in] newPos Position after move with newSpeed. * @param[in] newSpeed Moving speed. - * * @return True (always). */ - bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos, - SUMOReal newPos, SUMOReal newSpeed); + bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed); /** @brief Saves departure info on insertion @@ -115,11 +107,11 @@ * @param[in] isLaneChange whether the vehicle changed from the lane * @return True if it did not leave the net. */ - bool notifyLeave(SUMOVehicle& veh, SUMOReal lastPos, - MSMoveReminder::Notification reason); + bool notifyLeave(SUMOVehicle& veh, SUMOReal lastPos, MSMoveReminder::Notification reason); /// @} + /** @brief Called on writing tripinfo output * * @param[in] os The stream to write the information into @@ -129,6 +121,7 @@ void generateOutput() const; + private: /** @brief Constructor * @@ -145,21 +138,34 @@ private: /// @brief The lane the vehicle departed at std::string myDepartLane; + /// @brief The position on the lane the vehicle departed at SUMOReal myDepartPos; + /// @brief The speed on departure SUMOReal myDepartSpeed; + /// @brief The overall number of waiting steps unsigned int myWaitingSteps; + /// @brief The vehicle's arrival time SUMOTime myArrivalTime; + /// @brief The lane the vehicle arrived at std::string myArrivalLane; + /// @brief The position on the lane the vehicle arrived at SUMOReal myArrivalPos; + /// @brief The speed when arriving SUMOReal myArrivalSpeed; + /// @brief The time loss when compared to the desired and allowed speed + SUMOTime myTimeLoss; + + /// @brief devices which may still need to produce output + typedef std::set > DeviceSet; + static DeviceSet myPendingOutput; private: /// @brief Invalidated copy constructor. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Vehroutes.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Vehroutes.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Vehroutes.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Vehroutes.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Laura Bieker /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Fri, 30.01.2009 -/// @version $Id: MSDevice_Vehroutes.cpp 14471 2013-08-22 10:32:01Z dkrajzew $ +/// @version $Id: MSDevice_Vehroutes.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A device which collects info on the vehicle trip /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2009-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,7 +35,7 @@ #include #include #include -#include +#include #include #include #include "MSDevice_Vehroutes.h" @@ -49,11 +50,13 @@ // =========================================================================== bool MSDevice_Vehroutes::mySaveExits = false; bool MSDevice_Vehroutes::myLastRouteOnly = false; +bool MSDevice_Vehroutes::myDUAStyle = false; bool MSDevice_Vehroutes::mySorted = false; +bool MSDevice_Vehroutes::myIntendedDepart = false; bool MSDevice_Vehroutes::myWithTaz = false; MSDevice_Vehroutes::StateListener MSDevice_Vehroutes::myStateListener; std::map MSDevice_Vehroutes::myDepartureCounts; -std::map MSDevice_Vehroutes::myRouteInfos; +std::map > MSDevice_Vehroutes::myRouteInfos; // =========================================================================== @@ -65,10 +68,12 @@ void MSDevice_Vehroutes::init() { if (OptionsCont::getOptions().isSet("vehroute-output")) { - OutputDevice::createDeviceByOption("vehroute-output", "routes"); + OutputDevice::createDeviceByOption("vehroute-output", "routes", "routes_file.xsd"); mySaveExits = OptionsCont::getOptions().getBool("vehroute-output.exit-times"); myLastRouteOnly = OptionsCont::getOptions().getBool("vehroute-output.last-route"); - mySorted = OptionsCont::getOptions().getBool("vehroute-output.sorted"); + myDUAStyle = OptionsCont::getOptions().getBool("vehroute-output.dua"); + mySorted = myDUAStyle || OptionsCont::getOptions().getBool("vehroute-output.sorted"); + myIntendedDepart = OptionsCont::getOptions().getBool("vehroute-output.intended-depart"); myWithTaz = OptionsCont::getOptions().getBool("device.rerouting.with-taz"); MSNet::getInstance()->addVehicleStateListener(&myStateListener); } @@ -124,7 +129,8 @@ bool MSDevice_Vehroutes::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason) { if (mySorted && reason == NOTIFICATION_DEPARTED && myStateListener.myDevices[&veh] == this) { - myDepartureCounts[MSNet::getInstance()->getCurrentTimeStep()]++; + const SUMOTime departure = myIntendedDepart ? myHolder.getParameter().depart : MSNet::getInstance()->getCurrentTimeStep(); + myDepartureCounts[departure]++; } return mySaveExits; } @@ -135,7 +141,7 @@ if (mySaveExits && reason != NOTIFICATION_LANE_CHANGE) { if (reason != NOTIFICATION_TELEPORT && myLastSavedAt == veh.getEdge()) { // need to check this for internal lanes myExits.back() = MSNet::getInstance()->getCurrentTimeStep(); - } else { + } else if (myLastSavedAt != veh.getEdge()) { myExits.push_back(MSNet::getInstance()->getCurrentTimeStep()); myLastSavedAt = veh.getEdge(); } @@ -211,35 +217,65 @@ MSDevice_Vehroutes::generateOutput() const { OutputDevice& routeOut = OutputDevice::getDeviceByOption("vehroute-output"); OutputDevice_String od(routeOut.isBinary(), 1); + const SUMOTime departure = myIntendedDepart ? myHolder.getParameter().depart : myHolder.getDeparture(); od.openTag(SUMO_TAG_VEHICLE).writeAttr(SUMO_ATTR_ID, myHolder.getID()); if (myHolder.getVehicleType().getID() != DEFAULT_VTYPE_ID) { od.writeAttr(SUMO_ATTR_TYPE, myHolder.getVehicleType().getID()); } - od.writeAttr(SUMO_ATTR_DEPART, time2string(myHolder.getDeparture())); + od.writeAttr(SUMO_ATTR_DEPART, time2string(departure)); if (myHolder.hasArrived()) { od.writeAttr("arrival", time2string(MSNet::getInstance()->getCurrentTimeStep())); } if (myWithTaz) { od.writeAttr(SUMO_ATTR_FROM_TAZ, myHolder.getParameter().fromTaz).writeAttr(SUMO_ATTR_TO_TAZ, myHolder.getParameter().toTaz); } - if (myReplacedRoutes.size() > 0) { - od.openTag(SUMO_TAG_ROUTE_DISTRIBUTION); - for (unsigned int i = 0; i < myReplacedRoutes.size(); ++i) { - writeXMLRoute(od, i); + if (myDUAStyle) { + const RandomDistributor* const routeDist = MSRoute::distDictionary("!" + myHolder.getID()); + if (routeDist != 0) { + const std::vector& routes = routeDist->getVals(); + unsigned index = 0; + while (index < routes.size() && routes[index] != myCurrentRoute) { + ++index; + } + od.openTag(SUMO_TAG_ROUTE_DISTRIBUTION).writeAttr(SUMO_ATTR_LAST, index); + const std::vector& probs = routeDist->getProbs(); + for (unsigned int i = 0; i < routes.size(); ++i) { + od.setPrecision(); + od.openTag(SUMO_TAG_ROUTE).writeAttr(SUMO_ATTR_COST, routes[i]->getCosts()); + od.setPrecision(8); + od.writeAttr(SUMO_ATTR_PROB, probs[i]); + od.setPrecision(); + od << " edges=\""; + routes[i]->writeEdgeIDs(od, *routes[i]->begin()); + (od << "\"").closeTag(); + } + od.closeTag(); + } else { + writeXMLRoute(od); + } + } else { + if (myReplacedRoutes.size() > 0) { + od.openTag(SUMO_TAG_ROUTE_DISTRIBUTION); + for (unsigned int i = 0; i < myReplacedRoutes.size(); ++i) { + writeXMLRoute(od, i); + } + } + writeXMLRoute(od); + if (myReplacedRoutes.size() > 0) { + od.closeTag(); } - } - writeXMLRoute(od); - if (myReplacedRoutes.size() > 0) { - od.closeTag(); } od.closeTag(); od.lf(); if (mySorted) { - myRouteInfos[myHolder.getDeparture()] += od.getString(); - myDepartureCounts[myHolder.getDeparture()]--; + myRouteInfos[departure][myHolder.getID()] = od.getString(); + myDepartureCounts[departure]--; std::map::iterator it = myDepartureCounts.begin(); while (it != myDepartureCounts.end() && it->second == 0) { - routeOut << myRouteInfos[it->first]; + std::map& infos = myRouteInfos[it->first]; + for (std::map::const_iterator it2 = infos.begin(); it2 != infos.end(); ++it2) { + routeOut << it2->second; + } myRouteInfos.erase(it->first); myDepartureCounts.erase(it); it = myDepartureCounts.begin(); @@ -278,7 +314,7 @@ void MSDevice_Vehroutes::generateOutputForUnfinished() { - for (std::map::iterator it = myStateListener.myDevices.begin(); + for (std::map >::const_iterator it = myStateListener.myDevices.begin(); it != myStateListener.myDevices.end(); ++it) { if (it->first->hasDeparted()) { it->second->generateOutput(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Vehroutes.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Vehroutes.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/devices/MSDevice_Vehroutes.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/devices/MSDevice_Vehroutes.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file MSDevice_Vehroutes.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Fri, 30.01.2009 -/// @version $Id: MSDevice_Vehroutes.h 14471 2013-08-22 10:32:01Z dkrajzew $ +/// @version $Id: MSDevice_Vehroutes.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A device which collects info on the vehicle trip /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2009-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -69,7 +70,7 @@ * The built device is stored in the given vector. * * @param[in] v The vehicle for which a device may be built - * @param[in, filled] into The vector to store the built device in + * @param[filled] into The vector to store the built device in */ static MSDevice_Vehroutes* buildVehicleDevices(SUMOVehicle& v, std::vector& into, unsigned int maxRoutes = INT_MAX); @@ -78,6 +79,7 @@ static void generateOutputForUnfinished(); + public: /// @brief Destructor. ~MSDevice_Vehroutes(); @@ -130,6 +132,7 @@ const MSRoute* getRoute(int index) const; + private: /** @brief Constructor * @@ -152,6 +155,7 @@ void addRoute(); + private: /// @brief A shortcut for the Option "vehroute-output.exit-times" static bool mySaveExits; @@ -159,9 +163,15 @@ /// @brief A shortcut for the Option "vehroute-output.last-route" static bool myLastRouteOnly; + /// @brief A shortcut for the Option "vehroute-output.dua" + static bool myDUAStyle; + /// @brief A shortcut for the Option "vehroute-output.sorted" static bool mySorted; + /// @brief A shortcut for the Option "vehroute-output.intended-depart" + static bool myIntendedDepart; + /// @brief A shortcut for the Option "device.routing.with-taz" static bool myWithTaz; @@ -181,12 +191,11 @@ void vehicleStateChanged(const SUMOVehicle* const vehicle, MSNet::VehicleState to); /// @brief A map for internal notification - std::map myDevices; + std::map > myDevices; }; - /// @brief A class that is notified about reroutings static StateListener myStateListener; @@ -194,7 +203,7 @@ static std::map myDepartureCounts; /// @todo: describe - static std::map myRouteInfos; + static std::map > myRouteInfos; /** diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,8 @@ +noinst_LIBRARIES = libmicrosimlcmodels.a + +libmicrosimlcmodels_a_SOURCES = MSAbstractLaneChangeModel.cpp \ +MSAbstractLaneChangeModel.h \ +MSLCM_DK2008.cpp MSLCM_DK2008.h \ +MSLCM_LC2013.cpp MSLCM_LC2013.h \ +MSLCM_JE2013.cpp MSLCM_JE2013.h + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,624 @@ +# Makefile.in generated by automake 1.13.4 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/microsim/lcmodels +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libmicrosimlcmodels_a_AR = $(AR) $(ARFLAGS) +libmicrosimlcmodels_a_LIBADD = +am_libmicrosimlcmodels_a_OBJECTS = \ + MSAbstractLaneChangeModel.$(OBJEXT) MSLCM_DK2008.$(OBJEXT) \ + MSLCM_LC2013.$(OBJEXT) MSLCM_JE2013.$(OBJEXT) +libmicrosimlcmodels_a_OBJECTS = $(am_libmicrosimlcmodels_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libmicrosimlcmodels_a_SOURCES) +DIST_SOURCES = $(libmicrosimlcmodels_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_CPPFLAGS = @AM_CPPFLAGS@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ +FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ +GDAL_LDFLAGS = @GDAL_LDFLAGS@ +GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_XERCES = @LIB_XERCES@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OSG_LIBS = @OSG_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJ_LDFLAGS = @PROJ_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XERCES_CFLAGS = @XERCES_CFLAGS@ +XERCES_LDFLAGS = @XERCES_LDFLAGS@ +XERCES_LIBS = @XERCES_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LIBRARIES = libmicrosimlcmodels.a +libmicrosimlcmodels_a_SOURCES = MSAbstractLaneChangeModel.cpp \ +MSAbstractLaneChangeModel.h \ +MSLCM_DK2008.cpp MSLCM_DK2008.h \ +MSLCM_LC2013.cpp MSLCM_LC2013.h \ +MSLCM_JE2013.cpp MSLCM_JE2013.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/microsim/lcmodels/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/microsim/lcmodels/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +libmicrosimlcmodels.a: $(libmicrosimlcmodels_a_OBJECTS) $(libmicrosimlcmodels_a_DEPENDENCIES) $(EXTRA_libmicrosimlcmodels_a_DEPENDENCIES) + $(AM_V_at)-rm -f libmicrosimlcmodels.a + $(AM_V_AR)$(libmicrosimlcmodels_a_AR) libmicrosimlcmodels.a $(libmicrosimlcmodels_a_OBJECTS) $(libmicrosimlcmodels_a_LIBADD) + $(AM_V_at)$(RANLIB) libmicrosimlcmodels.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSAbstractLaneChangeModel.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLCM_DK2008.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLCM_JE2013.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLCM_LC2013.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSAbstractLaneChangeModel.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSAbstractLaneChangeModel.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSAbstractLaneChangeModel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSAbstractLaneChangeModel.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,221 @@ +/****************************************************************************/ +/// @file MSAbstractLaneChangeModel.h +/// @author Daniel Krajzewicz +/// @author Friedemann Wesner +/// @author Sascha Krieg +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date Fri, 29.04.2005 +/// @version $Id: MSAbstractLaneChangeModel.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Interface for lane-change models +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include "MSAbstractLaneChangeModel.h" +#include "MSLCM_DK2008.h" +#include "MSLCM_LC2013.h" +#include "MSLCM_JE2013.h" +#include +#include +#include +#include + +/* ------------------------------------------------------------------------- + * static members + * ----------------------------------------------------------------------- */ +bool MSAbstractLaneChangeModel::myAllowOvertakingRight(false); + +/* ------------------------------------------------------------------------- + * MSAbstractLaneChangeModel-methods + * ----------------------------------------------------------------------- */ + +void +MSAbstractLaneChangeModel::initGlobalOptions(const OptionsCont& oc) { + myAllowOvertakingRight = oc.getBool("lanechange.overtake-right"); +} + + +MSAbstractLaneChangeModel* +MSAbstractLaneChangeModel::build(LaneChangeModel lcm, MSVehicle& v) { + switch (lcm) { + case LCM_DK2008: + return new MSLCM_DK2008(v); + case LCM_LC2013: + return new MSLCM_LC2013(v); + case LCM_JE2013: + return new MSLCM_JE2013(v); + default: + throw ProcessError("Lane change model '" + toString(lcm) + "' not implemented"); + } +} + + +MSAbstractLaneChangeModel::MSAbstractLaneChangeModel(MSVehicle& v) : + myVehicle(v), + myOwnState(0), + myLaneChangeCompletion(1.0), + myLaneChangeDirection(0), + myLaneChangeMidpointPassed(false), + myAlreadyMoved(false), + myShadowLane(0), + myHaveShadow(false), + myCarFollowModel(v.getCarFollowModel()), + myLastLaneChangeOffset(0) { +} + + +MSAbstractLaneChangeModel::~MSAbstractLaneChangeModel() { + if (myShadowLane != 0 && myHaveShadow) { + myShadowLane->removeVehicle(&myVehicle, MSMoveReminder::NOTIFICATION_VAPORIZED, false); + } +} + + +bool +MSAbstractLaneChangeModel::congested(const MSVehicle* const neighLeader) { + if (neighLeader == 0) { + return false; + } + // Congested situation are relevant only on highways (maxSpeed > 70km/h) + // and congested on German Highways means that the vehicles have speeds + // below 60km/h. Overtaking on the right is allowed then. + if ((myVehicle.getLane()->getSpeedLimit() <= 70.0 / 3.6) || (neighLeader->getLane()->getSpeedLimit() <= 70.0 / 3.6)) { + + return false; + } + if (myVehicle.congested() && neighLeader->congested()) { + return true; + } + return false; +} + + +bool +MSAbstractLaneChangeModel::predInteraction(const MSVehicle* const leader) { + if (leader == 0) { + return false; + } + // let's check it on highways only + if (leader->getSpeed() < (80.0 / 3.6)) { + return false; + } + SUMOReal gap = leader->getPositionOnLane() - leader->getVehicleType().getLength() - myVehicle.getVehicleType().getMinGap() - myVehicle.getPositionOnLane(); + return gap < myCarFollowModel.interactionGap(&myVehicle, leader->getSpeed()); +} + + +bool +MSAbstractLaneChangeModel::startLaneChangeManeuver(MSLane* source, MSLane* target, int direction) { + target->enteredByLaneChange(&myVehicle); + if (MSGlobals::gLaneChangeDuration > DELTA_T) { + myLaneChangeCompletion = 0; + myShadowLane = target; + myHaveShadow = true; + myLaneChangeMidpointPassed = false; + myLaneChangeDirection = direction; + continueLaneChangeManeuver(false); + return true; + } else { + myVehicle.leaveLane(MSMoveReminder::NOTIFICATION_LANE_CHANGE); + source->leftByLaneChange(&myVehicle); + myVehicle.enterLaneAtLaneChange(target); + changed(direction); + return false; + } +} + + +void +MSAbstractLaneChangeModel::continueLaneChangeManeuver(bool moved) { + if (moved && myHaveShadow) { + // move shadow to next lane + removeLaneChangeShadow(); + const int shadowDirection = myLaneChangeMidpointPassed ? -myLaneChangeDirection : myLaneChangeDirection; + myShadowLane = myVehicle.getLane()->getParallelLane(shadowDirection); + if (myShadowLane == 0) { + // abort lane change + WRITE_WARNING("Vehicle '" + myVehicle.getID() + "' could not finish continuous lane change (lane disappeared) time=" + + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); + endLaneChangeManeuver(); + return; + } + myHaveShadow = true; + } + myLaneChangeCompletion += (SUMOReal)DELTA_T / (SUMOReal)MSGlobals::gLaneChangeDuration; + if (!myLaneChangeMidpointPassed && myLaneChangeCompletion >= + myVehicle.getLane()->getWidth() / (myVehicle.getLane()->getWidth() + myShadowLane->getWidth())) { + // maneuver midpoint reached, swap myLane and myShadowLane + myLaneChangeMidpointPassed = true; + MSLane* tmp = myVehicle.getLane(); + myVehicle.leaveLane(MSMoveReminder::NOTIFICATION_LANE_CHANGE); + myVehicle.enterLaneAtLaneChange(myShadowLane); + myShadowLane = tmp; + if (myVehicle.fixPosition()) { + WRITE_WARNING("vehicle '" + myVehicle.getID() + "' set back by " + toString(myVehicle.getPositionOnLane() - myVehicle.getLane()->getLength()) + + "m when changing lanes on lane '" + myVehicle.getLane()->getID() + " time=" + + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); + } + changed(myLaneChangeDirection); + myAlreadyMoved = true; + } + // remove shadow as soon as the vehicle leaves the original lane geometrically + if (myLaneChangeMidpointPassed && myHaveShadow) { + const SUMOReal sourceHalfWidth = myShadowLane->getWidth() / 2.0; + const SUMOReal targetHalfWidth = myVehicle.getLane()->getWidth() / 2.0; + if (myLaneChangeCompletion * (sourceHalfWidth + targetHalfWidth) - myVehicle.getVehicleType().getWidth() / 2.0 > sourceHalfWidth) { + removeLaneChangeShadow(); + } + } + // finish maneuver + if (!isChangingLanes()) { + assert(myLaneChangeMidpointPassed); + endLaneChangeManeuver(); + } +} + + +void +MSAbstractLaneChangeModel::removeLaneChangeShadow() { + if (myShadowLane != 0 && myHaveShadow) { + myShadowLane->removeVehicle(&myVehicle, MSMoveReminder::NOTIFICATION_LANE_CHANGE); + myHaveShadow = false; + } +} + + +bool +MSAbstractLaneChangeModel::cancelRequest(int state) { + int ret = myVehicle.influenceChangeDecision(state); + return ret != state; +} + + +void +MSAbstractLaneChangeModel::initLastLaneChangeOffset(int dir) { + if (dir > 0) { + myLastLaneChangeOffset = 1; + } else if (dir < 0) { + myLastLaneChangeOffset = -1; + } +} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSAbstractLaneChangeModel.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSAbstractLaneChangeModel.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSAbstractLaneChangeModel.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSAbstractLaneChangeModel.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,377 @@ +/****************************************************************************/ +/// @file MSAbstractLaneChangeModel.h +/// @author Daniel Krajzewicz +/// @author Friedemann Wesner +/// @author Sascha Krieg +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date Fri, 29.04.2005 +/// @version $Id: MSAbstractLaneChangeModel.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Interface for lane-change models +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSAbstractLaneChangeModel_h +#define MSAbstractLaneChangeModel_h + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include + +class MSLane; + +// =========================================================================== +// used enumeration +// =========================================================================== +/** @enum LaneChangeAction + * @brief A try to store the state of a vehicle's lane-change wish in an int + */ +enum LaneChangeAction { + /// @name currently wanted lane-change action + /// @{ + + /// @brief No action desired + LCA_NONE = 0, + /// @brief Needs to stay on the current lane + LCA_STAY = 1 << 0, + /// @brief Wants go to the left + LCA_LEFT = 1 << 1, + /// @brief Wants go to the right + LCA_RIGHT = 1 << 2, + + /// @brief The action is needed to follow the route (navigational lc) + LCA_STRATEGIC = 1 << 3, + /// @brief The action is done to help someone else + LCA_COOPERATIVE = 1 << 4, + /// @brief The action is due to the wish to be faster (tactical lc) + LCA_SPEEDGAIN = 1 << 5, + /// @brief The action is due to the default of keeping right "Rechtsfahrgebot" + LCA_KEEPRIGHT = 1 << 6, + /// @brief The action is due to a TraCI request + LCA_TRACI = 1 << 7, + + /// @brief The action is urgent (to be defined by lc-model) + LCA_URGENT = 1 << 8, + + LCA_WANTS_LANECHANGE = LCA_LEFT | LCA_RIGHT, + LCA_WANTS_LANECHANGE_OR_STAY = LCA_WANTS_LANECHANGE | LCA_STAY, + /// @} + + /// @name External state + /// @{ + + /// @brief The vehicle is blocked by left leader + LCA_BLOCKED_BY_LEFT_LEADER = 1 << 9, + /// @brief The vehicle is blocked by left follower + LCA_BLOCKED_BY_LEFT_FOLLOWER = 1 << 10, + + /// @brief The vehicle is blocked by right leader + LCA_BLOCKED_BY_RIGHT_LEADER = 1 << 11, + /// @brief The vehicle is blocked by right follower + LCA_BLOCKED_BY_RIGHT_FOLLOWER = 1 << 12, + + // The vehicle is blocked being overlapping + LCA_OVERLAPPING = 1 << 13, + + LCA_BLOCKED_LEFT = LCA_BLOCKED_BY_LEFT_LEADER | LCA_BLOCKED_BY_LEFT_FOLLOWER, + LCA_BLOCKED_RIGHT = LCA_BLOCKED_BY_RIGHT_LEADER | LCA_BLOCKED_BY_RIGHT_FOLLOWER, + LCA_BLOCKED_BY_LEADER = LCA_BLOCKED_BY_LEFT_LEADER | LCA_BLOCKED_BY_RIGHT_LEADER, + LCA_BLOCKED_BY_FOLLOWER = LCA_BLOCKED_BY_LEFT_FOLLOWER | LCA_BLOCKED_BY_RIGHT_FOLLOWER, + LCA_BLOCKED = LCA_BLOCKED_LEFT | LCA_BLOCKED_RIGHT + + /// @} + +}; + + + + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSAbstractLaneChangeModel + * @brief Interface for lane-change models + */ +class MSAbstractLaneChangeModel { +public: + + /** @class MSLCMessager + * @brief A class responsible for exchanging messages between cars involved in lane-change interaction + */ + class MSLCMessager { + public: + /** @brief Constructor + * @param[in] leader The leader on the informed vehicle's lane + * @param[in] neighLead The leader on the lane the vehicle want to change to + * @param[in] neighFollow The follower on the lane the vehicle want to change to + */ + MSLCMessager(MSVehicle* leader, MSVehicle* neighLead, MSVehicle* neighFollow) + : myLeader(leader), myNeighLeader(neighLead), + myNeighFollower(neighFollow) { } + + + /// @brief Destructor + ~MSLCMessager() { } + + + /** @brief Informs the leader on the same lane + * @param[in] info The information to pass + * @param[in] sender The sending vehicle (the lane changing vehicle) + * @return Something!? + */ + void* informLeader(void* info, MSVehicle* sender) { + assert(myLeader != 0); + return myLeader->getLaneChangeModel().inform(info, sender); + } + + + /** @brief Informs the leader on the desired lane + * @param[in] info The information to pass + * @param[in] sender The sending vehicle (the lane changing vehicle) + * @return Something!? + */ + void* informNeighLeader(void* info, MSVehicle* sender) { + assert(myNeighLeader != 0); + return myNeighLeader->getLaneChangeModel().inform(info, sender); + } + + + /** @brief Informs the follower on the desired lane + * @param[in] info The information to pass + * @param[in] sender The sending vehicle (the lane changing vehicle) + * @return Something!? + */ + void* informNeighFollower(void* info, MSVehicle* sender) { + assert(myNeighFollower != 0); + return myNeighFollower->getLaneChangeModel().inform(info, sender); + } + + + private: + /// @brief The leader on the informed vehicle's lane + MSVehicle* myLeader; + /// @brief The leader on the lane the vehicle want to change to + MSVehicle* myNeighLeader; + /// @brief The follower on the lane the vehicle want to change to + MSVehicle* myNeighFollower; + + }; + + /// @brief init global model parameters + void static initGlobalOptions(const OptionsCont& oc); + + /** @brief Factory method for instantiating new lane changing models + * @param[in] lcm The type of model to build + * @param[in] vehicle The vehicle for which this model shall be built + */ + static MSAbstractLaneChangeModel* build(LaneChangeModel lcm, MSVehicle& vehicle); + + /** @brief Constructor + * @param[in] v The vehicle this lane-changer belongs to + */ + MSAbstractLaneChangeModel(MSVehicle& v); + + /// @brief Destructor + virtual ~MSAbstractLaneChangeModel(); + + inline int getOwnState() const { + return myOwnState; + } + + inline void setOwnState(int state) { + myOwnState = state; + } + + virtual void prepareStep() { } + + /** @brief Called to examine whether the vehicle wants to change + * using the given laneOffset. + * This method gets the information about the surrounding vehicles + * and whether another lane may be more preferable */ + virtual int wantsChange( + int laneOffset, + MSAbstractLaneChangeModel::MSLCMessager& msgPass, int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked) = 0; + + virtual void* inform(void* info, MSVehicle* sender) = 0; + + /** @brief Called to adapt the speed in order to allow a lane change. + * + * It is guaranteed that min<=wanted<=max, but the implementation needs + * to make sure that the return value is between min and max. + * + * @param min The minimum resulting speed + * @param wanted The aspired speed of the car following model + * @param max The maximum resulting speed + * @param cfModel The model used + * @return the new speed of the vehicle as proposed by the lane changer + */ + virtual SUMOReal patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, + const MSCFModel& cfModel) = 0; + + virtual void changed(int dir) = 0; + + void unchanged() { + if (myLastLaneChangeOffset > 0) { + myLastLaneChangeOffset += DELTA_T; + } else if (myLastLaneChangeOffset < 0) { + myLastLaneChangeOffset -= DELTA_T; + } + } + + /** @brief Returns the lane the vehicles shadow is on during continuouss lane change + * @return The vehicle's shadow lane + */ + MSLane* getShadowLane() const { + return myShadowLane; + } + + + inline SUMOTime getLastLaneChangeOffset() const { + return myLastLaneChangeOffset; + } + + + /// @brief return whether the vehicle passed the midpoint of a continuous lane change maneuver + inline bool isLaneChangeMidpointPassed() const { + return myLaneChangeMidpointPassed; + } + + /// @brief return whether the vehicle passed the midpoint of a continuous lane change maneuver + inline SUMOReal getLaneChangeCompletion() const { + return myLaneChangeCompletion; + } + + /// @brief return true if the vehicle currently performs a lane change maneuver + inline bool isChangingLanes() const { + return myLaneChangeCompletion < (1 - NUMERICAL_EPS); + } + + /// @brief return the direction of the current lane change maneuver + inline int getLaneChangeDirection() const { + return myLaneChangeDirection; + } + + /// @brief reset the flag whether a vehicle already moved to false + inline bool alreadyMoved() const { + return myAlreadyMoved; + } + + /// @brief reset the flag whether a vehicle already moved to false + void resetMoved() { + myAlreadyMoved = false; + } + + + /// @brief start the lane change maneuver and return whether it continues + bool startLaneChangeManeuver(MSLane* source, MSLane* target, int direction); + + + /* @brief continue the lane change maneuver + * @param[in] moved Whether the vehicle has moved to a new lane + */ + void continueLaneChangeManeuver(bool moved); + + /* @brief finish the lane change maneuver + */ + inline void endLaneChangeManeuver() { + removeLaneChangeShadow(); + myLaneChangeCompletion = 1; + myShadowLane = 0; + } + + /// @brief remove the shadow copy of a lane change maneuver + void removeLaneChangeShadow(); + + /// @brief reserve space at the end of the lane to avoid dead locks + virtual void saveBlockerLength(SUMOReal length) { + UNUSED_PARAMETER(length); + }; + +protected: + virtual bool congested(const MSVehicle* const neighLeader); + + virtual bool predInteraction(const MSVehicle* const leader); + + /// @brief whether the influencer cancels the given request + bool cancelRequest(int state); + + +protected: + /// @brief The vehicle this lane-changer belongs to + MSVehicle& myVehicle; + + /// @brief The current state of the vehicle + int myOwnState; + + /// @brief progress of the lane change maneuver 0:started, 1:complete + SUMOReal myLaneChangeCompletion; + + /// @brief direction of the lane change maneuver -1 means right, 1 means left + int myLaneChangeDirection; + + /// @brief whether myLane has already been set to the target of the lane-change maneuver + bool myLaneChangeMidpointPassed; + + /// @brief whether the vehicle has already moved this step + bool myAlreadyMoved; + + /// @brief The lane the vehicle shadow is on during a continuous lane change + MSLane* myShadowLane; + + /// Wether a vehicle shadow exists + bool myHaveShadow; + + /// @brief The vehicle's car following model + const MSCFModel& myCarFollowModel; + + /* @brief to be called by derived classes in their changed() method. + * If dir=0 is given, the current value remains unchanged */ + void initLastLaneChangeOffset(int dir); + + /// @brief whether overtaking on the right is permitted + static bool myAllowOvertakingRight; + +private: + /* @brief information how long ago the vehicle has performed a lane-change, + * sign indicates direction of the last change + */ + SUMOTime myLastLaneChangeOffset; + + + +private: + /// @brief Invalidated assignment operator + MSAbstractLaneChangeModel& operator=(const MSAbstractLaneChangeModel& s); +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_DK2008.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_DK2008.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_DK2008.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_DK2008.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,680 @@ +/****************************************************************************/ +/// @file MSLCM_DK2008.cpp +/// @author Daniel Krajzewicz +/// @author Friedemann Wesner +/// @author Sascha Krieg +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date Tue, 29.05.2005 +/// @version $Id: MSLCM_DK2008.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A lane change model developed by D. Krajzewicz between 2004 and 2010 +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include "MSLCM_DK2008.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + +//#define DEBUG_VEHICLE_GUI_SELECTION 1 +#ifdef DEBUG_VEHICLE_GUI_SELECTION +#include +#include +#include +#endif + + + +// =========================================================================== +// variable definitions +// =========================================================================== +// 80km/h will be the threshold for dividing between long/short foresight +#define LOOK_FORWARD_SPEED_DIVIDER 14. + +#define LOOK_FORWARD_FAR 15. +#define LOOK_FORWARD_NEAR 5. + + + +#define JAM_FACTOR 2. +#define JAM_FACTOR2 1. + + +// =========================================================================== +// member method definitions +// =========================================================================== +MSLCM_DK2008::MSLCM_DK2008(MSVehicle& v) + : MSAbstractLaneChangeModel(v), + myChangeProbability(0), + myLeadingBlockerLength(0), myLeftSpace(0) {} + +MSLCM_DK2008::~MSLCM_DK2008() { + changed(0); +} + +int +MSLCM_DK2008::wantsChange( + int laneOffset, + MSAbstractLaneChangeModel::MSLCMessager& msgPass, int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked) { + UNUSED_PARAMETER(firstBlocked); + return (laneOffset == -1 ? + wantsChangeToRight(msgPass, blocked, leader, neighLead, neighFollow, neighLane, preb, lastBlocked, firstBlocked) + : wantsChangeToLeft(msgPass, blocked, leader, neighLead, neighFollow, neighLane, preb, lastBlocked, firstBlocked)); + +} + + +int +MSLCM_DK2008::wantsChangeToRight(MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked) { + UNUSED_PARAMETER(firstBlocked); +#ifdef DEBUG_VEHICLE_GUI_SELECTION + if (gSelected.isSelected(GLO_VEHICLE, static_cast(&myVehicle)->getGlID())) { + int bla = 0; + } +#endif + MSVehicle::LaneQ curr, best; + int bestLaneOffset = 0; + SUMOReal currentDist = 0; + SUMOReal neighDist = 0; + SUMOReal neighExtDist = 0; + SUMOReal currExtDist = 0; + int currIdx = 0; + MSLane* prebLane = myVehicle.getLane(); + if (prebLane->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { + // internal edges are not kept inside the bestLanes structure + prebLane = prebLane->getLinkCont()[0]->getLane(); + } + for (int p = 0; p < (int) preb.size(); ++p) { + if (preb[p].lane == prebLane && p > 0) { + curr = preb[p]; + bestLaneOffset = curr.bestLaneOffset; + currentDist = curr.length; + currExtDist = curr.lane->getLength(); + neighDist = preb[p - 1].length; + neighExtDist = preb[p - 1].lane->getLength(); + best = preb[p + bestLaneOffset]; + currIdx = p; + break; + } + } + + // keep information about being a leader/follower + int ret = (myOwnState & 0xffff0000); + + if (leader.first != 0 + && + (myOwnState & LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0 + && + (leader.first->getLaneChangeModel().getOwnState()&LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0) { + + myOwnState &= (0xffffffff - LCA_AMBLOCKINGFOLLOWER_DONTBRAKE); + if (myVehicle.getSpeed() > SUMO_const_haltingSpeed) { + myOwnState |= LCA_AMBACKBLOCKER; + } else { + ret |= LCA_AMBACKBLOCKER; + myDontBrake = true; + } + } + + // process information about the last blocked vehicle + // if this vehicle is blocking someone in front, we maybe decelerate to let him in + if ((*lastBlocked) != 0) { + SUMOReal gap = (*lastBlocked)->getPositionOnLane() - (*lastBlocked)->getVehicleType().getLength() - myVehicle.getPositionOnLane() - myVehicle.getVehicleType().getMinGap(); + if (gap > 0.1) { + if (myVehicle.getSpeed() < ACCEL2SPEED(myVehicle.getCarFollowModel().getMaxDecel())) { + if ((*lastBlocked)->getSpeed() < SUMO_const_haltingSpeed) { + ret |= LCA_AMBACKBLOCKER_STANDING; + } else { + ret |= LCA_AMBACKBLOCKER; + } + myVSafes.push_back(myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), (SUMOReal)(gap - 0.1), (*lastBlocked)->getSpeed(), (*lastBlocked)->getCarFollowModel().getMaxDecel())); + (*lastBlocked) = 0; + } + return ret; + } + } + + // we try to estimate the distance which is necessary to get on a lane + // we have to get on in order to keep our route + // we assume we need something that depends on our velocity + // and compare this with the free space on our wished lane + // + // if the free space is somehow less than the space we need, we should + // definitely try to get to the desired lane + // + // this rule forces our vehicle to change the lane if a lane changing is necessary soon + SUMOReal rv = myVehicle.getSpeed() > LOOK_FORWARD_SPEED_DIVIDER + ? myVehicle.getSpeed() * (SUMOReal) LOOK_FORWARD_FAR + : myVehicle.getSpeed() * (SUMOReal) LOOK_FORWARD_NEAR; + rv += myVehicle.getVehicleType().getLengthWithGap() * (SUMOReal) 2.; + + SUMOReal tdist = currentDist - myVehicle.getPositionOnLane() - best.occupation * (SUMOReal) JAM_FACTOR2; + + // assert(best.length > curr.length); + // XXX if (curr.length != best.length) && ... + if (fabs(best.length - curr.length) > MIN2((SUMOReal) .1, best.lane->getLength()) && bestLaneOffset < 0 && currentDistDisallows(tdist/*currentDist*/, bestLaneOffset, rv)) { + informBlocker(msgPass, blocked, LCA_MRIGHT, neighLead, neighFollow); + if (neighLead.second > 0 && neighLead.second > leader.second) { + myVSafes.push_back(myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighLead.second, neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel()) - (SUMOReal) 0.5); + } + + // letting vehicles merge in at the end of the lane in case of counter-lane change, step#1, right + // if there is a leader and he wants to change to left (we want to change to right) + if (neighLead.first != 0 && (neighLead.first->getLaneChangeModel().getOwnState()&LCA_LEFT) != 0) { + // save at least his length in myLeadingBlockerLength + myLeadingBlockerLength = MAX2(neighLead.first->getVehicleType().getLengthWithGap(), myLeadingBlockerLength); + // save the left space + myLeftSpace = currentDist - myVehicle.getPositionOnLane(); + } + // + + return ret | LCA_RIGHT | LCA_STRATEGIC | LCA_URGENT; + } + + + // the opposite lane-changing direction should be done than the one examined herein + // we'll check whether we assume we could change anyhow and get back in time... + // + // this rule prevents the vehicle from moving in opposite direction of the best lane + // unless the way till the end where the vehicle has to be on the best lane + // is long enough + SUMOReal maxJam = MAX2(preb[currIdx - 1].occupation, preb[currIdx].occupation); + SUMOReal neighLeftPlace = MAX2((SUMOReal) 0, neighDist - myVehicle.getPositionOnLane() - maxJam); + if (bestLaneOffset >= 0 && (currentDistDisallows(neighLeftPlace, bestLaneOffset + 2, rv))) { + // ...we will not change the lane if not + return ret | LCA_STAY | LCA_STRATEGIC; + } + + + // if the current lane is the best and a lane-changing would cause a situation + // of which we assume we will not be able to return to the lane we have to be on... + // + // this rule prevents the vehicle from leaving the current, best lane when it is + // close to this lane's end + if (currExtDist > neighExtDist && (neighLeftPlace * 2. < rv/*||currE[currIdx+1].lengthgetSpeedLimit() > 80. / 3.6) { + return ret | LCA_STAY | LCA_STRATEGIC; + } + // -------- + + // -------- make place on current lane if blocking follower + if (amBlockingFollowerPlusNB() + && + (currentDistAllows(neighDist, bestLaneOffset, rv) || neighDist >= currentDist)) { + + return ret | LCA_RIGHT | LCA_COOPERATIVE | LCA_URGENT; + } + // -------- + + + // -------- security checks for krauss + // (vsafe fails when gap<0) + if ((blocked & LCA_BLOCKED) != 0) { + return ret; + } + // -------- + + // -------- higher speed + if ((congested(neighLead.first) && neighLead.second < 20) || predInteraction(leader.first)) { //!!! + return ret; + } + SUMOReal thisLaneVSafe = myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle); + SUMOReal neighLaneVSafe = neighLane.getVehicleMaxSpeed(&myVehicle); + if (neighLead.first == 0) { + neighLaneVSafe = MIN2(neighLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighDist, 0, 0)); + } else { + // @todo: what if leader is below safe gap?!!! + neighLaneVSafe = MIN2(neighLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighLead.second, neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel())); + } + if (leader.first == 0) { + thisLaneVSafe = MIN2(thisLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), currentDist, 0, 0)); + } else { + // @todo: what if leader is below safe gap?!!! + thisLaneVSafe = MIN2(thisLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), leader.second, leader.first->getSpeed(), leader.first->getCarFollowModel().getMaxDecel())); + } + + thisLaneVSafe = MIN2(thisLaneVSafe, myVehicle.getVehicleType().getMaxSpeed()); + neighLaneVSafe = MIN2(neighLaneVSafe, myVehicle.getVehicleType().getMaxSpeed()); + if (thisLaneVSafe - neighLaneVSafe > 5. / 3.6) { + // ok, the current lane is faster than the right one... + if (myChangeProbability < 0) { + myChangeProbability /= 2.0; + } + } else { + // ok, the right lane is faster than the current + myChangeProbability -= (SUMOReal)((neighLaneVSafe - thisLaneVSafe) / (myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle))); + } + + // let's recheck the "Rechtsfahrgebot" + SUMOReal vmax = MIN2(myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle), myVehicle.getVehicleType().getMaxSpeed()); + vmax -= (SUMOReal)(5. / 2.6); + if (neighLaneVSafe >= vmax) { + myChangeProbability -= (SUMOReal)((neighLaneVSafe - vmax) / (vmax)); + } + + if (myChangeProbability < -2 && neighDist / MAX2((SUMOReal) .1, myVehicle.getSpeed()) > 20.) { //./MAX2((SUMOReal) .1, myVehicle.getSpeed())) { // -.1 + return ret | LCA_RIGHT | LCA_SPEEDGAIN; + } + // -------- + + return ret; +} + + +int +MSLCM_DK2008::wantsChangeToLeft(MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked) { + UNUSED_PARAMETER(firstBlocked); +#ifdef DEBUG_VEHICLE_GUI_SELECTION + if (gSelected.isSelected(GLO_VEHICLE, static_cast(&myVehicle)->getGlID())) { + int bla = 0; + } +#endif + MSVehicle::LaneQ curr, best; + int bestLaneOffset = 0; + SUMOReal currentDist = 0; + SUMOReal neighDist = 0; + SUMOReal neighExtDist = 0; + SUMOReal currExtDist = 0; + int currIdx = 0; + MSLane* prebLane = myVehicle.getLane(); + if (prebLane->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { + // internal edges are not kept inside the bestLanes structure + prebLane = prebLane->getLinkCont()[0]->getLane(); + } + for (int p = 0; p < (int) preb.size(); ++p) { + if (preb[p].lane == prebLane) { + curr = preb[p]; + bestLaneOffset = curr.bestLaneOffset; + currentDist = curr.length; + currExtDist = curr.lane->getLength(); + neighDist = preb[p + 1].length; + neighExtDist = preb[p + 1].lane->getLength(); + best = preb[p + bestLaneOffset]; + currIdx = p; + break; + } + } + // keep information about being a leader/follower + int ret = (myOwnState & 0xffff0000); + + // ?!!! + if (leader.first != 0 + && + (myOwnState & LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0 + && + (leader.first->getLaneChangeModel().getOwnState()&LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0) { + + myOwnState &= (0xffffffff - LCA_AMBLOCKINGFOLLOWER_DONTBRAKE); + if (myVehicle.getSpeed() > SUMO_const_haltingSpeed) { + myOwnState |= LCA_AMBACKBLOCKER; + } else { + ret |= LCA_AMBACKBLOCKER; + myDontBrake = true; + } + } + + // process information about the last blocked vehicle + // if this vehicle is blocking someone in front, we maybe decelerate to let him in + if ((*lastBlocked) != 0) { + SUMOReal gap = (*lastBlocked)->getPositionOnLane() - (*lastBlocked)->getVehicleType().getLength() - myVehicle.getPositionOnLane() - myVehicle.getVehicleType().getMinGap(); + if (gap > 0.1) { + if (myVehicle.getSpeed() < ACCEL2SPEED(myVehicle.getCarFollowModel().getMaxDecel())) { + if ((*lastBlocked)->getSpeed() < SUMO_const_haltingSpeed) { + ret |= LCA_AMBACKBLOCKER_STANDING; + } else { + ret |= LCA_AMBACKBLOCKER; + } + myVSafes.push_back(myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), (SUMOReal)(gap - 0.1), (*lastBlocked)->getSpeed(), (*lastBlocked)->getCarFollowModel().getMaxDecel())); + (*lastBlocked) = 0; + } + return ret; + } + } + + // we try to estimate the distance which is necessary to get on a lane + // we have to get on in order to keep our route + // we assume we need something that depends on our velocity + // and compare this with the free space on our wished lane + // + // if the free space is somehow less than the space we need, we should + // definitely try to get to the desired lane + // + // this rule forces our vehicle to change the lane if a lane changing is necessary soon + SUMOReal lv = myVehicle.getSpeed() > LOOK_FORWARD_SPEED_DIVIDER + ? myVehicle.getSpeed() * (SUMOReal) LOOK_FORWARD_FAR + : myVehicle.getSpeed() * (SUMOReal) LOOK_FORWARD_NEAR; + lv += myVehicle.getVehicleType().getLengthWithGap() * (SUMOReal) 2.; + + + SUMOReal tdist = currentDist - myVehicle.getPositionOnLane() - best.occupation * (SUMOReal) JAM_FACTOR2; + if (fabs(best.length - curr.length) > MIN2((SUMOReal) .1, best.lane->getLength()) && bestLaneOffset > 0 + && + currentDistDisallows(tdist/*currentDist*/, bestLaneOffset, lv)) { + informBlocker(msgPass, blocked, LCA_MLEFT, neighLead, neighFollow); + if (neighLead.second > 0 && neighLead.second > leader.second) { + myVSafes.push_back(myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighLead.second, neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel()) - (SUMOReal) 0.5); + } + + // letting vehicles merge in at the end of the lane in case of counter-lane change, step#1, left + // if there is a leader and he wants to change to right (we want to change to left) + if (neighLead.first != 0 && (neighLead.first->getLaneChangeModel().getOwnState()&LCA_RIGHT) != 0) { + // save at least his length in myLeadingBlockerLength + myLeadingBlockerLength = MAX2(neighLead.first->getVehicleType().getLengthWithGap(), myLeadingBlockerLength); + // save the left space + myLeftSpace = currentDist - myVehicle.getPositionOnLane(); + } + // + + return ret | LCA_LEFT | LCA_STRATEGIC | LCA_URGENT; + } + + // the opposite lane-changing direction should be rather done, not + // the one examined herein + // we'll check whether we assume we could change anyhow and get back in time... + // + // this rule prevents the vehicle from moving in opposite direction of the best lane + // unless the way till the end where the vehicle has to be on the best lane + // is long enough + SUMOReal maxJam = MAX2(preb[currIdx + 1].occupation, preb[currIdx].occupation); + SUMOReal neighLeftPlace = MAX2((SUMOReal) 0, neighDist - myVehicle.getPositionOnLane() - maxJam); + if (bestLaneOffset <= 0 && (currentDistDisallows(neighLeftPlace, bestLaneOffset - 2, lv))) { + // ...we will not change the lane if not + return ret | LCA_STAY | LCA_STRATEGIC; + } + + + // if the current lane is the best and a lane-changing would cause a situation + // of which we assume we will not be able to return to the lane we have to be on... + // + // this rule prevents the vehicle from leaving the current, best lane when it is + // close to this lane's end + if (currExtDist > neighExtDist && (neighLeftPlace * 2. < lv/*||currE[currIdx+1].length80./3.6) { + return ret; + } + */ + + + /* + // if the current lane is the + if(bestLaneOffset==0&&(neighDist==0||curr.seenVehicles2*JAM_FACTOR>=neighExtDist-curr.length)) { + return ret; + } + */ + // -------- + + // -------- make place on current lane if blocking follower + if (amBlockingFollowerPlusNB() + && + (currentDistAllows(neighDist, bestLaneOffset, lv) || neighDist >= currentDist)) { + + return ret | LCA_LEFT | LCA_COOPERATIVE | LCA_URGENT; + } + // -------- + + // -------- security checks for krauss + // (vsafe fails when gap<0) + if ((blocked & LCA_BLOCKED) != 0) { + return ret; + } + + // -------- higher speed + if ((congested(neighLead.first) && neighLead.second < 20) || predInteraction(leader.first)) { //!!! + return ret; + } + SUMOReal neighLaneVSafe = neighLane.getVehicleMaxSpeed(&myVehicle); + SUMOReal thisLaneVSafe = myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle); + if (neighLead.first == 0) { + neighLaneVSafe = MIN2(neighLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighDist, 0, 0)); // !!! warum nicht die Folgesgeschw.? + } else { + // @todo: what if leader is below safe gap?!!! + neighLaneVSafe = MIN2(neighLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighLead.second, neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel())); + } + if (leader.first == 0) { + thisLaneVSafe = MIN2(thisLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), currentDist, 0, 0)); + } else { + // @todo: what if leader is below safe gap?!!! + thisLaneVSafe = MIN2(thisLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), leader.second, leader.first->getSpeed(), leader.first->getCarFollowModel().getMaxDecel())); + } + thisLaneVSafe = MIN2(thisLaneVSafe, myVehicle.getVehicleType().getMaxSpeed()); + neighLaneVSafe = MIN2(neighLaneVSafe, myVehicle.getVehicleType().getMaxSpeed()); + if (thisLaneVSafe > neighLaneVSafe) { + // this lane is better + if (myChangeProbability > 0) { + myChangeProbability /= 2.0; + } + } else { + // right lane is better + myChangeProbability += (SUMOReal)((neighLaneVSafe - thisLaneVSafe) / (myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle))); // !!! Fahrzeuggeschw.! + } + if (myChangeProbability > .2 && neighDist / MAX2((SUMOReal) .1, myVehicle.getSpeed()) > 20.) { // .1 + return ret | LCA_LEFT | LCA_SPEEDGAIN | LCA_URGENT; + } + // -------- + + return ret; +} + + +SUMOReal +MSLCM_DK2008::patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, const MSCFModel& cfModel) { +#ifdef DEBUG_VEHICLE_GUI_SELECTION + if (gSelected.isSelected(GLO_VEHICLE, static_cast(&myVehicle)->getGlID())) { + int bla = 0; + } +#endif + int state = myOwnState; + + // letting vehicles merge in at the end of the lane in case of counter-lane change, step#2 + SUMOReal MAGIC_offset = 1.; + // if we want to change and have a blocking leader and there is enough room for him in front of us + if (myLeadingBlockerLength != 0) { + SUMOReal space = myLeftSpace - myLeadingBlockerLength - MAGIC_offset - myVehicle.getVehicleType().getMinGap(); + if (space > 0) { + // compute speed for decelerating towards a place which allows the blocking leader to merge in in front + SUMOReal safe = cfModel.stopSpeed(&myVehicle, myVehicle.getSpeed(), space); + // if we are approaching this place + if (safe < wanted) { + // return this speed as the speed to use + return MAX2(min, safe); + } + } + } + + // just to make sure to be notified about lane chaning end + if (myVehicle.getLane()->getEdge().getLanes().size() == 1 || myVehicle.getLane()->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { + // remove chaning information if on a road with a single lane + changed(0); + return wanted; + } + + SUMOReal nVSafe = wanted; + bool gotOne = false; + for (std::vector::const_iterator i = myVSafes.begin(); i != myVSafes.end(); ++i) { + SUMOReal v = (*i); + if (v >= min && v <= max) { + nVSafe = MIN2(v, nVSafe); + gotOne = true; + } + } + + // check whether the vehicle is blocked + if ((state & LCA_WANTS_LANECHANGE) != 0) { + if (gotOne && !myDontBrake) { + return nVSafe; + } + // check whether the vehicle maybe has to be swapped with one of + // the blocking vehicles + if ((state & LCA_BLOCKED) != 0) { + if ((state & LCA_BLOCKED_BY_LEADER) != 0) { + // if interacting with leader and not too slow + return (min + wanted) / (SUMOReal) 2.0; + } + if ((state & LCA_BLOCKED_BY_FOLLOWER) != 0) { + return (max + wanted) / (SUMOReal) 2.0; + } + return (min + wanted) / (SUMOReal) 2.0; + } + } + + + // decelerate if being a blocking follower + // (and does not have to change lanes) + if ((state & LCA_AMBLOCKINGFOLLOWER) != 0) { + if (fabs(max - myVehicle.getCarFollowModel().maxNextSpeed(myVehicle.getSpeed(), &myVehicle)) < 0.001 && min == 0) { // !!! was standing + return 0; + } + return (min + wanted) / (SUMOReal) 2.0; + } + if ((state & LCA_AMBACKBLOCKER) != 0) { + if (max <= myVehicle.getCarFollowModel().maxNextSpeed(myVehicle.getSpeed(), &myVehicle) && min == 0) { // !!! was standing + return min; + } + } + if ((state & LCA_AMBACKBLOCKER_STANDING) != 0) { + return min; + } + // accelerate if being a blocking leader or blocking follower not able to brake + // (and does not have to change lanes) + if ((state & LCA_AMBLOCKINGLEADER) != 0) { + return (max + wanted) / (SUMOReal) 2.0; + } + if ((state & LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0) { + if (max <= myVehicle.getCarFollowModel().maxNextSpeed(myVehicle.getSpeed(), &myVehicle) && min == 0) { // !!! was standing + return wanted; + } + return (min + wanted) / (SUMOReal) 2.0; + } + return wanted; +} + + +void* +MSLCM_DK2008::inform(void* info, MSVehicle* /*sender*/) { + Info* pinfo = (Info*) info; + //myOwnState &= 0xffffffff; // reset all bits of MyLCAEnum but only those + myOwnState |= pinfo->second; + delete pinfo; + return (void*) true; +} + + +void +MSLCM_DK2008::changed(int dir) { + myOwnState = 0; + myChangeProbability = 0; + myLeadingBlockerLength = 0; + myLeftSpace = 0; + myVSafes.clear(); + myDontBrake = false; + initLastLaneChangeOffset(dir); +} + + +void +MSLCM_DK2008::informBlocker(MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int& blocked, + int dir, + const std::pair& neighLead, + const std::pair& neighFollow) { + if ((blocked & LCA_BLOCKED_BY_FOLLOWER) != 0) { + assert(neighFollow.first != 0); + MSVehicle* nv = neighFollow.first; + SUMOReal decelGap = + neighFollow.second + + SPEED2DIST(myVehicle.getSpeed()) * (SUMOReal) 2.0 + - MAX2(nv->getSpeed() - (SUMOReal) ACCEL2DIST(nv->getCarFollowModel().getMaxDecel()) * (SUMOReal) 2.0, (SUMOReal) 0); + if (neighFollow.second > 0 && decelGap > 0 && decelGap >= nv->getCarFollowModel().getSecureGap(nv->getSpeed(), myVehicle.getSpeed(), myVehicle.getCarFollowModel().getMaxDecel())) { + SUMOReal vsafe = myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighFollow.second, neighFollow.first->getSpeed(), neighFollow.first->getCarFollowModel().getMaxDecel()); + msgPass.informNeighFollower(new Info(vsafe, dir | LCA_AMBLOCKINGFOLLOWER), &myVehicle); + } else { + SUMOReal vsafe = neighFollow.second <= 0 ? 0 : myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighFollow.second, neighFollow.first->getSpeed(), neighFollow.first->getCarFollowModel().getMaxDecel()); + msgPass.informNeighFollower(new Info(vsafe, dir | LCA_AMBLOCKINGFOLLOWER_DONTBRAKE), &myVehicle); + } + } + if ((blocked & LCA_BLOCKED_BY_LEADER) != 0) { + if (neighLead.first != 0 && neighLead.second > 0) { + msgPass.informNeighLeader(new Info(0, dir | LCA_AMBLOCKINGLEADER), &myVehicle); + } + } +} + + +void +MSLCM_DK2008::prepareStep() { + myOwnState = 0; + myLeadingBlockerLength = 0; + myLeftSpace = 0; + myVSafes.clear(); + myDontBrake = false; + // truncate myChangeProbability to work around numerical instability between different builds + myChangeProbability = ceil(myChangeProbability * 100000.0) * 0.00001; +} + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_DK2008.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_DK2008.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_DK2008.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_DK2008.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,172 @@ +/****************************************************************************/ +/// @file MSLCM_DK2008.h +/// @author Daniel Krajzewicz +/// @author Friedemann Wesner +/// @author Sascha Krieg +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date Fri, 29.04.2005 +/// @version $Id: MSLCM_DK2008.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A lane change model developed by D. Krajzewicz between 2004 and 2010 +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSLCM_DK2008_h +#define MSLCM_DK2008_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include "MSAbstractLaneChangeModel.h" +#include + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSLCM_DK2008 + * @brief A lane change model developed by D. Krajzewicz between 2004 and 2010 + */ +class MSLCM_DK2008 : public MSAbstractLaneChangeModel { +public: + + enum MyLCAEnum { + LCA_AMBLOCKINGLEADER = 1 << 16, + LCA_AMBLOCKINGFOLLOWER = 1 << 17, + LCA_MRIGHT = 1 << 18, + LCA_MLEFT = 1 << 19, + // !!! never set LCA_UNBLOCK = 1 << 20, + LCA_AMBLOCKINGFOLLOWER_DONTBRAKE = 1 << 21, + // !!! never used LCA_AMBLOCKINGSECONDFOLLOWER = 1 << 22, + + // !!! never read LCA_KEEP1 = 1 << 24, + // !!! never used LCA_KEEP2 = 1 << 25, + LCA_AMBACKBLOCKER = 1 << 26, + LCA_AMBACKBLOCKER_STANDING = 1 << 27 + }; + + MSLCM_DK2008(MSVehicle& v); + + virtual ~MSLCM_DK2008(); + + /** @brief Called to examine whether the vehicle wants to change + * using the given laneOffset. + * This method gets the information about the surrounding vehicles + * and whether another lane may be more preferable */ + int wantsChange( + int laneOffset, + MSAbstractLaneChangeModel::MSLCMessager& msgPass, int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked); + + virtual void* inform(void* info, MSVehicle* sender); + + /** @brief Called to adapt the speed in order to allow a lane change. + * + * @param min The minimum resulting speed + * @param wanted The aspired speed of the car following model + * @param max The maximum resulting speed + * @param cfModel The model used + * @return the new speed of the vehicle as proposed by the lane changer + */ + virtual SUMOReal patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, + const MSCFModel& cfModel); + + virtual void changed(int dir); + + virtual void prepareStep(); + + +protected: + /** @brief Called to examine whether the vehicle wants to change to right + This method gets the information about the surrounding vehicles + and whether another lane may be more preferable */ + virtual int wantsChangeToRight( + MSAbstractLaneChangeModel::MSLCMessager& msgPass, int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked); + + /** @brief Called to examine whether the vehicle wants to change to left + This method gets the information about the surrounding vehicles + and whether another lane may be more preferable */ + virtual int wantsChangeToLeft( + MSAbstractLaneChangeModel::MSLCMessager& msgPass, int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked); + + void informBlocker(MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int& blocked, int dir, + const std::pair& neighLead, + const std::pair& neighFollow); + + inline bool amBlockingLeader() { + return (myOwnState & LCA_AMBLOCKINGLEADER) != 0; + } + inline bool amBlockingFollower() { + return (myOwnState & LCA_AMBLOCKINGFOLLOWER) != 0; + } + inline bool amBlockingFollowerNB() { + return (myOwnState & LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0; + } + inline bool amBlockingFollowerPlusNB() { + return (myOwnState & (LCA_AMBLOCKINGFOLLOWER | LCA_AMBLOCKINGFOLLOWER_DONTBRAKE)) != 0; + } + inline bool currentDistDisallows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist) { + return dist / (abs(laneOffset)) < lookForwardDist; + } + inline bool currentDistAllows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist) { + return dist / abs(laneOffset) > lookForwardDist; + } + + typedef std::pair Info; + + + +protected: + SUMOReal myChangeProbability; + + SUMOReal myLeadingBlockerLength; + SUMOReal myLeftSpace; + + std::vector myVSafes; + bool myDontBrake; + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_JE2013.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_JE2013.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_JE2013.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_JE2013.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,1223 @@ +/****************************************************************************/ +/// @file MSLCM_JE2013.h +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @author Laura Bieker +/// @date Fri, 08.10.2013 +/// @version $Id: MSLCM_JE2013.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A lane change model developed by J. Erdmann +// based on the model of D. Krajzewicz developed between 2004 and 2011 (MSLCM_DK2004) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include "MSLCM_JE2013.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + +//#define DEBUG_VEHICLE_GUI_SELECTION 1 +#ifdef DEBUG_VEHICLE_GUI_SELECTION +#include +#include +#include +#endif + + + +// =========================================================================== +// variable definitions +// =========================================================================== +// 80km/h will be the threshold for dividing between long/short foresight +#define LOOK_FORWARD_SPEED_DIVIDER (SUMOReal)14. + +// VARIANT_1 (lf*2) +//#define LOOK_FORWARD_FAR 30. +//#define LOOK_FORWARD_NEAR 10. + +#define LOOK_FORWARD_RIGHT (SUMOReal)10. +#define LOOK_FORWARD_LEFT (SUMOReal)20. + +#define JAM_FACTOR (SUMOReal)1. +//#define JAM_FACTOR 2. // VARIANT_8 (makes vehicles more focused but also more "selfish") + +#define LCA_RIGHT_IMPATIENCE (SUMOReal)-1. +#define CUT_IN_LEFT_SPEED_THRESHOLD (SUMOReal)27. +#define MAX_ONRAMP_LENGTH (SUMOReal)200. + +#define LOOK_AHEAD_MIN_SPEED (SUMOReal)0.0 +#define LOOK_AHEAD_SPEED_MEMORY (SUMOReal)0.9 +#define LOOK_AHEAD_SPEED_DECREMENT 6. + +#define HELP_DECEL_FACTOR (SUMOReal)1.0 + +#define HELP_OVERTAKE (SUMOReal)(10.0 / 3.6) +#define MIN_FALLBEHIND (SUMOReal)(14.0 / 3.6) + +#define KEEP_RIGHT_HEADWAY (SUMOReal)2.0 + +#define URGENCY (SUMOReal)2.0 + +#define ROUNDABOUT_DIST_BONUS (SUMOReal)100.0 + +#define CHANGE_PROB_THRESHOLD_RIGHT (SUMOReal)2.0 +#define CHANGE_PROB_THRESHOLD_LEFT (SUMOReal)0.2 +#define KEEP_RIGHT_TIME (SUMOReal)5.0 // the number of seconds after which a vehicle should move to the right lane +#define KEEP_RIGHT_ACCEPTANCE (SUMOReal)7.0 // calibration factor for determining the desire to keep right + +#define RELGAIN_NORMALIZATION_MIN_SPEED (SUMOReal)10.0 + +#define TURN_LANE_DIST (SUMOReal)200.0 // the distance at which a lane leading elsewhere is considered to be a turn-lane that must be avoided + +//#define DEBUG_COND (myVehicle.getID() == "1501_27271428" || myVehicle.getID() == "1502_27270000") +//#define DEBUG_COND (myVehicle.getID() == "175129_26220000") +//#define DEBUG_COND (myVehicle.getID() == "pkw150478" || myVehicle.getID() == "pkw150494" || myVehicle.getID() == "pkw150289") +//#define DEBUG_COND (myVehicle.getID() == "A" || myVehicle.getID() == "B") // fail change to left +//#define DEBUG_COND (myVehicle.getID() == "Costa_12_13") // test stops_overtaking +#define DEBUG_COND false + +// debug function +std::string +tryID(const MSVehicle* v) { + return v == 0 ? "NULL" : v->getID(); +} + + +// =========================================================================== +// member method definitions +// =========================================================================== +MSLCM_JE2013::MSLCM_JE2013(MSVehicle& v) : + MSAbstractLaneChangeModel(v), + mySpeedGainProbability(0), + myKeepRightProbability(0), + myLeadingBlockerLength(0), + myLeftSpace(0), + myLookAheadSpeed(LOOK_AHEAD_MIN_SPEED) +{} + +MSLCM_JE2013::~MSLCM_JE2013() { + changed(0); +} + + +int +MSLCM_JE2013::wantsChange( + int laneOffset, + MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked) { + gDebugFlag2 = DEBUG_COND; + + if (gDebugFlag2) { + std::cout << STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + << " veh=" << myVehicle.getID() + << " lane=" << myVehicle.getLane()->getID() + << " pos=" << myVehicle.getPositionOnLane() + << " speed=" << myVehicle.getSpeed() + << " considerChangeTo=" << (laneOffset == -1 ? "right" : "left") + << "\n"; + } + + const int result = _wantsChange(laneOffset, msgPass, blocked, leader, neighLead, neighFollow, neighLane, preb, lastBlocked, firstBlocked); + if (gDebugFlag2) { + if (result & LCA_WANTS_LANECHANGE) { + std::cout << STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + << " veh=" << myVehicle.getID() + << " wantsChangeTo=" << (laneOffset == -1 ? "right" : "left") + << ((result & LCA_URGENT) ? " (urgent)" : "") + << ((result & LCA_CHANGE_TO_HELP) ? " (toHelp)" : "") + << ((result & LCA_STRATEGIC) ? " (strat)" : "") + << ((result & LCA_COOPERATIVE) ? " (coop)" : "") + << ((result & LCA_SPEEDGAIN) ? " (speed)" : "") + << ((result & LCA_KEEPRIGHT) ? " (keepright)" : "") + << ((result & LCA_TRACI) ? " (traci)" : "") + << ((blocked & LCA_BLOCKED) ? " (blocked)" : "") + << ((blocked & LCA_OVERLAPPING) ? " (overlap)" : "") + << "\n\n\n"; + } + } + gDebugFlag2 = false; + return result; +} + + +SUMOReal +MSLCM_JE2013::patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, const MSCFModel& cfModel) { + gDebugFlag1 = DEBUG_COND; + + const SUMOReal newSpeed = _patchSpeed(min, wanted, max, cfModel); + if (gDebugFlag1) { + const std::string patched = (wanted != newSpeed ? " patched=" + toString(newSpeed) : ""); + std::cout << STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + << " veh=" << myVehicle.getID() + << " lane=" << myVehicle.getLane()->getID() + << " pos=" << myVehicle.getPositionOnLane() + << " v=" << myVehicle.getSpeed() + << " wanted=" << wanted + << patched + << "\n\n"; + } + gDebugFlag1 = false; + return newSpeed; +} + + +SUMOReal +MSLCM_JE2013::_patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, const MSCFModel& cfModel) { + + const SUMOReal time = STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()); + + int state = myOwnState; + + // letting vehicles merge in at the end of the lane in case of counter-lane change, step#2 + SUMOReal MAGIC_offset = 1.; + // if we want to change and have a blocking leader and there is enough room for him in front of us + if (myLeadingBlockerLength != 0) { + SUMOReal space = myLeftSpace - myLeadingBlockerLength - MAGIC_offset - myVehicle.getVehicleType().getMinGap(); + if (gDebugFlag1) { + std::cout << time << " veh=" << myVehicle.getID() << " myLeadingBlockerLength=" << myLeadingBlockerLength << " space=" << space << "\n"; + } + if (space > 0) { // XXX space > -MAGIC_offset + // compute speed for decelerating towards a place which allows the blocking leader to merge in in front + SUMOReal safe = cfModel.stopSpeed(&myVehicle, myVehicle.getSpeed(), space); + // if we are approaching this place + if (safe < wanted) { + // return this speed as the speed to use + if (gDebugFlag1) { + std::cout << time << " veh=" << myVehicle.getID() << " slowing down for leading blocker, safe=" << safe << (safe + NUMERICAL_EPS < min ? " (not enough)" : "") << "\n"; + } + return MAX2(min, safe); + } + } + } + + SUMOReal nVSafe = wanted; + bool gotOne = false; + for (std::vector::const_iterator i = myVSafes.begin(); i != myVSafes.end(); ++i) { + SUMOReal v = (*i); + if (v >= min && v <= max) { + nVSafe = MIN2(v, nVSafe); + gotOne = true; + if (gDebugFlag1) { + std::cout << time << " veh=" << myVehicle.getID() << " got nVSafe=" << nVSafe << "\n"; + } + } else { + if (v < min) { + if (gDebugFlag1) { + std::cout << time << " veh=" << myVehicle.getID() << " ignoring low nVSafe=" << v << " min=" << min << "\n"; + } + } else { + if (gDebugFlag1) { + std::cout << time << " veh=" << myVehicle.getID() << " ignoring high nVSafe=" << v << " max=" << max << "\n"; + } + } + } + } + + if (gotOne && !myDontBrake) { + if (gDebugFlag1) { + std::cout << time << " veh=" << myVehicle.getID() << " got vSafe\n"; + } + return nVSafe; + } + + // check whether the vehicle is blocked + if ((state & LCA_WANTS_LANECHANGE) != 0 && (state & LCA_BLOCKED) != 0) { + if ((state & LCA_STRATEGIC) != 0) { + // necessary decelerations are controlled via vSafe. If there are + // none it means we should speed up + if (gDebugFlag1) { + std::cout << time << " veh=" << myVehicle.getID() << " LCA_WANTS_LANECHANGE (strat, no vSafe)\n"; + } + return (max + wanted) / (SUMOReal) 2.0; + } else if ((state & LCA_COOPERATIVE) != 0) { + // only minor adjustments in speed should be done + if ((state & LCA_BLOCKED_BY_LEADER) != 0) { + if (gDebugFlag1) { + std::cout << time << " veh=" << myVehicle.getID() << " LCA_BLOCKED_BY_LEADER (coop)\n"; + } + return (min + wanted) / (SUMOReal) 2.0; + } + if ((state & LCA_BLOCKED_BY_FOLLOWER) != 0) { + if (gDebugFlag1) { + std::cout << time << " veh=" << myVehicle.getID() << " LCA_BLOCKED_BY_FOLLOWER (coop)\n"; + } + return (max + wanted) / (SUMOReal) 2.0; + } + //} else { // VARIANT_16 + // // only accelerations should be performed + // if ((state & LCA_BLOCKED_BY_FOLLOWER) != 0) { + // if (gDebugFlag1) std::cout << time << " veh=" << myVehicle.getID() << " LCA_BLOCKED_BY_FOLLOWER\n"; + // return (max + wanted) / (SUMOReal) 2.0; + // } + } + } + + /* + // decelerate if being a blocking follower + // (and does not have to change lanes) + if ((state & LCA_AMBLOCKINGFOLLOWER) != 0) { + if (fabs(max - myVehicle.getCarFollowModel().maxNextSpeed(myVehicle.getSpeed(), &myVehicle)) < 0.001 && min == 0) { // !!! was standing + if (gDebugFlag1) std::cout << time << " veh=" << myVehicle.getID() << " LCA_AMBLOCKINGFOLLOWER (standing)\n"; + return 0; + } + if (gDebugFlag1) std::cout << time << " veh=" << myVehicle.getID() << " LCA_AMBLOCKINGFOLLOWER\n"; + + //return min; // VARIANT_3 (brakeStrong) + return (min + wanted) / (SUMOReal) 2.0; + } + if ((state & LCA_AMBACKBLOCKER) != 0) { + if (max <= myVehicle.getCarFollowModel().maxNextSpeed(myVehicle.getSpeed(), &myVehicle) && min == 0) { // !!! was standing + if (gDebugFlag1) std::cout << time << " veh=" << myVehicle.getID() << " LCA_AMBACKBLOCKER (standing)\n"; + //return min; VARIANT_9 (backBlockVSafe) + return nVSafe; + } + } + if ((state & LCA_AMBACKBLOCKER_STANDING) != 0) { + if (gDebugFlag1) std::cout << time << " veh=" << myVehicle.getID() << " LCA_AMBACKBLOCKER_STANDING\n"; + //return min; + return nVSafe; + } + */ + + // accelerate if being a blocking leader or blocking follower not able to brake + // (and does not have to change lanes) + if ((state & LCA_AMBLOCKINGLEADER) != 0) { + if (gDebugFlag1) { + std::cout << time << " veh=" << myVehicle.getID() << " LCA_AMBLOCKINGLEADER\n"; + } + return (max + wanted) / (SUMOReal) 2.0; + } + + if ((state & LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0) { + if (gDebugFlag1) { + std::cout << time << " veh=" << myVehicle.getID() << " LCA_AMBLOCKINGFOLLOWER_DONTBRAKE\n"; + } + /* + // VARIANT_4 (dontbrake) + if (max <= myVehicle.getCarFollowModel().maxNextSpeed(myVehicle.getSpeed(), &myVehicle) && min == 0) { // !!! was standing + return wanted; + } + return (min + wanted) / (SUMOReal) 2.0; + */ + } + if (myVehicle.getLane()->getEdge().getLanes().size() == 1) { + // remove chaning information if on a road with a single lane + changed(0); + } + return wanted; +} + + +void* +MSLCM_JE2013::inform(void* info, MSVehicle* sender) { + Info* pinfo = (Info*) info; + if (pinfo->first >= 0) { + myVSafes.push_back(pinfo->first); + } + //myOwnState &= 0xffffffff; // reset all bits of MyLCAEnum but only those + myOwnState |= pinfo->second; + if (gDebugFlag2 || DEBUG_COND) { + std::cout << STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + << " veh=" << myVehicle.getID() + << " informedBy=" << sender->getID() + << " info=" << pinfo->second + << " vSafe=" << pinfo->first + << "\n"; + } + delete pinfo; + return (void*) true; +} + + +SUMOReal +MSLCM_JE2013::informLeader(MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int blocked, + int dir, + const std::pair& neighLead, + SUMOReal remainingSeconds) { + SUMOReal plannedSpeed = MIN2(myVehicle.getSpeed(), + myVehicle.getCarFollowModel().stopSpeed(&myVehicle, myVehicle.getSpeed(), myLeftSpace - myLeadingBlockerLength)); + for (std::vector::const_iterator i = myVSafes.begin(); i != myVSafes.end(); ++i) { + SUMOReal v = (*i); + if (v >= myVehicle.getSpeed() - ACCEL2SPEED(myVehicle.getCarFollowModel().getMaxDecel())) { + plannedSpeed = MIN2(plannedSpeed, v); + } + } + if (gDebugFlag2) { + std::cout << " informLeader speed=" << myVehicle.getSpeed() << " planned=" << plannedSpeed << "\n"; + } + + if ((blocked & LCA_BLOCKED_BY_LEADER) != 0) { + assert(neighLead.first != 0); + MSVehicle* nv = neighLead.first; + if (gDebugFlag2) std::cout << " blocked by leader nv=" << nv->getID() << " nvSpeed=" << nv->getSpeed() << " needGap=" + << myVehicle.getCarFollowModel().getSecureGap(myVehicle.getSpeed(), nv->getSpeed(), nv->getCarFollowModel().getMaxDecel()) << "\n"; + // decide whether we want to overtake the leader or follow it + const SUMOReal dv = plannedSpeed - nv->getSpeed(); + const SUMOReal overtakeDist = (neighLead.second // drive to back of follower + + nv->getVehicleType().getLengthWithGap() // drive to front of follower + + myVehicle.getVehicleType().getLength() // ego back reaches follower front + + nv->getCarFollowModel().getSecureGap( // save gap to follower + nv->getSpeed(), myVehicle.getSpeed(), myVehicle.getCarFollowModel().getMaxDecel())); + + if (dv < 0 + // overtaking on the right on an uncongested highway is forbidden (noOvertakeLCLeft) + || (dir == LCA_MLEFT && !myVehicle.congested() && !myAllowOvertakingRight) + // not enough space to overtake? (we will start to brake when approaching a dead end) + || myLeftSpace - myVehicle.getCarFollowModel().brakeGap(myVehicle.getSpeed()) < overtakeDist + // not enough time to overtake? + || dv * remainingSeconds < overtakeDist) { + // cannot overtake + msgPass.informNeighLeader(new Info(-1, dir | LCA_AMBLOCKINGLEADER), &myVehicle); + // slow down smoothly to follow leader + const SUMOReal targetSpeed = myCarFollowModel.followSpeed( + &myVehicle, myVehicle.getSpeed(), neighLead.second, nv->getSpeed(), nv->getCarFollowModel().getMaxDecel()); + if (targetSpeed < myVehicle.getSpeed()) { + // slow down smoothly to follow leader + const SUMOReal decel = ACCEL2SPEED(MIN2(myVehicle.getCarFollowModel().getMaxDecel(), + MAX2(MIN_FALLBEHIND, (myVehicle.getSpeed() - targetSpeed) / remainingSeconds))); + //const SUMOReal nextSpeed = MAX2((SUMOReal)0, MIN2(plannedSpeed, myVehicle.getSpeed() - decel)); + const SUMOReal nextSpeed = MIN2(plannedSpeed, myVehicle.getSpeed() - decel); + if (gDebugFlag2) { + std::cout << STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + << " cannot overtake leader nv=" << nv->getID() + << " dv=" << dv + << " remainingSeconds=" << remainingSeconds + << " targetSpeed=" << targetSpeed + << " nextSpeed=" << nextSpeed + << "\n"; + } + myVSafes.push_back(nextSpeed); + return nextSpeed; + } else { + // leader is fast enough anyway + if (gDebugFlag2) { + std::cout << STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + << " cannot overtake fast leader nv=" << nv->getID() + << " dv=" << dv + << " remainingSeconds=" << remainingSeconds + << " targetSpeed=" << targetSpeed + << "\n"; + } + myVSafes.push_back(targetSpeed); + return plannedSpeed; + } + } else { + if (gDebugFlag2) { + std::cout << STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + << " wants to overtake leader nv=" << nv->getID() + << " dv=" << dv + << " remainingSeconds=" << remainingSeconds + << " currentGap=" << neighLead.second + << " secureGap=" << nv->getCarFollowModel().getSecureGap(nv->getSpeed(), myVehicle.getSpeed(), myVehicle.getCarFollowModel().getMaxDecel()) + << " overtakeDist=" << overtakeDist + << "\n"; + } + // overtaking, leader should not accelerate + msgPass.informNeighLeader(new Info(nv->getSpeed(), dir | LCA_AMBLOCKINGLEADER), &myVehicle); + return -1; + } + } else if (neighLead.first != 0) { // (remainUnblocked) + // we are not blocked now. make sure we stay far enough from the leader + MSVehicle* nv = neighLead.first; + const SUMOReal nextNVSpeed = nv->getSpeed() - HELP_OVERTAKE; // conservative + const SUMOReal dv = SPEED2DIST(myVehicle.getSpeed() - nextNVSpeed); + const SUMOReal targetSpeed = myCarFollowModel.followSpeed( + &myVehicle, myVehicle.getSpeed(), neighLead.second - dv, nextNVSpeed, nv->getCarFollowModel().getMaxDecel()); + myVSafes.push_back(targetSpeed); + if (gDebugFlag2) { + std::cout << " not blocked by leader nv=" << nv->getID() + << " nvSpeed=" << nv->getSpeed() + << " gap=" << neighLead.second + << " nextGap=" << neighLead.second - dv + << " needGap=" << myVehicle.getCarFollowModel().getSecureGap(myVehicle.getSpeed(), nv->getSpeed(), nv->getCarFollowModel().getMaxDecel()) + << " targetSpeed=" << targetSpeed + << "\n"; + } + return MIN2(targetSpeed, plannedSpeed); + } else { + // not overtaking + return plannedSpeed; + } +} + + +void +MSLCM_JE2013::informFollower(MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int blocked, + int dir, + const std::pair& neighFollow, + SUMOReal remainingSeconds, + SUMOReal plannedSpeed) { + if ((blocked & LCA_BLOCKED_BY_FOLLOWER) != 0) { + assert(neighFollow.first != 0); + MSVehicle* nv = neighFollow.first; + if (gDebugFlag2) std::cout << " blocked by follower nv=" << nv->getID() << " nvSpeed=" << nv->getSpeed() << " needGap=" + << nv->getCarFollowModel().getSecureGap(nv->getSpeed(), myVehicle.getSpeed(), myVehicle.getCarFollowModel().getMaxDecel()) << "\n"; + + // are we fast enough to cut in without any help? + if (plannedSpeed - nv->getSpeed() >= HELP_OVERTAKE) { + const SUMOReal neededGap = nv->getCarFollowModel().getSecureGap(nv->getSpeed(), plannedSpeed, myVehicle.getCarFollowModel().getMaxDecel()); + if ((neededGap - neighFollow.second) / remainingSeconds < (plannedSpeed - nv->getSpeed())) { + if (gDebugFlag2) { + std::cout << " wants to cut in before nv=" << nv->getID() << " without any help neededGap=" << neededGap << "\n"; + } + // follower might even accelerate but not to much + msgPass.informNeighFollower(new Info(plannedSpeed - HELP_OVERTAKE, dir | LCA_AMBLOCKINGFOLLOWER), &myVehicle); + return; + } + } + // decide whether we will request help to cut in before the follower or allow to be overtaken + + // PARAMETERS + // assume other vehicle will assume the equivalent of 1 second of + // maximum deceleration to help us (will probably be spread over + // multiple seconds) + // ----------- + const SUMOReal helpDecel = nv->getCarFollowModel().getMaxDecel() * HELP_DECEL_FACTOR ; + + // change in the gap between ego and blocker over 1 second (not STEP!) + const SUMOReal neighNewSpeed = MAX2((SUMOReal)0, nv->getSpeed() - ACCEL2SPEED(helpDecel)); + const SUMOReal neighNewSpeed1s = MAX2((SUMOReal)0, nv->getSpeed() - helpDecel); + const SUMOReal dv = plannedSpeed - neighNewSpeed1s; + // new gap between follower and self in case the follower does brake for 1s + const SUMOReal decelGap = neighFollow.second + dv; + const SUMOReal secureGap = nv->getCarFollowModel().getSecureGap(neighNewSpeed1s, plannedSpeed, myVehicle.getCarFollowModel().getMaxDecel()); + if (gDebugFlag2) { + std::cout << STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + << " egoV=" << myVehicle.getSpeed() + << " egoNV=" << plannedSpeed + << " nvNewSpeed=" << neighNewSpeed + << " nvNewSpeed1s=" << neighNewSpeed1s + << " deltaGap=" << dv + << " decelGap=" << decelGap + << " secGap=" << secureGap + << "\n"; + } + if (decelGap > 0 && decelGap >= secureGap) { + // if the blocking neighbor brakes it could actually help + // how hard does it actually need to be? + const SUMOReal vsafe = MAX2(neighNewSpeed, nv->getCarFollowModel().followSpeed( + nv, nv->getSpeed(), neighFollow.second, plannedSpeed, myVehicle.getCarFollowModel().getMaxDecel())); + msgPass.informNeighFollower(new Info(vsafe, dir | LCA_AMBLOCKINGFOLLOWER), &myVehicle); + if (gDebugFlag2) { + std::cout << " wants to cut in before nv=" << nv->getID() + << " vsafe=" << vsafe + << " newSecGap=" << nv->getCarFollowModel().getSecureGap(vsafe, plannedSpeed, myVehicle.getCarFollowModel().getMaxDecel()) + << "\n"; + } + } else if (dv > 0 && dv * remainingSeconds > (secureGap - decelGap + POSITION_EPS)) { + // decelerating once is sufficient to open up a large enough gap in time + msgPass.informNeighFollower(new Info(neighNewSpeed, dir | LCA_AMBLOCKINGFOLLOWER), &myVehicle); + if (gDebugFlag2) { + std::cout << " wants to cut in before nv=" << nv->getID() << " (eventually)\n"; + } + } else if (dir == LCA_MRIGHT && !myAllowOvertakingRight && !nv->congested()) { + const SUMOReal vhelp = MAX2(neighNewSpeed, HELP_OVERTAKE); + msgPass.informNeighFollower(new Info(vhelp, dir | LCA_AMBLOCKINGFOLLOWER), &myVehicle); + if (gDebugFlag2) { + std::cout << " wants to cut in before nv=" << nv->getID() << " (nv cannot overtake right)\n"; + } + } else { + SUMOReal vhelp = MAX2(nv->getSpeed(), myVehicle.getSpeed() + HELP_OVERTAKE); + if (nv->getSpeed() > myVehicle.getSpeed() && + ((dir == LCA_MRIGHT && myVehicle.getWaitingSeconds() > LCA_RIGHT_IMPATIENCE) + || (dir == LCA_MLEFT && plannedSpeed > CUT_IN_LEFT_SPEED_THRESHOLD) // VARIANT_22 (slowDownLeft) + // XXX this is a hack to determine whether the vehicles is on an on-ramp. This information should be retrieved from the network itself + || (dir == LCA_MLEFT && myLeftSpace > MAX_ONRAMP_LENGTH) + )) { + // let the follower slow down to increase the likelyhood that later vehicles will be slow enough to help + // follower should still be fast enough to open a gap + vhelp = MAX2(neighNewSpeed, myVehicle.getSpeed() + HELP_OVERTAKE); + if (gDebugFlag2) { + std::cout << " wants right follower to slow down a bit\n"; + } + if ((nv->getSpeed() - myVehicle.getSpeed()) / helpDecel < remainingSeconds) { + if (gDebugFlag2) { + std::cout << " wants to cut in before right follower nv=" << nv->getID() << " (eventually)\n"; + } + msgPass.informNeighFollower(new Info(vhelp, dir | LCA_AMBLOCKINGFOLLOWER), &myVehicle); + return; + } + } + msgPass.informNeighFollower(new Info(vhelp, dir | LCA_AMBLOCKINGFOLLOWER), &myVehicle); + // this follower is supposed to overtake us. slow down smoothly to allow this + const SUMOReal overtakeDist = (neighFollow.second // follower reaches ego back + + myVehicle.getVehicleType().getLengthWithGap() // follower reaches ego front + + nv->getVehicleType().getLength() // follower back at ego front + + myVehicle.getCarFollowModel().getSecureGap( // follower has safe dist to ego + plannedSpeed, vhelp, nv->getCarFollowModel().getMaxDecel())); + // speed difference to create a sufficiently large gap + const SUMOReal needDV = overtakeDist / remainingSeconds; + // make sure the deceleration is not to strong + myVSafes.push_back(MAX2(vhelp - needDV, myVehicle.getSpeed() - ACCEL2SPEED(myVehicle.getCarFollowModel().getMaxDecel()))); + + if (gDebugFlag2) { + std::cout << STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + << " veh=" << myVehicle.getID() + << " wants to be overtaken by=" << nv->getID() + << " overtakeDist=" << overtakeDist + << " vneigh=" << nv->getSpeed() + << " vhelp=" << vhelp + << " needDV=" << needDV + << " vsafe=" << myVSafes.back() + << "\n"; + } + } + } else if (neighFollow.first != 0) { + // we are not blocked no, make sure it remains that way + MSVehicle* nv = neighFollow.first; + const SUMOReal vsafe = nv->getCarFollowModel().followSpeed( + nv, nv->getSpeed(), neighFollow.second, plannedSpeed, myVehicle.getCarFollowModel().getMaxDecel()); + msgPass.informNeighFollower(new Info(vsafe, dir), &myVehicle); + if (gDebugFlag2) { + std::cout << " wants to cut in before non-blocking follower nv=" << nv->getID() << "\n"; + } + } +} + + +void +MSLCM_JE2013::prepareStep() { + // keep information about strategic change direction + myOwnState = (myOwnState & LCA_STRATEGIC) ? (myOwnState & LCA_WANTS_LANECHANGE) : 0; + myLeadingBlockerLength = 0; + myLeftSpace = 0; + myVSafes.clear(); + myDontBrake = false; + // truncate to work around numerical instability between different builds + mySpeedGainProbability = ceil(mySpeedGainProbability * 100000.0) * 0.00001; + myKeepRightProbability = ceil(myKeepRightProbability * 100000.0) * 0.00001; +} + + +void +MSLCM_JE2013::changed(int dir) { + myOwnState = 0; + mySpeedGainProbability = 0; + myKeepRightProbability = 0; + if (myVehicle.getBestLaneOffset() == 0) { + // if we are not yet on our best lane there might still be unseen blockers + // (during patchSpeed) + myLeadingBlockerLength = 0; + myLeftSpace = 0; + } + myLookAheadSpeed = LOOK_AHEAD_MIN_SPEED; + myVSafes.clear(); + myDontBrake = false; + initLastLaneChangeOffset(dir); +} + + +int +MSLCM_JE2013::_wantsChange( + int laneOffset, + MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked) { + assert(laneOffset == 1 || laneOffset == -1); + const SUMOTime currentTime = MSNet::getInstance()->getCurrentTimeStep(); + // compute bestLaneOffset + MSVehicle::LaneQ curr, neigh, best; + int bestLaneOffset = 0; + SUMOReal currentDist = 0; + SUMOReal neighDist = 0; + int currIdx = 0; + MSLane* prebLane = myVehicle.getLane(); + if (prebLane->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { + // internal edges are not kept inside the bestLanes structure + prebLane = prebLane->getLinkCont()[0]->getLane(); + } + for (int p = 0; p < (int) preb.size(); ++p) { + if (preb[p].lane == prebLane && p + laneOffset >= 0) { + assert(p + laneOffset < (int)preb.size()); + curr = preb[p]; + neigh = preb[p + laneOffset]; + currentDist = curr.length; + neighDist = neigh.length; + bestLaneOffset = curr.bestLaneOffset; + // VARIANT_13 (equalBest) + if (bestLaneOffset == 0 && preb[p + laneOffset].bestLaneOffset == 0) { + if (gDebugFlag2) { + std::cout << STEPS2TIME(currentTime) + << " veh=" << myVehicle.getID() + << " bestLaneOffsetOld=" << bestLaneOffset + << " bestLaneOffsetNew=" << laneOffset + << "\n"; + } + bestLaneOffset = laneOffset; + } + best = preb[p + bestLaneOffset]; + currIdx = p; + break; + } + } + // direction specific constants + const bool right = (laneOffset == -1); + const int lca = (right ? LCA_RIGHT : LCA_LEFT); + const int myLca = (right ? LCA_MRIGHT : LCA_MLEFT); + const int lcaCounter = (right ? LCA_LEFT : LCA_RIGHT); + const int myLcaCounter = (right ? LCA_MLEFT : LCA_MRIGHT); + const bool changeToBest = (right && bestLaneOffset < 0) || (!right && bestLaneOffset > 0); + // keep information about being a leader/follower + int ret = (myOwnState & 0xffff0000); + int req = 0; // the request to change or stay + + // VARIANT_5 (disableAMBACKBLOCKER1) + /* + if (leader.first != 0 + && (myOwnState & LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0 + && (leader.first->getLaneChangeModel().getOwnState() & LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0) { + + myOwnState &= (0xffffffff - LCA_AMBLOCKINGFOLLOWER_DONTBRAKE); + if (myVehicle.getSpeed() > SUMO_const_haltingSpeed) { + myOwnState |= LCA_AMBACKBLOCKER; + } else { + ret |= LCA_AMBACKBLOCKER; + myDontBrake = true; + } + } + */ + + if (gDebugFlag2) { + std::cout << STEPS2TIME(currentTime) + << " veh=" << myVehicle.getID() + << " firstBlocked=" << tryID(*firstBlocked) + << " lastBlocked=" << tryID(*lastBlocked) + << " neighLead=" << tryID(neighLead.first) + << " neighLeadGap=" << neighLead.second + << " neighFollow=" << tryID(neighFollow.first) + << " neighFollowGap=" << neighFollow.second + << "\n"; + } + + ret = slowDownForBlocked(lastBlocked, ret); + // VARIANT_14 (furtherBlock) + if (lastBlocked != firstBlocked) { + ret = slowDownForBlocked(firstBlocked, ret); + } + + + // we try to estimate the distance which is necessary to get on a lane + // we have to get on in order to keep our route + // we assume we need something that depends on our velocity + // and compare this with the free space on our wished lane + // + // if the free space is somehow less than the space we need, we should + // definitely try to get to the desired lane + // + // this rule forces our vehicle to change the lane if a lane changing is necessary soon + // lookAheadDistance: + // we do not want the lookahead distance to change all the time so we discrectize the speed a bit + + // VARIANT_18 (laHyst) + if (myVehicle.getSpeed() > myLookAheadSpeed) { + myLookAheadSpeed = myVehicle.getSpeed(); + } else { + myLookAheadSpeed = MAX2(LOOK_AHEAD_MIN_SPEED, + (LOOK_AHEAD_SPEED_MEMORY * myLookAheadSpeed + (1 - LOOK_AHEAD_SPEED_MEMORY) * myVehicle.getSpeed())); + } + //myLookAheadSpeed = myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle); + + //SUMOReal laDist = laSpeed > LOOK_FORWARD_SPEED_DIVIDER + // ? laSpeed * LOOK_FORWARD_FAR + // : laSpeed * LOOK_FORWARD_NEAR; + SUMOReal laDist = myLookAheadSpeed * (right ? LOOK_FORWARD_RIGHT : LOOK_FORWARD_LEFT); + laDist += myVehicle.getVehicleType().getLengthWithGap() * (SUMOReal) 2.; + // free space that is available for changing + //const SUMOReal neighSpeed = (neighLead.first != 0 ? neighLead.first->getSpeed() : + // neighFollow.first != 0 ? neighFollow.first->getSpeed() : + // best.lane->getSpeedLimit()); + // @note: while this lets vehicles change earlier into the correct direction + // it also makes the vehicles more "selfish" and prevents changes which are necessary to help others + + // VARIANT_15 (insideRoundabout) + int roundaboutEdgesAhead = 0; + for (std::vector::iterator it = curr.bestContinuations.begin(); it != curr.bestContinuations.end(); ++it) { + if ((*it) != 0 && (*it)->getEdge().isRoundabout()) { + roundaboutEdgesAhead += 1; + } else if (roundaboutEdgesAhead > 0) { + // only check the next roundabout + break; + } + } + int roundaboutEdgesAheadNeigh = 0; + for (std::vector::iterator it = neigh.bestContinuations.begin(); it != neigh.bestContinuations.end(); ++it) { + if ((*it) != 0 && (*it)->getEdge().isRoundabout()) { + roundaboutEdgesAheadNeigh += 1; + } else if (roundaboutEdgesAheadNeigh > 0) { + // only check the next roundabout + break; + } + } + if (roundaboutEdgesAhead > 1) { + currentDist += roundaboutEdgesAhead * ROUNDABOUT_DIST_BONUS; + neighDist += roundaboutEdgesAheadNeigh * ROUNDABOUT_DIST_BONUS; + } + if (roundaboutEdgesAhead > 0) { + if (gDebugFlag2) { + std::cout << " roundaboutEdgesAhead=" << roundaboutEdgesAhead << " roundaboutEdgesAheadNeigh=" << roundaboutEdgesAheadNeigh << "\n"; + } + } + + const SUMOReal usableDist = (currentDist - myVehicle.getPositionOnLane() - best.occupation * JAM_FACTOR); + //- (best.lane->getVehicleNumber() * neighSpeed)); // VARIANT 9 jfSpeed + const SUMOReal maxJam = MAX2(preb[currIdx + laneOffset].occupation, preb[currIdx].occupation); + const SUMOReal neighLeftPlace = MAX2((SUMOReal) 0, neighDist - myVehicle.getPositionOnLane() - maxJam); + + if (gDebugFlag2) { + std::cout << STEPS2TIME(currentTime) + << " veh=" << myVehicle.getID() + << " laSpeed=" << myLookAheadSpeed + << " laDist=" << laDist + << " currentDist=" << currentDist + << " usableDist=" << usableDist + << " bestLaneOffset=" << bestLaneOffset + << " best.length=" << best.length + << " maxJam=" << maxJam + << " neighLeftPlace=" << neighLeftPlace + << "\n"; + } + + if (changeToBest && bestLaneOffset == curr.bestLaneOffset + && currentDistDisallows(usableDist, bestLaneOffset, laDist)) { + /// @brief we urgently need to change lanes to follow our route + ret = ret | lca | LCA_STRATEGIC | LCA_URGENT; + } else { + // VARIANT_20 (noOvertakeRight) + if (!myAllowOvertakingRight && !right && !myVehicle.congested() && neighLead.first != 0) { + // check for slower leader on the left. we should not overtake but + // rather move left ourselves (unless congested) + MSVehicle* nv = neighLead.first; + if (nv->getSpeed() < myVehicle.getSpeed()) { + const SUMOReal vSafe = myCarFollowModel.followSpeed( + &myVehicle, myVehicle.getSpeed(), neighLead.second, nv->getSpeed(), nv->getCarFollowModel().getMaxDecel()); + myVSafes.push_back(vSafe); + if (vSafe < myVehicle.getSpeed()) { + mySpeedGainProbability += CHANGE_PROB_THRESHOLD_LEFT / 3; + } + if (gDebugFlag2) { + std::cout << STEPS2TIME(currentTime) + << " avoid overtaking on the right nv=" << nv->getID() + << " nvSpeed=" << nv->getSpeed() + << " mySpeedGainProbability=" << mySpeedGainProbability + << " plannedSpeed=" << myVSafes.back() + << "\n"; + } + } + } + + if (!changeToBest && (currentDistDisallows(neighLeftPlace, abs(bestLaneOffset) + 2, laDist))) { + // the opposite lane-changing direction should be done than the one examined herein + // we'll check whether we assume we could change anyhow and get back in time... + // + // this rule prevents the vehicle from moving in opposite direction of the best lane + // unless the way till the end where the vehicle has to be on the best lane + // is long enough + if (gDebugFlag2) { + std::cout << " veh=" << myVehicle.getID() << " could not change back and forth in time (1) neighLeftPlace=" << neighLeftPlace << "\n"; + } + ret = ret | LCA_STAY | LCA_STRATEGIC; + } else if (bestLaneOffset == 0 && (neighLeftPlace * 2. < laDist)) { + // the current lane is the best and a lane-changing would cause a situation + // of which we assume we will not be able to return to the lane we have to be on. + // this rule prevents the vehicle from leaving the current, best lane when it is + // close to this lane's end + if (gDebugFlag2) { + std::cout << " veh=" << myVehicle.getID() << " could not change back and forth in time (2) neighLeftPlace=" << neighLeftPlace << "\n"; + } + ret = ret | LCA_STAY | LCA_STRATEGIC; + } else if (bestLaneOffset == 0 + && (leader.first == 0 || !leader.first->isStopped()) + && neigh.bestContinuations.back()->getLinkCont().size() != 0 + && roundaboutEdgesAhead == 0 + && neighDist < TURN_LANE_DIST) { + // VARIANT_21 (stayOnBest) + // we do not want to leave the best lane for a lane which leads elsewhere + // unless our leader is stopped or we are approaching a roundabout + if (gDebugFlag2) { + std::cout << " veh=" << myVehicle.getID() << " does not want to leave the bestLane (neighDist=" << neighDist << ")\n"; + } + ret = ret | LCA_STAY | LCA_STRATEGIC; + } + } + // check for overriding TraCI requests + if (gDebugFlag2) { + std::cout << STEPS2TIME(currentTime) << " veh=" << myVehicle.getID() << " ret=" << ret; + } + ret = myVehicle.influenceChangeDecision(ret); + if ((ret & lcaCounter) != 0) { + // we are not interested in traci requests for the opposite direction here + ret &= ~(LCA_TRACI | lcaCounter | LCA_URGENT); + } + if (gDebugFlag2) { + std::cout << " retAfterInfluence=" << ret << "\n"; + } + + if ((ret & LCA_STAY) != 0) { + return ret; + } + if ((ret & LCA_URGENT) != 0) { + // prepare urgent lane change maneuver + // save the left space + myLeftSpace = currentDist - myVehicle.getPositionOnLane(); + if (changeToBest && abs(bestLaneOffset) > 1) { + // there might be a vehicle which needs to counter-lane-change one lane further and we cannot see it yet + if (gDebugFlag2) { + std::cout << " reserving space for unseen blockers\n"; + } + myLeadingBlockerLength = MAX2((SUMOReal)(right ? 20.0 : 40.0), myLeadingBlockerLength); + } + + // letting vehicles merge in at the end of the lane in case of counter-lane change, step#1 + // if there is a leader and he wants to change to the opposite direction + saveBlockerLength(neighLead.first, lcaCounter); + if (*firstBlocked != neighLead.first) { + saveBlockerLength(*firstBlocked, lcaCounter); + } + + const SUMOReal remainingSeconds = ((ret & LCA_TRACI) == 0 ? + MAX2((SUMOReal)STEPS2TIME(TS), myLeftSpace / MAX2(myLookAheadSpeed, NUMERICAL_EPS) / abs(bestLaneOffset) / URGENCY) : + myVehicle.getInfluencer().changeRequestRemainingSeconds(currentTime)); + const SUMOReal plannedSpeed = informLeader(msgPass, blocked, myLca, neighLead, remainingSeconds); + if (plannedSpeed >= 0) { + // maybe we need to deal with a blocking follower + informFollower(msgPass, blocked, myLca, neighFollow, remainingSeconds, plannedSpeed); + } + + if (gDebugFlag2) { + std::cout << STEPS2TIME(currentTime) + << " veh=" << myVehicle.getID() + << " myLeftSpace=" << myLeftSpace + << " remainingSeconds=" << remainingSeconds + << " plannedSpeed=" << plannedSpeed + << "\n"; + } + return ret; + } + + // VARIANT_15 + if (roundaboutEdgesAhead > 1) { + // try to use the inner lanes of a roundabout to increase throughput + // unless we are approaching the exit + if (lca == LCA_LEFT) { + req = ret | lca | LCA_COOPERATIVE; + } else { + req = ret | LCA_STAY | LCA_COOPERATIVE; + } + if (!cancelRequest(req)) { + return ret | req; + } + } + + // let's also regard the case where the vehicle is driving on a highway... + // in this case, we do not want to get to the dead-end of an on-ramp + if (right) { + if (bestLaneOffset == 0 && myVehicle.getLane()->getSpeedLimit() > 80. / 3.6 && myLookAheadSpeed > SUMO_const_haltingSpeed) { + if (gDebugFlag2) { + std::cout << " veh=" << myVehicle.getID() << " does not want to get stranded on the on-ramp of a highway\n"; + } + req = ret | LCA_STAY | LCA_STRATEGIC; + if (!cancelRequest(req)) { + return ret | req; + } + } + } + // -------- + + // -------- make place on current lane if blocking follower + //if (amBlockingFollowerPlusNB()) { + // std::cout << myVehicle.getID() << ", " << currentDistAllows(neighDist, bestLaneOffset, laDist) + // << " neighDist=" << neighDist + // << " currentDist=" << currentDist + // << "\n"; + //} + if (amBlockingFollowerPlusNB() + //&& ((myOwnState & myLcaCounter) == 0) // VARIANT_6 : counterNoHelp + && (changeToBest || currentDistAllows(neighDist, abs(bestLaneOffset) + 1, laDist))) { + + // VARIANT_2 (nbWhenChangingToHelp) + if (gDebugFlag2) { + std::cout << STEPS2TIME(currentTime) + << " veh=" << myVehicle.getID() + << " wantsChangeToHelp=" << (right ? "right" : "left") + << " state=" << myOwnState + << (((myOwnState & myLcaCounter) != 0) ? " (counter)" : "") + << "\n"; + } + req = ret | lca | LCA_COOPERATIVE | LCA_URGENT ;//| LCA_CHANGE_TO_HELP; + if (!cancelRequest(req)) { + return ret | req; + } + } + + // -------- + + + //// -------- security checks for krauss + //// (vsafe fails when gap<0) + //if ((blocked & LCA_BLOCKED) != 0) { + // return ret; + //} + //// -------- + + // -------- higher speed + //if ((congested(neighLead.first) && neighLead.second < 20) || predInteraction(leader.first)) { //!!! + // return ret; + //} + SUMOReal thisLaneVSafe = myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle); + SUMOReal neighLaneVSafe = neighLane.getVehicleMaxSpeed(&myVehicle); + if (neighLead.first == 0) { + neighLaneVSafe = MIN2(neighLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighDist, 0, 0)); + } else { + // @todo: what if leader is below safe gap?!!! + neighLaneVSafe = MIN2(neighLaneVSafe, myCarFollowModel.followSpeed( + &myVehicle, myVehicle.getSpeed(), neighLead.second, neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel())); + } + if (leader.first == 0) { + thisLaneVSafe = MIN2(thisLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), currentDist, 0, 0)); + } else { + // @todo: what if leader is below safe gap?!!! + thisLaneVSafe = MIN2(thisLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), leader.second, leader.first->getSpeed(), leader.first->getCarFollowModel().getMaxDecel())); + } + + const SUMOReal vMax = MIN2(myVehicle.getVehicleType().getMaxSpeed(), myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle)); + thisLaneVSafe = MIN2(thisLaneVSafe, vMax); + neighLaneVSafe = MIN2(neighLaneVSafe, vMax); + const SUMOReal relativeGain = (neighLaneVSafe - thisLaneVSafe) / MAX2(neighLaneVSafe, + RELGAIN_NORMALIZATION_MIN_SPEED); + + if (right) { + // ONLY FOR CHANGING TO THE RIGHT + if (thisLaneVSafe - 5 / 3.6 > neighLaneVSafe) { + // ok, the current lane is faster than the right one... + if (mySpeedGainProbability < 0) { + mySpeedGainProbability /= 2.0; + } + } else { + // ok, the current lane is not faster than the right one + mySpeedGainProbability -= relativeGain; + + // honor the obligation to keep right (Rechtsfahrgebot) + // XXX consider fast approaching followers on the current lane + //const SUMOReal vMax = myLookAheadSpeed; + const SUMOReal acceptanceTime = KEEP_RIGHT_ACCEPTANCE * vMax * MAX2((SUMOReal)1, myVehicle.getSpeed()) / myVehicle.getLane()->getSpeedLimit(); + SUMOReal fullSpeedGap = MAX2((SUMOReal)0, neighDist - myVehicle.getCarFollowModel().brakeGap(vMax)); + SUMOReal fullSpeedDrivingSeconds = MIN2(acceptanceTime, fullSpeedGap / vMax); + if (neighLead.first != 0 && neighLead.first->getSpeed() < vMax) { + fullSpeedGap = MAX2((SUMOReal)0, MIN2(fullSpeedGap, + neighLead.second - myVehicle.getCarFollowModel().getSecureGap( + vMax, neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel()))); + fullSpeedDrivingSeconds = MIN2(fullSpeedDrivingSeconds, fullSpeedGap / (vMax - neighLead.first->getSpeed())); + } + const SUMOReal deltaProb = (CHANGE_PROB_THRESHOLD_RIGHT + * STEPS2TIME(DELTA_T) + * (fullSpeedDrivingSeconds / acceptanceTime) / KEEP_RIGHT_TIME); + myKeepRightProbability -= deltaProb; + + if (gDebugFlag2) { + std::cout << STEPS2TIME(currentTime) + << " veh=" << myVehicle.getID() + << " vMax=" << vMax + << " neighDist=" << neighDist + << " brakeGap=" << myVehicle.getCarFollowModel().brakeGap(myVehicle.getSpeed()) + << " leaderSpeed=" << (neighLead.first == 0 ? -1 : neighLead.first->getSpeed()) + << " secGap=" << (neighLead.first == 0 ? -1 : myVehicle.getCarFollowModel().getSecureGap( + myVehicle.getSpeed(), neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel())) + << " acceptanceTime=" << acceptanceTime + << " fullSpeedGap=" << fullSpeedGap + << " fullSpeedDrivingSeconds=" << fullSpeedDrivingSeconds + << " dProb=" << deltaProb + << "\n"; + } + if (myKeepRightProbability < -CHANGE_PROB_THRESHOLD_RIGHT) { + req = ret | lca | LCA_KEEPRIGHT; + if (!cancelRequest(req)) { + return ret | req; + } + } + } + + if (gDebugFlag2) { + std::cout << STEPS2TIME(currentTime) + << " veh=" << myVehicle.getID() + << " speed=" << myVehicle.getSpeed() + << " myKeepRightProbability=" << myKeepRightProbability + << " thisLaneVSafe=" << thisLaneVSafe + << " neighLaneVSafe=" << neighLaneVSafe + << " relativeGain=" << relativeGain + << " blocked=" << blocked + << "\n"; + } + + if (mySpeedGainProbability < -CHANGE_PROB_THRESHOLD_RIGHT + && neighDist / MAX2((SUMOReal) .1, myVehicle.getSpeed()) > 20.) { //./MAX2((SUMOReal) .1, myVehicle.getSpeed())) { // -.1 + req = ret | lca | LCA_SPEEDGAIN; + if (!cancelRequest(req)) { + return ret | req; + } + } + } else { + // ONLY FOR CHANGING TO THE LEFT + if (thisLaneVSafe > neighLaneVSafe) { + // this lane is better + if (mySpeedGainProbability > 0) { + mySpeedGainProbability /= 2.0; + } + } else { + // left lane is better + mySpeedGainProbability += relativeGain; + } + // VARIANT_19 (stayRight) + //if (neighFollow.first != 0) { + // MSVehicle* nv = neighFollow.first; + // const SUMOReal secGap = nv->getCarFollowModel().getSecureGap(nv->getSpeed(), myVehicle.getSpeed(), myVehicle.getCarFollowModel().getMaxDecel()); + // if (neighFollow.second < secGap * KEEP_RIGHT_HEADWAY) { + // // do not change left if it would inconvenience faster followers + // return ret | LCA_STAY | LCA_SPEEDGAIN; + // } + //} + if (mySpeedGainProbability > CHANGE_PROB_THRESHOLD_LEFT && neighDist / MAX2((SUMOReal) .1, myVehicle.getSpeed()) > 20.) { // .1 + req = ret | lca | LCA_SPEEDGAIN; + if (!cancelRequest(req)) { + return ret | req; + } + } + } + // -------- + if (changeToBest && bestLaneOffset == curr.bestLaneOffset + && (right ? mySpeedGainProbability < 0 : mySpeedGainProbability > 0)) { + // change towards the correct lane, speedwise it does not hurt + req = ret | lca | LCA_STRATEGIC; + if (!cancelRequest(req)) { + return ret | req; + } + } + if (gDebugFlag2) { + std::cout << STEPS2TIME(currentTime) + << " veh=" << myVehicle.getID() + << " mySpeedGainProbability=" << mySpeedGainProbability + << " myKeepRightProbability=" << myKeepRightProbability + << " thisLaneVSafe=" << thisLaneVSafe + << " neighLaneVSafe=" << neighLaneVSafe + << "\n"; + } + return ret; +} + + +int +MSLCM_JE2013::slowDownForBlocked(MSVehicle** blocked, int state) { + // if this vehicle is blocking someone in front, we maybe decelerate to let him in + if ((*blocked) != 0) { + SUMOReal gap = (*blocked)->getPositionOnLane() - (*blocked)->getVehicleType().getLength() - myVehicle.getPositionOnLane() - myVehicle.getVehicleType().getMinGap(); + if (gDebugFlag2) { + std::cout << STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + << " veh=" << myVehicle.getID() + << " blocked=" << tryID(*blocked) + << " gap=" << gap + << "\n"; + } + if (gap > POSITION_EPS) { + //const bool blockedWantsUrgentRight = (((*blocked)->getLaneChangeModel().getOwnState() & LCA_RIGHT != 0) + // && ((*blocked)->getLaneChangeModel().getOwnState() & LCA_URGENT != 0)); + + if (myVehicle.getSpeed() < ACCEL2SPEED(myVehicle.getCarFollowModel().getMaxDecel()) + //|| blockedWantsUrgentRight // VARIANT_10 (helpblockedRight) + ) { + if ((*blocked)->getSpeed() < SUMO_const_haltingSpeed) { + state |= LCA_AMBACKBLOCKER_STANDING; + } else { + state |= LCA_AMBACKBLOCKER; + } + myVSafes.push_back(myCarFollowModel.followSpeed( + &myVehicle, myVehicle.getSpeed(), + (SUMOReal)(gap - POSITION_EPS), (*blocked)->getSpeed(), + (*blocked)->getCarFollowModel().getMaxDecel())); + //(*blocked) = 0; // VARIANT_14 (furtherBlock) + } + } + } + return state; +} + + +void +MSLCM_JE2013::saveBlockerLength(MSVehicle* blocker, int lcaCounter) { + if (gDebugFlag2) { + std::cout << STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + << " veh=" << myVehicle.getID() + << " saveBlockerLength blocker=" << tryID(blocker) + << " bState=" << (blocker == 0 ? "None" : toString(blocker->getLaneChangeModel().getOwnState())) + << "\n"; + } + if (blocker != 0 && (blocker->getLaneChangeModel().getOwnState() & lcaCounter) != 0) { + // is there enough space in front of us for the blocker? + const SUMOReal potential = myLeftSpace - myVehicle.getCarFollowModel().brakeGap( + myVehicle.getSpeed(), myVehicle.getCarFollowModel().getMaxDecel(), 0); + if (blocker->getVehicleType().getLengthWithGap() <= potential) { + // save at least his length in myLeadingBlockerLength + myLeadingBlockerLength = MAX2(blocker->getVehicleType().getLengthWithGap(), myLeadingBlockerLength); + if (gDebugFlag2) { + std::cout << STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + << " veh=" << myVehicle.getID() + << " blocker=" << tryID(blocker) + << " saving myLeadingBlockerLength=" << myLeadingBlockerLength + << "\n"; + } + } else { + // we cannot save enough space for the blocker. It needs to save + // space for ego instead + if (gDebugFlag2) { + std::cout << STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + << " veh=" << myVehicle.getID() + << " blocker=" << tryID(blocker) + << " cannot save space=" << blocker->getVehicleType().getLengthWithGap() + << " potential=" << potential + << "\n"; + } + blocker->getLaneChangeModel().saveBlockerLength(myVehicle.getVehicleType().getLengthWithGap()); + } + } +} +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_JE2013.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_JE2013.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_JE2013.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_JE2013.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,197 @@ +/****************************************************************************/ +/// @file MSLCM_JE2013.h +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @author Laura Bieker +/// @date Fri, 08.10.2013 +/// @version $Id: MSLCM_JE2013.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A lane change model developed by J. Erdmann +// based on the model of D. Krajzewicz developed between 2004 and 2011 (MSLCM_DK2004) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSLCM_JE2013_h +#define MSLCM_JE2013_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include "MSAbstractLaneChangeModel.h" +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSLCM_JE2013 + * @brief A lane change model developed by J. Erdmann + */ +class MSLCM_JE2013 : public MSAbstractLaneChangeModel { +public: + + enum MyLCAEnum { + LCA_AMBLOCKINGLEADER = 1 << 16, + LCA_AMBLOCKINGFOLLOWER = 1 << 17, + LCA_MRIGHT = 1 << 18, + LCA_MLEFT = 1 << 19, + // !!! never set LCA_UNBLOCK = 1 << 20, + LCA_AMBLOCKINGFOLLOWER_DONTBRAKE = 1 << 21, + // !!! never used LCA_AMBLOCKINGSECONDFOLLOWER = 1 << 22, + LCA_CHANGE_TO_HELP = 1 << 23, + // !!! never read LCA_KEEP1 = 1 << 24, + // !!! never used LCA_KEEP2 = 1 << 25, + LCA_AMBACKBLOCKER = 1 << 26, + LCA_AMBACKBLOCKER_STANDING = 1 << 27 + }; + + + MSLCM_JE2013(MSVehicle& v); + + virtual ~MSLCM_JE2013(); + + /** @brief Called to examine whether the vehicle wants to change + * using the given laneOffset. + * This method gets the information about the surrounding vehicles + * and whether another lane may be more preferable */ + int wantsChange( + int laneOffset, + MSAbstractLaneChangeModel::MSLCMessager& msgPass, int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked); + + void* inform(void* info, MSVehicle* sender); + + /** @brief Called to adapt the speed in order to allow a lane change. + * + * @param min The minimum resulting speed + * @param wanted The aspired speed of the car following model + * @param max The maximum resulting speed + * @param cfModel The model used + * @return the new speed of the vehicle as proposed by the lane changer + */ + SUMOReal patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, + const MSCFModel& cfModel); + /** helper function which contains the actual logic */ + SUMOReal _patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, + const MSCFModel& cfModel); + + void changed(int dir); + + void prepareStep(); + + +protected: + + /// @brief helper function for doing the actual work + int _wantsChange( + int laneOffset, + MSAbstractLaneChangeModel::MSLCMessager& msgPass, int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked); + + + /* @brief decide whether we will overtake or follow a blocking leader + * and inform it accordingly + * If we decide to follow, myVSafes will be extended + * returns the planned speed if following or -1 if overtaking */ + SUMOReal informLeader(MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int blocked, int dir, + const std::pair& neighLead, + SUMOReal remainingSeconds); + + /// @brief decide whether we will try cut in before the follower or allow to be overtaken + void informFollower(MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int blocked, int dir, + const std::pair& neighFollow, + SUMOReal remainingSeconds, + SUMOReal plannedSpeed); + + + /// @brief compute useful slowdowns for blocked vehicles + int slowDownForBlocked(MSVehicle** blocked, int state); + + /// @brief save space for vehicles which need to counter-lane-change + void saveBlockerLength(MSVehicle* blocker, int lcaCounter); + + /// @brief reserve space at the end of the lane to avoid dead locks + inline void saveBlockerLength(SUMOReal length) { + myLeadingBlockerLength = MAX2(length, myLeadingBlockerLength); + }; + + inline bool amBlockingLeader() { + return (myOwnState & LCA_AMBLOCKINGLEADER) != 0; + } + inline bool amBlockingFollower() { + return (myOwnState & LCA_AMBLOCKINGFOLLOWER) != 0; + } + inline bool amBlockingFollowerNB() { + return (myOwnState & LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0; + } + inline bool amBlockingFollowerPlusNB() { + return (myOwnState & (LCA_AMBLOCKINGFOLLOWER | LCA_AMBLOCKINGFOLLOWER_DONTBRAKE)) != 0; + } + inline bool currentDistDisallows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist) { + return dist / (abs(laneOffset)) < lookForwardDist; + } + inline bool currentDistAllows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist) { + return dist / abs(laneOffset) > lookForwardDist; + } + + /// @brief information regarding save velocity (unused) and state flags of the ego vehicle + typedef std::pair Info; + + + +protected: + /// @brief a value for tracking the probability that a change to the offset with the same sign is beneficial + SUMOReal mySpeedGainProbability; + /* @brief a value for tracking the probability of following the/"Rechtsfahrgebot" + * A larger negative value indicates higher probability for moving to the + * right (as in mySpeedGainProbability) */ + SUMOReal myKeepRightProbability; + + SUMOReal myLeadingBlockerLength; + SUMOReal myLeftSpace; + + /*@brief the speed to use when computing the look-ahead distance for + * determining urgency of strategic lane changes */ + SUMOReal myLookAheadSpeed; + + std::vector myVSafes; + bool myDontBrake; + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_LC2013.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_LC2013.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_LC2013.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_LC2013.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,780 @@ +/****************************************************************************/ +/// @file MSLCM_LC2013.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Friedemann Wesner +/// @author Sascha Krieg +/// @author Michael Behrisch +/// @date Fri, 08.10.2013 +/// @version $Id: MSLCM_LC2013.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A lane change model developed by D. Krajzewicz, J. Erdmann et al. between 2004 and 2013 +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include "MSLCM_LC2013.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + +//#define DEBUG_VEHICLE_GUI_SELECTION 1 +#ifdef DEBUG_VEHICLE_GUI_SELECTION +#include +#include +#include +#endif + + + +// =========================================================================== +// variable definitions +// =========================================================================== +// 80km/h will be the threshold for dividing between long/short foresight +#define LOOK_FORWARD_SPEED_DIVIDER (SUMOReal)14. + +#define LOOK_FORWARD_RIGHT (SUMOReal)10. +#define LOOK_FORWARD_LEFT (SUMOReal)20. + +#define JAM_FACTOR (SUMOReal)1. + +#define LCA_RIGHT_IMPATIENCE (SUMOReal)-1. +#define CUT_IN_LEFT_SPEED_THRESHOLD (SUMOReal)27. + +#define LOOK_AHEAD_MIN_SPEED (SUMOReal)0.0 +#define LOOK_AHEAD_SPEED_MEMORY (SUMOReal)0.9 +#define LOOK_AHEAD_SPEED_DECREMENT 6. + +#define HELP_DECEL_FACTOR (SUMOReal)1.0 + +#define HELP_OVERTAKE (SUMOReal)(10.0 / 3.6) +#define MIN_FALLBEHIND (SUMOReal)(14.0 / 3.6) + +#define URGENCY (SUMOReal)2.0 + +#define ROUNDABOUT_DIST_BONUS (SUMOReal)80.0 + +#define CHANGE_PROB_THRESHOLD_RIGHT (SUMOReal)2.0 +#define CHANGE_PROB_THRESHOLD_LEFT (SUMOReal)0.2 +#define KEEP_RIGHT_TIME (SUMOReal)5.0 // the number of seconds after which a vehicle should move to the right lane +#define KEEP_RIGHT_ACCEPTANCE (SUMOReal)2.0 // calibration factor for determining the desire to keep right + +#define RELGAIN_NORMALIZATION_MIN_SPEED (SUMOReal)10.0 + +// =========================================================================== +// member method definitions +// =========================================================================== +MSLCM_LC2013::MSLCM_LC2013(MSVehicle& v) : + MSAbstractLaneChangeModel(v), + mySpeedGainProbability(0), + myKeepRightProbability(0), + myLeadingBlockerLength(0), + myLeftSpace(0), + myLookAheadSpeed(LOOK_AHEAD_MIN_SPEED) +{} + +MSLCM_LC2013::~MSLCM_LC2013() { + changed(0); +} + + +int +MSLCM_LC2013::wantsChange( + int laneOffset, + MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked) { + const int result = _wantsChange(laneOffset, msgPass, blocked, leader, neighLead, neighFollow, neighLane, preb, lastBlocked, firstBlocked); + return result; +} + + +SUMOReal +MSLCM_LC2013::patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, const MSCFModel& cfModel) { + const SUMOReal newSpeed = _patchSpeed(min, wanted, max, cfModel); + return newSpeed; +} + + +SUMOReal +MSLCM_LC2013::_patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, const MSCFModel& cfModel) { + int state = myOwnState; + + // letting vehicles merge in at the end of the lane in case of counter-lane change, step#2 + SUMOReal MAGIC_offset = 1.; + // if we want to change and have a blocking leader and there is enough room for him in front of us + if (myLeadingBlockerLength != 0) { + SUMOReal space = myLeftSpace - myLeadingBlockerLength - MAGIC_offset - myVehicle.getVehicleType().getMinGap(); + if (space > 0) { + // compute speed for decelerating towards a place which allows the blocking leader to merge in in front + SUMOReal safe = cfModel.stopSpeed(&myVehicle, myVehicle.getSpeed(), space); + // if we are approaching this place + if (safe < wanted) { + // return this speed as the speed to use + return MAX2(min, safe); + } + } + } + + SUMOReal nVSafe = wanted; + bool gotOne = false; + for (std::vector::const_iterator i = myVSafes.begin(); i != myVSafes.end(); ++i) { + SUMOReal v = (*i); + if (v >= min && v <= max) { + nVSafe = MIN2(v, nVSafe); + gotOne = true; + } else { + } + } + + if (gotOne && !myDontBrake) { + return nVSafe; + } + + // check whether the vehicle is blocked + if ((state & LCA_WANTS_LANECHANGE) != 0 && (state & LCA_BLOCKED) != 0) { + if ((state & LCA_STRATEGIC) != 0) { + // necessary decelerations are controlled via vSafe. If there are + // none it means we should speed up + return (max + wanted) / (SUMOReal) 2.0; + } else if ((state & LCA_COOPERATIVE) != 0) { + // only minor adjustments in speed should be done + if ((state & LCA_BLOCKED_BY_LEADER) != 0) { + return (min + wanted) / (SUMOReal) 2.0; + } + if ((state & LCA_BLOCKED_BY_FOLLOWER) != 0) { + return (max + wanted) / (SUMOReal) 2.0; + } + } + } + + // accelerate if being a blocking leader or blocking follower not able to brake + // (and does not have to change lanes) + if ((state & LCA_AMBLOCKINGLEADER) != 0) { + return (max + wanted) / (SUMOReal) 2.0; + } + + if ((state & LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0) { + } + if (myVehicle.getLane()->getEdge().getLanes().size() == 1) { + // remove chaning information if on a road with a single lane + changed(0); + } + return wanted; +} + + +void* +MSLCM_LC2013::inform(void* info, MSVehicle* /* sender */) { + Info* pinfo = (Info*) info; + myVSafes.push_back(pinfo->first); + myOwnState |= pinfo->second; + delete pinfo; + return (void*) true; +} + + +SUMOReal +MSLCM_LC2013::informLeader(MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int blocked, + int dir, + const std::pair& neighLead, + SUMOReal remainingSeconds) { + SUMOReal plannedSpeed = MIN2(myVehicle.getSpeed(), + myVehicle.getCarFollowModel().stopSpeed(&myVehicle, myVehicle.getSpeed(), myLeftSpace - myLeadingBlockerLength)); + for (std::vector::const_iterator i = myVSafes.begin(); i != myVSafes.end(); ++i) { + SUMOReal v = (*i); + if (v >= myVehicle.getSpeed() - ACCEL2SPEED(myVehicle.getCarFollowModel().getMaxDecel())) { + plannedSpeed = MIN2(plannedSpeed, v); + } + } + if ((blocked & LCA_BLOCKED_BY_LEADER) != 0) { + assert(neighLead.first != 0); + MSVehicle* nv = neighLead.first; + // decide whether we want to overtake the leader or follow it + const SUMOReal dv = plannedSpeed - nv->getSpeed(); + const SUMOReal overtakeDist = (neighLead.second // drive to back of follower + + nv->getVehicleType().getLengthWithGap() // drive to front of follower + + myVehicle.getVehicleType().getLength() // ego back reaches follower front + + nv->getCarFollowModel().getSecureGap( // save gap to follower + nv->getSpeed(), myVehicle.getSpeed(), myVehicle.getCarFollowModel().getMaxDecel())); + + if (dv < 0 + // overtaking on the right on an uncongested highway is forbidden (noOvertakeLCLeft) + || (dir == LCA_MLEFT && !myVehicle.congested() && !myAllowOvertakingRight) + // not enough space to overtake? + || myLeftSpace < overtakeDist + // not enough time to overtake? + || dv * remainingSeconds < overtakeDist) { + // cannot overtake + msgPass.informNeighLeader(new Info(-1, dir | LCA_AMBLOCKINGLEADER), &myVehicle); + // slow down smoothly to follow leader + const SUMOReal targetSpeed = myCarFollowModel.followSpeed( + &myVehicle, myVehicle.getSpeed(), neighLead.second, nv->getSpeed(), nv->getCarFollowModel().getMaxDecel()); + if (targetSpeed < myVehicle.getSpeed()) { + // slow down smoothly to follow leader + const SUMOReal decel = ACCEL2SPEED(MIN2(myVehicle.getCarFollowModel().getMaxDecel(), + MAX2(MIN_FALLBEHIND, (myVehicle.getSpeed() - targetSpeed) / remainingSeconds))); + const SUMOReal nextSpeed = MIN2(plannedSpeed, myVehicle.getSpeed() - decel); + myVSafes.push_back(nextSpeed); + return nextSpeed; + } else { + // leader is fast enough anyway + myVSafes.push_back(targetSpeed); + return plannedSpeed; + } + } else { + // overtaking, leader should not accelerate + msgPass.informNeighLeader(new Info(nv->getSpeed(), dir | LCA_AMBLOCKINGLEADER), &myVehicle); + return -1; + } + } else if (neighLead.first != 0) { // (remainUnblocked) + // we are not blocked now. make sure we stay far enough from the leader + MSVehicle* nv = neighLead.first; + const SUMOReal nextNVSpeed = nv->getSpeed() - HELP_OVERTAKE; // conservative + const SUMOReal dv = SPEED2DIST(myVehicle.getSpeed() - nextNVSpeed); + const SUMOReal targetSpeed = myCarFollowModel.followSpeed( + &myVehicle, myVehicle.getSpeed(), neighLead.second - dv, nextNVSpeed, nv->getCarFollowModel().getMaxDecel()); + myVSafes.push_back(targetSpeed); + return MIN2(targetSpeed, plannedSpeed); + } else { + // not overtaking + return plannedSpeed; + } +} + + +void +MSLCM_LC2013::informFollower(MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int blocked, + int dir, + const std::pair& neighFollow, + SUMOReal remainingSeconds, + SUMOReal plannedSpeed) { + if ((blocked & LCA_BLOCKED_BY_FOLLOWER) != 0) { + assert(neighFollow.first != 0); + MSVehicle* nv = neighFollow.first; + + // are we fast enough to cut in without any help? + if (plannedSpeed - nv->getSpeed() >= HELP_OVERTAKE) { + const SUMOReal neededGap = nv->getCarFollowModel().getSecureGap(nv->getSpeed(), plannedSpeed, myVehicle.getCarFollowModel().getMaxDecel()); + if ((neededGap - neighFollow.second) / remainingSeconds < (plannedSpeed - nv->getSpeed())) { + // follower might even accelerate but not to much + msgPass.informNeighFollower(new Info(plannedSpeed - HELP_OVERTAKE, dir | LCA_AMBLOCKINGFOLLOWER), &myVehicle); + return; + } + } + // decide whether we will request help to cut in before the follower or allow to be overtaken + + // PARAMETERS + // assume other vehicle will assume the equivalent of 1 second of + // maximum deceleration to help us (will probably be spread over + // multiple seconds) + // ----------- + const SUMOReal helpDecel = nv->getCarFollowModel().getMaxDecel() * HELP_DECEL_FACTOR ; + + // change in the gap between ego and blocker over 1 second (not STEP!) + const SUMOReal neighNewSpeed = MAX2((SUMOReal)0, nv->getSpeed() - ACCEL2SPEED(helpDecel)); + const SUMOReal neighNewSpeed1s = MAX2((SUMOReal)0, nv->getSpeed() - helpDecel); + const SUMOReal dv = plannedSpeed - neighNewSpeed1s; + // new gap between follower and self in case the follower does brake for 1s + const SUMOReal decelGap = neighFollow.second + dv; + const SUMOReal secureGap = nv->getCarFollowModel().getSecureGap(neighNewSpeed1s, plannedSpeed, myVehicle.getCarFollowModel().getMaxDecel()); + if (decelGap > 0 && decelGap >= secureGap) { + // if the blocking neighbor brakes it could actually help + // how hard does it actually need to be? + const SUMOReal vsafe = MAX2(neighNewSpeed, nv->getCarFollowModel().followSpeed( + nv, nv->getSpeed(), neighFollow.second, plannedSpeed, myVehicle.getCarFollowModel().getMaxDecel())); + msgPass.informNeighFollower(new Info(vsafe, dir | LCA_AMBLOCKINGFOLLOWER), &myVehicle); + } else if (dv > 0 && dv * remainingSeconds > (secureGap - decelGap + POSITION_EPS)) { + // decelerating once is sufficient to open up a large enough gap in time + msgPass.informNeighFollower(new Info(neighNewSpeed, dir | LCA_AMBLOCKINGFOLLOWER), &myVehicle); + } else { + SUMOReal vhelp = MAX2(nv->getSpeed(), myVehicle.getSpeed() + HELP_OVERTAKE); + //if (dir == LCA_MRIGHT && myVehicle.getWaitingSeconds() > LCA_RIGHT_IMPATIENCE && + // nv->getSpeed() > myVehicle.getSpeed()) { + if (nv->getSpeed() > myVehicle.getSpeed() && + ((dir == LCA_MRIGHT && myVehicle.getWaitingSeconds() > LCA_RIGHT_IMPATIENCE) + || (dir == LCA_MLEFT && plannedSpeed > CUT_IN_LEFT_SPEED_THRESHOLD) // VARIANT_22 (slowDownLeft) + )) { + // let the follower slow down to increase the likelyhood that later vehicles will be slow enough to help + // follower should still be fast enough to open a gap + vhelp = MAX2(neighNewSpeed, myVehicle.getSpeed() + HELP_OVERTAKE); + if ((nv->getSpeed() - myVehicle.getSpeed()) / helpDecel < remainingSeconds) { + msgPass.informNeighFollower(new Info(vhelp, dir | LCA_AMBLOCKINGFOLLOWER), &myVehicle); + return; + } + } + msgPass.informNeighFollower(new Info(vhelp, dir | LCA_AMBLOCKINGFOLLOWER), &myVehicle); + // this follower is supposed to overtake us. slow down smoothly to allow this + const SUMOReal overtakeDist = (neighFollow.second // follower reaches ego back + + myVehicle.getVehicleType().getLengthWithGap() // follower reaches ego front + + nv->getVehicleType().getLength() // follower back at ego front + + myVehicle.getCarFollowModel().getSecureGap( // follower has safe dist to ego + plannedSpeed, vhelp, nv->getCarFollowModel().getMaxDecel())); + // speed difference to create a sufficiently large gap + const SUMOReal needDV = overtakeDist / remainingSeconds; + // make sure the deceleration is not to strong + myVSafes.push_back(MAX2(vhelp - needDV, myVehicle.getSpeed() - ACCEL2SPEED(myVehicle.getCarFollowModel().getMaxDecel()))); + } + } +} + + +void +MSLCM_LC2013::prepareStep() { + // keep information about strategic change direction + myOwnState = (myOwnState & LCA_STRATEGIC) ? (myOwnState & LCA_WANTS_LANECHANGE) : 0; + myLeadingBlockerLength = 0; + myLeftSpace = 0; + myVSafes.clear(); + myDontBrake = false; + // truncate to work around numerical instability between different builds + mySpeedGainProbability = ceil(mySpeedGainProbability * 100000.0) * 0.00001; + myKeepRightProbability = ceil(myKeepRightProbability * 100000.0) * 0.00001; +} + + +void +MSLCM_LC2013::changed(int dir) { + myOwnState = 0; + mySpeedGainProbability = 0; + myKeepRightProbability = 0; + if (myVehicle.getBestLaneOffset() == 0) { + // if we are not yet on our best lane there might still be unseen blockers + // (during patchSpeed) + myLeadingBlockerLength = 0; + myLeftSpace = 0; + } + myLookAheadSpeed = LOOK_AHEAD_MIN_SPEED; + myVSafes.clear(); + myDontBrake = false; + initLastLaneChangeOffset(dir); +} + + +int +MSLCM_LC2013::_wantsChange( + int laneOffset, + MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked) { + assert(laneOffset == 1 || laneOffset == -1); + const SUMOTime currentTime = MSNet::getInstance()->getCurrentTimeStep(); + // compute bestLaneOffset + MSVehicle::LaneQ curr, neigh, best; + int bestLaneOffset = 0; + SUMOReal currentDist = 0; + SUMOReal neighDist = 0; + int currIdx = 0; + MSLane* prebLane = myVehicle.getLane(); + if (prebLane->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { + // internal edges are not kept inside the bestLanes structure + prebLane = prebLane->getLinkCont()[0]->getLane(); + } + for (int p = 0; p < (int) preb.size(); ++p) { + if (preb[p].lane == prebLane && p + laneOffset >= 0) { + assert(p + laneOffset < (int)preb.size()); + curr = preb[p]; + neigh = preb[p + laneOffset]; + currentDist = curr.length; + neighDist = neigh.length; + bestLaneOffset = curr.bestLaneOffset; + if (bestLaneOffset == 0 && preb[p + laneOffset].bestLaneOffset == 0) { + bestLaneOffset = laneOffset; + } + best = preb[p + bestLaneOffset]; + currIdx = p; + break; + } + } + // direction specific constants + const bool right = (laneOffset == -1); + const int lca = (right ? LCA_RIGHT : LCA_LEFT); + const int myLca = (right ? LCA_MRIGHT : LCA_MLEFT); + const int lcaCounter = (right ? LCA_LEFT : LCA_RIGHT); + const bool changeToBest = (right && bestLaneOffset < 0) || (!right && bestLaneOffset > 0); + // keep information about being a leader/follower + int ret = (myOwnState & 0xffff0000); + int req = 0; // the request to change or stay + + ret = slowDownForBlocked(lastBlocked, ret); + if (lastBlocked != firstBlocked) { + ret = slowDownForBlocked(firstBlocked, ret); + } + + + // we try to estimate the distance which is necessary to get on a lane + // we have to get on in order to keep our route + // we assume we need something that depends on our velocity + // and compare this with the free space on our wished lane + // + // if the free space is somehow less than the space we need, we should + // definitely try to get to the desired lane + // + // this rule forces our vehicle to change the lane if a lane changing is necessary soon + // lookAheadDistance: + // we do not want the lookahead distance to change all the time so we discrectize the speed a bit + + if (myVehicle.getSpeed() > myLookAheadSpeed) { + myLookAheadSpeed = myVehicle.getSpeed(); + } else { + myLookAheadSpeed = MAX2(LOOK_AHEAD_MIN_SPEED, + (LOOK_AHEAD_SPEED_MEMORY * myLookAheadSpeed + (1 - LOOK_AHEAD_SPEED_MEMORY) * myVehicle.getSpeed())); + } + SUMOReal laDist = myLookAheadSpeed * (right ? LOOK_FORWARD_RIGHT : LOOK_FORWARD_LEFT); + laDist += myVehicle.getVehicleType().getLengthWithGap() * (SUMOReal) 2.; + // free space that is available for changing + //const SUMOReal neighSpeed = (neighLead.first != 0 ? neighLead.first->getSpeed() : + // neighFollow.first != 0 ? neighFollow.first->getSpeed() : + // best.lane->getSpeedLimit()); + // @note: while this lets vehicles change earlier into the correct direction + // it also makes the vehicles more "selfish" and prevents changes which are necessary to help others + + int roundaboutEdgesAhead = 0; + for (std::vector::iterator it = curr.bestContinuations.begin(); it != curr.bestContinuations.end(); ++it) { + if ((*it) != 0 && (*it)->getEdge().isRoundabout()) { + roundaboutEdgesAhead += 1; + } else if (roundaboutEdgesAhead > 0) { + // only check the next roundabout + break; + } + } + int roundaboutEdgesAheadNeigh = 0; + for (std::vector::iterator it = neigh.bestContinuations.begin(); it != neigh.bestContinuations.end(); ++it) { + if ((*it) != 0 && (*it)->getEdge().isRoundabout()) { + roundaboutEdgesAheadNeigh += 1; + } else if (roundaboutEdgesAheadNeigh > 0) { + // only check the next roundabout + break; + } + } + if (roundaboutEdgesAhead > 1) { + currentDist += roundaboutEdgesAhead * ROUNDABOUT_DIST_BONUS; + neighDist += roundaboutEdgesAheadNeigh * ROUNDABOUT_DIST_BONUS; + } + + const SUMOReal usableDist = (currentDist - myVehicle.getPositionOnLane() - best.occupation * JAM_FACTOR); + const SUMOReal maxJam = MAX2(preb[currIdx + laneOffset].occupation, preb[currIdx].occupation); + const SUMOReal neighLeftPlace = MAX2((SUMOReal) 0, neighDist - myVehicle.getPositionOnLane() - maxJam); + + if (changeToBest && bestLaneOffset == curr.bestLaneOffset + && currentDistDisallows(usableDist, bestLaneOffset, laDist)) { + /// @brief we urgently need to change lanes to follow our route + ret = ret | lca | LCA_STRATEGIC | LCA_URGENT; + } else { + + if (!myAllowOvertakingRight && !right && !myVehicle.congested() && neighLead.first != 0) { + // check for slower leader on the left. we should not overtake but + // rather move left ourselves (unless congested) + MSVehicle* nv = neighLead.first; + if (nv->getSpeed() < myVehicle.getSpeed()) { + const SUMOReal vSafe = myCarFollowModel.followSpeed( + &myVehicle, myVehicle.getSpeed(), neighLead.second, nv->getSpeed(), nv->getCarFollowModel().getMaxDecel()); + myVSafes.push_back(vSafe); + if (vSafe < myVehicle.getSpeed()) { + mySpeedGainProbability += CHANGE_PROB_THRESHOLD_LEFT / 3; + } + } + } + + if (!changeToBest && (currentDistDisallows(neighLeftPlace, abs(bestLaneOffset) + 2, laDist))) { + // the opposite lane-changing direction should be done than the one examined herein + // we'll check whether we assume we could change anyhow and get back in time... + // + // this rule prevents the vehicle from moving in opposite direction of the best lane + // unless the way till the end where the vehicle has to be on the best lane + // is long enough + ret = ret | LCA_STAY | LCA_STRATEGIC; + } else if (bestLaneOffset == 0 && (neighLeftPlace * 2. < laDist)) { + // the current lane is the best and a lane-changing would cause a situation + // of which we assume we will not be able to return to the lane we have to be on. + // this rule prevents the vehicle from leaving the current, best lane when it is + // close to this lane's end + ret = ret | LCA_STAY | LCA_STRATEGIC; + } + } + // check for overriding TraCI requests + ret = myVehicle.influenceChangeDecision(ret); + if ((ret & lcaCounter) != 0) { + // we are not interested in traci requests for the opposite direction here + ret &= ~(LCA_TRACI | lcaCounter | LCA_URGENT); + } + + if ((ret & LCA_STAY) != 0) { + return ret; + } + if ((ret & LCA_URGENT) != 0) { + // prepare urgent lane change maneuver + // save the left space + myLeftSpace = currentDist - myVehicle.getPositionOnLane(); + if (changeToBest && abs(bestLaneOffset) > 1) { + // there might be a vehicle which needs to counter-lane-change one lane further and we cannot see it yet + myLeadingBlockerLength = MAX2((SUMOReal)(right ? 20.0 : 40.0), myLeadingBlockerLength); + } + + // letting vehicles merge in at the end of the lane in case of counter-lane change, step#1 + // if there is a leader and he wants to change to the opposite direction + saveBlockerLength(neighLead.first, lcaCounter); + if (*firstBlocked != neighLead.first) { + saveBlockerLength(*firstBlocked, lcaCounter); + } + + const SUMOReal remainingSeconds = ((ret & LCA_TRACI) == 0 ? + MAX2((SUMOReal)STEPS2TIME(TS), myLeftSpace / MAX2(myLookAheadSpeed, NUMERICAL_EPS) / abs(bestLaneOffset) / URGENCY) : + myVehicle.getInfluencer().changeRequestRemainingSeconds(currentTime)); + const SUMOReal plannedSpeed = informLeader(msgPass, blocked, myLca, neighLead, remainingSeconds); + if (plannedSpeed >= 0) { + // maybe we need to deal with a blocking follower + informFollower(msgPass, blocked, myLca, neighFollow, remainingSeconds, plannedSpeed); + } + + return ret; + } + + if (roundaboutEdgesAhead > 1) { + // try to use the inner lanes of a roundabout to increase throughput + // unless we are approaching the exit + if (lca == LCA_LEFT) { + req = ret | lca | LCA_COOPERATIVE; + } else { + req = ret | LCA_STAY | LCA_COOPERATIVE; + } + if (!cancelRequest(req)) { + return ret | req; + } + } + + // let's also regard the case where the vehicle is driving on a highway... + // in this case, we do not want to get to the dead-end of an on-ramp + if (right) { + if (bestLaneOffset == 0 && myVehicle.getLane()->getSpeedLimit() > 80. / 3.6 && myLookAheadSpeed > SUMO_const_haltingSpeed) { + req = ret | LCA_STAY | LCA_STRATEGIC; + if (!cancelRequest(req)) { + return ret | req; + } + } + } + // -------- + + // -------- make place on current lane if blocking follower + //if (amBlockingFollowerPlusNB()) { + // std::cout << myVehicle.getID() << ", " << currentDistAllows(neighDist, bestLaneOffset, laDist) + // << " neighDist=" << neighDist + // << " currentDist=" << currentDist + // << "\n"; + //} + if (amBlockingFollowerPlusNB() + && (changeToBest || currentDistAllows(neighDist, abs(bestLaneOffset) + 1, laDist))) { + + req = ret | lca | LCA_COOPERATIVE | LCA_URGENT ;//| LCA_CHANGE_TO_HELP; + if (!cancelRequest(req)) { + return ret | req; + } + } + + // -------- + + + //// -------- security checks for krauss + //// (vsafe fails when gap<0) + //if ((blocked & LCA_BLOCKED) != 0) { + // return ret; + //} + //// -------- + + // -------- higher speed + //if ((congested(neighLead.first) && neighLead.second < 20) || predInteraction(leader.first)) { //!!! + // return ret; + //} + SUMOReal thisLaneVSafe = myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle); + SUMOReal neighLaneVSafe = neighLane.getVehicleMaxSpeed(&myVehicle); + if (neighLead.first == 0) { + neighLaneVSafe = MIN2(neighLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighDist, 0, 0)); + } else { + // @todo: what if leader is below safe gap?!!! + neighLaneVSafe = MIN2(neighLaneVSafe, myCarFollowModel.followSpeed( + &myVehicle, myVehicle.getSpeed(), neighLead.second, neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel())); + } + if (leader.first == 0) { + thisLaneVSafe = MIN2(thisLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), currentDist, 0, 0)); + } else { + // @todo: what if leader is below safe gap?!!! + thisLaneVSafe = MIN2(thisLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), leader.second, leader.first->getSpeed(), leader.first->getCarFollowModel().getMaxDecel())); + } + + const SUMOReal vMax = MIN2(myVehicle.getVehicleType().getMaxSpeed(), myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle)); + thisLaneVSafe = MIN2(thisLaneVSafe, vMax); + neighLaneVSafe = MIN2(neighLaneVSafe, vMax); + const SUMOReal relativeGain = (neighLaneVSafe - thisLaneVSafe) / MAX2(neighLaneVSafe, + RELGAIN_NORMALIZATION_MIN_SPEED); + + if (right) { + // ONLY FOR CHANGING TO THE RIGHT + if (thisLaneVSafe - 5 / 3.6 > neighLaneVSafe) { + // ok, the current lane is faster than the right one... + if (mySpeedGainProbability < 0) { + mySpeedGainProbability /= 2.0; + //myKeepRightProbability /= 2.0; + } + } else { + // ok, the current lane is not faster than the right one + mySpeedGainProbability -= relativeGain; + + // honor the obligation to keep right (Rechtsfahrgebot) + // XXX consider fast approaching followers on the current lane + //const SUMOReal vMax = myLookAheadSpeed; + const SUMOReal acceptanceTime = KEEP_RIGHT_ACCEPTANCE * vMax * MAX2((SUMOReal)1, myVehicle.getSpeed()) / myVehicle.getLane()->getSpeedLimit(); + SUMOReal fullSpeedGap = MAX2((SUMOReal)0, neighDist - myVehicle.getCarFollowModel().brakeGap(vMax)); + SUMOReal fullSpeedDrivingSeconds = MIN2(acceptanceTime, fullSpeedGap / vMax); + if (neighLead.first != 0 && neighLead.first->getSpeed() < vMax) { + fullSpeedGap = MAX2((SUMOReal)0, MIN2(fullSpeedGap, + neighLead.second - myVehicle.getCarFollowModel().getSecureGap( + vMax, neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel()))); + fullSpeedDrivingSeconds = MIN2(fullSpeedDrivingSeconds, fullSpeedGap / (vMax - neighLead.first->getSpeed())); + } + const SUMOReal deltaProb = (CHANGE_PROB_THRESHOLD_RIGHT + * STEPS2TIME(DELTA_T) + * (fullSpeedDrivingSeconds / acceptanceTime) / KEEP_RIGHT_TIME); + myKeepRightProbability -= deltaProb; + + if (gDebugFlag2) { + std::cout << STEPS2TIME(currentTime) + << " veh=" << myVehicle.getID() + << " vMax=" << vMax + << " neighDist=" << neighDist + << " brakeGap=" << myVehicle.getCarFollowModel().brakeGap(myVehicle.getSpeed()) + << " leaderSpeed=" << (neighLead.first == 0 ? -1 : neighLead.first->getSpeed()) + << " secGap=" << (neighLead.first == 0 ? -1 : myVehicle.getCarFollowModel().getSecureGap( + myVehicle.getSpeed(), neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel())) + << " acceptanceTime=" << acceptanceTime + << " fullSpeedGap=" << fullSpeedGap + << " fullSpeedDrivingSeconds=" << fullSpeedDrivingSeconds + << " dProb=" << deltaProb + << "\n"; + } + if (myKeepRightProbability < -CHANGE_PROB_THRESHOLD_RIGHT) { + req = ret | lca | LCA_KEEPRIGHT; + if (!cancelRequest(req)) { + return ret | req; + } + } + } + + if (mySpeedGainProbability < -CHANGE_PROB_THRESHOLD_RIGHT + && neighDist / MAX2((SUMOReal) .1, myVehicle.getSpeed()) > 20.) { //./MAX2((SUMOReal) .1, myVehicle.getSpeed())) { // -.1 + req = ret | lca | LCA_SPEEDGAIN; + if (!cancelRequest(req)) { + return ret | req; + } + } + } else { + // ONLY FOR CHANGING TO THE LEFT + if (thisLaneVSafe > neighLaneVSafe) { + // this lane is better + if (mySpeedGainProbability > 0) { + mySpeedGainProbability /= 2.0; + } + } else { + // left lane is better + mySpeedGainProbability += relativeGain; + } + if (mySpeedGainProbability > CHANGE_PROB_THRESHOLD_LEFT && neighDist / MAX2((SUMOReal) .1, myVehicle.getSpeed()) > 20.) { // .1 + req = ret | lca | LCA_SPEEDGAIN; + if (!cancelRequest(req)) { + return ret | req; + } + } + } + // -------- + if (changeToBest && bestLaneOffset == curr.bestLaneOffset + && (right ? mySpeedGainProbability < 0 : mySpeedGainProbability > 0)) { + // change towards the correct lane, speedwise it does not hurt + req = ret | lca | LCA_STRATEGIC; + if (!cancelRequest(req)) { + return ret | req; + } + } + + return ret; +} + + +int +MSLCM_LC2013::slowDownForBlocked(MSVehicle** blocked, int state) { + // if this vehicle is blocking someone in front, we maybe decelerate to let him in + if ((*blocked) != 0) { + SUMOReal gap = (*blocked)->getPositionOnLane() - (*blocked)->getVehicleType().getLength() - myVehicle.getPositionOnLane() - myVehicle.getVehicleType().getMinGap(); + if (gap > POSITION_EPS) { + if (myVehicle.getSpeed() < ACCEL2SPEED(myVehicle.getCarFollowModel().getMaxDecel())) { + if ((*blocked)->getSpeed() < SUMO_const_haltingSpeed) { + state |= LCA_AMBACKBLOCKER_STANDING; + } else { + state |= LCA_AMBACKBLOCKER; + } + myVSafes.push_back(myCarFollowModel.followSpeed( + &myVehicle, myVehicle.getSpeed(), + (SUMOReal)(gap - POSITION_EPS), (*blocked)->getSpeed(), + (*blocked)->getCarFollowModel().getMaxDecel())); + } + } + } + return state; +} + + +void +MSLCM_LC2013::saveBlockerLength(MSVehicle* blocker, int lcaCounter) { + if (blocker != 0 && (blocker->getLaneChangeModel().getOwnState() & lcaCounter) != 0) { + // is there enough space in front of us for the blocker? + const SUMOReal potential = myLeftSpace - myVehicle.getCarFollowModel().brakeGap( + myVehicle.getSpeed(), myVehicle.getCarFollowModel().getMaxDecel(), 0); + if (blocker->getVehicleType().getLengthWithGap() <= potential) { + // save at least his length in myLeadingBlockerLength + myLeadingBlockerLength = MAX2(blocker->getVehicleType().getLengthWithGap(), myLeadingBlockerLength); + } else { + // we cannot save enough space for the blocker. It needs to save + // space for ego instead + blocker->getLaneChangeModel().saveBlockerLength(myVehicle.getVehicleType().getLengthWithGap()); + } + } +} +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_LC2013.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_LC2013.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_LC2013.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/lcmodels/MSLCM_LC2013.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,199 @@ +/****************************************************************************/ +/// @file MSLCM_LC2013.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Friedemann Wesner +/// @author Sascha Krieg +/// @author Michael Behrisch +/// @date Fri, 08.10.2013 +/// @version $Id: MSLCM_LC2013.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A lane change model developed by D. Krajzewicz, J. Erdmann et al. between 2004 and 2013 +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSLCM_LC2013_h +#define MSLCM_LC2013_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include "MSAbstractLaneChangeModel.h" +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSLCM_LC2013 + * @brief A lane change model developed by D. Krajzewicz, J. Erdmann + * et al. between 2004 and 2013 + */ +class MSLCM_LC2013 : public MSAbstractLaneChangeModel { +public: + + enum MyLCAEnum { + LCA_AMBLOCKINGLEADER = 1 << 16, + LCA_AMBLOCKINGFOLLOWER = 1 << 17, + LCA_MRIGHT = 1 << 18, + LCA_MLEFT = 1 << 19, + // !!! never set LCA_UNBLOCK = 1 << 20, + LCA_AMBLOCKINGFOLLOWER_DONTBRAKE = 1 << 21, + // !!! never used LCA_AMBLOCKINGSECONDFOLLOWER = 1 << 22, + LCA_CHANGE_TO_HELP = 1 << 23, + // !!! never read LCA_KEEP1 = 1 << 24, + // !!! never used LCA_KEEP2 = 1 << 25, + LCA_AMBACKBLOCKER = 1 << 26, + LCA_AMBACKBLOCKER_STANDING = 1 << 27 + }; + + + MSLCM_LC2013(MSVehicle& v); + + virtual ~MSLCM_LC2013(); + + /** @brief Called to examine whether the vehicle wants to change + * using the given laneOffset. + * This method gets the information about the surrounding vehicles + * and whether another lane may be more preferable */ + int wantsChange( + int laneOffset, + MSAbstractLaneChangeModel::MSLCMessager& msgPass, int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked); + + void* inform(void* info, MSVehicle* sender); + + /** @brief Called to adapt the speed in order to allow a lane change. + * + * @param min The minimum resulting speed + * @param wanted The aspired speed of the car following model + * @param max The maximum resulting speed + * @param cfModel The model used + * @return the new speed of the vehicle as proposed by the lane changer + */ + SUMOReal patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, + const MSCFModel& cfModel); + /** helper function which contains the actual logic */ + SUMOReal _patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, + const MSCFModel& cfModel); + + void changed(int dir); + + void prepareStep(); + + +protected: + + /// @brief helper function for doing the actual work + int _wantsChange( + int laneOffset, + MSAbstractLaneChangeModel::MSLCMessager& msgPass, int blocked, + const std::pair& leader, + const std::pair& neighLead, + const std::pair& neighFollow, + const MSLane& neighLane, + const std::vector& preb, + MSVehicle** lastBlocked, + MSVehicle** firstBlocked); + + + /* @brief decide whether we will overtake or follow a blocking leader + * and inform it accordingly + * If we decide to follow, myVSafes will be extended + * returns the planned speed if following or -1 if overtaking */ + SUMOReal informLeader(MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int blocked, int dir, + const std::pair& neighLead, + SUMOReal remainingSeconds); + + /// @brief decide whether we will try cut in before the follower or allow to be overtaken + void informFollower(MSAbstractLaneChangeModel::MSLCMessager& msgPass, + int blocked, int dir, + const std::pair& neighFollow, + SUMOReal remainingSeconds, + SUMOReal plannedSpeed); + + + /// @brief compute useful slowdowns for blocked vehicles + int slowDownForBlocked(MSVehicle** blocked, int state); + + /// @brief save space for vehicles which need to counter-lane-change + void saveBlockerLength(MSVehicle* blocker, int lcaCounter); + + /// @brief reserve space at the end of the lane to avoid dead locks + inline void saveBlockerLength(SUMOReal length) { + myLeadingBlockerLength = MAX2(length, myLeadingBlockerLength); + }; + + inline bool amBlockingLeader() { + return (myOwnState & LCA_AMBLOCKINGLEADER) != 0; + } + inline bool amBlockingFollower() { + return (myOwnState & LCA_AMBLOCKINGFOLLOWER) != 0; + } + inline bool amBlockingFollowerNB() { + return (myOwnState & LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0; + } + inline bool amBlockingFollowerPlusNB() { + return (myOwnState & (LCA_AMBLOCKINGFOLLOWER | LCA_AMBLOCKINGFOLLOWER_DONTBRAKE)) != 0; + } + inline bool currentDistDisallows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist) { + return dist / (abs(laneOffset)) < lookForwardDist; + } + inline bool currentDistAllows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist) { + return dist / abs(laneOffset) > lookForwardDist; + } + + /// @brief information regarding save velocity (unused) and state flags of the ego vehicle + typedef std::pair Info; + + + +protected: + /// @brief a value for tracking the probability that a change to the offset with the same sign is beneficial + SUMOReal mySpeedGainProbability; + /* @brief a value for tracking the probability of following the/"Rechtsfahrgebot" + * A larger negative value indicates higher probability for moving to the + * right (as in mySpeedGainProbability) */ + SUMOReal myKeepRightProbability; + + SUMOReal myLeadingBlockerLength; + SUMOReal myLeftSpace; + + /*@brief the speed to use when computing the look-ahead distance for + * determining urgency of strategic lane changes */ + SUMOReal myLookAheadSpeed; + + std::vector myVSafes; + bool myDontBrake; + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/logging/CastingFunctionBinding.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/logging/CastingFunctionBinding.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/logging/CastingFunctionBinding.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/logging/CastingFunctionBinding.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Christian Roessel /// @author Sascha Krieg /// @date Fri, 29.04.2005 -/// @version $Id: CastingFunctionBinding.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: CastingFunctionBinding.h 18095 2015-03-17 09:39:00Z behrisch $ /// -// »missingDescription« +// Function type template /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -47,33 +47,40 @@ /// Type of the function to execute. typedef O(T::* Operation)() const; - CastingFunctionBinding(T* source, Operation operation) : + CastingFunctionBinding(T* source, Operation operation, const R scale = 1) : mySource(source), - myOperation(operation) {} + myOperation(operation), + myScale(scale) {} /// Destructor. ~CastingFunctionBinding() {} R getValue() const { - return (R)(mySource->*myOperation)(); + return myScale * (R)(mySource->*myOperation)(); } ValueSource* copy() const { - return new CastingFunctionBinding(mySource, myOperation); + return new CastingFunctionBinding(mySource, myOperation, myScale); } ValueSource* makeSUMORealReturningCopy() const { - return new CastingFunctionBinding(mySource, myOperation); + return new CastingFunctionBinding(mySource, myOperation, myScale); } -protected: - private: /// The object the action is directed to. T* mySource; /// The object's operation to perform. Operation myOperation; + + /// The scale to apply. + const R myScale; + +private: + /// @brief invalidated assignment operator + CastingFunctionBinding& operator=(const CastingFunctionBinding&); + }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/logging/FuncBinding_IntParam.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/logging/FuncBinding_IntParam.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/logging/FuncBinding_IntParam.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/logging/FuncBinding_IntParam.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Fri, 29.04.2005 -/// @version $Id: FuncBinding_IntParam.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: FuncBinding_IntParam.h 18095 2015-03-17 09:39:00Z behrisch $ /// -// �missingDescription� +// �Function type template /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/logging/FuncBinding_StringParam.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/logging/FuncBinding_StringParam.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/logging/FuncBinding_StringParam.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/logging/FuncBinding_StringParam.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @date Fri, 29.04.2005 -/// @version $Id: FuncBinding_StringParam.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: FuncBinding_StringParam.h 18095 2015-03-17 09:39:00Z behrisch $ /// -// »missingDescription« +// Function type template /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/logging/FunctionBinding.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/logging/FunctionBinding.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/logging/FunctionBinding.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/logging/FunctionBinding.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Fri, 29.04.2005 -/// @version $Id: FunctionBinding.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: FunctionBinding.h 18095 2015-03-17 09:39:00Z behrisch $ /// -// »missingDescription« +// Function type template /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -50,23 +50,24 @@ /// Type of the function to execute. typedef R(T::* Operation)() const; - FunctionBinding(T* const source, Operation operation) : + FunctionBinding(T* const source, Operation operation, const R scale = 1) : mySource(source), - myOperation(operation) {} + myOperation(operation), + myScale(scale) {} /// Destructor. ~FunctionBinding() {} R getValue() const { - return (mySource->*myOperation)(); + return myScale * (mySource->*myOperation)(); } ValueSource* copy() const { - return new FunctionBinding(mySource, myOperation); + return new FunctionBinding(mySource, myOperation, myScale); } ValueSource* makeSUMORealReturningCopy() const { - return new CastingFunctionBinding(mySource, myOperation); + return new CastingFunctionBinding(mySource, myOperation, myScale); } private: @@ -75,6 +76,14 @@ /// The object's operation to perform. Operation myOperation; + + /// The scale to apply. + const R myScale; + +private: + /// @brief invalidated assignment operator + FunctionBinding& operator=(const FunctionBinding&); + }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/logging/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/logging/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/logging/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/logging/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,7 +79,7 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/microsim/logging -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -44,14 +88,33 @@ CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -78,9 +141,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -91,10 +158,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -230,11 +293,11 @@ clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: + +ctags CTAGS: -ctags: CTAGS -CTAGS: +cscope cscopelist: distdir: $(DISTFILES) @@ -281,10 +344,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -365,15 +433,16 @@ .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -2,7 +2,9 @@ libmicrosim_a_SOURCES = MSBitSetLogic.h \ MSBaseVehicle.cpp MSBaseVehicle.h \ -MSAbstractLaneChangeModel.h MSAbstractLaneChangeModel.cpp \ +MSCModel_NonInteracting.h MSCModel_NonInteracting.cpp \ +MSContainer.cpp MSContainer.h \ +MSContainerControl.cpp MSContainerControl.h \ MSEdge.cpp MSEdge.h MSEdgeControl.cpp MSEdgeControl.h \ MSEdgeWeightsStorage.cpp MSEdgeWeightsStorage.h \ MSEventControl.cpp MSEventControl.h \ @@ -12,12 +14,11 @@ MSJunction.cpp MSJunction.h \ MSJunctionControl.cpp MSJunctionControl.h \ MSJunctionLogic.cpp MSJunctionLogic.h MSLane.cpp MSLane.h \ -MSLCM_DK2004.cpp MSLCM_DK2004.h \ MSLaneChanger.cpp MSLaneChanger.h \ MSLink.cpp MSLink.h MSLinkCont.cpp MSLinkCont.h \ MSLogicJunction.cpp MSLogicJunction.h MSMoveReminder.cpp MSMoveReminder.h \ MSNet.cpp MSNet.h MSNoLogicJunction.cpp MSNoLogicJunction.h \ -MSPerson.cpp MSPerson.h MSPersonControl.cpp MSPersonControl.h \ +MSPersonControl.cpp MSPersonControl.h \ MSRightOfWayJunction.cpp MSRightOfWayJunction.h \ MSRoute.cpp MSRoute.h MSRouteHandler.cpp MSRouteHandler.h \ MSVehicle.cpp MSVehicle.h \ @@ -27,4 +28,5 @@ MSVehicleType.cpp MSVehicleType.h \ MSStateHandler.h MSStateHandler.cpp -SUBDIRS = actions cfmodels devices logging output traffic_lights trigger +SUBDIRS = actions cfmodels devices lcmodels logging output pedestrians \ +traffic_lights trigger diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/microsim -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,61 +92,125 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libmicrosim_a_AR = $(AR) $(ARFLAGS) libmicrosim_a_LIBADD = am_libmicrosim_a_OBJECTS = MSBaseVehicle.$(OBJEXT) \ - MSAbstractLaneChangeModel.$(OBJEXT) MSEdge.$(OBJEXT) \ + MSCModel_NonInteracting.$(OBJEXT) MSContainer.$(OBJEXT) \ + MSContainerControl.$(OBJEXT) MSEdge.$(OBJEXT) \ MSEdgeControl.$(OBJEXT) MSEdgeWeightsStorage.$(OBJEXT) \ MSEventControl.$(OBJEXT) MSFrame.$(OBJEXT) MSGlobals.$(OBJEXT) \ MSInsertionControl.$(OBJEXT) MSInternalJunction.$(OBJEXT) \ MSJunction.$(OBJEXT) MSJunctionControl.$(OBJEXT) \ MSJunctionLogic.$(OBJEXT) MSLane.$(OBJEXT) \ - MSLCM_DK2004.$(OBJEXT) MSLaneChanger.$(OBJEXT) \ - MSLink.$(OBJEXT) MSLinkCont.$(OBJEXT) \ + MSLaneChanger.$(OBJEXT) MSLink.$(OBJEXT) MSLinkCont.$(OBJEXT) \ MSLogicJunction.$(OBJEXT) MSMoveReminder.$(OBJEXT) \ - MSNet.$(OBJEXT) MSNoLogicJunction.$(OBJEXT) MSPerson.$(OBJEXT) \ + MSNet.$(OBJEXT) MSNoLogicJunction.$(OBJEXT) \ MSPersonControl.$(OBJEXT) MSRightOfWayJunction.$(OBJEXT) \ MSRoute.$(OBJEXT) MSRouteHandler.$(OBJEXT) MSVehicle.$(OBJEXT) \ MSVehicleContainer.$(OBJEXT) MSVehicleControl.$(OBJEXT) \ MSVehicleTransfer.$(OBJEXT) MSVehicleType.$(OBJEXT) \ MSStateHandler.$(OBJEXT) libmicrosim_a_OBJECTS = $(am_libmicrosim_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libmicrosim_a_SOURCES) DIST_SOURCES = $(libmicrosim_a_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -136,6 +245,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -162,9 +272,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -175,10 +289,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -275,7 +385,9 @@ noinst_LIBRARIES = libmicrosim.a libmicrosim_a_SOURCES = MSBitSetLogic.h \ MSBaseVehicle.cpp MSBaseVehicle.h \ -MSAbstractLaneChangeModel.h MSAbstractLaneChangeModel.cpp \ +MSCModel_NonInteracting.h MSCModel_NonInteracting.cpp \ +MSContainer.cpp MSContainer.h \ +MSContainerControl.cpp MSContainerControl.h \ MSEdge.cpp MSEdge.h MSEdgeControl.cpp MSEdgeControl.h \ MSEdgeWeightsStorage.cpp MSEdgeWeightsStorage.h \ MSEventControl.cpp MSEventControl.h \ @@ -285,12 +397,11 @@ MSJunction.cpp MSJunction.h \ MSJunctionControl.cpp MSJunctionControl.h \ MSJunctionLogic.cpp MSJunctionLogic.h MSLane.cpp MSLane.h \ -MSLCM_DK2004.cpp MSLCM_DK2004.h \ MSLaneChanger.cpp MSLaneChanger.h \ MSLink.cpp MSLink.h MSLinkCont.cpp MSLinkCont.h \ MSLogicJunction.cpp MSLogicJunction.h MSMoveReminder.cpp MSMoveReminder.h \ MSNet.cpp MSNet.h MSNoLogicJunction.cpp MSNoLogicJunction.h \ -MSPerson.cpp MSPerson.h MSPersonControl.cpp MSPersonControl.h \ +MSPersonControl.cpp MSPersonControl.h \ MSRightOfWayJunction.cpp MSRightOfWayJunction.h \ MSRoute.cpp MSRoute.h MSRouteHandler.cpp MSRouteHandler.h \ MSVehicle.cpp MSVehicle.h \ @@ -300,7 +411,9 @@ MSVehicleType.cpp MSVehicleType.h \ MSStateHandler.h MSStateHandler.cpp -SUBDIRS = actions cfmodels devices logging output traffic_lights trigger +SUBDIRS = actions cfmodels devices lcmodels logging output pedestrians \ +traffic_lights trigger + all: all-recursive .SUFFIXES: @@ -338,10 +451,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libmicrosim.a: $(libmicrosim_a_OBJECTS) $(libmicrosim_a_DEPENDENCIES) - -rm -f libmicrosim.a - $(libmicrosim_a_AR) libmicrosim.a $(libmicrosim_a_OBJECTS) $(libmicrosim_a_LIBADD) - $(RANLIB) libmicrosim.a + +libmicrosim.a: $(libmicrosim_a_OBJECTS) $(libmicrosim_a_DEPENDENCIES) $(EXTRA_libmicrosim_a_DEPENDENCIES) + $(AM_V_at)-rm -f libmicrosim.a + $(AM_V_AR)$(libmicrosim_a_AR) libmicrosim.a $(libmicrosim_a_OBJECTS) $(libmicrosim_a_LIBADD) + $(AM_V_at)$(RANLIB) libmicrosim.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -349,8 +463,10 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSAbstractLaneChangeModel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSBaseVehicle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCModel_NonInteracting.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSContainer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSContainerControl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSEdge.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSEdgeControl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSEdgeWeightsStorage.Po@am__quote@ @@ -362,7 +478,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSJunction.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSJunctionControl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSJunctionLogic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLCM_DK2004.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLane.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLaneChanger.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLink.Po@am__quote@ @@ -371,7 +486,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSMoveReminder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSNet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSNoLogicJunction.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSPerson.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSPersonControl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSRightOfWayJunction.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSRoute.Po@am__quote@ @@ -384,25 +498,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSVehicleType.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -411,22 +525,25 @@ -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -441,57 +558,12 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -507,12 +579,7 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -524,15 +591,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -541,6 +604,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -577,13 +655,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -618,10 +693,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -704,12 +784,11 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - clean-noinstLIBRARIES ctags ctags-recursive distclean \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ @@ -719,8 +798,8 @@ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSAbstractLaneChangeModel.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSAbstractLaneChangeModel.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSAbstractLaneChangeModel.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSAbstractLaneChangeModel.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,186 +0,0 @@ -/****************************************************************************/ -/// @file MSAbstractLaneChangeModel.h -/// @author Daniel Krajzewicz -/// @author Friedemann Wesner -/// @author Sascha Krieg -/// @author Michael Behrisch -/// @author Jakob Erdmann -/// @date Fri, 29.04.2005 -/// @version $Id: MSAbstractLaneChangeModel.cpp 14494 2013-08-24 21:47:48Z behrisch $ -/// -// Interface for lane-change models -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include "MSAbstractLaneChangeModel.h" -#include "MSNet.h" -#include "MSEdge.h" -#include "MSLane.h" -#include "MSGlobals.h" - -/* ------------------------------------------------------------------------- - * MSAbstractLaneChangeModel-methods - * ----------------------------------------------------------------------- */ - -MSAbstractLaneChangeModel::MSAbstractLaneChangeModel(MSVehicle& v) : - myVehicle(v), - myOwnState(0), - myLastLaneChangeOffset(0), - myLaneChangeCompletion(1.0), - myLaneChangeDirection(0), - myLaneChangeMidpointPassed(false), - myAlreadyMoved(false), - myShadowLane(0), - myHaveShadow(false), -#ifndef NO_TRACI - myChangeRequest(MSVehicle::REQUEST_NONE), -#endif - myCarFollowModel(v.getCarFollowModel()) { -} - - -MSAbstractLaneChangeModel::~MSAbstractLaneChangeModel() { - removeLaneChangeShadow(); -} - - -bool -MSAbstractLaneChangeModel::congested(const MSVehicle* const neighLeader) { - if (neighLeader == 0) { - return false; - } - // Congested situation are relevant only on highways (maxSpeed > 70km/h) - // and congested on German Highways means that the vehicles have speeds - // below 60km/h. Overtaking on the right is allowed then. - if ((myVehicle.getLane()->getSpeedLimit() <= 70.0 / 3.6) || (neighLeader->getLane()->getSpeedLimit() <= 70.0 / 3.6)) { - - return false; - } - if (myVehicle.congested() && neighLeader->congested()) { - return true; - } - return false; -} - - -bool -MSAbstractLaneChangeModel::predInteraction(const MSVehicle* const leader) { - if (leader == 0) { - return false; - } - // let's check it on highways only - if (leader->getSpeed() < (80.0 / 3.6)) { - return false; - } - SUMOReal gap = leader->getPositionOnLane() - leader->getVehicleType().getLength() - myVehicle.getVehicleType().getMinGap() - myVehicle.getPositionOnLane(); - return gap < myCarFollowModel.interactionGap(&myVehicle, leader->getSpeed()); -} - - -bool -MSAbstractLaneChangeModel::startLaneChangeManeuver(MSLane* source, MSLane* target, int direction) { - target->enteredByLaneChange(&myVehicle); - if (MSGlobals::gLaneChangeDuration > DELTA_T) { - myLaneChangeCompletion = 0; - myShadowLane = target; - myHaveShadow = true; - myLaneChangeMidpointPassed = false; - myLaneChangeDirection = direction; - continueLaneChangeManeuver(false); - return true; - } else { - myVehicle.leaveLane(MSMoveReminder::NOTIFICATION_LANE_CHANGE); - source->leftByLaneChange(&myVehicle); - myVehicle.enterLaneAtLaneChange(target); - myLastLaneChangeOffset = 0; - changed(); - return false; - } -} - - -void -MSAbstractLaneChangeModel::continueLaneChangeManeuver(bool moved) { - if (moved && myHaveShadow) { - // move shadow to next lane - removeLaneChangeShadow(); - const int shadowDirection = myLaneChangeMidpointPassed ? -myLaneChangeDirection : myLaneChangeDirection; - myShadowLane = myVehicle.getLane()->getParallelLane(shadowDirection); - if (myShadowLane == 0) { - // abort lane change - WRITE_WARNING("Vehicle '" + myVehicle.getID() + "' could not finish continuous lane change (lane disappeared) time=" + - time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); - endLaneChangeManeuver(); - return; - } - myHaveShadow = true; - } - myLaneChangeCompletion += (SUMOReal)DELTA_T / (SUMOReal)MSGlobals::gLaneChangeDuration; - if (!myLaneChangeMidpointPassed && myLaneChangeCompletion >= - myVehicle.getLane()->getWidth() / (myVehicle.getLane()->getWidth() + myShadowLane->getWidth())) { - // maneuver midpoint reached, swap myLane and myShadowLane - myLaneChangeMidpointPassed = true; - MSLane* tmp = myVehicle.getLane(); - myVehicle.leaveLane(MSMoveReminder::NOTIFICATION_LANE_CHANGE); - myVehicle.enterLaneAtLaneChange(myShadowLane); - myShadowLane = tmp; - if (myVehicle.getLane()->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { - // internal lanes do not appear in bestLanes so we need to update - // myCurrentLaneInBestLanes explicitly - myVehicle.getBestLanes(false, myVehicle.getLane()->getLogicalPredecessorLane()); - if (myVehicle.fixContinuations()) { - WRITE_WARNING("vehicle '" + myVehicle.getID() + "' could not reconstruct bestLanes when changing lanes on lane '" + myVehicle.getLane()->getID() + " time=" - + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); - } - } - if (myVehicle.fixPosition()) { - WRITE_WARNING("vehicle '" + myVehicle.getID() + "' set back by " + toString(myVehicle.getPositionOnLane() - myVehicle.getLane()->getLength()) + - "m when changing lanes on lane '" + myVehicle.getLane()->getID() + " time=" + - time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); - } - myLastLaneChangeOffset = 0; - changed(); - myAlreadyMoved = true; - } - // remove shadow as soon as the vehicle leaves the original lane geometrically - if (myLaneChangeMidpointPassed && myHaveShadow) { - const SUMOReal sourceHalfWidth = myShadowLane->getWidth() / 2.0; - const SUMOReal targetHalfWidth = myVehicle.getLane()->getWidth() / 2.0; - if (myLaneChangeCompletion * (sourceHalfWidth + targetHalfWidth) - myVehicle.getVehicleType().getWidth() / 2.0 > sourceHalfWidth) { - removeLaneChangeShadow(); - } - } - // finish maneuver - if (!isChangingLanes()) { - assert(myLaneChangeMidpointPassed); - endLaneChangeManeuver(); - } -} - - -void -MSAbstractLaneChangeModel::removeLaneChangeShadow() { - if (myShadowLane != 0 && myHaveShadow) { - myShadowLane->removeVehicle(&myVehicle, MSMoveReminder::NOTIFICATION_LANE_CHANGE); - myHaveShadow = false; - } -} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSAbstractLaneChangeModel.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSAbstractLaneChangeModel.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSAbstractLaneChangeModel.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSAbstractLaneChangeModel.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,369 +0,0 @@ -/****************************************************************************/ -/// @file MSAbstractLaneChangeModel.h -/// @author Daniel Krajzewicz -/// @author Friedemann Wesner -/// @author Sascha Krieg -/// @author Michael Behrisch -/// @author Jakob Erdmann -/// @date Fri, 29.04.2005 -/// @version $Id: MSAbstractLaneChangeModel.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Interface for lane-change models -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef MSAbstractLaneChangeModel_h -#define MSAbstractLaneChangeModel_h - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include "MSVehicle.h" -class MSLane; - -// =========================================================================== -// used enumeration -// =========================================================================== -/** @enum LaneChangeAction - * @brief A try to store the state of a vehicle's lane-change wish in an int - */ -enum LaneChangeAction { - /// @name currently wanted lane-change action - /// @{ - - /// @brief No action - LCA_NONE = 0, - /// @brief The action is due to the wish to follow the route (navigational lc) - LCA_URGENT = 1, - /// @brief The action is due to the wish to be faster (tactical lc) - LCA_SPEEDGAIN = 2, - /// @brief Wants go to the left - LCA_LEFT = 4, - /// @brief Wants go to the right - LCA_RIGHT = 8, - - LCA_WANTS_LANECHANGE = LCA_URGENT | LCA_SPEEDGAIN | LCA_LEFT | LCA_RIGHT, - /// @} - - - /// @name External state - /// @{ - - /// @brief The vehicle is blocked by left leader - LCA_BLOCKED_BY_LEFT_LEADER = 16, - /// @brief The vehicle is blocked by left follower - LCA_BLOCKED_BY_LEFT_FOLLOWER = 32, - - /// @brief The vehicle is blocked by right leader - LCA_BLOCKED_BY_RIGHT_LEADER = 64, - /// @brief The vehicle is blocked by right follower - LCA_BLOCKED_BY_RIGHT_FOLLOWER = 128, - - LCA_BLOCKED_LEFT = LCA_BLOCKED_BY_LEFT_LEADER | LCA_BLOCKED_BY_LEFT_FOLLOWER, - LCA_BLOCKED_RIGHT = LCA_BLOCKED_BY_RIGHT_LEADER | LCA_BLOCKED_BY_RIGHT_FOLLOWER, - LCA_BLOCKED_BY_LEADER = LCA_BLOCKED_BY_LEFT_LEADER | LCA_BLOCKED_BY_RIGHT_LEADER, - LCA_BLOCKED_BY_FOLLOWER = LCA_BLOCKED_BY_LEFT_FOLLOWER | LCA_BLOCKED_BY_RIGHT_FOLLOWER, - LCA_BLOCKED = LCA_BLOCKED_LEFT | LCA_BLOCKED_RIGHT - - // The vehicle is blocked being overlapping - // This is currently not used, but I'll keep it while working on this, as - // overlapping may be interested, but surely divided by leader/follower - // LCA_OVERLAPPING = 64 - /// @} - -}; - - - - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class MSAbstractLaneChangeModel - * @brief Interface for lane-change models - */ -class MSAbstractLaneChangeModel { -public: - /** @class MSLCMessager - * @brief A class responsible for exchanging messages between cars involved in lane-change interaction - */ - class MSLCMessager { - public: - /** @brief Constructor - * @param[in] leader The leader on the informed vehicle's lane - * @param[in] neighLead The leader on the lane the vehicle want to change to - * @param[in] neighFollow The follower on the lane the vehicle want to change to - */ - MSLCMessager(MSVehicle* leader, MSVehicle* neighLead, MSVehicle* neighFollow) - : myLeader(leader), myNeighLeader(neighLead), - myNeighFollower(neighFollow) { } - - - /// @brief Destructor - ~MSLCMessager() { } - - - /** @brief Informs the leader on the same lane - * @param[in] info The information to pass - * @param[in] sender The sending vehicle (the lane changing vehicle) - * @return Something!? - */ - void* informLeader(void* info, MSVehicle* sender) { - assert(myLeader != 0); - return myLeader->getLaneChangeModel().inform(info, sender); - } - - - /** @brief Informs the leader on the desired lane - * @param[in] info The information to pass - * @param[in] sender The sending vehicle (the lane changing vehicle) - * @return Something!? - */ - void* informNeighLeader(void* info, MSVehicle* sender) { - assert(myNeighLeader != 0); - return myNeighLeader->getLaneChangeModel().inform(info, sender); - } - - - /** @brief Informs the follower on the desired lane - * @param[in] info The information to pass - * @param[in] sender The sending vehicle (the lane changing vehicle) - * @return Something!? - */ - void* informNeighFollower(void* info, MSVehicle* sender) { - assert(myNeighFollower != 0); - return myNeighFollower->getLaneChangeModel().inform(info, sender); - } - - - private: - /// @brief The leader on the informed vehicle's lane - MSVehicle* myLeader; - /// @brief The leader on the lane the vehicle want to change to - MSVehicle* myNeighLeader; - /// @brief The follower on the lane the vehicle want to change to - MSVehicle* myNeighFollower; - - }; - - - /** @brief Constructor - * @param[in] v The vehicle this lane-changer belongs to - */ - MSAbstractLaneChangeModel(MSVehicle& v); - - /// @brief Destructor - virtual ~MSAbstractLaneChangeModel(); - - inline int getOwnState() const { - return myOwnState; - } - - inline void setOwnState(int state) { - myOwnState = state; - } - - virtual void prepareStep() { } - - /** @brief Called to examine whether the vehicle wants to change to right - This method gets the information about the surrounding vehicles - and whether another lane may be more preferable */ - virtual int wantsChangeToRight( - MSLCMessager& msgPass, int blocked, - const std::pair& leader, - const std::pair& neighLead, - const std::pair& neighFollow, - const MSLane& neighLane, - const std::vector& preb, - MSVehicle** lastBlocked) = 0; - - /** @brief Called to examine whether the vehicle wants to change to left - This method gets the information about the surrounding vehicles - and whether another lane may be more preferable */ - virtual int wantsChangeToLeft( - MSLCMessager& msgPass, int blocked, - const std::pair& leader, - const std::pair& neighLead, - const std::pair& neighFollow, - const MSLane& neighLane, - const std::vector& preb, - MSVehicle** lastBlocked) = 0; - - virtual void* inform(void* info, MSVehicle* sender) = 0; - - /** @brief Called to adapt the speed in order to allow a lane change. - * - * It is guaranteed that min<=wanted<=max, but the implementation needs - * to make sure that the return value is between min and max. - * - * @param min The minimum resulting speed - * @param wanted The aspired speed of the car following model - * @param max The maximum resulting speed - * @param cfModel The model used - * @return the new speed of the vehicle as proposed by the lane changer - */ - virtual SUMOReal patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, - const MSCFModel& cfModel) = 0; - - virtual void changed() = 0; - - void unchanged() { - myLastLaneChangeOffset += DELTA_T; - } - - /** @brief Returns the lane the vehicles shadow is on during continuouss lane change - * @return The vehicle's shadow lane - */ - MSLane* getShadowLane() const { - return myShadowLane; - } - - - inline SUMOTime getLastLaneChangeOffset() const { - return myLastLaneChangeOffset; - } - - - /// @brief return whether the vehicle passed the midpoint of a continuous lane change maneuver - inline bool isLaneChangeMidpointPassed() const { - return myLaneChangeMidpointPassed; - } - - /// @brief return whether the vehicle passed the midpoint of a continuous lane change maneuver - inline SUMOReal getLaneChangeCompletion() const { - return myLaneChangeCompletion; - } - - /// @brief return true if the vehicle currently performs a lane change maneuver - inline bool isChangingLanes() const { - return myLaneChangeCompletion < (1 - NUMERICAL_EPS); - } - - /// @brief return the direction of the current lane change maneuver - inline int getLaneChangeDirection() const { - return myLaneChangeDirection; - } - - /// @brief reset the flag whether a vehicle already moved to false - inline bool alreadyMoved() const { - return myAlreadyMoved; - } - - /// @brief reset the flag whether a vehicle already moved to false - void resetMoved() { - myAlreadyMoved = false; - } - - - /// @brief start the lane change maneuver and return whether it continues - bool startLaneChangeManeuver(MSLane* source, MSLane* target, int direction); - - - /* @brief continue the lane change maneuver - * @param[in] moved Whether the vehicle has moved to a new lane - */ - void continueLaneChangeManeuver(bool moved); - - /* @brief finish the lane change maneuver - */ - inline void endLaneChangeManeuver() { - removeLaneChangeShadow(); - myLaneChangeCompletion = 1; - myShadowLane = 0; - } - - /// @brief remove the shadow copy of a lane change maneuver - void removeLaneChangeShadow(); - -#ifndef NO_TRACI - /** - * The vehicle is requested to change the lane as soon as possible - * without violating any directives defined by this lane change model - * - * @param request indicates the requested change - */ - virtual void requestLaneChange(MSVehicle::ChangeRequest request) { - myChangeRequest = request; - }; - - /** - * Inform the model that a certain lane change request has been fulfilled - * by the lane changer, so the request won't be taken into account the next time. - * - * @param request indicates the request that was fulfilled - */ - virtual void fulfillChangeRequest(MSVehicle::ChangeRequest request) { - if (request == myChangeRequest) { - myChangeRequest = MSVehicle::REQUEST_NONE; - } - } -#endif - -protected: - virtual bool congested(const MSVehicle* const neighLeader); - - virtual bool predInteraction(const MSVehicle* const leader); - - -protected: - /// @brief The vehicle this lane-changer belongs to - MSVehicle& myVehicle; - - /// @brief The current state of the vehicle - int myOwnState; - - /// @brief information how long ago the vehicle has performed a lane-change - SUMOTime myLastLaneChangeOffset; - - /// @brief progress of the lane change maneuver 0:started, 1:complete - SUMOReal myLaneChangeCompletion; - - /// @brief direction of the lane change maneuver -1 means right, 1 means left - int myLaneChangeDirection; - - /// @brief whether myLane has already been set to the target of the lane-change maneuver - bool myLaneChangeMidpointPassed; - - /// @brief whether the vehicle has already moved this step - bool myAlreadyMoved; - - /// @brief The lane the vehicle shadow is on during a continuous lane change - MSLane* myShadowLane; - - /// Wether a vehicle shadow exists - bool myHaveShadow; - -#ifndef NO_TRACI - MSVehicle::ChangeRequest myChangeRequest; -#endif - - /// @brief The vehicle's car following model - const MSCFModel& myCarFollowModel; - -private: - /// @brief Invalidated assignment operator - MSAbstractLaneChangeModel& operator=(const MSAbstractLaneChangeModel& s); -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSBaseVehicle.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSBaseVehicle.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSBaseVehicle.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSBaseVehicle.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @date Mon, 8 Nov 2010 -/// @version $Id: MSBaseVehicle.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSBaseVehicle.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A base class for vehicle implementations /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,6 +36,7 @@ #include #include #include +#include "MSGlobals.h" #include "MSVehicleType.h" #include "MSEdge.h" #include "MSLane.h" @@ -43,6 +44,7 @@ #include "MSBaseVehicle.h" #include "MSNet.h" #include "devices/MSDevice.h" +#include "devices/MSDevice_Routing.h" #ifdef CHECK_MEMORY_LEAKS #include @@ -59,7 +61,8 @@ // =========================================================================== // method definitions // =========================================================================== -MSBaseVehicle::MSBaseVehicle(SUMOVehicleParameter* pars, const MSRoute* route, const MSVehicleType* type, const SUMOReal speedFactor) : +MSBaseVehicle::MSBaseVehicle(SUMOVehicleParameter* pars, const MSRoute* route, + const MSVehicleType* type, const SUMOReal speedFactor) : myParameter(pars), myRoute(route), myType(type), @@ -80,15 +83,20 @@ myMoveReminders.push_back(std::make_pair(*dev, 0.)); } myRoute->addReference(); - calculateArrivalPos(); + if (!pars->wasSet(VEHPARS_FORCE_REROUTE)) { + calculateArrivalPos(); + } } MSBaseVehicle::~MSBaseVehicle() { myRoute->release(); - delete myParameter; + if (myParameter->repetitionNumber == 0) { + MSRoute::checkDist(myParameter->routeid); + } for (std::vector< MSDevice* >::iterator dev = myDevices.begin(); dev != myDevices.end(); ++dev) { - delete(*dev); + delete *dev; } + delete myParameter; } @@ -127,28 +135,43 @@ void -MSBaseVehicle::reroute(SUMOTime t, SUMOAbstractRouter& router, bool withTaz) { +MSBaseVehicle::reroute(SUMOTime t, SUMOAbstractRouter& router, const bool onInit, const bool withTaz) { // check whether to reroute - std::vector edges; - if (withTaz && MSEdge::dictionary(myParameter->fromTaz + "-source") && MSEdge::dictionary(myParameter->toTaz + "-sink")) { - router.compute(MSEdge::dictionary(myParameter->fromTaz + "-source"), MSEdge::dictionary(myParameter->toTaz + "-sink"), this, t, edges); - if (edges.size() >= 2) { - edges.erase(edges.begin()); + const MSEdge* source = withTaz && onInit ? MSEdge::dictionary(myParameter->fromTaz + "-source") : getRerouteOrigin(); + if (source == 0) { + source = getRerouteOrigin(); + } + const MSEdge* sink = withTaz ? MSEdge::dictionary(myParameter->toTaz + "-sink") : myRoute->getLastEdge(); + if (sink == 0) { + sink = myRoute->getLastEdge(); + } + ConstMSEdgeVector edges; + const ConstMSEdgeVector stops = getStopEdges(); + for (MSRouteIterator s = stops.begin(); s != stops.end(); ++s) { + if (*s != source) { + // !!! need to adapt t here + router.compute(source, *s, this, t, edges); + source = *s; edges.pop_back(); } - } else { - router.compute(*myCurrEdge, myRoute->getLastEdge(), this, t, edges); } - if (edges.empty()) { - WRITE_WARNING("No route for vehicle '" + getID() + "' found."); - return; + router.compute(source, sink, this, t, edges); + if (!edges.empty() && edges.front()->getPurpose() == MSEdge::EDGEFUNCTION_DISTRICT) { + edges.erase(edges.begin()); + } + if (!edges.empty() && edges.back()->getPurpose() == MSEdge::EDGEFUNCTION_DISTRICT) { + edges.pop_back(); } - replaceRouteEdges(edges, withTaz); + replaceRouteEdges(edges, onInit); } bool -MSBaseVehicle::replaceRouteEdges(const MSEdgeVector& edges, bool onInit) { +MSBaseVehicle::replaceRouteEdges(ConstMSEdgeVector& edges, bool onInit) { + if (edges.empty()) { + WRITE_WARNING("No route for vehicle '" + getID() + "' found."); + return false; + } // build a new id, first std::string id = getID(); if (id[0] != '!') { @@ -159,15 +182,39 @@ } else { id = id + "!var#1"; } + const MSEdge* const origin = getRerouteOrigin(); + if (origin != *myCurrEdge && edges.front() == origin) { + edges.insert(edges.begin(), *myCurrEdge); + } + const int oldSize = (int)edges.size(); + edges.insert(edges.begin(), myRoute->begin(), myCurrEdge); + if (edges == myRoute->getEdges()) { + return true; + } const RGBColor& c = myRoute->getColor(); - MSRoute* newRoute = new MSRoute(id, edges, 0, &c == &RGBColor::DEFAULT_COLOR ? 0 : new RGBColor(c), myRoute->getStops()); + MSRoute* newRoute = new MSRoute(id, edges, false, &c == &RGBColor::DEFAULT_COLOR ? 0 : new RGBColor(c), myRoute->getStops()); +#ifdef HAVE_FOX + MSDevice_Routing::lock(); +#endif if (!MSRoute::dictionary(id, newRoute)) { +#ifdef HAVE_FOX + MSDevice_Routing::unlock(); +#endif delete newRoute; return false; } - if (!replaceRoute(newRoute, onInit)) { +#ifdef HAVE_FOX + MSDevice_Routing::unlock(); +#endif + if (!replaceRoute(newRoute, onInit, (int)edges.size() - oldSize)) { newRoute->addReference(); +#ifdef HAVE_FOX + MSDevice_Routing::lock(); +#endif newRoute->release(); +#ifdef HAVE_FOX + MSDevice_Routing::unlock(); +#endif return false; } return true; @@ -180,6 +227,12 @@ } +SUMOReal +MSBaseVehicle::getSlope() const { + return 0; +} + + void MSBaseVehicle::onDepart() { myDeparture = MSNet::getInstance()->getCurrentTimeStep(); @@ -202,6 +255,9 @@ MSBaseVehicle::addPerson(MSPerson* /*person*/) { } +void +MSBaseVehicle::addContainer(MSContainer* /*container*/) { +} bool MSBaseVehicle::hasValidRoute(std::string& msg) const { @@ -298,6 +354,13 @@ } +SUMOReal +MSBaseVehicle::getImpatience() const { + return MAX2((SUMOReal)0, MIN2((SUMOReal)1, getVehicleType().getImpatience() + + (MSGlobals::gTimeToGridlock > 0 ? (SUMOReal)getWaitingTime() / MSGlobals::gTimeToGridlock : 0))); +} + + MSDevice* MSBaseVehicle::getDevice(const std::type_info& type) const { for (std::vector::const_iterator dev = myDevices.begin(); dev != myDevices.end(); ++dev) { @@ -320,6 +383,29 @@ } +void +MSBaseVehicle::addStops(const bool ignoreStopErrors) { + for (std::vector::const_iterator i = myParameter->stops.begin(); i != myParameter->stops.end(); ++i) { + std::string errorMsg; + if (!addStop(*i, errorMsg) && !ignoreStopErrors) { + throw ProcessError(errorMsg); + } + if (errorMsg != "") { + WRITE_WARNING(errorMsg); + } + } + for (std::vector::const_iterator i = myRoute->getStops().begin(); i != myRoute->getStops().end(); ++i) { + std::string errorMsg; + if (!addStop(*i, errorMsg) && !ignoreStopErrors) { + throw ProcessError(errorMsg); + } + if (errorMsg != "") { + WRITE_WARNING(errorMsg); + } + } +} + + #ifdef _DEBUG void MSBaseVehicle::initMoveReminderOutput(const OptionsCont& oc) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSBaseVehicle.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSBaseVehicle.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSBaseVehicle.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSBaseVehicle.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,14 +1,15 @@ /****************************************************************************/ /// @file MSBaseVehicle.h +/// @author Daniel Krajzewicz /// @author Michael Behrisch /// @author Jakob Erdmann /// @date Mon, 8 Nov 2010 -/// @version $Id: MSBaseVehicle.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSBaseVehicle.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A base class for vehicle implementations /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,17 +35,11 @@ #include #include #include -#include +#include #include #include "MSRoute.h" #include "MSMoveReminder.h" - - -// =========================================================================== -// class declarations -// =========================================================================== -class SUMOVehicleParameter; -class MSVehicleType; +#include "MSVehicleType.h" // =========================================================================== @@ -63,7 +58,8 @@ * @param[in] speedFactor The factor for driven lane's speed limits * @exception ProcessError If a value is wrong */ - MSBaseVehicle(SUMOVehicleParameter* pars, const MSRoute* route, const MSVehicleType* type, const SUMOReal speedFactor); + MSBaseVehicle(SUMOVehicleParameter* pars, const MSRoute* route, + const MSVehicleType* type, const SUMOReal speedFactor); /// @brief Destructor @@ -96,6 +92,13 @@ } + /** @brief Returns the vehicle's access class + * @return The vehicle's access class + */ + inline SUMOVehicleClass getVClass() const { + return myType->getParameter().vehicleClass; + } + /** @brief Returns the maximum speed * @return The vehicle's maximum speed */ @@ -126,6 +129,24 @@ } + /** @brief Returns the starting point for reroutes (usually the current edge) + * + * This differs from *myCurrEdge only if the vehicle is on an internal edge + * @return The rerouting start point + */ + virtual const MSEdge* getRerouteOrigin() const { + return *myCurrEdge; + } + + + /** @brief Returns an iterator pointing to the current edge in this vehicles route + * @return The current route pointer + */ + const MSRouteIterator& getCurrentRouteEdge() const { + return myCurrEdge; + } + + /** @brief Performs a rerouting using the given router * * Tries to find a new route between the current edge and the destination edge, first. @@ -135,7 +156,7 @@ * @param[in] router The router to use * @see replaceRoute */ - void reroute(SUMOTime t, SUMOAbstractRouter& router, bool withTaz = false); + void reroute(SUMOTime t, SUMOAbstractRouter& router, const bool onInit = false, const bool withTaz = false); /** @brief Replaces the current route by the given edges @@ -148,7 +169,7 @@ * @param[in] simTime The time at which the route was replaced * @return Whether the new route was accepted */ - bool replaceRouteEdges(const MSEdgeVector& edges, bool onInit = false); + bool replaceRouteEdges(ConstMSEdgeVector& edges, bool onInit = false); /** @brief Returns the vehicle's acceleration @@ -158,6 +179,13 @@ */ virtual SUMOReal getAcceleration() const; + /** @brief Returns the slope of the road at vehicle's position + * + * This default implementation returns always 0. + * @return The slope + */ + virtual SUMOReal getSlope() const; + /** @brief Called when the vehicle is inserted into the network * * Sets optional information about departure time, informs the vehicle @@ -196,6 +224,10 @@ return myNumberReroutes; } + /// @brief Returns this vehicles impatience + SUMOReal getImpatience() const; + + /** @brief Returns this vehicle's devices * @return This vehicle's devices */ @@ -211,6 +243,15 @@ */ virtual void addPerson(MSPerson* person); + + /** @brief Adds a container to this vehicle + * + * The default implementation does nothing since containers are not supported by default + * + * @param[in] container The person to add + */ + virtual void addContainer(MSContainer* container); + /** @brief Validates the current route * @param[out] msg Description why the route is not valid (if it is the case) * @return Whether the vehicle's current route is valid @@ -250,6 +291,13 @@ return myChosenSpeedFactor; } + /** @brief Returns the precomputed factor by which the driver wants to be faster than the speed limit + * @return Speed limit factor + */ + inline void setChosenSpeedFactor(const SUMOReal factor) { + myChosenSpeedFactor = factor; + } + /// @brief Returns a device of the given type if it exists or 0 MSDevice* getDevice(const std::type_info& type) const; @@ -262,11 +310,25 @@ //@} + /** @brief Adds stops to the built vehicle + * + * This code needs to be separated from the MSBaseVehicle constructor + * since it is not allowed to call virtual functions from a constructor + * + * @param[in] ignoreStopErrors whether invalid stops trigger a warning only + */ + void addStops(const bool ignoreStopErrors); + + protected: /** @brief (Re-)Calculates the arrival position from the vehicle parameters */ void calculateArrivalPos(); + /** @brief Returns the list of still pending stop edges + */ + virtual const ConstMSEdgeVector getStopEdges() const = 0; + protected: /// @brief This Vehicle's parameter. const SUMOVehicleParameter* myParameter; @@ -281,7 +343,7 @@ MSRouteIterator myCurrEdge; /// @brief A precomputed factor by which the driver wants to be faster than the speed limit - const SUMOReal myChosenSpeedFactor; + SUMOReal myChosenSpeedFactor; /// @name Move reminder structures diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSBitSetLogic.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSBitSetLogic.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSBitSetLogic.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSBitSetLogic.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Wed, 12 Dez 2001 -/// @version $Id: MSBitSetLogic.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSBitSetLogic.h 18095 2015-03-17 09:39:00Z behrisch $ /// -// »missingDescription« +// Container for holding a right-of-way matrix /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -93,7 +93,7 @@ return myConts.test(linkIndex); } - virtual bool isCrossing() const { + virtual bool hasFoes() const { for (typename Logic::const_iterator i = myLogic->begin(); i != myLogic->end(); ++i) { if ((*i).any()) { return true; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSCModel_NonInteracting.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSCModel_NonInteracting.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSCModel_NonInteracting.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSCModel_NonInteracting.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,158 @@ +/****************************************************************************/ +/// @file MSCModel_NonInteracting.h +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Tue, 29 July 2014 +/// @version $Id: MSCModel_NonInteracting.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// The container following model for tranship (prototype) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif +// +#include +#include +#include +#include +#include +#include +#include +#include +#include "MSCModel_NonInteracting.h" + +// =========================================================================== +// static members +// =========================================================================== +MSCModel_NonInteracting* MSCModel_NonInteracting::myModel(0); + + +// named constants +const int CState::FORWARD(1); +const int CState::BACKWARD(-1); +const int CState::UNDEFINED_DIRECTION(0); +const SUMOReal CState::LATERAL_OFFSET(0); + +// =========================================================================== +// MSCModel_NonInteracting method definitions +// =========================================================================== + +MSCModel_NonInteracting::MSCModel_NonInteracting(MSNet* net) : + myNet(net) { + assert(myNet != 0); +} + + +MSCModel_NonInteracting::~MSCModel_NonInteracting() { +} + +MSCModel_NonInteracting* +MSCModel_NonInteracting::getModel() { + if (myModel == 0) { + MSNet* net = MSNet::getInstance(); + myModel = new MSCModel_NonInteracting(net); + } + return myModel; +} + +CState* +MSCModel_NonInteracting::add(MSContainer* container, MSContainer::MSContainerStage_Tranship* stage, SUMOTime now) { + CState* state = new CState(); + const SUMOTime firstEdgeDuration = state->computeTranshipTime(0, *stage, now); + myNet->getBeginOfTimestepEvents()->addEvent(new MoveToNextEdge(container, *stage), + now + firstEdgeDuration, MSEventControl::ADAPT_AFTER_EXECUTION); + return state; +} + + +void +MSCModel_NonInteracting::cleanup() { + if (myModel != 0) { + delete myModel; + myModel = 0; + } +} + + +SUMOTime +MSCModel_NonInteracting::MoveToNextEdge::execute(SUMOTime currentTime) { + CState* state = myParent.getContainerState(); + const MSEdge* old = myParent.getEdge(); + const bool arrived = myParent.moveToNextEdge(myContainer, currentTime); + if (arrived) { + // tranship finished. clean up state + delete state; + return 0; + } else { + return state->computeTranshipTime(old, myParent, currentTime); + } +} + + +SUMOReal +CState::getEdgePos(const MSContainer::MSContainerStage_Tranship&, SUMOTime now) const { + return myCurrentBeginPos + (myCurrentEndPos - myCurrentBeginPos) / myCurrentDuration * (now - myLastEntryTime); +} + + +Position +CState::getPosition(const MSContainer::MSContainerStage_Tranship& stage, SUMOTime now) const { + const SUMOReal dist = myCurrentBeginPosition.distanceTo2D(myCurrentEndPosition); //distance between begin and end position of this tranship stage + SUMOReal pos = MIN2(STEPS2TIME(now - myLastEntryTime) * stage.getMaxSpeed(), dist); //the containerd shall not go beyond its end position + return PositionVector::positionAtOffset2D(myCurrentBeginPosition, myCurrentEndPosition, pos, 0); +} + + +SUMOReal +CState::getAngle(const MSContainer::MSContainerStage_Tranship& stage, SUMOTime now) const { + //todo: change angle by 90 degree + SUMOReal angle = stage.getEdgeAngle(stage.getEdge(), getEdgePos(stage, now)) + (myCurrentEndPos < myCurrentBeginPos ? 180 : 0); + if (angle > 180) { + angle -= 360; + } + return angle; +} + + +SUMOReal +CState::getSpeed(const MSContainer::MSContainerStage_Tranship& stage) const { + return stage.getMaxSpeed(); +} + + +SUMOTime +CState::computeTranshipTime(const MSEdge* /* prev */, const MSContainer::MSContainerStage_Tranship& stage, SUMOTime currentTime) { + myLastEntryTime = currentTime; + + myCurrentBeginPos = stage.getDepartPos(); + myCurrentEndPos = stage.getArrivalPos(); + + const MSLane* fromLane = stage.getFromEdge()->getLanes().front(); //the lane the container starts from during its tranship stage + myCurrentBeginPosition = stage.getLanePosition(fromLane, myCurrentBeginPos, LATERAL_OFFSET); + const MSLane* toLane = stage.getToEdge()->getLanes().front(); //the lane the container ends during its tranship stage + myCurrentEndPosition = stage.getLanePosition(toLane, myCurrentEndPos, LATERAL_OFFSET); + + myCurrentDuration = MAX2((SUMOTime)1, TIME2STEPS(fabs(myCurrentEndPosition.distanceTo(myCurrentBeginPosition)) / stage.getMaxSpeed())); + return myCurrentDuration; +} + + + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSCModel_NonInteracting.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSCModel_NonInteracting.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSCModel_NonInteracting.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSCModel_NonInteracting.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,137 @@ +/****************************************************************************/ +/// @file MSCModel_NonInteracting.h +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Tue, 29 July 2014 +/// @version $Id: MSCModel_NonInteracting.h 18096 2015-03-17 09:50:59Z behrisch $ +/// +// The container following model for tranship (prototype) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSCModel_NonInteracting_h +#define MSCModel_NonInteracting_h + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class MSNet; +class MSLink; +class MSLane; +class MSJunction; +class CState; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSCModel_NonInteracting + * @brief The container following model for tranship + * + */ +class MSCModel_NonInteracting { +public: + + /// @brief Constructor (it should not be necessary to construct more than one instance) + MSCModel_NonInteracting(MSNet* net); + + ~MSCModel_NonInteracting(); + + static MSCModel_NonInteracting* getModel(); + + /// @brief remove state at simulation end + static void cleanup(); + + /// @brief register the given container as a transhiped container + CState* add(MSContainer* container, MSContainer::MSContainerStage_Tranship* stage, SUMOTime now); + +private: + static MSCModel_NonInteracting* myModel; + +private: + class MoveToNextEdge : public Command { + public: + MoveToNextEdge(MSContainer* container, MSContainer::MSContainerStage_Tranship& tranship) : myParent(tranship), myContainer(container) {} + ~MoveToNextEdge() {} + SUMOTime execute(SUMOTime currentTime); + + private: + MSContainer::MSContainerStage_Tranship& myParent; + MSContainer* myContainer; + private: + /// @brief Invalidated assignment operator. + MoveToNextEdge& operator=(const MoveToNextEdge&); + }; + + +private: + /// @brief the net to which to issue moveToNextEdge commands + MSNet* myNet; + +}; + +class CState { +public: + CState() {}; + + ~CState() {}; + + // @brief walking directions + static const int FORWARD; + static const int BACKWARD; + static const int UNDEFINED_DIRECTION; + + /// @brief the offset for computing container positions when being transhiped + static const SUMOReal LATERAL_OFFSET; + + /// @brief return the offset from the start of the current edge measured in its natural direction + SUMOReal getEdgePos(const MSContainer::MSContainerStage_Tranship& stage, SUMOTime now) const; + /// @brief return the network coordinate of the container + Position getPosition(const MSContainer::MSContainerStage_Tranship& stage, SUMOTime now) const; + /// @brief return the direction in which the container heading to + SUMOReal getAngle(const MSContainer::MSContainerStage_Tranship& stage, SUMOTime now) const; + /// @brief return the current speed of the container + SUMOReal getSpeed(const MSContainer::MSContainerStage_Tranship& stage) const; + /// @brief compute tranship time on edge and update state members + SUMOTime computeTranshipTime(const MSEdge* prev, const MSContainer::MSContainerStage_Tranship& stage, SUMOTime currentTime); + + +private: + SUMOTime myLastEntryTime; + SUMOTime myCurrentDuration; + SUMOReal myCurrentBeginPos; + SUMOReal myCurrentEndPos; + Position myCurrentBeginPosition; //the position the container is moving from during its tranship stage + Position myCurrentEndPosition; //the position the container is moving to during its tranship stage + +}; + + +#endif /* MSCModel_NonInteracting_h */ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSContainerControl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSContainerControl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSContainerControl.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSContainerControl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,239 @@ +/****************************************************************************/ +/// @file MSContainerControl.cpp +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Mon, 16 Jun 2014 +/// @version $Id: MSContainerControl.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// Stores all containers in the net and handles their waiting for cars. +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +//#include +#include "MSNet.h" +#include "MSEdge.h" +#include "MSContainer.h" +//#include "MSVehicle.h" +#include "MSContainerControl.h" +#include +#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +MSContainerControl::MSContainerControl() {} + + +MSContainerControl::~MSContainerControl() { + for (std::map::iterator i = myContainers.begin(); i != myContainers.end(); ++i) { + delete(*i).second; + } + myContainers.clear(); + myWaiting4Vehicle.clear(); +} + + +bool +MSContainerControl::add(const std::string& id, MSContainer* container) { + if (myContainers.find(id) == myContainers.end()) { + myContainers[id] = container; + return true; + } + return false; +} + + +void +MSContainerControl::erase(MSContainer* container) { + const std::string& id = container->getID(); + if (OptionsCont::getOptions().isSet("tripinfo-output")) { + OutputDevice& od = OutputDevice::getDeviceByOption("tripinfo-output"); + od.openTag("containerinfo").writeAttr("id", id).writeAttr("depart", time2string(container->getDesiredDepart())); + container->tripInfoOutput(od); + od.closeTag(); + } + if (OptionsCont::getOptions().isSet("vehroute-output")) { + OutputDevice& od = OutputDevice::getDeviceByOption("vehroute-output"); + od.openTag("container").writeAttr("id", id).writeAttr("depart", time2string(container->getDesiredDepart())).writeAttr("arrival", time2string(MSNet::getInstance()->getCurrentTimeStep())); + container->routeOutput(od); + od.closeTag(); + od << "\n"; + } + const std::map::iterator i = myContainers.find(id); + if (i != myContainers.end()) { + delete i->second; + myContainers.erase(i); + } +} + + +void +MSContainerControl::setDeparture(const SUMOTime time, MSContainer* container) { + const SUMOTime step = time % DELTA_T == 0 ? time : (time / DELTA_T + 1) * DELTA_T; + if (myWaiting4Departure.find(step) == myWaiting4Departure.end()) { + myWaiting4Departure[step] = ContainerVector(); + } + myWaiting4Departure[step].push_back(container); +} + + +void +MSContainerControl::setWaitEnd(const SUMOTime time, MSContainer* container) { + const SUMOTime step = time % DELTA_T == 0 ? time : (time / DELTA_T + 1) * DELTA_T; + if (myWaitingUntil.find(step) == myWaitingUntil.end()) { + myWaitingUntil[step] = ContainerVector(); + } + myWaitingUntil[step].push_back(container); +} + + +void +MSContainerControl::checkWaitingContainers(MSNet* net, const SUMOTime time) { + while (myWaiting4Departure.find(time) != myWaiting4Departure.end()) { + const ContainerVector& containers = myWaiting4Departure[time]; + // we cannot use an iterator here because there might be additions to the vector while proceeding + for (size_t i = 0; i < containers.size(); ++i) { + if (!containers[i]->proceed(net, time)) { + erase(containers[i]); + } + } + myWaiting4Departure.erase(time); + } + while (myWaitingUntil.find(time) != myWaitingUntil.end()) { + const ContainerVector& containers = myWaitingUntil[time]; + // we cannot use an iterator here because there might be additions to the vector while proceeding + for (size_t i = 0; i < containers.size(); ++i) { + if (!containers[i]->proceed(net, time)) { + erase(containers[i]); + } + } + myWaitingUntil.erase(time); + } +} + + +void +MSContainerControl::addWaiting(const MSEdge* const edge, MSContainer* container) { + if (myWaiting4Vehicle.find(edge) == myWaiting4Vehicle.end()) { + myWaiting4Vehicle[edge] = std::vector(); + } + myWaiting4Vehicle[edge].push_back(container); +} + + +//bool +//MSContainerControl::isWaiting4Vehicle(const MSEdge* const edge, MSContainer* /* p */) const { +// return myWaiting4Vehicle.find(edge) != myWaiting4Vehicle.end(); +//} + + +bool +MSContainerControl::loadAnyWaiting(MSEdge* edge, MSVehicle* vehicle, MSVehicle::Stop* stop) { + bool ret = false; + if (myWaiting4Vehicle.find(edge) != myWaiting4Vehicle.end()) { + ContainerVector& waitContainers = myWaiting4Vehicle[edge]; + for (ContainerVector::iterator i = waitContainers.begin(); i != waitContainers.end();) { + const std::string& line = vehicle->getParameter().line == "" ? vehicle->getParameter().id : vehicle->getParameter().line; + SUMOTime currentTime = MSNet::getInstance()->getCurrentTimeStep(); + if ((*i)->isWaitingFor(line) && vehicle->getVehicleType().getContainerCapacity() > vehicle->getContainerNumber() + && stop->timeToLoadNextContainer <= currentTime + && stop->startPos <= (*i)->getEdgePos() && (*i)->getEdgePos() <= stop->endPos) { + edge->removeContainer(*i); + vehicle->addContainer(*i); + //if the time a container needs to get loaded on the vehicle extends the duration of the stop of the vehicle extend + //the duration by setting it to the loading duration of the container + const SUMOTime loadingDuration = vehicle->getVehicleType().getLoadingDuration(); + if (loadingDuration >= stop->duration) { + stop->duration = loadingDuration; + } + //update the time point at which the next container can be loaded on the vehicle + stop->timeToLoadNextContainer = currentTime + loadingDuration; + + static_cast((*i)->getCurrentStage())->setVehicle(vehicle); + i = waitContainers.erase(i); + ret = true; + } else { + ++i; + } + } + if (waitContainers.size() == 0) { + myWaiting4Vehicle.erase(myWaiting4Vehicle.find(edge)); + } + } + return ret; +} + +bool +MSContainerControl::hasContainers() const { + return !myContainers.empty(); +} + + +bool +MSContainerControl::hasNonWaiting() const { + return !myWaiting4Departure.empty() || !myWaitingUntil.empty() || !myTranship.empty(); +} + + +void +MSContainerControl::setTranship(MSContainer* c) { + myTranship[c->getID()] = c; +} + + +void +MSContainerControl::unsetTranship(MSContainer* c) { + std::map::iterator i = myTranship.find(c->getID()); + if (i != myTranship.end()) { + myTranship.erase(i); + } +} + + +void +MSContainerControl::abortWaiting() { + for (std::map::const_iterator i = myWaiting4Vehicle.begin(); i != myWaiting4Vehicle.end(); ++i) { + const MSEdge* edge = (*i).first; + const ContainerVector& pv = (*i).second; + for (ContainerVector::const_iterator j = pv.begin(); j != pv.end(); ++j) { + MSContainer* p = (*j); + edge->removeContainer(p); + WRITE_WARNING("Container " + p->getID() + " aborted waiting for a transport that will never come."); + erase(p); + } + } +} + + +MSContainer* +MSContainerControl::buildContainer(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSContainer::MSContainerPlan* plan) const { + return new MSContainer(pars, vtype, plan); +} + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSContainerControl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSContainerControl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSContainerControl.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSContainerControl.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,145 @@ +/****************************************************************************/ +/// @file MSContainerControl.h +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Mon, 16 Jun 2014 +/// @version $Id: MSContainerControl.h 18096 2015-03-17 09:50:59Z behrisch $ +/// +// Stores all containers in the net and handles their waiting for cars. +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSContainerControl_h +#define MSContainerControl_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include "MSContainer.h" +#include "MSVehicle.h" + + +// =========================================================================== +// class declarations +// =========================================================================== +class MSNet; +class MSVehicle; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * + * @class MSContainerControl + * The class is used to handle containers who are not using a transportation + * system but are waiting. Both is processed by waiting + * for the arrival time / the time the waiting is over. + */ +class MSContainerControl { +public: + + typedef std::vector ContainerVector; + + /// constructor + MSContainerControl(); + + /// destructor + virtual ~MSContainerControl(); + + /// adds a single container, returns false if an id clash occured + bool add(const std::string& id, MSContainer* container); + + /// removes a single container + virtual void erase(MSContainer* container); + + /// sets the arrival time for a waiting container + void setDeparture(SUMOTime time, MSContainer* container); + + /// sets the arrival time for a waiting container + void setWaitEnd(SUMOTime time, MSContainer* container); + + /// checks whether any containers waiting time is over + void checkWaitingContainers(MSNet* net, const SUMOTime time); + + /// adds a container to the list of containers waiting for a vehicle on the specified edge + void addWaiting(const MSEdge* edge, MSContainer* container); + + /** @brief load any applicable containers + * Loads any container that is waiting on that edge for the given vehicle and removes them from myWaiting + * @param[in] the edge on which the loading should take place + * @param[in] the vehicle which is taking on containers + * @return Whether any containers have been loaded + */ + bool loadAnyWaiting(MSEdge* edge, MSVehicle* vehicle, MSVehicle::Stop* stop); + + /// checks whether any container waits to finish her plan + bool hasContainers() const; + + /// checks whether any container is still engaged in walking / stopping + bool hasNonWaiting() const; + + /// aborts the plan for any container that is still waiting for a ride + void abortWaiting(); + + + /** @brief Builds a new container + * @param[in] pars The parameter + * @param[in] vtype The type (reusing vehicle type container here) + * @param[in] plan This container's plan + */ + virtual MSContainer* buildContainer(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSContainer::MSContainerPlan* plan) const; + + /// adds a container to myTranship + void setTranship(MSContainer* c); + + /// removes a container from myTranship + void unsetTranship(MSContainer* c); +// +// /// @brief returns whether the the given container is waiting for a vehicle on the given edge +// bool isWaiting4Vehicle(const MSEdge* const edge, MSContainer* p) const; +// +// const std::map& getContainers() const { +// return myContainers; +// } +// +private: + /// all containers by id + std::map myContainers; + + /// all containers being transhiped + std::map myTranship; + + /// @brief Containers waiting for departure + std::map myWaiting4Departure; + + /// the lists of walking / stopping containers + std::map myWaitingUntil; + + /// the lists of waiting containers + std::map myWaiting4Vehicle; +// +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSContainer.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSContainer.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSContainer.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSContainer.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,563 @@ +/****************************************************************************/ +/// @file MSContainer.cpp +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Thu, 12 Jun 2014 +/// @version $Id: MSContainer.cpp 18129 2015-03-24 13:18:25Z behrisch $ +/// +// The class for modelling container-movements +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include "MSNet.h" +#include "MSEdge.h" +#include "MSLane.h" +#include "MSContainer.h" +#include "microsim/trigger/MSContainerStop.h" +#include "MSContainerControl.h" +#include "MSInsertionControl.h" +#include "MSVehicle.h" +#include "MSCModel_NonInteracting.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + +/* ------------------------------------------------------------------------- + * static member definitions + * ----------------------------------------------------------------------- */ +const SUMOReal MSContainer::ROADSIDE_OFFSET(3); + +// =========================================================================== +// method definitions +// =========================================================================== +/* ------------------------------------------------------------------------- + * MSContainer::MSContainerStage - methods + * ----------------------------------------------------------------------- */ +MSContainer::MSContainerStage::MSContainerStage(const MSEdge& destination, StageType type) + : myDestination(destination), myDeparted(-1), myArrived(-1), myType(type) {} + +MSContainer::MSContainerStage::~MSContainerStage() {} + +const MSEdge& +MSContainer::MSContainerStage::getDestination() const { + return myDestination; +} + +void +MSContainer::MSContainerStage::setDeparted(SUMOTime now) { + if (myDeparted < 0) { + myDeparted = now; + } +} + +void +MSContainer::MSContainerStage::setArrived(SUMOTime now) { + myArrived = now; +} + +bool +MSContainer::MSContainerStage::isWaitingFor(const std::string& /*line*/) const { + return false; +} + +Position +MSContainer::MSContainerStage::getEdgePosition(const MSEdge* e, SUMOReal at, SUMOReal offset) const { + return getLanePosition(e->getLanes()[0], at, offset); +} + +Position +MSContainer::MSContainerStage::getLanePosition(const MSLane* lane, SUMOReal at, SUMOReal offset) const { + return lane->getShape().positionAtOffset(lane->interpolateLanePosToGeometryPos(at), offset); +} + +SUMOReal +MSContainer::MSContainerStage::getEdgeAngle(const MSEdge* e, SUMOReal at) const { + PositionVector shp = e->getLanes()[0]->getShape(); + return -shp.rotationDegreeAtOffset(at); +} + + + +/* ------------------------------------------------------------------------- + * MSContainer::MSContainerStage_Driving - methods + * ----------------------------------------------------------------------- */ +MSContainer::MSContainerStage_Driving::MSContainerStage_Driving(const MSEdge& destination, + MSContainerStop* toCS, const std::vector& lines) + : MSContainerStage(destination, DRIVING), myLines(lines.begin(), lines.end()), + myVehicle(0), myDestinationContainerStop(toCS) {} + + +MSContainer::MSContainerStage_Driving::~MSContainerStage_Driving() {} + +void +MSContainer::MSContainerStage_Driving::proceed(MSNet* net, MSContainer* container, SUMOTime now, + MSEdge* previousEdge, const SUMOReal at) { + myWaitingEdge = previousEdge; + myWaitingPos = at; + myWaitingSince = now; + SUMOVehicle* availableVehicle = net->getVehicleControl().getWaitingVehicle(previousEdge, myLines, myWaitingPos, container->getID()); + if (availableVehicle != 0 && availableVehicle->getParameter().departProcedure == DEPART_CONTAINER_TRIGGERED) { + myVehicle = availableVehicle; + previousEdge->removeContainer(container); + myVehicle->addContainer(container); + net->getInsertionControl().add(myVehicle); + net->getVehicleControl().removeWaiting(previousEdge, myVehicle); + net->getVehicleControl().unregisterOneWaitingForContainer(); + } else { + net->getContainerControl().addWaiting(previousEdge, container); + previousEdge->addContainer(container); + } +} + +const MSEdge* +MSContainer::MSContainerStage_Driving::getEdge() const { + if (myVehicle != 0) { + return myVehicle->getEdge(); + } + return myWaitingEdge; +} + + +const MSEdge* +MSContainer::MSContainerStage_Driving::getFromEdge() const { + return myWaitingEdge; +} + + +SUMOReal +MSContainer::MSContainerStage_Driving::getEdgePos(SUMOTime /* now */) const { + if (myVehicle != 0) { + // vehicle may already have passed the lane (check whether this is correct) + return MIN2(myVehicle->getPositionOnLane(), getEdge()->getLength()); + } + return myWaitingPos; +} + +Position +MSContainer::MSContainerStage_Driving::getPosition(SUMOTime /* now */) const { + if (myVehicle != 0) { + /// @bug this fails while vehicle is driving across a junction + return myVehicle->getEdge()->getLanes()[0]->getShape().positionAtOffset(myVehicle->getPositionOnLane()); + } + return getEdgePosition(myWaitingEdge, myWaitingPos, ROADSIDE_OFFSET); +} + +SUMOReal +MSContainer::MSContainerStage_Driving::getAngle(SUMOTime /* now */) const { + if (myVehicle != 0) { + MSVehicle* veh = dynamic_cast(myVehicle); + if (veh != 0) { + return veh->getAngle(); + } else { + return 0; + } + } + return getEdgeAngle(myWaitingEdge, myWaitingPos) + 90; +} + +bool +MSContainer::MSContainerStage_Driving::isWaitingFor(const std::string& line) const { + return myLines.count(line) > 0; +} + +bool +MSContainer::MSContainerStage_Driving::isWaiting4Vehicle() const { + return myVehicle == 0; +} + +SUMOTime +MSContainer::MSContainerStage_Driving::getWaitingTime(SUMOTime now) const { + return isWaiting4Vehicle() ? now - myWaitingSince : 0; +} + +SUMOReal +MSContainer::MSContainerStage_Driving::getSpeed() const { + return myVehicle == 0 ? 0 : myVehicle->getSpeed(); +} + +std::string +MSContainer::MSContainerStage_Driving::getStageDescription() const { + return isWaiting4Vehicle() ? "waiting for " + joinToString(myLines, ",") : "transport"; +} + +MSContainerStop* +MSContainer::MSContainerStage_Driving::getDepartContainerStop() const { + return myDepartContainerStop; +} + +void +MSContainer::MSContainerStage_Driving::tripInfoOutput(OutputDevice& os) const { + os.openTag("transport").writeAttr("depart", time2string(myDeparted)).writeAttr("arrival", time2string(myArrived)).closeTag(); +} + +void +MSContainer::MSContainerStage_Driving::routeOutput(OutputDevice& os) const { + os.openTag("transport").writeAttr(SUMO_ATTR_FROM, getFromEdge()->getID()).writeAttr(SUMO_ATTR_TO, getDestination().getID()); + os.writeAttr(SUMO_ATTR_LINES, myLines).closeTag(); +} + +void +MSContainer::MSContainerStage_Driving::beginEventOutput(const MSContainer& container, SUMOTime t, OutputDevice& os) const { + os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "arrival").writeAttr("agent", container.getID()).writeAttr("link", getEdge()->getID()).closeTag(); +} + +void +MSContainer::MSContainerStage_Driving::endEventOutput(const MSContainer& container, SUMOTime t, OutputDevice& os) const { + os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "arrival").writeAttr("agent", container.getID()).writeAttr("link", getEdge()->getID()).closeTag(); +} + + + +/* ------------------------------------------------------------------------- + * MSContainer::MSContainerStage_Waiting - methods + * ----------------------------------------------------------------------- */ +MSContainer::MSContainerStage_Waiting::MSContainerStage_Waiting(const MSEdge& destination, + SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string& actType) : + MSContainerStage(destination, WAITING), + myWaitingDuration(duration), + myWaitingUntil(until), + myActType(actType), + myStartPos(pos) { + myStartPos = SUMOVehicleParameter::interpretEdgePos( + myStartPos, myDestination.getLength(), SUMO_ATTR_DEPARTPOS, "container stopping at " + myDestination.getID()); +} + +MSContainer::MSContainerStage_Waiting::~MSContainerStage_Waiting() {} + +const MSEdge* +MSContainer::MSContainerStage_Waiting::getEdge() const { + return &myDestination; +} + +const MSEdge* +MSContainer::MSContainerStage_Waiting::getFromEdge() const { + return &myDestination; +} + +SUMOReal +MSContainer::MSContainerStage_Waiting::getEdgePos(SUMOTime /* now */) const { + return myStartPos; +} + +SUMOTime +MSContainer::MSContainerStage_Waiting::getUntil() const { + return myWaitingUntil; +} + +Position +MSContainer::MSContainerStage_Waiting::getPosition(SUMOTime /* now */) const { + return getEdgePosition(&myDestination, myStartPos, ROADSIDE_OFFSET); +} + +SUMOReal +MSContainer::MSContainerStage_Waiting::getAngle(SUMOTime /* now */) const { + return getEdgeAngle(&myDestination, myStartPos) - 180; +} + +SUMOTime +MSContainer::MSContainerStage_Waiting::getWaitingTime(SUMOTime now) const { + return now - myWaitingStart; +} + +SUMOReal +MSContainer::MSContainerStage_Waiting::getSpeed() const { + return 0; +} + +MSContainerStop* +MSContainer::MSContainerStage_Waiting::getDepartContainerStop() const { + return myCurrentContainerStop; +} + +void +MSContainer::MSContainerStage_Waiting::proceed(MSNet* net, MSContainer* container, SUMOTime now, + MSEdge* previousEdge, const SUMOReal /* at */) { + previousEdge->addContainer(container); + myWaitingStart = now; + const SUMOTime until = MAX3(now, now + myWaitingDuration, myWaitingUntil); + net->getContainerControl().setWaitEnd(until, container); +} + +void +MSContainer::MSContainerStage_Waiting::tripInfoOutput(OutputDevice& os) const { + os.openTag("stop").writeAttr("arrival", time2string(myArrived)).closeTag(); +} + +void +MSContainer::MSContainerStage_Waiting::routeOutput(OutputDevice& os) const { + os.openTag("stop").writeAttr(SUMO_ATTR_LANE, getDestination().getID()); + if (myWaitingDuration >= 0) { + os.writeAttr(SUMO_ATTR_DURATION, time2string(myWaitingDuration)); + } + if (myWaitingUntil >= 0) { + os.writeAttr(SUMO_ATTR_UNTIL, time2string(myWaitingUntil)); + } + os.closeTag(); +} + +void +MSContainer::MSContainerStage_Waiting::beginEventOutput(const MSContainer& container, SUMOTime t, OutputDevice& os) const { + os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "actstart " + myActType) + .writeAttr("agent", container.getID()).writeAttr("link", getEdge()->getID()).closeTag(); +} + +void +MSContainer::MSContainerStage_Waiting::endEventOutput(const MSContainer& container, SUMOTime t, OutputDevice& os) const { + os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "actend " + myActType).writeAttr("agent", container.getID()) + .writeAttr("link", getEdge()->getID()).closeTag(); +} + +/* ------------------------------------------------------------------------- + * MSContainer::MSContainerStage_Tranship - methods + * ----------------------------------------------------------------------- */ +MSContainer::MSContainerStage_Tranship::MSContainerStage_Tranship(const std::vector& route, + MSContainerStop* toCS, + SUMOReal speed, + SUMOReal departPos, SUMOReal arrivalPos) : + MSContainerStage(*route.back(), TRANSHIP), myRoute(route), + myDestinationContainerStop(toCS), + mySpeed(speed), myContainerState(0), myCurrentInternalEdge(0) { + myDepartPos = SUMOVehicleParameter::interpretEdgePos( + departPos, myRoute.front()->getLength(), SUMO_ATTR_DEPARTPOS, "container getting transhipped from " + myRoute.front()->getID()); + myArrivalPos = SUMOVehicleParameter::interpretEdgePos( + arrivalPos, myRoute.back()->getLength(), SUMO_ATTR_ARRIVALPOS, "container getting transhipped to " + myRoute.back()->getID()); +} + +MSContainer::MSContainerStage_Tranship::~MSContainerStage_Tranship() { +} + +void +MSContainer::MSContainerStage_Tranship::proceed(MSNet* /* net */, MSContainer* container, SUMOTime now, MSEdge* previousEdge, const SUMOReal at) { + previousEdge->removeContainer(container); + myRouteStep = myRoute.end() - 1; //define that the container is already on its destination edge + MSNet::getInstance()->getContainerControl().setTranship(container); + if (at >= 0) { + myDepartPos = at; + } + myContainerState = MSCModel_NonInteracting::getModel()->add(container, this, now); + ((MSEdge*) *myRouteStep)->addContainer(container); +} + +const MSEdge* +MSContainer::MSContainerStage_Tranship::getEdge() const { + if (myCurrentInternalEdge != 0) { + return myCurrentInternalEdge; + } else { + return *myRouteStep; + } +} + +const MSEdge* +MSContainer::MSContainerStage_Tranship::getFromEdge() const { + return myRoute.front(); +} + +const MSEdge* +MSContainer::MSContainerStage_Tranship::getToEdge() const { + return myRoute.back(); +} + +SUMOReal +MSContainer::MSContainerStage_Tranship::getEdgePos(SUMOTime now) const { + return myContainerState->getEdgePos(*this, now); +} + +Position +MSContainer::MSContainerStage_Tranship::getPosition(SUMOTime now) const { + return myContainerState->getPosition(*this, now); +} + +SUMOReal +MSContainer::MSContainerStage_Tranship::getAngle(SUMOTime now) const { + return myContainerState->getAngle(*this, now); +} + +SUMOTime +MSContainer::MSContainerStage_Tranship::getWaitingTime(SUMOTime /* now */) const { + return 0; +} + +SUMOReal +MSContainer::MSContainerStage_Tranship::getSpeed() const { + return myContainerState->getSpeed(*this); +} + +MSContainerStop* +MSContainer::MSContainerStage_Tranship::getDepartContainerStop() const { + return myDepartContainerStop; +} + +void +MSContainer::MSContainerStage_Tranship::tripInfoOutput(OutputDevice& os) const { + os.openTag("tranship").writeAttr("arrival", time2string(myArrived)).closeTag(); +} + + +void +MSContainer::MSContainerStage_Tranship::routeOutput(OutputDevice& os) const { + os.openTag("tranship").writeAttr(SUMO_ATTR_EDGES, myRoute); + os.writeAttr(SUMO_ATTR_SPEED, mySpeed); + os.closeTag(); +} + + +void +MSContainer::MSContainerStage_Tranship::beginEventOutput(const MSContainer& c, SUMOTime t, OutputDevice& os) const { + os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "departure") + .writeAttr("agent", c.getID()).writeAttr("link", myRoute.front()->getID()).closeTag(); +} + + +void +MSContainer::MSContainerStage_Tranship::endEventOutput(const MSContainer& c, SUMOTime t, OutputDevice& os) const { + os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "arrival") + .writeAttr("agent", c.getID()).writeAttr("link", myRoute.back()->getID()).closeTag(); +} + +bool +MSContainer::MSContainerStage_Tranship::moveToNextEdge(MSContainer* container, SUMOTime currentTime, MSEdge* nextInternal) { + ((MSEdge*)getEdge())->removeContainer(container); + if (myRouteStep == myRoute.end() - 1) { + MSNet::getInstance()->getContainerControl().unsetTranship(container); + if (myDestinationContainerStop != 0) { + myDestinationContainerStop->addContainer(container); //jakob + } + if (!container->proceed(MSNet::getInstance(), currentTime)) { + MSNet::getInstance()->getContainerControl().erase(container); + } + return true; + } else { + if (nextInternal == 0) { + ++myRouteStep; + myCurrentInternalEdge = 0; + } else { + myCurrentInternalEdge = nextInternal; + } + ((MSEdge*) getEdge())->addContainer(container); + return false; + } +} + +/* ------------------------------------------------------------------------- + * MSContainer - methods + * ----------------------------------------------------------------------- */ +MSContainer::MSContainer(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSContainerPlan* plan) + : myParameter(pars), myVType(vtype), myPlan(plan) { + myStep = myPlan->begin(); + lastDestination = &(myPlan->back())->getDestination(); +} + +MSContainer::~MSContainer() { + for (MSContainerPlan::const_iterator i = myPlan->begin(); i != myPlan->end(); ++i) { + delete *i; + } + delete myPlan; + delete myParameter; +} + +const std::string& +MSContainer::getID() const { + return myParameter->id; +} + +bool +MSContainer::proceed(MSNet* net, SUMOTime time) { + MSEdge* arrivedAt = (MSEdge*)(*myStep)->getEdge(); + SUMOReal atPos = (*myStep)->getEdgePos(time); + (*myStep)->setArrived(time); + myStep++; + if (myStep != myPlan->end()) { + (*myStep)->proceed(net, this, time, arrivedAt, atPos); + return true; + } else { + arrivedAt->removeContainer(this); + return false; + } +} + +SUMOTime +MSContainer::getDesiredDepart() const { + return myParameter->depart; +} + +void +MSContainer::setDeparted(SUMOTime now) { + (*myStep)->setDeparted(now); +} + +SUMOReal +MSContainer::getEdgePos() const { + return (*myStep)->getEdgePos(MSNet::getInstance()->getCurrentTimeStep()); +} + +Position +MSContainer::getPosition() const { + return (*myStep)->getPosition(MSNet::getInstance()->getCurrentTimeStep()); +} + +SUMOReal +MSContainer::getAngle() const { + return (*myStep)->getAngle(MSNet::getInstance()->getCurrentTimeStep()); +} + +SUMOReal +MSContainer::getWaitingSeconds() const { + return STEPS2TIME((*myStep)->getWaitingTime(MSNet::getInstance()->getCurrentTimeStep())); +} + +SUMOReal +MSContainer::getSpeed() const { + return (*myStep)->getSpeed(); +} + +MSContainerStop* +MSContainer::getDepartContainerStop() const { + return (*myStep)->getDepartContainerStop(); +} + +void +MSContainer::tripInfoOutput(OutputDevice& os) const { + for (MSContainerPlan::const_iterator i = myPlan->begin(); i != myPlan->end(); ++i) { + (*i)->tripInfoOutput(os); + } +} + +void +MSContainer::routeOutput(OutputDevice& os) const { + MSContainerPlan::const_iterator i = myPlan->begin(); + if ((*i)->getStageType() == WAITING && getDesiredDepart() == static_cast(*i)->getUntil()) { + ++i; + } + for (; i != myPlan->end(); ++i) { + (*i)->routeOutput(os); + } +} + + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSContainer.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSContainer.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSContainer.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSContainer.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,697 @@ +/****************************************************************************/ +/// @file MSContainer.h +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Thu, 12 Jun 2014 +/// @version $Id: MSContainer.h 18129 2015-03-24 13:18:25Z behrisch $ +/// +// The class for modelling container-movements +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSContainer_h +#define MSContainer_h + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class MSNet; +class MSEdge; +class MSLane; +class OutputDevice; +class SUMOVehicleParameter; +class MSContainerStop; +class SUMOVehicle; +class MSVehicleType; +class MSCModel_NonInteracting; +class CState; + +//typedef std::vector MSEdgeVector; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSContainer + * + * The class holds a simulated container together with its movement stages + */ + + +class MSContainer { +public: + enum StageType { + DRIVING = 0, + WAITING = 1, + TRANSHIP = 2 + }; + + /// @brief the offset for computing container positions when standing at an edge + static const SUMOReal ROADSIDE_OFFSET; + + + /** + * The "abstract" class for a single stage of a container movement + * Contains the destination of the current movement step + */ + class MSContainerStage { + public: + /// constructor + MSContainerStage(const MSEdge& destination, StageType type); + + /// destructor + virtual ~MSContainerStage(); + + /// returns the destination edge + const MSEdge& getDestination() const; + + /// Returns the current edge + virtual const MSEdge* getEdge() const = 0; + virtual const MSEdge* getFromEdge() const = 0; + virtual SUMOReal getEdgePos(SUMOTime now) const = 0; + + /// returns the position of the container + virtual Position getPosition(SUMOTime now) const = 0; + + /// returns the angle of the container + virtual SUMOReal getAngle(SUMOTime now) const = 0; + + /// + StageType getStageType() const { + return myType; + } + + /// @brief return string representation of the current stage + virtual std::string getStageDescription() const = 0; + + /// proceeds to the next step + virtual void proceed(MSNet* net, MSContainer* container, SUMOTime now, MSEdge* previousEdge, const SUMOReal at) = 0; + + /// logs end of the step + void setDeparted(SUMOTime now); + + /// logs end of the step + void setArrived(SUMOTime now); + + /// Whether the container waits for a vehicle of the line specified. + virtual bool isWaitingFor(const std::string& line) const; + + /// @brief Whether the container waits for a vehicle + virtual bool isWaiting4Vehicle() const { + return false; + } + + /// @brief the time this container spent waiting + virtual SUMOTime getWaitingTime(SUMOTime now) const = 0; + + /// @brief the speed of the container + virtual SUMOReal getSpeed() const = 0; + + /// @brief get position on edge e at length at with orthogonal offset + Position getEdgePosition(const MSEdge* e, SUMOReal at, SUMOReal offset) const; + + /// @brief get position on lane at length at with orthogonal offset + Position getLanePosition(const MSLane* lane, SUMOReal at, SUMOReal offset) const; + + /// @brief get angle of the edge at a certain position + SUMOReal getEdgeAngle(const MSEdge* e, SUMOReal at) const; + + /* @brief Return the current ContainerStop or the destination containe stop + * + * returns the current container stop if the stage=Waiting and the + * container stop from wich the container departs if stage=Driving + */ + virtual MSContainerStop* getDepartContainerStop() const = 0; + + /** @brief Called on writing tripinfo output + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void tripInfoOutput(OutputDevice& os) const = 0; + + /** @brief Called on writing vehroute output + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void routeOutput(OutputDevice& os) const = 0; + + /** @brief Called for writing the events output (begin of an action) + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void beginEventOutput(const MSContainer& container, SUMOTime t, OutputDevice& os) const = 0; + + /** @brief Called for writing the events output (end of an action) + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void endEventOutput(const MSContainer& container, SUMOTime t, OutputDevice& os) const = 0; + + protected: + /// the next edge to reach by getting transported + const MSEdge& myDestination; + + /// the time at which this stage started + SUMOTime myDeparted; + + /// the time at which this stage ended + SUMOTime myArrived; + + /// The type of this stage + StageType myType; + + private: + /// @brief Invalidated copy constructor. + MSContainerStage(const MSContainerStage&); + + /// @brief Invalidated assignment operator. + MSContainerStage& operator=(const MSContainerStage&); + + }; + + /** + * A "real" stage performing the travelling by a transport system + * A container is in this stage if it is on a ride or if its waiting for a ride. + * The given route will be chosen. The travel time is computed by the simulation + */ + class MSContainerStage_Driving : public MSContainerStage { + public: + /// constructor + MSContainerStage_Driving(const MSEdge& destination, MSContainerStop* toCS, + const std::vector& lines); + + /// destructor + ~MSContainerStage_Driving(); + + /// proceeds to the next step + virtual void proceed(MSNet* net, MSContainer* container, SUMOTime now, MSEdge* previousEdge, const SUMOReal at); + + /// Returns the current edge + const MSEdge* getEdge() const; + const MSEdge* getFromEdge() const; + SUMOReal getEdgePos(SUMOTime now) const; + + /// + Position getPosition(SUMOTime now) const; + + /// @brief the angle of the vehicle or the angle of the edge + 90deg + SUMOReal getAngle(SUMOTime now) const; + + /// @brief returns the stage description as a string + std::string getStageDescription() const; + + /// Whether the container waits for a vehicle of the line specified. + bool isWaitingFor(const std::string& line) const; + + /// @brief Whether the container waits for a vehicle + bool isWaiting4Vehicle() const; + + /// @brief time spent waiting for a ride + SUMOTime getWaitingTime(SUMOTime now) const; + + /** @brief the speed of the container + * + * If the container is still waiting for a ride zero will be returned. + * If the container is on a ride the speed of the corresponding vehicle + * will be returned. + */ + SUMOReal getSpeed() const; + + /// @brief returns the container stop from which the container departs + MSContainerStop* getDepartContainerStop() const; + + /// @brief assign a vehicle to the container + void setVehicle(SUMOVehicle* v) { + myVehicle = v; + } + + /** @brief Called on writing tripinfo output + * + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void tripInfoOutput(OutputDevice& os) const; + + /** @brief Called on writing vehroute output + * + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void routeOutput(OutputDevice& os) const; + + /** @brief Called for writing the events output + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void beginEventOutput(const MSContainer& container, SUMOTime t, OutputDevice& os) const; + + /** @brief Called for writing the events output (end of an action) + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void endEventOutput(const MSContainer& container, SUMOTime t, OutputDevice& os) const; + + private: + /// the lines to choose from + const std::set myLines; + + /// @brief The taken vehicle + SUMOVehicle* myVehicle; + + /// @brief The destination container stop + MSContainerStop* myDestinationContainerStop; + + /// @brief The container stop from which the container departs + MSContainerStop* myDepartContainerStop; + + SUMOReal myWaitingPos; + + /// @brief The time since which this container is waiting for a ride + SUMOTime myWaitingSince; + + const MSEdge* myWaitingEdge; + + private: + /// @brief Invalidated copy constructor. + MSContainerStage_Driving(const MSContainerStage_Driving&); + + /// @brief Invalidated assignment operator. + MSContainerStage_Driving& operator=(const MSContainerStage_Driving&); + + }; + + /** + * A "real" stage performing a waiting over the specified time + * A container is in this stage if it is not on a ride or waiting for a ride, e.g. + * if it is stored, or if gets filled or emptied. + */ + class MSContainerStage_Waiting : public MSContainerStage { + public: + /// constructor + MSContainerStage_Waiting(const MSEdge& destination, + SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string& actType); + + /// destructor + ~MSContainerStage_Waiting(); + + /// Returns the current edge + const MSEdge* getEdge() const; + + /// Returns the current edge + const MSEdge* getFromEdge() const; + + SUMOReal getEdgePos(SUMOTime now) const; + + /// Returns time until the container waits + SUMOTime getUntil() const; + + Position getPosition(SUMOTime now) const; + + /// @brief the angle of the edge minus 90deg + SUMOReal getAngle(SUMOTime now) const; + + SUMOTime getWaitingTime(SUMOTime now) const; + + /// Returns the speed of the container which is always zero in that stage + SUMOReal getSpeed() const; + + /// Returns the current stage description as a string + std::string getStageDescription() const { + return "waiting (" + myActType + ")"; + } + + /* @brief returns the container stop at which the container is waiting + * + * this method was added to have a method 'getDepartContainerStop' + * for MSContainer. + */ + MSContainerStop* getDepartContainerStop() const; + + /// proceeds to the next step + virtual void proceed(MSNet* net, MSContainer* container, SUMOTime now, MSEdge* previousEdge, const SUMOReal at); + + /** @brief Called on writing tripinfo output + * + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void tripInfoOutput(OutputDevice& os) const; + + /** @brief Called on writing vehroute output + * + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void routeOutput(OutputDevice& os) const; + + /** @brief Called for writing the events output + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void beginEventOutput(const MSContainer& container, SUMOTime t, OutputDevice& os) const; + + /** @brief Called for writing the events output (end of an action) + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void endEventOutput(const MSContainer& container, SUMOTime t, OutputDevice& os) const; + + private: + /// the time the container is waiting + SUMOTime myWaitingDuration; + + /// the time until the container is waiting + SUMOTime myWaitingUntil; + + /// the time the container started waiting + SUMOTime myWaitingStart; + + /// @brief The type of activity + std::string myActType; + + SUMOReal myStartPos; + + /// @brief the container stop at which the container is waiting + MSContainerStop* myCurrentContainerStop; + + + private: + /// @brief Invalidated copy constructor. + MSContainerStage_Waiting(const MSContainerStage_Waiting&); + + /// @brief Invalidated assignment operator. + MSContainerStage_Waiting& operator=(const MSContainerStage_Waiting&); + + }; + + /** + * A "real" stage performing the tranship of a container + * A container is in this stage if it gets transhipred between two stops that are + * assumed to be connected. + */ + class MSContainerStage_Tranship : public MSContainerStage { + friend class MSCModel_NonInteracting; + + public: + /// constructor + MSContainerStage_Tranship(const std::vector& route, MSContainerStop* toCS, SUMOReal speed, SUMOReal departPos, SUMOReal arrivalPos); + + /// destructor + ~MSContainerStage_Tranship(); + + /// proceeds to the next step + virtual void proceed(MSNet* net, MSContainer* container, SUMOTime now, MSEdge* previousEdge, const SUMOReal at); + + /// Returns the current edge + const MSEdge* getEdge() const; + + /// Returns first edge of the containers route + const MSEdge* getFromEdge() const; + + /// Returns last edge of the containers route + const MSEdge* getToEdge() const; + + /// Returns the offset from the start of the current edge measured in its natural direction + SUMOReal getEdgePos(SUMOTime now) const; + + /// Returns the position of the container + Position getPosition(SUMOTime now) const; + + /// Returns the angle of the container + SUMOReal getAngle(SUMOTime now) const; + + /// Returns the time the container spent waiting + SUMOTime getWaitingTime(SUMOTime now) const; + + /// Returns the speed of the container + SUMOReal getSpeed() const; + + /// Returns the current stage description as a string + std::string getStageDescription() const { + return "tranship"; + } + + /// @brief returns the container stop from which the container departs + MSContainerStop* getDepartContainerStop() const; + + /** @brief Called on writing tripinfo output + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void tripInfoOutput(OutputDevice& os) const; + + /** @brief Called on writing vehroute output + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void routeOutput(OutputDevice& os) const; + + /** @brief Called for writing the events output + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void beginEventOutput(const MSContainer& c, SUMOTime t, OutputDevice& os) const; + + /** @brief Called for writing the events output (end of an action) + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void endEventOutput(const MSContainer& c, SUMOTime t, OutputDevice& os) const; + + /// @brief move forward and return whether the container arrived + bool moveToNextEdge(MSContainer* container, SUMOTime currentTime, MSEdge* nextInternal = 0); + + + /// @brief accessors to be used by MSCModel_NonInteracting + inline SUMOReal getMaxSpeed() const { + return mySpeed; + } + + inline SUMOReal getDepartPos() const { + return myDepartPos; + } + + inline SUMOReal getArrivalPos() const { + return myArrivalPos; + } + + inline const MSEdge* getNextRouteEdge() const { + return myRouteStep == myRoute.end() - 1 ? 0 : *(myRouteStep + 1); + } + + CState* getContainerState() const { + return myContainerState; + } + + private: + /// @brief The route of the container + std::vector myRoute; + + /// @brief current step + std::vector::iterator myRouteStep; + + /// @brief the depart position + SUMOReal myDepartPos; + + /// @brief the arrival position + SUMOReal myArrivalPos; + + /// @brief the destination container stop + MSContainerStop* myDestinationContainerStop; + + /// @brief The container stop from which the container departs + MSContainerStop* myDepartContainerStop; + + /// @brief the speed of the container + SUMOReal mySpeed; + + /// @brief state that is to be manipulated by MSCModel + CState* myContainerState; + + /// @brief The current internal edge this container is on or 0 + MSEdge* myCurrentInternalEdge; + + private: + /// @brief Invalidated copy constructor. + MSContainerStage_Tranship(const MSContainerStage_Tranship&); + + /// @brief Invalidated assignment operator. + MSContainerStage_Tranship& operator=(const MSContainerStage_Tranship&); + + }; + +public: + /// the structure holding the plan of a container + typedef std::vector MSContainerPlan; + + /// the last destination of the route of the container + const MSEdge* lastDestination; + +protected: + /// the plan of the container + const SUMOVehicleParameter* myParameter; + + /// @brief This container's type. (mainly used for drawing related information + /// Note sure if it is really necessary + const MSVehicleType* myVType; + + /// the plan of the container + MSContainerPlan* myPlan; + + /// the iterator over the route + MSContainerPlan::iterator myStep; + + /// @brief Whether events shall be written + bool myWriteEvents; + +public: + /// constructor + MSContainer(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSContainerPlan* plan); + + /// destructor + virtual ~MSContainer(); + + /// returns the container id + const std::string& getID() const; + + /* @brief proceeds to the next step of the route, + * @return Whether the containers plan continues */ + bool proceed(MSNet* net, SUMOTime time); + + /// Returns the desired departure time. + SUMOTime getDesiredDepart() const; + + /// logs depart time of the current stage + void setDeparted(SUMOTime now); + + /// Returns the current destination. + const MSEdge& getDestination() const { + return (*myStep)->getDestination(); + } + + /// Returns the destination after the current destination. + const MSEdge& getNextDestination() const { + return (*(myStep + 1))->getDestination(); + } + + /// @brief Returns the current edge + const MSEdge* getEdge() const { + return (*myStep)->getEdge(); + } + + /// @brief Returns the departure edge + const MSEdge* getFromEdge() const { + return (*myStep)->getFromEdge(); + } + + /// @brief Return the position on the edge + virtual SUMOReal getEdgePos() const; + + /// @brief Return the Network coordinate of the container + virtual Position getPosition() const; + + /// @brief return the current angle of the container + virtual SUMOReal getAngle() const; + + /// @brief the time this container spent waiting in seconds + virtual SUMOReal getWaitingSeconds() const; + + /// @brief the current speed of the container + virtual SUMOReal getSpeed() const; + + /// @brief the current stage type of the container + StageType getCurrentStageType() const { + return (*myStep)->getStageType(); + } + + /// Returns the current stage description as a string + std::string getCurrentStageDescription() const { + return (*myStep)->getStageDescription(); + } + + /// @brief Return the current stage + MSContainerStage* getCurrentStage() const { + return *myStep; + } + + /* @brief Return the current ContainerStop or the destination containe stop + * + * returns the current container stop if the stage=Waiting and the + * container stop from wich the container departs if stage=Driving + */ + virtual MSContainerStop* getDepartContainerStop() const; + + + /** @brief Called on writing tripinfo output + * + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + void tripInfoOutput(OutputDevice& os) const; + + /** @brief Called on writing vehroute output + * + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + void routeOutput(OutputDevice& os) const; + + /// Whether the container waits for a vehicle of the line specified. + bool isWaitingFor(const std::string& line) const { + return (*myStep)->isWaitingFor(line); + } + + /// Whether the container waits for a vehicle + bool isWaiting4Vehicle() const { + return (*myStep)->isWaiting4Vehicle(); + } + + const SUMOVehicleParameter& getParameter() const { + return *myParameter; + } + + inline const MSVehicleType& getVehicleType() const { + return *myVType; + } + +private: + /// @brief Invalidated copy constructor. + MSContainer(const MSContainer&); + + /// @brief Invalidated assignment operator. + MSContainer& operator=(const MSContainer&); + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEdgeControl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEdgeControl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEdgeControl.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEdgeControl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 09 Apr 2001 -/// @version $Id: MSEdgeControl.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSEdgeControl.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Stores edges and lanes, performs moving of vehicle /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -168,7 +168,7 @@ void -MSEdgeControl::detectCollisions(SUMOTime timestep, int stage) { +MSEdgeControl::detectCollisions(SUMOTime timestep, const std::string& stage) { // Detections is made by the edge's lanes, therefore hand over. for (std::list::iterator i = myActiveLanes.begin(); i != myActiveLanes.end(); ++i) { (*i)->detectCollisions(timestep, stage); @@ -179,7 +179,7 @@ std::vector MSEdgeControl::getEdgeNames() const { std::vector ret; - for (std::vector::const_iterator i = myEdges.begin(); i != myEdges.end(); ++i) { + for (MSEdgeVector::const_iterator i = myEdges.begin(); i != myEdges.end(); ++i) { ret.push_back((*i)->getID()); } return ret; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEdgeControl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEdgeControl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEdgeControl.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEdgeControl.h 2015-04-17 00:20:29.000000000 +0000 @@ -7,12 +7,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Mon, 09 Apr 2001 -/// @version $Id: MSEdgeControl.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSEdgeControl.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Stores edges and lanes, performs moving of vehicle /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -52,6 +52,7 @@ class MSLane; class OutputDevice; +typedef std::vector MSEdgeVector; // =========================================================================== // class definitions @@ -71,9 +72,6 @@ * in "patchActiveLanes". */ class MSEdgeControl { -public: - /// @brief Container for edges. - typedef std::vector< MSEdge* > EdgeCont; public: /** @brief Constructor @@ -150,7 +148,7 @@ * @param[in] stage The current stage within the simulation step * @note see MSNet::simulationStep */ - void detectCollisions(SUMOTime timestep, int stage); + void detectCollisions(SUMOTime timestep, const std::string& stage); /** @brief Returns loaded edges @@ -158,7 +156,7 @@ * @return the container storing one-lane edges * @todo Check: Is this secure? */ - const std::vector& getEdges() const { + const MSEdgeVector& getEdges() const { return myEdges; } @@ -205,7 +203,7 @@ private: /// @brief Loaded edges - std::vector myEdges; + MSEdgeVector myEdges; /// @brief Definition of a container about a lane's number of vehicles and neighbors typedef std::vector LaneUsageVector; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEdge.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEdge.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEdge.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEdge.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -8,12 +8,12 @@ /// @author Michael Behrisch /// @author Sascha Krieg /// @date Tue, 06 Mar 2001 -/// @version $Id: MSEdge.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSEdge.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // A road/street connecting two junctions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -40,10 +40,13 @@ #include #include #include "MSEdge.h" +#include "MSJunction.h" #include "MSLane.h" #include "MSLaneChanger.h" #include "MSGlobals.h" #include "MSVehicle.h" +#include +#include "MSContainer.h" #include "MSEdgeWeightsStorage.h" #ifdef HAVE_INTERNAL @@ -61,7 +64,7 @@ // static member definitions // =========================================================================== MSEdge::DictType MSEdge::myDict; -std::vector MSEdge::myEdges; +MSEdgeVector MSEdge::myEdges; // =========================================================================== @@ -69,10 +72,20 @@ // =========================================================================== MSEdge::MSEdge(const std::string& id, int numericalID, const EdgeBasicFunction function, - const std::string& streetName) : + const std::string& streetName, + const std::string& edgeType, + int priority) : Named(id), myNumericalID(numericalID), myLanes(0), myLaneChanger(0), myFunction(function), myVaporizationRequests(0), - myLastFailedInsertionTime(-1), myStreetName(streetName) {} + myLastFailedInsertionTime(-1), + myFromJunction(0), myToJunction(0), + myStreetName(streetName), + myEdgeType(edgeType), + myPriority(priority), + myLength(-1.), + myEmptyTraveltime(-1.), + myAmDelayed(false), + myAmRoundabout(false) {} MSEdge::~MSEdge() { @@ -91,22 +104,31 @@ void -MSEdge::initialize(std::vector* lanes) { - assert(myFunction == EDGEFUNCTION_DISTRICT || lanes != 0); +MSEdge::initialize(const std::vector* lanes) { + assert(lanes != 0); myLanes = lanes; - if (myLanes && myLanes->size() > 1 && myFunction != EDGEFUNCTION_INTERNAL) { - myLaneChanger = new MSLaneChanger(myLanes, OptionsCont::getOptions().getBool("lanechange.allow-swap")); + if (!lanes->empty()) { + recalcCache(); + if (myLanes->size() > 1) { + myLaneChanger = new MSLaneChanger(myLanes, OptionsCont::getOptions().getBool("lanechange.allow-swap")); + } } if (myFunction == EDGEFUNCTION_DISTRICT) { - myCombinedPermissions = SVCFreeForAll; + myCombinedPermissions = SVCAll; } } +void MSEdge::recalcCache() { + myLength = myLanes->front()->getLength(); + myEmptyTraveltime = myLength / MAX2(getSpeedLimit(), NUMERICAL_EPS); +} + + void MSEdge::closeBuilding() { myAllowed[0] = new std::vector(); - for (std::vector::iterator i = myLanes->begin(); i != myLanes->end(); ++i) { + for (std::vector::const_iterator i = myLanes->begin(); i != myLanes->end(); ++i) { myAllowed[0]->push_back(*i); const MSLinkCont& lc = (*i)->getLinkCont(); for (MSLinkCont::const_iterator j = lc.begin(); j != lc.end(); ++j) { @@ -117,8 +139,8 @@ if (std::find(mySuccessors.begin(), mySuccessors.end(), &to) == mySuccessors.end()) { mySuccessors.push_back(&to); } - if (std::find(to.myPredeccesors.begin(), to.myPredeccesors.end(), this) == to.myPredeccesors.end()) { - to.myPredeccesors.push_back(this); + if (std::find(to.myPredecessors.begin(), to.myPredecessors.end(), this) == to.myPredecessors.end()) { + to.myPredecessors.push_back(this); } // if (myAllowed.find(&to) == myAllowed.end()) { @@ -130,7 +152,9 @@ toL = (*j)->getViaLane(); if (toL != 0) { MSEdge& to = toL->getEdge(); - to.myPredeccesors.push_back(this); + if (std::find(to.myPredecessors.begin(), to.myPredecessors.end(), this) == to.myPredecessors.end()) { + to.myPredecessors.push_back(this); + } } #endif } @@ -150,10 +174,11 @@ } } myClassedAllowed.clear(); + myClassesSuccessorMap.clear(); // rebuild myMinimumPermissions and myCombinedPermissions - myMinimumPermissions = SVCFreeForAll; + myMinimumPermissions = SVCAll; myCombinedPermissions = 0; - for (std::vector::iterator i = myLanes->begin(); i != myLanes->end(); ++i) { + for (std::vector::const_iterator i = myLanes->begin(); i != myLanes->end(); ++i) { myMinimumPermissions &= (*i)->getPermissions(); myCombinedPermissions |= (*i)->getPermissions(); } @@ -181,21 +206,6 @@ } const int resultIndex = index + offset; if (resultIndex >= (int)myLanes->size() || resultIndex < 0) { - // check for parallel running internal lanes - if (getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { - const MSLane* pred = lane->getLogicalPredecessorLane(); - const MSLane* next = lane->getLinkCont()[0]->getLane(); - assert(pred != 0); - assert(next != 0); - const MSLane* predParallel = pred->getParallelLane(offset); - const MSLane* nextParallel = next->getParallelLane(offset); - if (predParallel != 0 && nextParallel != 0) { - const MSLink* connecting = MSLinkContHelper::getConnectingLink(*predParallel, *nextParallel); - if (connecting != 0) { - return connecting->getViaLaneOrLane(); - } - } - } return 0; } else { return (*myLanes)[resultIndex]; @@ -285,11 +295,12 @@ } MSLane* res = 0; if (allowed != 0) { - unsigned int noCars = INT_MAX; + SUMOReal leastOccupancy = std::numeric_limits::max();; for (std::vector::const_iterator i = allowed->begin(); i != allowed->end(); ++i) { - if ((*i)->getVehicleNumber() < noCars) { + const SUMOReal occupancy = (*i)->getBruttoOccupancy(); + if (occupancy < leastOccupancy) { res = (*i); - noCars = (*i)->getVehicleNumber(); + leastOccupancy = occupancy; } } } @@ -298,7 +309,7 @@ MSLane* -MSEdge::getDepartLane(const MSVehicle& veh) const { +MSEdge::getDepartLane(MSVehicle& veh) const { switch (veh.getParameter().departLaneProcedure) { case DEPART_LANE_GIVEN: if ((int) myLanes->size() <= veh.getParameter().departLane || !(*myLanes)[veh.getParameter().departLane]->allowsVehicleClass(veh.getVehicleType().getVehicleClass())) { @@ -316,7 +327,8 @@ return getFreeLane(allowedLanes(**(veh.getRoute().begin() + 1)), veh.getVehicleType().getVehicleClass()); } case DEPART_LANE_BEST_FREE: { - const std::vector& bl = veh.getBestLanes(false, (*myLanes)[0]); + veh.updateBestLanes(false, myLanes->front()); + const std::vector& bl = veh.getBestLanes(); SUMOReal bestLength = -1; for (std::vector::const_iterator i = bl.begin(); i != bl.end(); ++i) { if ((*i).length > bestLength) { @@ -334,6 +346,13 @@ return ret; } case DEPART_LANE_DEFAULT: + case DEPART_LANE_FIRST_ALLOWED: + for (std::vector::const_iterator i = myLanes->begin(); i != myLanes->end(); ++i) { + if ((*i)->allowsVehicleClass(veh.getVehicleType().getVehicleClass())) { + return *i; + } + } + return 0; default: break; } @@ -345,14 +364,24 @@ bool -MSEdge::insertVehicle(SUMOVehicle& v, SUMOTime time) const { - // when vaporizing, no vehicles are inserted... +MSEdge::insertVehicle(SUMOVehicle& v, SUMOTime time, const bool checkOnly) const { + // when vaporizing, no vehicles are inserted, but checking needs to be successful to trigger removal if (isVaporizing()) { - return false; + return checkOnly; + } + const SUMOVehicleParameter& pars = v.getParameter(); + const MSVehicleType& type = v.getVehicleType(); + if (pars.departSpeedProcedure == DEPART_SPEED_GIVEN && pars.departSpeed > getVehicleMaxSpeed(&v)) { + if (type.getSpeedDeviation() > 0 && pars.departSpeed <= type.getSpeedFactor() * getSpeedLimit() * (2 * type.getSpeedDeviation() + 1.)) { + WRITE_WARNING("Choosing new speed factor for vehicle '" + pars.id + "' to match departure speed."); + v.setChosenSpeedFactor(type.computeChosenSpeedDeviation(0, pars.departSpeed / (type.getSpeedFactor() * getSpeedLimit()))); + } else { + throw ProcessError("Departure speed for vehicle '" + pars.id + + "' is too high for the departure edge '" + getID() + "'."); + } } #ifdef HAVE_INTERNAL if (MSGlobals::gUseMesoSim) { - const SUMOVehicleParameter& pars = v.getParameter(); SUMOReal pos = 0.0; switch (pars.departPosProcedure) { case DEPART_POS_GIVEN: @@ -379,17 +408,46 @@ MEVehicle* veh = static_cast(&v); if (pars.departPosProcedure == DEPART_POS_FREE) { while (segment != 0 && !result) { - result = segment->initialise(veh, time); + if (checkOnly) { + result = segment->hasSpaceFor(veh, time, true); + } else { + result = segment->initialise(veh, time); + } segment = segment->getNextSegment(); } } else { - result = segment->initialise(veh, time); + if (checkOnly) { + result = segment->hasSpaceFor(veh, time, true); + } else { + result = segment->initialise(veh, time); + } } return result; } #else UNUSED_PARAMETER(time); #endif + if (checkOnly) { + if (v.getEdge()->getPurpose() == MSEdge::EDGEFUNCTION_DISTRICT) { + return true; + } + switch (v.getParameter().departLaneProcedure) { + case DEPART_LANE_GIVEN: + case DEPART_LANE_DEFAULT: + case DEPART_LANE_FIRST_ALLOWED: { + const SUMOReal occupancy = getDepartLane(static_cast(v))->getBruttoOccupancy(); + return occupancy == (SUMOReal)0 || occupancy * myLength + v.getVehicleType().getLengthWithGap() <= myLength; + } + default: + for (std::vector::const_iterator i = myLanes->begin(); i != myLanes->end(); ++i) { + const SUMOReal occupancy = (*i)->getBruttoOccupancy(); + if (occupancy == (SUMOReal)0 || occupancy * myLength + v.getVehicleType().getLengthWithGap() <= myLength) { + return true; + } + } + } + return false; + } MSLane* insertionLane = getDepartLane(static_cast(v)); return insertionLane != 0 && insertionLane->insertVehicle(static_cast(v)); } @@ -397,10 +455,20 @@ void MSEdge::changeLanes(SUMOTime t) { - if (myFunction == EDGEFUNCTION_INTERNAL) { + if (myLaneChanger == 0) { return; } - assert(myLaneChanger != 0); + if (myFunction == EDGEFUNCTION_INTERNAL) { + // allow changing only if all links leading to this internal lane have priority + for (std::vector::const_iterator it = myLanes->begin(); it != myLanes->end(); ++it) { + MSLane* pred = (*it)->getLogicalPredecessorLane(); + MSLink* link = MSLinkContHelper::getConnectingLink(*pred, **it); + assert(link != 0); + if (!link->havePriority()) { + return; + } + } + } myLaneChanger->laneChange(t); } @@ -432,6 +500,9 @@ SUMOReal MSEdge::getCurrentTravelTime(SUMOReal minSpeed) const { assert(minSpeed > 0); + if (!myAmDelayed) { + return myEmptyTraveltime; + } SUMOReal v = 0; #ifdef HAVE_INTERNAL if (MSGlobals::gUseMesoSim) { @@ -445,15 +516,14 @@ v /= (SUMOReal) segments; } else { #endif - for (std::vector::iterator i = myLanes->begin(); i != myLanes->end(); ++i) { + for (std::vector::const_iterator i = myLanes->begin(); i != myLanes->end(); ++i) { v += (*i)->getMeanSpeed(); } v /= (SUMOReal) myLanes->size(); #ifdef HAVE_INTERNAL } #endif - v = MAX2(minSpeed, v); - return getLength() / v; + return getLength() / MAX2(minSpeed, v); } @@ -521,7 +591,7 @@ void -MSEdge::parseEdgesList(const std::string& desc, std::vector& into, +MSEdge::parseEdgesList(const std::string& desc, ConstMSEdgeVector& into, const std::string& rid) { if (desc[0] == BinaryFormatter::BF_ROUTE) { std::istringstream in(desc, std::ios::binary); @@ -536,7 +606,7 @@ void -MSEdge::parseEdgesList(const std::vector& desc, std::vector& into, +MSEdge::parseEdgesList(const std::vector& desc, ConstMSEdgeVector& into, const std::string& rid) { for (std::vector::const_iterator i = desc.begin(); i != desc.end(); ++i) { const MSEdge* edge = MSEdge::dictionary(*i); @@ -553,7 +623,7 @@ SUMOReal MSEdge::getDistanceTo(const MSEdge* other) const { if (getLanes().size() > 0 && other->getLanes().size() > 0) { - return getLanes()[0]->getShape()[-1].distanceTo2D(other->getLanes()[0]->getShape()[0]); + return getToJunction()->getPosition().distanceTo2D(other->getFromJunction()->getPosition()); } else { return 0; // optimism is just right for astar } @@ -561,12 +631,6 @@ SUMOReal -MSEdge::getLength() const { - return getLanes()[0]->getLength(); -} - - -SUMOReal MSEdge::getSpeedLimit() const { // @note lanes might have different maximum speeds in theory return getLanes()[0]->getSpeedLimit(); @@ -579,5 +643,64 @@ return getLanes()[0]->getVehicleMaxSpeed(veh); } + +std::vector +MSEdge::getSortedPersons(SUMOTime timestep) const { + std::vector result(myPersons.begin(), myPersons.end()); + sort(result.begin(), result.end(), person_by_offset_sorter(timestep)); + return result; +} + + +std::vector +MSEdge::getSortedContainers(SUMOTime timestep) const { + std::vector result(myContainers.begin(), myContainers.end()); + sort(result.begin(), result.end(), container_by_position_sorter(timestep)); + return result; +} + + +int +MSEdge::person_by_offset_sorter::operator()(const MSPerson* const p1, const MSPerson* const p2) const { + const SUMOReal pos1 = p1->getCurrentStage()->getEdgePos(myTime); + const SUMOReal pos2 = p2->getCurrentStage()->getEdgePos(myTime); + if (pos1 != pos2) { + return pos1 < pos2; + } + return p1->getID() < p2->getID(); +} + +int +MSEdge::container_by_position_sorter::operator()(const MSContainer* const c1, const MSContainer* const c2) const { + const SUMOReal pos1 = c1->getCurrentStage()->getEdgePos(myTime); + const SUMOReal pos2 = c2->getCurrentStage()->getEdgePos(myTime); + if (pos1 != pos2) { + return pos1 < pos2; + } + return c1->getID() < c2->getID(); +} + +const MSEdgeVector& +MSEdge::getSuccessors(SUMOVehicleClass vClass) const { + if (vClass == SVC_IGNORING) { + return mySuccessors; + } + ClassesSuccesorMap::const_iterator i = myClassesSuccessorMap.find(vClass); + if (i != myClassesSuccessorMap.end()) { + // can use cached value + return i->second; + } else { + // this vClass is requested for the first time. rebuild all succesors + for (MSEdgeVector::const_iterator it = mySuccessors.begin(); it != mySuccessors.end(); ++it) { + const std::vector* allowed = allowedLanes(*it, vClass); + if (allowed == 0 || allowed->size() > 0) { + myClassesSuccessorMap[vClass].push_back(*it); + } + } + return myClassesSuccessorMap[vClass]; + } +} + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEdge.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEdge.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEdge.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEdge.h 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Mon, 12 Mar 2001 -/// @version $Id: MSEdge.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSEdge.h 18096 2015-03-17 09:50:59Z behrisch $ /// // A road/street connecting two junctions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -41,10 +41,11 @@ #include #include #include -#include +#include #include #include #include +#include "MSNet.h" #include "MSVehicleType.h" @@ -58,6 +59,9 @@ class MSVehicle; class MSLane; class MSPerson; +class MSJunction; +class MSEdge; +class MSContainer; // =========================================================================== @@ -70,6 +74,10 @@ * A single connection between two junctions. * Holds lanes which are reponsible for vehicle movements. */ + +typedef std::vector MSEdgeVector; +typedef std::vector ConstMSEdgeVector; + class MSEdge : public Named, public Parameterised { public: /** @@ -89,7 +97,11 @@ /// @brief The edge is an internal edge EDGEFUNCTION_INTERNAL = 2, /// @brief The edge is a district edge - EDGEFUNCTION_DISTRICT = 3 + EDGEFUNCTION_DISTRICT = 3, + /// @brief The edge is a pedestrian crossing (a special type of internal edge) + EDGEFUNCTION_CROSSING = 4, + /// @brief The edge is a pedestrian walking area (a special type of internal edge) + EDGEFUNCTION_WALKINGAREA = 5 }; @@ -112,7 +124,8 @@ * @param[in] function A basic type of the edge * @param[in] streetName The street name for that edge */ - MSEdge(const std::string& id, int numericalID, const EdgeBasicFunction function, const std::string& streetName = ""); + MSEdge(const std::string& id, int numericalID, const EdgeBasicFunction function, + const std::string& streetName, const std::string& edgeType, int priority); /// @brief Destructor. @@ -124,7 +137,12 @@ * @param[in] allowed Information which edges may be reached from which lanes * @param[in] lanes List of this edge's lanes */ - void initialize(std::vector* lanes); + void initialize(const std::vector* lanes); + + + /** @brief Recalculates the cached values + */ + void recalcCache(); /// @todo Has to be called after all edges were built and all connections were set...; Still, is not very nice @@ -151,6 +169,7 @@ */ MSLane* rightLane(const MSLane* const lane) const; + /** @brief Returns the lane with the given offset parallel to the given lane one or 0 if it does not exist * * @param[in] lane The base lane @@ -169,6 +188,19 @@ } + /** @brief Returns this edge's persons sorted by pos + * + * @return This edge's persons sorted by pos + */ + std::vector getSortedPersons(SUMOTime timestep) const; + + + /** @brief Returns this edge's containers sorted by pos + * + * @return This edge's containers sorted by pos + */ + std::vector getSortedContainers(SUMOTime timestep) const; + /** @brief Get the allowed lanes to reach the destination-edge. * * If there is no such edge, get 0. Then you are on the wrong edge. @@ -178,7 +210,7 @@ * @return The lanes that may be used to reach the given edge, 0 if no such lanes exist */ const std::vector* allowedLanes(const MSEdge& destination, - SUMOVehicleClass vclass = SVC_UNKNOWN) const; + SUMOVehicleClass vclass = SVC_IGNORING) const; /** @brief Get the allowed lanes for the given vehicle class. @@ -188,7 +220,7 @@ * @param[in] vclass The vehicle class for which this information shall be returned * @return The lanes that may be used by the given vclass */ - const std::vector* allowedLanes(SUMOVehicleClass vclass = SVC_UNKNOWN) const; + const std::vector* allowedLanes(SUMOVehicleClass vclass = SVC_IGNORING) const; /// @} @@ -204,11 +236,25 @@ return myFunction; } + /// @brief return whether this edge is an internal edge + inline bool isInternal() const { + return myFunction == EDGEFUNCTION_INTERNAL; + } + + /// @brief return whether this edge is a pedestrian crossing + inline bool isCrossing() const { + return myFunction == EDGEFUNCTION_CROSSING; + } + + /// @brief return whether this edge is walking area + inline bool isWalkingArea() const { + return myFunction == EDGEFUNCTION_WALKINGAREA; + } /** @brief Returns the numerical id of the edge * @return This edge's numerical id */ - int getNumericalID() const { + inline int getNumericalID() const { return myNumericalID; } @@ -218,6 +264,18 @@ const std::string& getStreetName() const { return myStreetName; } + + /** @brief Returns the type of the edge + */ + const std::string& getEdgeType() const { + return myEdgeType; + } + + /** @brief Returns the priority of the edge + */ + int getPriority() const { + return myPriority; + } /// @} @@ -225,35 +283,77 @@ /// @name Access to succeeding/predecessing edges /// @{ - /** @brief Returns the list of edges which may be reached from this edge - * @return Edges reachable from this edge + /** @brief Adds an edge to the list of edges which may be reached from this edge and to the incoming of the other edge + * + * This is mainly used by the taz (district) parsing + * @param[in] edge The edge to add */ - void addFollower(MSEdge* edge) { + void addSuccessor(MSEdge* edge) { mySuccessors.push_back(edge); + edge->myPredecessors.push_back(this); } /** @brief Returns the list of edges from which this edge may be reached * @return Edges from which this edge may be reached */ - const std::vector& getIncomingEdges() const { - return myPredeccesors; + const MSEdgeVector& getIncomingEdges() const { + return myPredecessors; } /** @brief Returns the number of edges that may be reached from this edge * @return The number of following edges */ - unsigned int getNoFollowing() const { + unsigned int getNumSuccessors() const { return (unsigned int) mySuccessors.size(); } - /** @brief Returns the n-th of the following edges - * @param[in] n The index within following edges of the edge to return - * @return The n-th of the following edges + + /** @brief Returns the following edges */ - const MSEdge* getFollower(unsigned int n) const { - return mySuccessors[n]; + const MSEdgeVector& getSuccessors() const { + return mySuccessors; + } + + + /** @brief Returns the following edges, restricted by vClass + * @param[in] vClass The vClass for which to restrict the successors + * @return The eligible following edges + */ + const MSEdgeVector& getSuccessors(SUMOVehicleClass vClass) const; + + + /** @brief Returns the number of edges this edge is connected to + * + * @return The number of edges following this edge + */ + unsigned int getNumPredecessors() const { + return (unsigned int) myPredecessors.size(); + } + + + /** @brief Returns the edge at the given position from the list of reachable edges + * @param[in] pos The position of the list within the list of approached + * @return The following edge, stored at position pos + */ + const MSEdgeVector& getPredecessors() const { + return myPredecessors; + } + + + const MSJunction* getFromJunction() const { + return myFromJunction; + } + + const MSJunction* getToJunction() const { + return myToJunction; + } + + + void setJunctions(MSJunction* from, MSJunction* to) { + myFromJunction = from; + myToJunction = to; } /// @} @@ -303,7 +403,7 @@ * @param[in] minSpeed The minimumSpeed to assume if traffic on this edge is stopped * @return The current effort (travel time) to pass the edge */ - SUMOReal getCurrentTravelTime(const SUMOReal minSpeed = 0.00001) const; + SUMOReal getCurrentTravelTime(const SUMOReal minSpeed = NUMERICAL_EPS) const; /// @brief returns the minimum travel time for the given vehicle @@ -316,6 +416,18 @@ } + /** @brief Returns the travel time for the given edge + * + * @param[in] edge The edge for which the travel time shall be retrieved + * @param[in] veh The vehicle for which the travel time on this edge shall be retrieved + * @param[in] time The time for which the travel time shall be returned [s] + * @return The traveltime needed by the given vehicle to pass the edge at the given time + */ + static inline SUMOReal getTravelTimeStatic(const MSEdge* const edge, const SUMOVehicle* const veh, SUMOReal time) { + return MSNet::getInstance()->getTravelTime(edge, veh, time); + } + + /// @name Methods releated to vehicle insertion /// @{ @@ -325,14 +437,17 @@ * In dependance to this, the proper lane is chosen. * * Insertion itself is done by calling the chose lane's "insertVehicle" - * method. + * method but only if the checkOnly argument is false. The check needs + * to be certain only in the negative case (if false is returned, there + * is no way this vehicle would be inserted). * * @param[in] v The vehicle to insert * @param[in] time The current simulation time + * @param[in] checkOnly whether we perform only the check without actually inserting * @return Whether the vehicle could be inserted * @see MSLane::insertVehicle */ - bool insertVehicle(SUMOVehicle& v, SUMOTime time) const; + bool insertVehicle(SUMOVehicle& v, SUMOTime time, const bool checkOnly = false) const; /** @brief Finds the emptiest lane allowing the vehicle class @@ -362,7 +477,7 @@ * @param[in] veh The vehicle to get the depart lane for * @return a possible/chosen depart lane, 0 if no lane can be used */ - MSLane* getDepartLane(const MSVehicle& veh) const; + MSLane* getDepartLane(MSVehicle& veh) const; /** @brief Returns the last time a vehicle could not be inserted @@ -400,6 +515,10 @@ return (myCombinedPermissions & svc) != svc; } + inline SVCPermissions getPermissions() const { + return myCombinedPermissions; + } + void rebuildAllowedLanes(); @@ -413,7 +532,9 @@ /** @brief return the length of the edge * @return The edge's length */ - SUMOReal getLength() const; + inline SUMOReal getLength() const { + return myLength; + } /** @brief Returns the speed limit of the edge @@ -443,6 +564,30 @@ } } + /// @brief Add a container to myContainers + virtual void addContainer(MSContainer* container) const { + myContainers.insert(container); + } + + /// @brief Remove container from myContainers + virtual void removeContainer(MSContainer* container) const { + std::set::iterator i = myContainers.find(container); + if (i != myContainers.end()) { + myContainers.erase(i); + } + } + + inline bool isRoundabout() const { + return myAmRoundabout; + } + + void markAsRoundabout() { + myAmRoundabout = true; + } + + void markDelayed() const { + myAmDelayed = true; + } /** @brief Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary. Otherwise @@ -480,7 +625,7 @@ * @param[in] rid The id of the route these description belongs to; used for error message generation * @exception ProcessError If one of the strings contained is not a known edge id */ - static void parseEdgesList(const std::string& desc, std::vector& into, + static void parseEdgesList(const std::string& desc, ConstMSEdgeVector& into, const std::string& rid); @@ -490,7 +635,7 @@ * @param[in] rid The id of the route these description belongs to; used for error message generation * @exception ProcessError If one of the strings contained is not a known edge id */ - static void parseEdgesList(const std::vector& desc, std::vector& into, + static void parseEdgesList(const std::vector& desc, ConstMSEdgeVector& into, const std::string& rid); /// @} @@ -511,6 +656,34 @@ }; + /** @class person_by_offset_sorter + * @brief Sorts persons by their positions + */ + class person_by_offset_sorter { + public: + /// @brief constructor + explicit person_by_offset_sorter(SUMOTime timestep): myTime(timestep) { } + + /// @brief comparing operator + int operator()(const MSPerson* const p1, const MSPerson* const p2) const; + private: + SUMOTime myTime; + }; + + /** @class container_by_position_sorter + * @brief Sorts containers by their positions + */ + class container_by_position_sorter { + public: + /// @brief constructor + explicit container_by_position_sorter(SUMOTime timestep): myTime(timestep) { } + + /// @brief comparing operator + int operator()(const MSContainer* const c1, const MSContainer* const c2) const; + private: + SUMOTime myTime; + }; + /** @brief Get the allowed lanes to reach the destination-edge. * @@ -521,7 +694,7 @@ * @return The lanes that may be used to reach the given edge, 0 if no such lanes exist */ const std::vector* allowedLanes(const MSEdge* destination, - SUMOVehicleClass vclass = SVC_UNKNOWN) const; + SUMOVehicleClass vclass = SVC_IGNORING) const; /// @brief lookup in map and return 0 if not found @@ -529,10 +702,10 @@ protected: /// @brief This edge's numerical id - int myNumericalID; + const int myNumericalID; /// @brief Container for the edge's lane; should be sorted: (right-hand-traffic) the more left the lane, the higher the container-index - std::vector* myLanes; + const std::vector* myLanes; /// @brief This member will do the lane-change MSLaneChanger* myLaneChanger; @@ -547,14 +720,21 @@ mutable SUMOTime myLastFailedInsertionTime; /// @brief The succeeding edges - std::vector mySuccessors; + MSEdgeVector mySuccessors; /// @brief The preceeding edges - std::vector myPredeccesors; + MSEdgeVector myPredecessors; + + /// @brief the junctions for this edge + MSJunction* myFromJunction; + MSJunction* myToJunction; /// @brief Persons on the edge (only for drawing) mutable std::set myPersons; + /// @brief Containers on the edge + mutable std::set myContainers; + /// @name Storages for allowed lanes (depending on vehicle classes) /// @{ @@ -569,11 +749,28 @@ SVCPermissions myMinimumPermissions; /// @brief The union of lane permissions for this edge SVCPermissions myCombinedPermissions; + /// @} + /// @brief the real-world name of this edge (need not be unique) std::string myStreetName; - /// @} + /// @brief the type of the edge (optionally used during network creation) + std::string myEdgeType; + + /// @brief the priority of the edge (used during network creation) + const int myPriority; + + /// @brief the length of the edge (cached value for speedup) + SUMOReal myLength; + + /// @brief the traveltime on the empty edge (cached value for speedup) + SUMOReal myEmptyTraveltime; + + /// @brief whether this edge had a vehicle with less than max speed on it + mutable bool myAmDelayed; + /// @brief whether this edge belongs to a roundabout + bool myAmRoundabout; /// @name Static edge container /// @{ @@ -589,10 +786,13 @@ /** @brief Static list of edges * @deprecated Move to MSEdgeControl, make non-static */ - static std::vector myEdges; + static MSEdgeVector myEdges; /// @} + /// @brief The successors available for a given vClass + typedef std::map ClassesSuccesorMap; + mutable ClassesSuccesorMap myClassesSuccessorMap; private: /// @brief Invalidated copy constructor. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEdgeWeightsStorage.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEdgeWeightsStorage.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEdgeWeightsStorage.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEdgeWeightsStorage.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Laura Bieker /// @author Michael Behrisch /// @date 02.11.2009 -/// @version $Id: MSEdgeWeightsStorage.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSEdgeWeightsStorage.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A storage for edge travel times and efforts /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -48,9 +48,8 @@ bool -MSEdgeWeightsStorage::retrieveExistingTravelTime(const MSEdge* const e, const SUMOVehicle* const /*v*/, - SUMOReal t, SUMOReal& value) const { - std::map >::const_iterator i = myTravelTimes.find((MSEdge*) e); +MSEdgeWeightsStorage::retrieveExistingTravelTime(const MSEdge* const e, const SUMOReal t, SUMOReal& value) const { + std::map >::const_iterator i = myTravelTimes.find(e); if (i == myTravelTimes.end()) { return false; } @@ -64,9 +63,8 @@ bool -MSEdgeWeightsStorage::retrieveExistingEffort(const MSEdge* const e, const SUMOVehicle* const /*v*/, - SUMOReal t, SUMOReal& value) const { - std::map >::const_iterator i = myEfforts.find((MSEdge*) e); +MSEdgeWeightsStorage::retrieveExistingEffort(const MSEdge* const e, const SUMOReal t, SUMOReal& value) const { + std::map >::const_iterator i = myEfforts.find(e); if (i == myEfforts.end()) { return false; } @@ -83,10 +81,10 @@ MSEdgeWeightsStorage::addTravelTime(const MSEdge* const e, SUMOReal begin, SUMOReal end, SUMOReal value) { - std::map >::iterator i = myTravelTimes.find((MSEdge*) e); + std::map >::iterator i = myTravelTimes.find(e); if (i == myTravelTimes.end()) { - myTravelTimes[(MSEdge*)e] = ValueTimeLine(); - i = myTravelTimes.find((MSEdge*) e); + myTravelTimes[e] = ValueTimeLine(); + i = myTravelTimes.find(e); } (*i).second.add(begin, end, value); } @@ -96,10 +94,10 @@ MSEdgeWeightsStorage::addEffort(const MSEdge* const e, SUMOReal begin, SUMOReal end, SUMOReal value) { - std::map >::iterator i = myEfforts.find((MSEdge*) e); + std::map >::iterator i = myEfforts.find(e); if (i == myEfforts.end()) { - myEfforts[(MSEdge*)e] = ValueTimeLine(); - i = myEfforts.find((MSEdge*) e); + myEfforts[e] = ValueTimeLine(); + i = myEfforts.find(e); } (*i).second.add(begin, end, value); } @@ -107,7 +105,7 @@ void MSEdgeWeightsStorage::removeTravelTime(const MSEdge* const e) { - std::map >::iterator i = myTravelTimes.find((MSEdge*) e); + std::map >::iterator i = myTravelTimes.find(e); if (i != myTravelTimes.end()) { myTravelTimes.erase(i); } @@ -116,7 +114,7 @@ void MSEdgeWeightsStorage::removeEffort(const MSEdge* const e) { - std::map >::iterator i = myEfforts.find((MSEdge*) e); + std::map >::iterator i = myEfforts.find(e); if (i != myEfforts.end()) { myEfforts.erase(i); } @@ -125,13 +123,13 @@ bool MSEdgeWeightsStorage::knowsTravelTime(const MSEdge* const e) const { - return myTravelTimes.find((MSEdge*) e) != myTravelTimes.end(); + return myTravelTimes.find(e) != myTravelTimes.end(); } bool MSEdgeWeightsStorage::knowsEffort(const MSEdge* const e) const { - return myEfforts.find((MSEdge*) e) != myEfforts.end(); + return myEfforts.find(e) != myEfforts.end(); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEdgeWeightsStorage.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEdgeWeightsStorage.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEdgeWeightsStorage.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEdgeWeightsStorage.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 02.11.2009 -/// @version $Id: MSEdgeWeightsStorage.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSEdgeWeightsStorage.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A storage for edge travel times and efforts /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -61,24 +61,20 @@ /** @brief Returns a travel time for an edge and time if stored * @param[in] e The edge for which the travel time shall be retrieved - * @param[in] v Unused * @param[in] t The time for which the travel time shall be retrieved * @param[in] value The value if the requested edge/time is described * @return Whether the requested edge/time is described */ - bool retrieveExistingTravelTime(const MSEdge* const e, const SUMOVehicle* const v, - SUMOReal t, SUMOReal& value) const; + bool retrieveExistingTravelTime(const MSEdge* const e, const SUMOReal t, SUMOReal& value) const; /** @brief Returns an effort for an edge and time if stored * @param[in] e The edge for which the effort shall be retrieved - * @param[in] v Unused * @param[in] t The time for which the effort shall be retrieved * @param[in] value The value if the requested edge/time is described * @return Whether the requested edge/time is described */ - bool retrieveExistingEffort(const MSEdge* const e, const SUMOVehicle* const v, - SUMOReal t, SUMOReal& value) const; + bool retrieveExistingEffort(const MSEdge* const e, const SUMOReal t, SUMOReal& value) const; /** @brief Adds a travel time information for an edge and a time span @@ -127,10 +123,10 @@ private: /// @brief A map of edge->time->travel time - std::map > myTravelTimes; + std::map > myTravelTimes; /// @brief A map of edge->time->effort - std::map > myEfforts; + std::map > myEfforts; private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEventControl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEventControl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEventControl.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEventControl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Matthias Heppner /// @date Mon, 12 Mar 2001 -/// @version $Id: MSEventControl.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSEventControl.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Stores time-dependant events and executes them at the proper time /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -98,7 +98,7 @@ } delete currEvent.first; } else { - currEvent.second = execTime + time; + currEvent.second += time; myEvents.push(currEvent); } } else { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEventControl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEventControl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSEventControl.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSEventControl.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Matthias Heppner /// @date Mon, 12 Mar 2001 -/// @version $Id: MSEventControl.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSEventControl.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Stores time-dependant events and executes them at the proper time /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSFrame.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSFrame.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSFrame.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSFrame.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -8,12 +8,12 @@ /// @author Mario Krumnow /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: MSFrame.cpp 14477 2013-08-23 06:59:42Z namdre $ +/// @version $Id: MSFrame.cpp 18103 2015-03-18 12:05:24Z namdre $ /// // Sets and checks options for microsim; inits global outputs and settings /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -77,6 +78,7 @@ oc.addOptionSubTopic("Output"); oc.addOptionSubTopic("Time"); oc.addOptionSubTopic("Processing"); + oc.addOptionSubTopic("Routing"); SystemFrame::addReportOptions(oc); // fill this subtopic, too @@ -104,17 +106,24 @@ oc.doRegister("load-state", new Option_FileName());//!!! check, describe oc.addDescription("load-state", "Input", "Loads a network state from FILE"); oc.doRegister("load-state.offset", new Option_String("0", "TIME"));//!!! check, describe - oc.addDescription("load-state.offset", "Input", "Sets the time offset for vehicle segment exit times."); + oc.addDescription("load-state.offset", "Input", "Sets the time offset for vehicle segment exit times"); // register output options oc.doRegister("netstate-dump", new Option_FileName()); oc.addSynonyme("netstate-dump", "ndump"); oc.addSynonyme("netstate-dump", "netstate"); + oc.addSynonyme("netstate-dump", "netstate-output"); oc.addDescription("netstate-dump", "Output", "Save complete network states into FILE"); oc.doRegister("netstate-dump.empty-edges", new Option_Bool(false)); oc.addSynonyme("netstate-dump.empty-edges", "netstate.empty-edges"); + oc.addSynonyme("netstate-dump.empty-edges", "netstate-output.empty-edges"); oc.addSynonyme("netstate-dump.empty-edges", "dump-empty-edges", true); oc.addDescription("netstate-dump.empty-edges", "Output", "Write also empty edges completely when dumping"); + oc.doRegister("netstate-dump.precision", new Option_Integer(OUTPUT_ACCURACY)); + oc.addSynonyme("netstate-dump.precision", "netstate.precision"); + oc.addSynonyme("netstate-dump.precision", "netstate-output.precision"); + oc.addSynonyme("netstate-dump.precision", "dump-precision", true); + oc.addDescription("netstate-dump.precision", "Output", "Write positions and speeds with the given precision (default 2)"); oc.doRegister("emission-output", new Option_FileName()); @@ -130,19 +139,22 @@ oc.doRegister("queue-output", new Option_FileName()); oc.addDescription("queue-output", "Output", "Save the vehicle queues at the junctions (experimental)"); oc.doRegister("vtk-output", new Option_FileName()); - oc.addDescription("vtk-output", "Output", "Save complete vehicle positions in VTK Format (usage: /file/out will produce /file/out_$NR$.vtp files)"); + oc.addDescription("vtk-output", "Output", "Save complete vehicle positions inclusive speed values in the VTK Format (usage: /path/out will produce /path/out_$TIMESTEP$.vtp files)"); + oc.doRegister("amitran-output", new Option_FileName()); + oc.addDescription("amitran-output", "Output", "Save the vehicle trajectories in the Amitran format"); oc.doRegister("summary-output", new Option_FileName()); oc.addSynonyme("summary-output", "summary"); - oc.addSynonyme("summary-output", "emissions-output", true); - oc.addSynonyme("summary-output", "emissions", true); oc.addDescription("summary-output", "Output", "Save aggregated vehicle departure info into FILE"); oc.doRegister("tripinfo-output", new Option_FileName()); oc.addSynonyme("tripinfo-output", "tripinfo"); oc.addDescription("tripinfo-output", "Output", "Save single vehicle trip info into FILE"); + oc.doRegister("tripinfo-output.write-unfinished", new Option_Bool(false)); + oc.addDescription("tripinfo-output.write-unfinished", "Output", "Write tripinfo output for vehicles which have not arrived at simulation end"); + oc.doRegister("vehroute-output", new Option_FileName()); oc.addSynonyme("vehroute-output", "vehroutes"); oc.addDescription("vehroute-output", "Output", "Save single vehicle route info into FILE"); @@ -159,12 +171,24 @@ oc.addSynonyme("vehroute-output.sorted", "vehroutes.sorted"); oc.addDescription("vehroute-output.sorted", "Output", "Sorts the output by departure time"); + oc.doRegister("vehroute-output.dua", new Option_Bool(false)); + oc.addSynonyme("vehroute-output.dua", "vehroutes.dua"); + oc.addDescription("vehroute-output.dua", "Output", "Write the output in the duarouter alternatives style"); + + oc.doRegister("vehroute-output.intended-depart", new Option_Bool(false)); + oc.addSynonyme("vehroute-output.intended-depart", "vehroutes.intended-depart"); + oc.addDescription("vehroute-output.intended-depart", "Output", "Write the output with the intended instead of the real departure time"); + oc.doRegister("vehroute-output.write-unfinished", new Option_Bool(false)); oc.addDescription("vehroute-output.write-unfinished", "Output", "Write vehroute output for vehicles which have not arrived at simulation end"); oc.doRegister("link-output", new Option_FileName()); oc.addDescription("link-output", "Output", "Save links states into FILE"); + oc.doRegister("bt-output", new Option_FileName()); + oc.addDescription("bt-output", "Output", "Save bt visibilities into FILE"); + + #ifdef _DEBUG oc.doRegister("movereminder-output", new Option_FileName()); oc.addDescription("movereminder-output", "Output", "Save movereminder states of selected vehicles into FILE"); @@ -199,10 +223,13 @@ #ifdef HAVE_INTERNAL_LANES oc.doRegister("no-internal-links", new Option_Bool(false)); oc.addDescription("no-internal-links", "Processing", "Disable (junction) internal links"); + + oc.doRegister("ignore-junction-blocker", new Option_String("-1", "TIME")); + oc.addDescription("ignore-junction-blocker", "Processing", "Ignore vehicles which block the junction after they have been standing for SECONDS (-1 means never ignore)"); #endif oc.doRegister("ignore-accidents", new Option_Bool(false)); - oc.addDescription("ignore-accidents", "Processing", "Do not check whether accidents occure more deeply"); + oc.addDescription("ignore-accidents", "Processing", "Do not check whether accidents occur"); oc.doRegister("ignore-route-errors", new Option_Bool(false)); oc.addDescription("ignore-route-errors", "Processing", "Do not check whether routes are connected"); @@ -211,44 +238,62 @@ oc.addSynonyme("max-num-vehicles", "too-many-vehicles", true); oc.addDescription("max-num-vehicles", "Processing", "Quit simulation if this number of vehicles is exceeded"); - oc.doRegister("incremental-dua-step", new Option_Integer());//!!! deprecated - oc.addDescription("incremental-dua-step", "Processing", "Perform the simulation as a step in incremental DUA"); - oc.doRegister("incremental-dua-base", new Option_Integer(10));//!!! deprecated - oc.addDescription("incremental-dua-base", "Processing", "Base value for incremental DUA"); oc.doRegister("scale", new Option_Float()); oc.addDescription("scale", "Processing", "Scale demand by the given factor (0..1)"); oc.doRegister("time-to-teleport", new Option_String("300", "TIME")); oc.addDescription("time-to-teleport", "Processing", "Specify how long a vehicle may wait until being teleported, defaults to 300, non-positive values disable teleporting"); oc.doRegister("time-to-teleport.highways", new Option_String("0", "TIME")); - oc.addDescription("time-to-teleport.highways", "Processing", "The teleport time on highways"); + oc.addDescription("time-to-teleport.highways", "Processing", "The waiting time after which vehicles on a fast road (speed > 69m/s) are teleported if they are on a non-continuing lane"); oc.doRegister("max-depart-delay", new Option_String("-1", "TIME")); oc.addDescription("max-depart-delay", "Processing", "How long vehicles wait for departure before being skipped, defaults to -1 which means vehicles are never skipped"); oc.doRegister("sloppy-insert", new Option_Bool(false)); - oc.addDescription("sloppy-insert", "Processing", "Whether insertion on an edge shall not be repeated in same step once failed."); + oc.addDescription("sloppy-insert", "Processing", "Whether insertion on an edge shall not be repeated in same step once failed"); oc.doRegister("eager-insert", new Option_Bool(false)); - oc.addDescription("eager-insert", "Processing", "Whether each vehicle is checked separately for insertion on an edge."); + oc.addDescription("eager-insert", "Processing", "Whether each vehicle is checked separately for insertion on an edge"); + + oc.doRegister("random-depart-offset", new Option_String("0", "TIME")); + oc.addDescription("random-depart-offset", "Processing", "Each vehicle receives a random offset to its depart value drawn uniformly from [0, TIME]"); oc.doRegister("lanechange.allow-swap", new Option_Bool(false)); - oc.addDescription("lanechange.allow-swap", "Processing", "Whether blocking vehicles trying to change lanes may be swapped."); + oc.addDescription("lanechange.allow-swap", "Processing", "Whether blocking vehicles trying to change lanes may be swapped"); oc.doRegister("lanechange.duration", new Option_String("0", "TIME")); - oc.addDescription("lanechange.duration", "Processing", "Duration of a lane change maneuver (default 0)."); + oc.addDescription("lanechange.duration", "Processing", "Duration of a lane change maneuver (default 0)"); - oc.doRegister("routing-algorithm", new Option_String("dijkstra")); - oc.addDescription("routing-algorithm", "Processing", - "Select among routing algorithms ['dijkstra', 'astar']"); + oc.doRegister("lanechange.overtake-right", new Option_Bool(false)); + oc.addDescription("lanechange.overtake-right", "Processing", "Whether overtaking on the right on motorways is permitted"); - oc.doRegister("routeDist.maxsize", new Option_Integer()); - oc.addDescription("routeDist.maxsize", "Processing", "Restrict the maximum size of route distributions"); + // pedestrian model + oc.doRegister("pedestrian.model", new Option_String("striping")); + oc.addDescription("pedestrian.model", "Processing", "Select among pedestrian models ['nonInteracting', 'striping']"); + + oc.doRegister("pedestrian.striping.stripe-width", new Option_Float(0.65)); + oc.addDescription("pedestrian.striping.stripe-width", "Processing", "Width of parallel stripes for segmenting a sidewalk (meters) for use with model 'striping'"); + + oc.doRegister("pedestrian.striping.dawdling", new Option_Float(0.2)); + oc.addDescription("pedestrian.striping.dawdling", "Processing", "factor for random slow-downs [0,1] for use with model 'striping'"); + + oc.doRegister("pedestrian.striping.jamtime", new Option_String("300", "TIME")); + oc.addDescription("pedestrian.striping.jamtime", "Processing", "Time in seconds after which pedestrians start squeezing through a jam when using model 'striping' (non-positive values disable squeezing)"); + + // generic routing options + oc.doRegister("routing-algorithm", new Option_String("dijkstra")); + oc.addDescription("routing-algorithm", "Routing", + "Select among routing algorithms ['dijkstra', 'astar', 'CH', 'CHWrapper']"); + oc.doRegister("weights.random-factor", new Option_Float()); + oc.addDescription("weights.random-factor", "Routing", "Edge weights for routing are dynamically disturbed by a random factor between [1,FLOAT]"); // devices oc.addOptionSubTopic("Emissions"); - MSDevice::insertOptions(oc); + oc.doRegister("phemlight-path", new Option_FileName("./PHEMlight/")); + oc.addDescription("phemlight-path", "Emissions", "Determines where to load PHEMlight definitions from."); + oc.addOptionSubTopic("Communication"); + MSDevice::insertOptions(oc); // register report options oc.doRegister("no-duration-log", new Option_Bool(false)); @@ -285,12 +330,14 @@ oc.addDescription("meso-taujj", "Mesoscopic", "Factor for calculating the jam-jam headway time"); oc.doRegister("meso-jam-threshold", new Option_Float(-1)); oc.addDescription("meso-jam-threshold", "Mesoscopic", "Minimum percentage of occupied space to consider a segment jammed. A negative argument causes thresholds to be computed based on edge speed and tauff (default)"); - oc.doRegister("meso-multi-queue", new Option_Bool(false)); + oc.doRegister("meso-multi-queue", new Option_Bool(true)); oc.addDescription("meso-multi-queue", "Mesoscopic", "Enable multiple queues at edge ends"); oc.doRegister("meso-junction-control", new Option_Bool(false)); oc.addDescription("meso-junction-control", "Mesoscopic", "Enable mesoscopic traffic light and priority junction handling"); oc.doRegister("meso-junction-control.limited", new Option_Bool(false)); oc.addDescription("meso-junction-control.limited", "Mesoscopic", "Enable mesoscopic traffic light and priority junction handling for saturated links. This prevents faulty traffic lights from hindering flow in low-traffic situations"); + oc.doRegister("meso-overtaking", new Option_Bool(false)); + oc.addDescription("meso-overtaking", "Mesoscopic", "Enable mesoscopic overtaking"); oc.doRegister("meso-recheck", new Option_String("0", "TIME")); oc.addDescription("meso-recheck", "Mesoscopic", "Time interval for rechecking insertion into the next segment after failure"); #endif @@ -327,17 +374,21 @@ void MSFrame::buildStreams() { // standard outputs - OutputDevice::createDeviceByOption("netstate-dump", "netstate"); - OutputDevice::createDeviceByOption("summary-output", "summary"); - OutputDevice::createDeviceByOption("tripinfo-output", "tripinfos"); + OutputDevice::createDeviceByOption("netstate-dump", "netstate", "netstate_file.xsd"); + OutputDevice::createDeviceByOption("summary-output", "summary", "summary_file.xsd"); + OutputDevice::createDeviceByOption("tripinfo-output", "tripinfos", "tripinfo_file.xsd"); //extended - OutputDevice::createDeviceByOption("fcd-output", "fcd-export"); - OutputDevice::createDeviceByOption("emission-output", "emission-export"); - OutputDevice::createDeviceByOption("full-output", "full-export"); - OutputDevice::createDeviceByOption("queue-output", "queue-export"); - OutputDevice::createDeviceByOption("vtk-output", "vtk-export"); + OutputDevice::createDeviceByOption("fcd-output", "fcd-export", "fcd_file.xsd"); + OutputDevice::createDeviceByOption("emission-output", "emission-export", "emission_file.xsd"); + OutputDevice::createDeviceByOption("full-output", "full-export", "full_file.xsd"); + OutputDevice::createDeviceByOption("queue-output", "queue-export", "queue_file.xsd"); + OutputDevice::createDeviceByOption("amitran-output", "trajectories", "amitran/trajectories.xsd\" timeStepSize=\"" + toString(STEPS2MS(DELTA_T))); + + //OutputDevice::createDeviceByOption("vtk-output", "vtk-export"); OutputDevice::createDeviceByOption("link-output", "link-output"); + OutputDevice::createDeviceByOption("bt-output", "bt-output"); + #ifdef _DEBUG OutputDevice::createDeviceByOption("movereminder-output", "movereminder-output"); #endif @@ -354,15 +405,8 @@ WRITE_ERROR("No network file (-n) specified."); ok = false; } - if (oc.isSet("incremental-dua-step") && oc.isSet("incremental-dua-base")) { - WRITE_WARNING("The options 'incremental-dua-step' and 'incremental-dua-base' are deprecated, use 'scale' instead."); - if (oc.getInt("incremental-dua-step") > oc.getInt("incremental-dua-base")) { - WRITE_ERROR("Invalid dua step."); - ok = false; - } - } if (!oc.isDefault("scale")) { - if (oc.getFloat("scale") < 0. || oc.getFloat("scale") > 1.) { + if (oc.getFloat("scale") < 0.) { WRITE_ERROR("Invalid scaling factor."); ok = false; } @@ -376,15 +420,23 @@ !oc.isUsableFileList("gui-settings-file")) { ok = false; } - if (oc.isSet("routeDist.maxsize") && oc.getInt("routeDist.maxsize") <= 0) { - WRITE_ERROR("routeDist.maxsize must be positive"); - ok = false; - } #ifdef HAVE_INTERNAL if (oc.getBool("meso-junction-control.limited") && !oc.getBool("meso-junction-control")) { oc.set("meso-junction-control", "true"); } #endif + const SUMOTime begin = string2time(oc.getString("begin")); + const SUMOTime end = string2time(oc.getString("end")); + if (begin < 0) { + WRITE_ERROR("The begin time should not be negative."); + ok = false; + } + if (end != string2time("-1")) { + if (end < begin) { + WRITE_ERROR("The end time should be after the begin time."); + ok = false; + } + } #ifdef HAVE_SUBSECOND_TIMESTEPS if (string2time(oc.getString("step-length")) <= 0) { WRITE_ERROR("the minimum step-length is 0.001"); @@ -412,8 +464,11 @@ #ifdef HAVE_INTERNAL_LANES // set whether internal lanes shall be used MSGlobals::gUsingInternalLanes = !oc.getBool("no-internal-links"); + MSGlobals::gIgnoreJunctionBlocker = string2time(oc.getString("ignore-junction-blocker")) < 0 ? + std::numeric_limits::max() : string2time(oc.getString("ignore-junction-blocker")); #else MSGlobals::gUsingInternalLanes = false; + MSGlobals::gIgnoreJunctionBlocker = 0; #endif // set the grid lock time MSGlobals::gTimeToGridlock = string2time(oc.getString("time-to-teleport")) < 0 ? 0 : string2time(oc.getString("time-to-teleport")); @@ -425,17 +480,16 @@ #ifdef HAVE_INTERNAL MSGlobals::gUseMesoSim = oc.getBool("mesosim"); MSGlobals::gMesoLimitedJunctionControl = oc.getBool("meso-junction-control.limited"); + MSGlobals::gMesoOvertaking = oc.getBool("meso-overtaking"); if (MSGlobals::gUseMesoSim) { MSGlobals::gUsingInternalLanes = false; } #endif + MSAbstractLaneChangeModel::initGlobalOptions(oc); #ifdef HAVE_SUBSECOND_TIMESTEPS DELTA_T = string2time(oc.getString("step-length")); #endif - if (oc.isSet("routeDist.maxsize")) { - MSRoute::setMaxRouteDistSize(oc.getInt("routeDist.maxsize")); - } #ifdef _DEBUG if (oc.isSet("movereminder-output")) { MSBaseVehicle::initMoveReminderOutput(oc); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSFrame.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSFrame.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSFrame.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSFrame.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: MSFrame.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSFrame.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for microsim; inits global outputs and settings /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -74,7 +74,6 @@ * @arg the network-file was specified (otherwise no simulation is existing) * @arg the begin and the end of the simulation must be given * @arg The default lane change model must be known - * @arg incremental-dua-step must be lower than incremental-dua-base * If one is not, false is returned. * * @return Whether the settings are valid diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSGlobals.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSGlobals.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSGlobals.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSGlobals.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file MSGlobals.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date late summer 2003 -/// @version $Id: MSGlobals.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSGlobals.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Some static variables for faster access /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -42,6 +43,7 @@ bool MSGlobals::gOmitEmptyEdgesOnDump; bool MSGlobals::gUsingInternalLanes; +SUMOTime MSGlobals::gIgnoreJunctionBlocker; SUMOTime MSGlobals::gTimeToGridlock; SUMOTime MSGlobals::gTimeToGridlockHighways; @@ -56,13 +58,11 @@ #ifdef HAVE_INTERNAL bool MSGlobals::gUseMesoSim; bool MSGlobals::gMesoLimitedJunctionControl; +bool MSGlobals::gMesoOvertaking; MELoop* MSGlobals::gMesoNet; #else const bool MSGlobals::gUseMesoSim = false; #endif -bool MSGlobals::gDebugFlag1 = false; -bool MSGlobals::gDebugFlag2 = false; - /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSGlobals.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSGlobals.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSGlobals.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSGlobals.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Christian Roessel /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date late summer 2003 -/// @version $Id: MSGlobals.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSGlobals.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Some static variables for faster access /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -69,6 +70,9 @@ /// Information whether the simulation regards internal lanes static bool gUsingInternalLanes; + /// Information whether the simulation regards internal lanes + static SUMOTime gIgnoreJunctionBlocker; + /** information whether the network shall check for collisions */ static bool gCheck4Accidents; @@ -88,6 +92,9 @@ /** Information whether limited junction control shall be used */ static bool gMesoLimitedJunctionControl; + /** Information whether overtaking is enabled in the mesoscopic simulation */ + static bool gMesoOvertaking; + /// mesoscopic simulation infrastructure static MELoop* gMesoNet; #else @@ -96,10 +103,6 @@ #endif - /// @brief global utility flags for debugging - static bool gDebugFlag1; - static bool gDebugFlag2; - }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSInsertionControl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSInsertionControl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSInsertionControl.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSInsertionControl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,14 @@ /// @author Daniel Krajzewicz /// @author Axel Wegener /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Mon, 12 Mar 2001 -/// @version $Id: MSInsertionControl.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSInsertionControl.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Inserts vehicles into the network when their departure time is reached /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,10 +36,13 @@ #include #include #include +#include +#include "MSGlobals.h" #include "MSInsertionControl.h" #include "MSVehicle.h" #include "MSLane.h" #include "MSEdge.h" +#include "MSRouteHandler.h" #ifdef CHECK_MEMORY_LEAKS #include @@ -68,15 +72,19 @@ } -void -MSInsertionControl::add(SUMOVehicleParameter* pars) { +bool +MSInsertionControl::add(SUMOVehicleParameter* const pars) { + if (myFlowIDs.count(pars->id) > 0) { + return false; + } Flow flow; flow.pars = pars; flow.isVolatile = pars->departLaneProcedure == DEPART_LANE_RANDOM || pars->departPosProcedure == DEPART_POS_RANDOM || MSNet::getInstance()->getVehicleControl().hasVTypeDistribution(pars->vtypeid); + flow.index = 0; if (!flow.isVolatile) { - RandomDistributor* dist = MSRoute::distDictionary(pars->routeid); + const RandomDistributor* dist = MSRoute::distDictionary(pars->routeid); if (dist != 0) { const std::vector& routes = dist->getVals(); const MSEdge* e = 0; @@ -94,51 +102,37 @@ } flow.vehicle = 0; myFlows.push_back(flow); + myFlowIDs.insert(pars->id); + return true; } unsigned int MSInsertionControl::emitVehicles(SUMOTime time) { - checkPrevious(time); // check whether any vehicles shall be emitted within this time step - if (!myAllVeh.anyWaitingFor(time) && myRefusedEmits1.empty() && myRefusedEmits2.empty() && myFlows.empty()) { + const bool havePreChecked = MSDevice_Routing::isEnabled(); + if (myPendingEmits.empty() || (havePreChecked && myEmitCandidates.empty())) { return 0; } - unsigned int noEmitted = 0; + unsigned int numEmitted = 0; // we use buffering for the refused emits to save time // for this, we have two lists; one contains previously refused emits, the second // will be used to append those vehicles that will not be able to depart in this // time step - assert(myRefusedEmits1.size() == 0 || myRefusedEmits2.size() == 0); - MSVehicleContainer::VehicleVector& refusedEmits = - myRefusedEmits1.size() == 0 ? myRefusedEmits1 : myRefusedEmits2; - MSVehicleContainer::VehicleVector& previousRefused = - myRefusedEmits2.size() == 0 ? myRefusedEmits1 : myRefusedEmits2; + MSVehicleContainer::VehicleVector refusedEmits; // go through the list of previously refused vehicles, first MSVehicleContainer::VehicleVector::const_iterator veh; - for (veh = previousRefused.begin(); veh != previousRefused.end(); veh++) { - noEmitted += tryInsert(time, *veh, refusedEmits); - } - // clear previously refused vehicle container - previousRefused.clear(); - - // Insert vehicles from myTrips into the net until the next vehicle's - // departure time is greater than the current time. - // Retrieve the list of vehicles to emit within this time step - - noEmitted += checkFlows(time, refusedEmits); - while (myAllVeh.anyWaitingFor(time)) { - const MSVehicleContainer::VehicleVector& next = myAllVeh.top(); - // go through the list and try to emit - for (veh = next.begin(); veh != next.end(); veh++) { - noEmitted += tryInsert(time, *veh, refusedEmits); + for (veh = myPendingEmits.begin(); veh != myPendingEmits.end(); veh++) { + if (havePreChecked && (myEmitCandidates.count(*veh) == 0)) { + refusedEmits.push_back(*veh); + } else { + numEmitted += tryInsert(time, *veh, refusedEmits); } - // let the MSVehicleContainer clear the vehicles - myAllVeh.pop(); } - // Return the number of emitted vehicles - return noEmitted; + myEmitCandidates.clear(); + myPendingEmits = refusedEmits; + return numEmitted; } @@ -148,7 +142,7 @@ assert(veh->getParameter().depart < time + DELTA_T); const MSEdge& edge = *veh->getEdge(); if ((!myCheckEdgesOnce || edge.getLastFailedInsertionTime() != time) && edge.insertVehicle(*veh, time)) { - // Successful emission. + // Successful insertion checkFlowWait(veh); veh->onDepart(); return 1; @@ -187,45 +181,73 @@ void -MSInsertionControl::checkPrevious(SUMOTime time) { - // check to which list append to - MSVehicleContainer::VehicleVector& previousRefused = - myRefusedEmits2.size() == 0 ? myRefusedEmits1 : myRefusedEmits2; - while (!myAllVeh.isEmpty() && myAllVeh.topTime() < time) { +MSInsertionControl::checkCandidates(SUMOTime time, const bool preCheck) { + while (myAllVeh.anyWaitingBefore(time + DELTA_T)) { const MSVehicleContainer::VehicleVector& top = myAllVeh.top(); - copy(top.begin(), top.end(), back_inserter(previousRefused)); + copy(top.begin(), top.end(), back_inserter(myPendingEmits)); myAllVeh.pop(); } + if (preCheck) { + MSVehicleContainer::VehicleVector::const_iterator veh; + for (veh = myPendingEmits.begin(); veh != myPendingEmits.end(); veh++) { + SUMOVehicle* const v = *veh; + const MSEdge* const edge = v->getEdge(); + if ((!myCheckEdgesOnce || edge->getLastFailedInsertionTime() != time) && edge->insertVehicle(*v, time, true)) { + myEmitCandidates.insert(v); + } else { + MSDevice_Routing* dev = static_cast(v->getDevice(typeid(MSDevice_Routing))); + if (dev != 0) { + dev->skipRouting(time); + } + } + } + } } -unsigned int -MSInsertionControl::checkFlows(SUMOTime time, - MSVehicleContainer::VehicleVector& refusedEmits) { +void +MSInsertionControl::determineCandidates(SUMOTime time) { MSVehicleControl& vehControl = MSNet::getInstance()->getVehicleControl(); - unsigned int noEmitted = 0; for (std::vector::iterator i = myFlows.begin(); i != myFlows.end();) { SUMOVehicleParameter* pars = i->pars; - if (!i->isVolatile && i->vehicle != 0) { + if (!i->isVolatile && i->vehicle != 0 && pars->repetitionProbability < 0) { ++i; + //std::cout << SIMTIME << " volatile=" << i->isVolatile << " veh=" << i->vehicle << "\n"; continue; } - while (pars->repetitionsDone < pars->repetitionNumber && - pars->depart + pars->repetitionsDone * pars->repetitionOffset < time + DELTA_T) { + bool tryEmitByProb = pars->repetitionProbability > 0; + while ((pars->repetitionProbability < 0 + && pars->repetitionsDone < pars->repetitionNumber + && pars->depart + pars->repetitionsDone * pars->repetitionOffset < time + DELTA_T) + || (tryEmitByProb + && pars->depart < time + DELTA_T + && pars->repetitionEnd > time + // only call rand if all other conditions are met + && RandHelper::rand() < (pars->repetitionProbability * TS)) + ) { + tryEmitByProb = false; // only emit one per step SUMOVehicleParameter* newPars = new SUMOVehicleParameter(*pars); - newPars->id = pars->id + "." + toString(pars->repetitionsDone); - newPars->depart = static_cast(pars->depart + pars->repetitionsDone * pars->repetitionOffset); + newPars->id = pars->id + "." + toString(i->index); + newPars->depart = pars->repetitionProbability > 0 ? time : (SUMOTime)(pars->depart + pars->repetitionsDone * pars->repetitionOffset); pars->repetitionsDone++; // try to build the vehicle if (vehControl.getVehicle(newPars->id) == 0) { const MSRoute* route = MSRoute::dictionary(pars->routeid); - const MSVehicleType* vtype = vehControl.getVType(pars->vtypeid); - i->vehicle = vehControl.buildVehicle(newPars, route, vtype); - if (vehControl.isInQuota()) { + const MSVehicleType* vtype = vehControl.getVType(pars->vtypeid, MSRouteHandler::getParsingRNG()); + i->vehicle = vehControl.buildVehicle(newPars, route, vtype, false); + unsigned int quota = vehControl.getQuota(); + if (quota > 0) { vehControl.addVehicle(newPars->id, i->vehicle); - noEmitted += tryInsert(time, i->vehicle, refusedEmits); - if (!i->isVolatile && i->vehicle != 0) { - break; + add(i->vehicle); + i->index++; + while (--quota > 0) { + SUMOVehicleParameter* quotaPars = new SUMOVehicleParameter(*pars); + quotaPars->id = pars->id + "." + toString(i->index); + quotaPars->depart = pars->repetitionProbability > 0 ? time : (SUMOTime)(pars->depart + pars->repetitionsDone * pars->repetitionOffset); + i->vehicle = vehControl.buildVehicle(quotaPars, route, vtype, false); + vehControl.addVehicle(quotaPars->id, i->vehicle); + add(i->vehicle); + i->index++; } } else { vehControl.deleteVehicle(i->vehicle, true); @@ -239,20 +261,21 @@ throw ProcessError("Another vehicle with the id '" + newPars->id + "' exists."); } } - if (pars->repetitionsDone == pars->repetitionNumber) { + if (pars->repetitionsDone == pars->repetitionNumber || (pars->repetitionProbability > 0 && pars->repetitionEnd <= time)) { i = myFlows.erase(i); - delete(pars); + MSRoute::checkDist(pars->routeid); + delete pars; } else { ++i; } } - return noEmitted; + checkCandidates(time, MSDevice_Routing::isEnabled()); } unsigned int MSInsertionControl::getWaitingVehicleNo() const { - return (unsigned int)(myRefusedEmits1.size() + myRefusedEmits2.size()); + return (unsigned int)myPendingEmits.size(); } @@ -267,5 +290,20 @@ myAbortedEmits.insert(veh); } +void +MSInsertionControl::clearPendingVehicles(std::string& route) { + //clear out the refused vehicle list, deleting the vehicles entirely + MSVehicleContainer::VehicleVector::iterator veh; + for (veh = myPendingEmits.begin(); veh != myPendingEmits.end();) { + if ((*veh)->getRoute().getID() == route || route == "") { + myVehicleControl.deleteVehicle(*veh, true); + veh = myPendingEmits.erase(veh); + } else { + ++veh; + } + } +} + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSInsertionControl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSInsertionControl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSInsertionControl.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSInsertionControl.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Christian Roessel /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Mon, 12 Mar 2001 -/// @version $Id: MSInsertionControl.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSInsertionControl.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Inserts vehicles into the network when their departure time is reached /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -109,8 +110,9 @@ /** @brief Adds parameter for a vehicle flow for departure * * @param[in] flow The flow to add for later insertion + * @return whether it could be added (no other flow with the same id was present) */ - void add(SUMOVehicleParameter* pars); + bool add(SUMOVehicleParameter* const pars); /** @brief Returns the number of waiting vehicles @@ -134,6 +136,17 @@ void descheduleDeparture(SUMOVehicle* veh); + /// @brief clears out all pending vehicles from a route, "" for all routes + void clearPendingVehicles(std::string& route); + + + /** @brief Checks for all vehicles whether they can be emitted + * + * @param[in] time The current simulation time + */ + void determineCandidates(SUMOTime time); + + private: /** @brief Tries to emit the vehicle * @@ -165,17 +178,7 @@ * @param[in] time The current simulation time * @todo recheck */ - void checkPrevious(SUMOTime time); - - - /** @brief Checks for all vehicles coming from flows whether they can be emitted - * - * @param[in] time The current simulation time - * @param[in] refusedEmits Container to insert vehicles that could not be emitted into - * @return The number of emitted vehicles - */ - unsigned int checkFlows(SUMOTime time, - MSVehicleContainer::VehicleVector& refusedEmits); + void checkCandidates(SUMOTime time, const bool preCheck); private: @@ -186,7 +189,10 @@ MSVehicleContainer myAllVeh; /// @brief Buffers for vehicles that could not be inserted - MSVehicleContainer::VehicleVector myRefusedEmits1, myRefusedEmits2; + MSVehicleContainer::VehicleVector myPendingEmits; + + /// @brief Buffer for vehicles that may be inserted in the current step + std::set myEmitCandidates; /// @brief Set of vehicles which shall not be inserted anymore std::set myAbortedEmits; @@ -201,11 +207,16 @@ bool isVolatile; /// @brief The last created vehicle SUMOVehicle* vehicle; + /// @brief the running index + unsigned int index; }; /// @brief Container for periodical vehicle parameters std::vector myFlows; + /// @brief Cache for periodical vehicle ids for quicker checking + std::set myFlowIDs; + /// @brief The maximum waiting time; vehicles waiting longer are deleted (-1: no deletion) SUMOTime myMaxDepartDelay; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSInternalJunction.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSInternalJunction.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSInternalJunction.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSInternalJunction.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Christian Roessel /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Wed, 12 Dez 2001 -/// @version $Id: MSInternalJunction.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSInternalJunction.cpp 18153 2015-03-26 08:19:10Z namdre $ /// // junction. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -31,9 +32,10 @@ #endif #include "MSInternalJunction.h" +#include "MSRightOfWayJunction.h" #include "MSLane.h" +#include "MSEdge.h" #include "MSJunctionLogic.h" -#include "MSBitSetLogic.h" #include #include #include @@ -48,11 +50,12 @@ // =========================================================================== #ifdef HAVE_INTERNAL_LANES MSInternalJunction::MSInternalJunction(const std::string& id, + SumoXMLNodeType type, const Position& position, const PositionVector& shape, std::vector incoming, std::vector internal) - : MSLogicJunction(id, position, shape, incoming, internal) {} + : MSLogicJunction(id, type, position, shape, incoming, internal) {} @@ -66,14 +69,26 @@ } // the first lane in the list of incoming lanes is special. It defines the // link that needs to do all the checking for this internal junction - assert(myIncomingLanes[0]->getLinkCont().size() == 1); - MSLink* thisLink = myIncomingLanes[0]->getLinkCont()[0]; + const MSLane* specialLane = myIncomingLanes[0]; + assert(specialLane->getLinkCont().size() == 1); + MSLink* thisLink = specialLane->getLinkCont()[0]; + const MSRightOfWayJunction* parent = dynamic_cast(specialLane->getEdge().getToJunction()); + assert(parent != 0); + const int ownLinkIndex = specialLane->getIncomingLanes()[0].viaLink->getIndex(); + const MSLogicJunction::LinkFoes& foeLinks = parent->getLogic()->getFoesFor(ownLinkIndex); // inform links where they have to report approaching vehicles to unsigned int requestPos = 0; for (std::vector::iterator i = myInternalLanes.begin(); i != myInternalLanes.end(); ++i) { const MSLinkCont& lc = (*i)->getLinkCont(); for (MSLinkCont::const_iterator q = lc.begin(); q != lc.end(); ++q) { if ((*q)->getViaLane() != 0) { + const int foeIndex = (*i)->getIncomingLanes()[0].viaLink->getIndex(); + if (foeLinks.test(foeIndex)) { + // only respect vehicles before internal junctions if they + // have priority (see the analogous foeLinks.test() when + // initializing myLinkFoeInternalLanes in MSRightOfWayJunction + myInternalLaneFoes.push_back(*i); + } myInternalLaneFoes.push_back((*q)->getViaLane()); } else { myInternalLaneFoes.push_back(*i); @@ -92,10 +107,12 @@ myInternalLinkFoes.push_back(*j); } } - thisLink->setRequestInformation(requestPos, requestPos, true, false, myInternalLinkFoes, myInternalLaneFoes); + // thisLinks is itself an exitLink of the preceding internal lane + thisLink->setRequestInformation((int)requestPos, true, false, myInternalLinkFoes, myInternalLaneFoes, thisLink->getViaLane()->getLogicalPredecessorLane()); assert(thisLink->getViaLane()->getLinkCont().size() == 1); MSLink* exitLink = thisLink->getViaLane()->getLinkCont()[0]; - exitLink->setRequestInformation(requestPos, requestPos, false, false, std::vector(), myInternalLaneFoes); + exitLink->setRequestInformation((int)requestPos, false, false, std::vector(), + myInternalLaneFoes, thisLink->getViaLane()); for (std::vector::const_iterator k = myInternalLinkFoes.begin(); k != myInternalLinkFoes.end(); ++k) { thisLink->addBlockedLink(*k); (*k)->addBlockedLink(thisLink); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSInternalJunction.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSInternalJunction.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSInternalJunction.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSInternalJunction.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 12 Dez 2001 -/// @version $Id: MSInternalJunction.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSInternalJunction.h 18095 2015-03-17 09:39:00Z behrisch $ /// // junction. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -66,7 +66,7 @@ * @param[in] incoming The incoming lanes * @param[in] internal The internal lanes */ - MSInternalJunction(const std::string& id, const Position& position, + MSInternalJunction(const std::string& id, SumoXMLNodeType type, const Position& position, const PositionVector& shape, std::vector incoming, std::vector internal); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSJunctionControl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSJunctionControl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSJunctionControl.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSJunctionControl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Tue, 06 Mar 2001 -/// @version $Id: MSJunctionControl.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSJunctionControl.cpp 18168 2015-03-27 13:28:26Z behrisch $ /// // Container for junctions; performs operations on all stored junctions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -32,6 +32,7 @@ #include "MSJunctionControl.h" #include "MSJunction.h" +#include "MSInternalJunction.h" #include #ifdef CHECK_MEMORY_LEAKS @@ -53,9 +54,24 @@ void MSJunctionControl::postloadInitContainer() { const std::vector& junctions = buildAndGetStaticVector(); +#ifdef HAVE_INTERNAL_LANES + // initialize normal junctions before internal junctions + // (to allow calling getIndex() during initialization of internal junction links) + for (std::vector::const_iterator i = junctions.begin(); i != junctions.end(); ++i) { + if (dynamic_cast(*i) == 0) { + (*i)->postloadInit(); + } + } + for (std::vector::const_iterator i = junctions.begin(); i != junctions.end(); ++i) { + if (dynamic_cast(*i) != 0) { + (*i)->postloadInit(); + } + } +#else for (std::vector::const_iterator i = junctions.begin(); i != junctions.end(); ++i) { (*i)->postloadInit(); } +#endif } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSJunctionControl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSJunctionControl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSJunctionControl.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSJunctionControl.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Mon, 12 Mar 2001 -/// @version $Id: MSJunctionControl.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSJunctionControl.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Container for junctions; performs operations on all stored junctions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSJunction.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSJunction.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSJunction.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSJunction.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 12 Dez 2001 -/// @version $Id: MSJunction.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSJunction.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The base class for an intersection /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -42,13 +42,16 @@ // =========================================================================== class MSLink; +// =========================================================================== +// static member definitions +// =========================================================================== // =========================================================================== // member method definition // =========================================================================== -MSJunction::MSJunction(const std::string& id, const Position& position, +MSJunction::MSJunction(const std::string& id, SumoXMLNodeType type, const Position& position, const PositionVector& shape) - : Named(id), myPosition(position), myShape(shape) {} + : Named(id), myType(type), myPosition(position), myShape(shape) {} MSJunction::~MSJunction() {} @@ -64,6 +67,5 @@ MSJunction::postloadInit() {} - /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSJunction.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSJunction.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSJunction.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSJunction.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Wed, 12 Dez 2001 -/// @version $Id: MSJunction.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSJunction.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The base class for an intersection /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -41,11 +41,15 @@ #include #include #include +#include class MSVehicle; class MSLink; class MSLane; +class MSEdge; + +typedef std::vector ConstMSEdgeVector; // =========================================================================== // class definitions @@ -61,7 +65,9 @@ * @param[in] position The position of the junction * @param[in] shape The shape of the junction */ - MSJunction(const std::string& id, const Position& position, + MSJunction(const std::string& id, + SumoXMLNodeType type, + const Position& position, const PositionVector& shape); @@ -93,7 +99,32 @@ return myEmptyLanes; } + inline const ConstMSEdgeVector& getIncoming() const { + return myIncoming; + } + + inline const ConstMSEdgeVector& getOutgoing() const { + return myOutgoing; + } + + void addIncoming(MSEdge* edge) { + myIncoming.push_back(edge); + } + + void addOutgoing(MSEdge* edge) { + myOutgoing.push_back(edge); + } + + /// @brief return the type of this Junction + SumoXMLNodeType getType() const { + return myType; + } + + protected: + /// @brief Tye type of this junction + SumoXMLNodeType myType; + /// @brief The position of the junction Position myPosition; @@ -104,7 +135,13 @@ std::vector myEmptyLanes; + /// @brief incoming edges + ConstMSEdgeVector myIncoming; + /// @brief outgoing edges + ConstMSEdgeVector myOutgoing; + /// @brief definition of the static dictionary type + typedef std::map DictType; private: /// @brief Invalidated copy constructor. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSJunctionLogic.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSJunctionLogic.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSJunctionLogic.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSJunctionLogic.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 12 Dez 2001 -/// @version $Id: MSJunctionLogic.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSJunctionLogic.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // kinds of logic-implementations. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSJunctionLogic.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSJunctionLogic.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSJunctionLogic.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSJunctionLogic.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @date Wed, 12 Dez 2001 -/// @version $Id: MSJunctionLogic.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSJunctionLogic.h 18095 2015-03-17 09:39:00Z behrisch $ /// // kinds of logic-implementations. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -71,7 +71,7 @@ return myNLinks; } - virtual bool isCrossing() const { + virtual bool hasFoes() const { return false; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLaneChanger.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLaneChanger.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLaneChanger.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLaneChanger.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,13 +5,14 @@ /// @author Laura Bieker /// @author Michael Behrisch /// @author Friedemann Wesner +/// @author Jakob Erdmann /// @date Fri, 01 Feb 2002 -/// @version $Id: MSLaneChanger.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSLaneChanger.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Performs lane changing of vehicles /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -32,6 +33,7 @@ #endif #include "MSLaneChanger.h" +#include "MSNet.h" #include "MSVehicle.h" #include "MSVehicleType.h" #include "MSVehicleTransfer.h" @@ -40,7 +42,7 @@ #include #include #include -#include +#include #include #ifdef CHECK_MEMORY_LEAKS @@ -58,13 +60,13 @@ // =========================================================================== // member method definitions // =========================================================================== -MSLaneChanger::MSLaneChanger(std::vector* lanes, bool allowSwap) +MSLaneChanger::MSLaneChanger(const std::vector* lanes, bool allowSwap) : myAllowsSwap(allowSwap) { assert(lanes->size() > 1); // Fill the changer with the lane-data. myChanger.reserve(lanes->size()); - for (std::vector::iterator lane = lanes->begin(); lane != lanes->end(); ++lane) { + for (std::vector::const_iterator lane = lanes->begin(); lane != lanes->end(); ++lane) { ChangeElem ce; ce.follow = 0; ce.lead = 0; @@ -72,6 +74,7 @@ ce.veh = (*lane)->myVehicles.rbegin(); ce.hoppedVeh = 0; ce.lastBlocked = 0; + ce.firstBlocked = 0; myChanger.push_back(ce); } } @@ -88,7 +91,6 @@ // Finally, the change-result has to be given back to the lanes. initChanger(); while (vehInChanger()) { - bool haveChanged = change(); updateChanger(haveChanged); } @@ -103,6 +105,7 @@ ce->lead = 0; ce->hoppedVeh = 0; ce->lastBlocked = 0; + ce->firstBlocked = 0; ce->dens = 0; MSLane::VehCont& vehicles = ce->lane->myVehicles; @@ -147,35 +150,27 @@ return false; // !!! temporary; just because it broke, here } #endif - const std::vector& preb = vehicle->getBestLanes(); - assert(preb.size() == myChanger.size()); + vehicle->updateBestLanes(); // needed? for (int i = 0; i < (int) myChanger.size(); ++i) { - ((std::vector&) preb)[i].occupation = myChanger[i].dens + preb[i].nextOccupation; + vehicle->adaptBestLanesOccupation(i, myChanger[i].dens); } - - vehicle->getLaneChangeModel().prepareStep(); + const std::vector& preb = vehicle->getBestLanes(); std::pair leader = getRealThisLeader(myCandi); // check whether the vehicle wants and is able to change to right lane int state1 = 0; if (myCandi != myChanger.begin() && (myCandi - 1)->lane->allowsVehicleClass(veh(myCandi)->getVehicleType().getVehicleClass())) { - std::pair rLead = getRealLeader(myCandi - 1); - std::pair rFollow = getRealFollower(myCandi - 1); - state1 = change2right(leader, rLead, rFollow, preb); - if ((state1 & LCA_URGENT) != 0 || (state1 & LCA_SPEEDGAIN) != 0) { - state1 |= LCA_RIGHT; - } + state1 = checkChange(-1, leader, preb); bool changingAllowed1 = (state1 & LCA_BLOCKED) == 0; // change if the vehicle wants to and is allowed to change if ((state1 & LCA_RIGHT) != 0 && changingAllowed1) { -#ifndef NO_TRACI - // inform lane change model about this change - vehicle->getLaneChangeModel().fulfillChangeRequest(MSVehicle::REQUEST_RIGHT); -#endif startChange(vehicle, myCandi, -1); return true; } if ((state1 & LCA_RIGHT) != 0 && (state1 & LCA_URGENT) != 0) { (myCandi - 1)->lastBlocked = vehicle; + if ((myCandi - 1)->firstBlocked == 0) { + (myCandi - 1)->firstBlocked = vehicle; + } } } @@ -184,46 +179,42 @@ // check whether the vehicle wants and is able to change to left lane int state2 = 0; if ((myCandi + 1) != myChanger.end() && (myCandi + 1)->lane->allowsVehicleClass(veh(myCandi)->getVehicleType().getVehicleClass())) { - std::pair lLead = getRealLeader(myCandi + 1); - std::pair lFollow = getRealFollower(myCandi + 1); - state2 = change2left(leader, lLead, lFollow, preb); - if ((state2 & LCA_URGENT) != 0 || (state2 & LCA_SPEEDGAIN) != 0) { - state2 |= LCA_LEFT; - } + state2 = checkChange(1, leader, preb); bool changingAllowed2 = (state2 & LCA_BLOCKED) == 0; - //vehicle->getLaneChangeModel().setOwnState(state2|state1); // change if the vehicle wants to and is allowed to change if ((state2 & LCA_LEFT) != 0 && changingAllowed2) { -#ifndef NO_TRACI - // inform lane change model about this change - vehicle->getLaneChangeModel().fulfillChangeRequest(MSVehicle::REQUEST_LEFT); -#endif startChange(vehicle, myCandi, 1); return true; } if ((state2 & LCA_LEFT) != 0 && (state2 & LCA_URGENT) != 0) { (myCandi + 1)->lastBlocked = vehicle; + if ((myCandi + 1)->firstBlocked == 0) { + (myCandi + 1)->firstBlocked = vehicle; + } } } - vehicle->getLaneChangeModel().setOwnState(state2 | state1); if ((state1 & (LCA_URGENT)) != 0 && (state2 & (LCA_URGENT)) != 0) { // ... wants to go to the left AND to the right // just let them go to the right lane... state2 = 0; - vehicle->getLaneChangeModel().setOwnState(state1); } + vehicle->getLaneChangeModel().setOwnState(state2 | state1); + // check whether the vehicles should be swapped if (myAllowsSwap && ((state1 & (LCA_URGENT)) != 0 || (state2 & (LCA_URGENT)) != 0)) { // get the direction ... ChangerIt target; + int direction = 0; if ((state1 & (LCA_URGENT)) != 0) { // ... wants to go right target = myCandi - 1; + direction = -1; } if ((state2 & (LCA_URGENT)) != 0) { // ... wants to go left target = myCandi + 1; + direction = 1; } MSVehicle* prohibitor = target->lead; if (target->hoppedVeh != 0) { @@ -248,8 +239,7 @@ // remove vehicle to swap with MSLane::VehCont::iterator i = find(target->lane->myTmpVehicles.begin(), target->lane->myTmpVehicles.end(), prohibitor); if (i != target->lane->myTmpVehicles.end()) { - MSVehicle* bla = *i; - assert(bla == prohibitor); + assert(*i == prohibitor); target->lane->myTmpVehicles.erase(i); // set this vehicle target->hoppedVeh = vehicle; @@ -271,8 +261,8 @@ vehicle->enterLaneAtLaneChange(target->lane); prohibitor->enterLaneAtLaneChange(myCandi->lane); // mark lane change - vehicle->getLaneChangeModel().changed(); - prohibitor->getLaneChangeModel().changed(); + vehicle->getLaneChangeModel().changed(direction); + prohibitor->getLaneChangeModel().changed(-direction); (myCandi)->dens += prohibitor->getVehicleType().getLengthWithGap(); (target)->dens += vehicle->getVehicleType().getLengthWithGap(); return true; @@ -320,7 +310,7 @@ return std::pair(predP, targetLane->getPartialOccupatorEnd() - veh(myCandi)->getPositionOnLane()); } const std::vector& bestLaneConts = veh(myCandi)->getBestLanesContinuation(); - MSLinkCont::const_iterator link = targetLane->succLinkSec(*veh(myCandi), 1, *targetLane, bestLaneConts); + MSLinkCont::const_iterator link = MSLane::succLinkSec(*veh(myCandi), 1, *targetLane, bestLaneConts); if (targetLane->isLinkEnd(link)) { return std::pair(static_cast(0), -1); } @@ -349,7 +339,7 @@ MSLaneChanger::getRealLeader(const ChangerIt& target) const { // get the leading vehicle on the lane to change to MSVehicle* neighLead = target->lead; - // check whether the hopped vehicle got the leader + // check whether the hopped vehicle became the leader if (target->hoppedVeh != 0) { SUMOReal hoppedPos = target->hoppedVeh->getPositionOnLane(); if (hoppedPos > veh(myCandi)->getPositionOnLane() && (neighLead == 0 || neighLead->getPositionOnLane() > hoppedPos)) { @@ -380,26 +370,22 @@ std::pair MSLaneChanger::getRealFollower(const ChangerIt& target) const { MSVehicle* neighFollow = veh(target); - // check whether the hopped vehicle got the follower + // check whether the hopped vehicle became the follower if (target->hoppedVeh != 0) { SUMOReal hoppedPos = target->hoppedVeh->getPositionOnLane(); - if (hoppedPos <= veh(myCandi)->getPositionOnLane() && (neighFollow == 0 || neighFollow->getPositionOnLane() > hoppedPos)) { + if (hoppedPos <= veh(myCandi)->getPositionOnLane() && (neighFollow == 0 || neighFollow->getPositionOnLane() < hoppedPos)) { neighFollow = target->hoppedVeh; } } if (neighFollow == 0) { - SUMOReal speed = target->lane->getSpeedLimit(); - // in order to look back, we'd need the minimum braking ability of vehicles in the net... - // we'll assume it to be 4m/s^2 - // !!!revisit - SUMOReal dist = speed * speed / (2.*4.) + SPEED2DIST(speed); - dist = MIN2(dist, (SUMOReal) 500.); MSVehicle* candi = veh(myCandi); - SUMOReal seen = candi->getPositionOnLane() - candi->getVehicleType().getLength(); - return target->lane->getFollowerOnConsecutive(dist, seen, candi->getSpeed(), candi->getPositionOnLane() - candi->getVehicleType().getLength(), 4.5);//!!! recheck + return target->lane->getFollowerOnConsecutive( + candi->getPositionOnLane() - candi->getVehicleType().getLength(), + candi->getSpeed(), candi->getCarFollowModel().getMaxDecel()); } else { MSVehicle* candi = veh(myCandi); - return std::pair(neighFollow, candi->getPositionOnLane() - candi->getVehicleType().getLength() - neighFollow->getPositionOnLane() - neighFollow->getVehicleType().getMinGap()); + return std::pair(neighFollow, + candi->getPositionOnLane() - candi->getVehicleType().getLength() - neighFollow->getPositionOnLane() - neighFollow->getVehicleType().getMinGap()); } } @@ -474,86 +460,71 @@ return max; } - int -MSLaneChanger::change2right(const std::pair& leader, - const std::pair& rLead, - const std::pair& rFollow, - const std::vector& preb) const { - ChangerIt target = myCandi - 1; - int blocked = overlapWithHopped(target) - ? target->hoppedVeh->getPositionOnLane() < veh(myCandi)->getPositionOnLane() - ? LCA_BLOCKED_BY_RIGHT_FOLLOWER - : LCA_BLOCKED_BY_RIGHT_LEADER - : 0; +MSLaneChanger::checkChange( + int laneOffset, + const std::pair& leader, + const std::vector& preb) const { + std::pair neighLead = getRealLeader(myCandi + laneOffset); + std::pair neighFollow = getRealFollower(myCandi + laneOffset); + MSVehicle* vehicle = veh(myCandi); + ChangerIt target = myCandi + laneOffset; + int blocked = 0; + int blockedByLeader = (laneOffset == -1 ? LCA_BLOCKED_BY_RIGHT_LEADER : LCA_BLOCKED_BY_LEFT_LEADER); + int blockedByFollower = (laneOffset == -1 ? LCA_BLOCKED_BY_RIGHT_FOLLOWER : LCA_BLOCKED_BY_LEFT_FOLLOWER); // overlap - if (rFollow.first != 0 && rFollow.second < 0) { - blocked |= (LCA_BLOCKED_BY_RIGHT_FOLLOWER); + if (neighFollow.first != 0 && neighFollow.second < 0) { + blocked |= (blockedByFollower | LCA_OVERLAPPING); } - if (rLead.first != 0 && rLead.second < 0) { - blocked |= (LCA_BLOCKED_BY_RIGHT_LEADER); + if (neighLead.first != 0 && neighLead.second < 0) { + blocked |= (blockedByLeader | LCA_OVERLAPPING); } // safe back gap - if (rFollow.first != 0) { + if (neighFollow.first != 0) { // !!! eigentlich: vsafe braucht die Max. Geschwindigkeit beider Spuren - if (rFollow.second < rFollow.first->getCarFollowModel().getSecureGap(rFollow.first->getSpeed(), veh(myCandi)->getSpeed(), veh(myCandi)->getCarFollowModel().getMaxDecel())) { - blocked |= LCA_BLOCKED_BY_RIGHT_FOLLOWER; + if (neighFollow.second < neighFollow.first->getCarFollowModel().getSecureGap(neighFollow.first->getSpeed(), vehicle->getSpeed(), vehicle->getCarFollowModel().getMaxDecel())) { + blocked |= blockedByFollower; } } // safe front gap - if (rLead.first != 0) { + if (neighLead.first != 0) { // !!! eigentlich: vsafe braucht die Max. Geschwindigkeit beider Spuren - if (rLead.second < veh(myCandi)->getCarFollowModel().getSecureGap(veh(myCandi)->getSpeed(), rLead.first->getSpeed(), rLead.first->getCarFollowModel().getMaxDecel())) { - blocked |= LCA_BLOCKED_BY_RIGHT_LEADER; + if (neighLead.second < vehicle->getCarFollowModel().getSecureGap(vehicle->getSpeed(), neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel())) { + blocked |= blockedByLeader; } } - MSAbstractLaneChangeModel::MSLCMessager msg(leader.first, rLead.first, rFollow.first); - return blocked | veh(myCandi)->getLaneChangeModel().wantsChangeToRight( - msg, blocked, leader, rLead, rFollow, *(myCandi - 1)->lane, preb, &(myCandi->lastBlocked)); -} - - -int -MSLaneChanger::change2left(const std::pair& leader, - const std::pair& rLead, - const std::pair& rFollow, - const std::vector& preb) const { - ChangerIt target = myCandi + 1; - int blocked = overlapWithHopped(target) - ? target->hoppedVeh->getPositionOnLane() < veh(myCandi)->getPositionOnLane() - ? LCA_BLOCKED_BY_LEFT_FOLLOWER - : LCA_BLOCKED_BY_LEFT_LEADER - : 0; - // overlap - if (rFollow.first != 0 && rFollow.second < 0) { - blocked |= (LCA_BLOCKED_BY_LEFT_FOLLOWER); - } - if (rLead.first != 0 && rLead.second < 0) { - blocked |= (LCA_BLOCKED_BY_LEFT_LEADER); - } - // safe back gap - if (rFollow.first != 0) { - // !!! eigentlich: vsafe braucht die Max. Geschwindigkeit beider Spuren - if (rFollow.second < rFollow.first->getCarFollowModel().getSecureGap(rFollow.first->getSpeed(), veh(myCandi)->getSpeed(), veh(myCandi)->getCarFollowModel().getMaxDecel())) { - blocked |= LCA_BLOCKED_BY_LEFT_FOLLOWER; - } - } - // safe front gap - if (rLead.first != 0) { - // !!! eigentlich: vsafe braucht die Max. Geschwindigkeit beider Spuren - if (rLead.second < veh(myCandi)->getCarFollowModel().getSecureGap(veh(myCandi)->getSpeed(), rLead.first->getSpeed(), rLead.first->getCarFollowModel().getMaxDecel())) { - blocked |= LCA_BLOCKED_BY_LEFT_LEADER; + MSAbstractLaneChangeModel::MSLCMessager msg(leader.first, neighLead.first, neighFollow.first); + int state = blocked | vehicle->getLaneChangeModel().wantsChange( + laneOffset, msg, blocked, leader, neighLead, neighFollow, *(target->lane), preb, &(myCandi->lastBlocked), &(myCandi->firstBlocked)); + + if (blocked == 0 && (state & LCA_WANTS_LANECHANGE) != 0 && neighLead.first != 0) { + // do are more carefull (but expensive) check to ensure that a + // safety-critical leader is not being overloocked + const SUMOReal seen = myCandi->lane->getLength() - vehicle->getPositionOnLane(); + const SUMOReal speed = vehicle->getSpeed(); + const SUMOReal dist = vehicle->getCarFollowModel().brakeGap(speed) + vehicle->getVehicleType().getMinGap(); + const MSLane* targetLane = (myCandi + laneOffset)->lane; + if (seen < dist) { + std::pair neighLead2 = targetLane->getCriticalLeader(dist, seen, speed, *vehicle); + if (neighLead2.first != 0 && neighLead2.first != neighLead.first + && (neighLead2.second < vehicle->getCarFollowModel().getSecureGap( + vehicle->getSpeed(), neighLead2.first->getSpeed(), neighLead2.first->getCarFollowModel().getMaxDecel()))) { + state |= blockedByLeader; + } } } - MSAbstractLaneChangeModel::MSLCMessager msg(leader.first, rLead.first, rFollow.first); - return blocked | veh(myCandi)->getLaneChangeModel().wantsChangeToLeft( - msg, blocked, leader, rLead, rFollow, *(myCandi + 1)->lane, preb, &(myCandi->lastBlocked)); +#ifndef NO_TRACI + // let TraCI influence the wish to change lanes and the security to take + //const int oldstate = state; + state = vehicle->influenceChangeDecision(state); + //if (vehicle->getID() == "150_2_36000000") { + // std::cout << STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) << " veh=" << vehicle->getID() << " oldstate=" << oldstate << " newstate=" << state << "\n"; + //} +#endif + return state; } - - - /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLaneChanger.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLaneChanger.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLaneChanger.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLaneChanger.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Christian Roessel /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Fri, 01 Feb 2002 -/// @version $Id: MSLaneChanger.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSLaneChanger.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Performs lane changing of vehicles /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -54,7 +55,7 @@ class MSLaneChanger { public: /// Constructor - MSLaneChanger(std::vector* lanes, bool allowSwap); + MSLaneChanger(const std::vector* lanes, bool allowSwap); /// Destructor. ~MSLaneChanger(); @@ -80,6 +81,8 @@ MSVehicle* hoppedVeh; /// the vehicle that really wants to change to this lane MSVehicle* lastBlocked; + /// the first vehicle on this edge that wants to change to this lane + MSVehicle* firstBlocked; SUMOReal dens; @@ -142,34 +145,16 @@ If there is none, myChanger.end() is returned. */ ChangerIt findCandidate(); - int change2right( + /* @brief check whether lane changing in the given direction is desirable + * and possible */ + int checkChange( + int laneOffset, const std::pair& leader, - const std::pair& rLead, - const std::pair& rFollow, const std::vector& preb) const; - int change2left( - const std::pair& leader, - const std::pair& rLead, - const std::pair& rFollow, - const std::vector& preb) const; - - /// @brief start the lane change maneuver (and finish it instantly if gLaneChangeDuration == 0) void startChange(MSVehicle* vehicle, ChangerIt& from, int direction); - - /** Returns true if candidate overlaps with a vehicle, that - already changed the lane.*/ - bool overlapWithHopped(ChangerIt target) const { - MSVehicle* v1 = target->hoppedVeh; - MSVehicle* v2 = veh(myCandi); - if (v1 != 0 && v2 != 0) { - return MSVehicle::overlap(v1, v2); - } - return false; - } - std::pair getRealThisLeader(const ChangerIt& target) const; std::pair getRealFollower(const ChangerIt& target) const; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLane.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLane.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLane.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLane.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -7,13 +7,14 @@ /// @author Axel Wegener /// @author Michael Behrisch /// @author Christoph Sommer +/// @author Mario Krumnow /// @date Mon, 05 Mar 2001 -/// @version $Id: MSLane.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSLane.cpp 18108 2015-03-19 11:11:30Z behrisch $ /// // Representation of a lane in the micro simulation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -37,7 +38,8 @@ #include #include #include "MSVehicle.h" -#include "MSAbstractLaneChangeModel.h" +#include +#include #include "MSNet.h" #include "MSVehicleType.h" #include "MSEdge.h" @@ -64,7 +66,7 @@ #include #include #include -#include +#include #include #include @@ -90,7 +92,7 @@ myVehicles(), myLength(length), myWidth(width), myEdge(edge), myMaxSpeed(maxSpeed), myPermissions(permissions), myLogicalPredecessorLane(0), - myVehicleLengthSum(0), myInlappingVehicleEnd(10000), myInlappingVehicle(0), + myBruttoVehicleLengthSum(0), myNettoVehicleLengthSum(0), myInlappingVehicleEnd(10000), myInlappingVehicle(0), myLengthGeometryFactor(myShape.length() / myLength) {} @@ -130,7 +132,9 @@ } else { myVehicles.insert(at, veh); } - myVehicleLengthSum += veh->getVehicleType().getLengthWithGap(); + myBruttoVehicleLengthSum += veh->getVehicleType().getLengthWithGap(); + myNettoVehicleLengthSum += veh->getVehicleType().getLength(); + myEdge->markDelayed(); if (wasInactive) { MSNet::getInstance()->getEdgeControl().gotActive(this); } @@ -139,10 +143,11 @@ bool MSLane::pWagGenericInsertion(MSVehicle& veh, SUMOReal mspeed, SUMOReal maxPos, SUMOReal minPos) { + veh.setTentativeLaneAndPosition(this, maxPos); + veh.updateBestLanes(false, this); SUMOReal xIn = maxPos; SUMOReal vIn = mspeed; SUMOReal leaderDecel; - veh.getBestLanes(true, this); if (myVehicles.size() != 0) { MSVehicle* leader = myVehicles.front(); xIn = leader->getPositionOnLane() - leader->getVehicleType().getLength() - veh.getVehicleType().getMinGap(); @@ -166,7 +171,8 @@ SUMOReal x = 0; for (int i = 0; i <= 10; i++) { x = 0.5 * (x1 + x2); - SUMOReal vSafe = veh.getCarFollowModel().followSpeed(&veh, vHlp, xIn - x, vIn, leaderDecel); + veh.setTentativeLaneAndPosition(this, x); + SUMOReal vSafe = veh.getCarFollowModel().insertionFollowSpeed(&veh, vHlp, xIn - x, vIn, leaderDecel); if (vSafe < vHlp) { x2 = x; } else { @@ -185,9 +191,10 @@ bool MSLane::pWagSimpleInsertion(MSVehicle& veh, SUMOReal mspeed, SUMOReal maxPos, SUMOReal minPos) { + veh.setTentativeLaneAndPosition(this, maxPos); + veh.updateBestLanes(false, this); SUMOReal xIn = maxPos; SUMOReal vIn = mspeed; - veh.getBestLanes(true, this); if (myVehicles.size() != 0) { MSVehicle* leader = myVehicles.front(); xIn = leader->getPositionOnLane() - leader->getVehicleType().getLength() - veh.getVehicleType().getMinGap(); @@ -218,7 +225,7 @@ bool MSLane::maxSpeedGapInsertion(MSVehicle& veh, SUMOReal mspeed) { if (myVehicles.size() == 0) { - return isInsertionSuccess(&veh, mspeed, myLength / 2, true); + return isInsertionSuccess(&veh, mspeed, myLength / 2, true, MSMoveReminder::NOTIFICATION_DEPARTED); } // go through the lane, look for free positions (starting after the last vehicle) MSLane::VehCont::iterator predIt = myVehicles.begin(); @@ -249,7 +256,7 @@ const SUMOReal currentMaxSpeed = lhs - tauDecel; if (MIN2(currentMaxSpeed, mspeed) > maxSpeed) { maxSpeed = currentMaxSpeed; - maxPos = leaderRearPos + frontGap; + maxPos = MIN2(leaderRearPos + frontGap, myLength); maxIt = predIt + 1; } } @@ -268,23 +275,39 @@ MSLane::freeInsertion(MSVehicle& veh, SUMOReal mspeed, MSMoveReminder::Notification notification) { bool adaptableSpeed = true; + // try to insert teleporting vehicles fully on this lane + const SUMOReal minPos = (notification == MSMoveReminder::NOTIFICATION_TELEPORT ? + MIN2(myLength, veh.getVehicleType().getLength()) : 0); + if (myVehicles.size() == 0) { - if (isInsertionSuccess(&veh, mspeed, 0, adaptableSpeed, notification)) { - return true; + // ensure sufficient gap to followers on predecessor lanes + const SUMOReal backOffset = minPos - veh.getVehicleType().getLength(); + const SUMOReal missingRearGap = getMissingRearGap(backOffset, mspeed, veh.getCarFollowModel().getMaxDecel()); + if (missingRearGap > 0) { + if (minPos + missingRearGap <= myLength) { + // @note. The rear gap is tailored to mspeed. If it changes due + // to a leader vehicle (on subsequent lanes) insertion will + // still fail. Under the right combination of acceleration and + // deceleration values there might be another insertion + // positions that would be successful be we do not look for it. + return isInsertionSuccess(&veh, mspeed, minPos + missingRearGap, adaptableSpeed, notification); + } else { + return false; + } + } else { + return isInsertionSuccess(&veh, mspeed, minPos, adaptableSpeed, notification); } + } else { // check whether the vehicle can be put behind the last one if there is such MSVehicle* leader = myVehicles.back(); - SUMOReal leaderPos = leader->getPositionOnLane() - leader->getVehicleType().getLength(); - SUMOReal speed = mspeed; - if (adaptableSpeed) { - speed = leader->getSpeed(); - } - SUMOReal frontGapNeeded = veh.getCarFollowModel().getSecureGap(speed, leader->getSpeed(), leader->getCarFollowModel().getMaxDecel()) + veh.getVehicleType().getMinGap(); - if (leaderPos - frontGapNeeded >= 0) { - SUMOReal tspeed = MIN2(veh.getCarFollowModel().followSpeed(&veh, mspeed, frontGapNeeded, leader->getSpeed(), leader->getCarFollowModel().getMaxDecel()), mspeed); + const SUMOReal leaderPos = leader->getPositionOnLane() - leader->getVehicleType().getLength(); + const SUMOReal speed = adaptableSpeed ? leader->getSpeed() : mspeed; + const SUMOReal frontGapNeeded = veh.getCarFollowModel().getSecureGap(speed, leader->getSpeed(), leader->getCarFollowModel().getMaxDecel()) + veh.getVehicleType().getMinGap(); + if (leaderPos >= frontGapNeeded) { + const SUMOReal tspeed = MIN2(veh.getCarFollowModel().insertionFollowSpeed(&veh, mspeed, frontGapNeeded, leader->getSpeed(), leader->getCarFollowModel().getMaxDecel()), mspeed); // check whether we can insert our vehicle behind the last vehicle on the lane - if (isInsertionSuccess(&veh, tspeed, 0, adaptableSpeed, notification)) { + if (isInsertionSuccess(&veh, tspeed, minPos, adaptableSpeed, notification)) { return true; } } @@ -318,7 +341,7 @@ const SUMOReal backMin = followPos + backGapNeeded + veh.getVehicleType().getLength(); // check whether there is enough room (given some extra space for rounding errors) - if (frontMax > 0 && backMin + POSITION_EPS < frontMax) { + if (frontMax > minPos && backMin + POSITION_EPS < frontMax) { // try to insert vehicle (should be always ok) if (isInsertionSuccess(&veh, speed, backMin + POSITION_EPS, adaptableSpeed, notification)) { return true; @@ -374,7 +397,7 @@ for (unsigned int i = 0; i < 10; i++) { // we will try some random positions ... pos = RandHelper::rand(getLength()); - if (isInsertionSuccess(&veh, speed, pos, patchSpeed)) { + if (isInsertionSuccess(&veh, speed, pos, patchSpeed, MSMoveReminder::NOTIFICATION_DEPARTED)) { return true; } } @@ -397,7 +420,25 @@ break; } // try to insert - return isInsertionSuccess(&veh, speed, pos, patchSpeed); + return isInsertionSuccess(&veh, speed, pos, patchSpeed, MSMoveReminder::NOTIFICATION_DEPARTED); +} + + +bool +MSLane::checkFailure(MSVehicle* aVehicle, SUMOReal& speed, SUMOReal& dist, const SUMOReal nspeed, const bool patchSpeed, const std::string errorMsg) const { + if (nspeed < speed) { + if (patchSpeed) { + speed = MIN2(nspeed, speed); + dist = aVehicle->getCarFollowModel().brakeGap(speed) + aVehicle->getVehicleType().getMinGap(); + } else { + if (errorMsg != "") { + WRITE_ERROR("Vehicle '" + aVehicle->getID() + "' will not be able to depart using the given velocity (" + errorMsg + ")!"); + MSNet::getInstance()->getInsertionControl().descheduleDeparture(aVehicle); + } + return true; + } + } + return false; } @@ -411,7 +452,8 @@ aVehicle->getID() + "'. Inserting at lane end instead."); pos = myLength; } - aVehicle->getBestLanes(true, this); + aVehicle->setTentativeLaneAndPosition(this, pos); + aVehicle->updateBestLanes(false, this); const MSCFModel& cfModel = aVehicle->getCarFollowModel(); const std::vector& bestLaneConts = aVehicle->getBestLanesContinuation(this); std::vector::const_iterator ri = bestLaneConts.begin(); @@ -422,40 +464,26 @@ unsigned int nRouteSuccs = 1; MSLane* currentLane = this; MSLane* nextLane = this; - SUMOTime arrivalTime = MSNet::getInstance()->getCurrentTimeStep() + TIME2STEPS(seen / speed); + SUMOTime arrivalTime = MSNet::getInstance()->getCurrentTimeStep() + TIME2STEPS(seen / MAX2(speed, SUMO_const_haltingSpeed)); while (seen < dist && ri != bestLaneConts.end()) { // get the next link used... - MSLinkCont::const_iterator link = currentLane->succLinkSec(*aVehicle, nRouteSuccs, *currentLane, bestLaneConts); + MSLinkCont::const_iterator link = succLinkSec(*aVehicle, nRouteSuccs, *currentLane, bestLaneConts); if (currentLane->isLinkEnd(link)) { if (¤tLane->getEdge() == r.getLastEdge()) { // reached the end of the route if (aVehicle->getParameter().arrivalSpeedProcedure == ARRIVAL_SPEED_GIVEN) { - SUMOReal nspeed = cfModel.freeSpeed(aVehicle, speed, seen, aVehicle->getParameter().arrivalSpeed); - if (nspeed < speed) { - if (patchSpeed) { - speed = MIN2(nspeed, speed); - dist = cfModel.brakeGap(speed) + aVehicle->getVehicleType().getMinGap(); - } else { - // we may not drive with the given velocity - we cannot match the specified arrival speed - WRITE_ERROR("Vehicle '" + aVehicle->getID() + "' will not be able to depart using the given velocity due (arrival speed too low)!"); - MSNet::getInstance()->getInsertionControl().descheduleDeparture(aVehicle); - return false; - } + if (checkFailure(aVehicle, speed, dist, cfModel.freeSpeed(aVehicle, speed, seen, aVehicle->getParameter().arrivalSpeed, true), + patchSpeed, "arrival speed too low")) { + // we may not drive with the given velocity - we cannot match the specified arrival speed + return false; } } } else { // lane does not continue - SUMOReal nspeed = cfModel.stopSpeed(aVehicle, speed, seen); - if (nspeed < speed) { - if (patchSpeed) { - speed = MIN2(nspeed, speed); - dist = cfModel.brakeGap(speed) + aVehicle->getVehicleType().getMinGap(); - } else { - // we may not drive with the given velocity - we cannot stop at the junction - WRITE_ERROR("Vehicle '" + aVehicle->getID() + "' will not be able to depart using the given velocity (junction too close)!"); - MSNet::getInstance()->getInsertionControl().descheduleDeparture(aVehicle); - return false; - } + if (checkFailure(aVehicle, speed, dist, cfModel.stopSpeed(aVehicle, speed, seen), + patchSpeed, "junction too close")) { + // we may not drive with the given velocity - we cannot stop at the junction + return false; } } break; @@ -463,24 +491,19 @@ if (!(*link)->opened(arrivalTime, speed, speed, aVehicle->getVehicleType().getLength(), aVehicle->getImpatience(), cfModel.getMaxDecel(), 0) || !(*link)->havePriority()) { // have to stop at junction - SUMOReal nspeed = cfModel.stopSpeed(aVehicle, speed, seen); - if (nspeed < speed) { - if (patchSpeed) { - speed = MIN2(nspeed, speed); - dist = cfModel.brakeGap(speed) + aVehicle->getVehicleType().getMinGap(); - } else { - // we may not drive with the given velocity - we cannot stop at the junction in time - const LinkState state = (*link)->getState(); - if (state == LINKSTATE_MINOR - || state == LINKSTATE_EQUAL - || state == LINKSTATE_STOP - || state == LINKSTATE_ALLWAY_STOP) { - // no sense in trying later - WRITE_ERROR("Vehicle '" + aVehicle->getID() + "' will not be able to depart using the given velocity (unpriorised junction too close)!"); - MSNet::getInstance()->getInsertionControl().descheduleDeparture(aVehicle); - } - return false; - } + std::string errorMsg = ""; + const LinkState state = (*link)->getState(); + if (state == LINKSTATE_MINOR + || state == LINKSTATE_EQUAL + || state == LINKSTATE_STOP + || state == LINKSTATE_ALLWAY_STOP) { + // no sense in trying later + errorMsg = "unpriorised junction too close"; + } + if (checkFailure(aVehicle, speed, dist, cfModel.stopSpeed(aVehicle, speed, seen), + patchSpeed, errorMsg)) { + // we may not drive with the given velocity - we cannot stop at the junction in time + return false; } break; } @@ -488,39 +511,32 @@ nextLane = (*link)->getViaLaneOrLane(); // check how next lane effects the journey if (nextLane != 0) { - arrivalTime += TIME2STEPS(nextLane->getLength() / speed); + // check leader on next lane SUMOReal gap = 0; - MSVehicle* leader = currentLane->getPartialOccupator(); + MSVehicle* leader = nextLane->getLastVehicle(); if (leader != 0) { - gap = seen + currentLane->getPartialOccupatorEnd() - currentLane->getLength() - aVehicle->getVehicleType().getMinGap(); + gap = seen + leader->getPositionOnLane() - leader->getVehicleType().getLength() - aVehicle->getVehicleType().getMinGap(); } else { - // check leader on next lane - leader = nextLane->getLastVehicle(); + leader = nextLane->getPartialOccupator(); if (leader != 0) { - gap = seen + leader->getPositionOnLane() - leader->getVehicleType().getLength() - aVehicle->getVehicleType().getMinGap(); + gap = seen + nextLane->getPartialOccupatorEnd() - aVehicle->getVehicleType().getMinGap(); } } if (leader != 0) { if (gap < 0) { return false; } - const SUMOReal nspeed = cfModel.followSpeed(aVehicle, speed, gap, leader->getSpeed(), leader->getCarFollowModel().getMaxDecel()); - if (nspeed < speed) { - if (patchSpeed) { - speed = MIN2(nspeed, speed); - dist = cfModel.brakeGap(speed) + aVehicle->getVehicleType().getMinGap(); - } else { - // we may not drive with the given velocity - we crash into the leader - return false; - } + const SUMOReal nspeed = cfModel.insertionFollowSpeed(aVehicle, speed, gap, leader->getSpeed(), leader->getCarFollowModel().getMaxDecel()); + if (checkFailure(aVehicle, speed, dist, nspeed, patchSpeed, "")) { + // we may not drive with the given velocity - we crash into the leader + return false; } } // check next lane's maximum velocity - const SUMOReal nspeed = nextLane->getVehicleMaxSpeed(aVehicle); + const SUMOReal nspeed = cfModel.freeSpeed(aVehicle, speed, seen, nextLane->getVehicleMaxSpeed(aVehicle), true); if (nspeed < speed) { - // patch speed if needed if (patchSpeed) { - speed = MIN2(cfModel.freeSpeed(aVehicle, speed, seen, nspeed), speed); + speed = nspeed; dist = cfModel.brakeGap(speed) + aVehicle->getVehicleType().getMinGap(); } else { // we may not drive with the given velocity - we would be too fast on the next lane @@ -532,20 +548,14 @@ // check traffic on next junction // we cannot use (*link)->opened because a vehicle without priority // may already be comitted to blocking the link and unable to stop - const SUMOTime arrivalTime = MSNet::getInstance()->getCurrentTimeStep() + TIME2STEPS(seen / speed); - const SUMOTime leaveTime = arrivalTime + TIME2STEPS((*link)->getLength() * speed); + const SUMOTime leaveTime = (*link)->getLeaveTime(arrivalTime, speed, speed, aVehicle->getVehicleType().getLength()); if ((*link)->hasApproachingFoe(arrivalTime, leaveTime, speed, cfModel.getMaxDecel())) { - SUMOReal nspeed = cfModel.followSpeed(aVehicle, speed, seen, 0, 0); - if (nspeed < speed) { - if (patchSpeed) { - speed = MIN2(nspeed, speed); - dist = cfModel.brakeGap(speed) + aVehicle->getVehicleType().getMinGap(); - } else { - // we may not drive with the given velocity - we crash at the junction - return false; - } + if (checkFailure(aVehicle, speed, dist, cfModel.stopSpeed(aVehicle, speed, seen), patchSpeed, "")) { + // we may not drive with the given velocity - we crash at the junction + return false; } } + arrivalTime += TIME2STEPS(nextLane->getLength() / MAX2(speed, NUMERICAL_EPS)); seen += nextLane->getLength(); currentLane = nextLane; #ifdef HAVE_INTERNAL_LANES @@ -561,14 +571,24 @@ } // get the pointer to the vehicle next in front of the given position + MSVehicle* leader = 0; + SUMOReal gap = 0; MSLane::VehCont::iterator predIt = find_if(myVehicles.begin(), myVehicles.end(), bind2nd(VehPosition(), pos)); if (predIt != myVehicles.end()) { - // ok, there is one (a leader) - MSVehicle* leader = *predIt; - SUMOReal frontGapNeeded = cfModel.getSecureGap(speed, leader->getSpeed(), leader->getCarFollowModel().getMaxDecel()); - SUMOReal gap = MSVehicle::gap(leader->getPositionOnLane(), leader->getVehicleType().getLength(), pos + aVehicle->getVehicleType().getMinGap()); - if (gap < frontGapNeeded) { - // too close to the leader on this lane + leader = *predIt; + gap = MSVehicle::gap(leader->getPositionOnLane(), leader->getVehicleType().getLength(), pos + aVehicle->getVehicleType().getMinGap()); + } + if (leader == 0 && getPartialOccupator() != 0) { + leader = getPartialOccupator(); + gap = getPartialOccupatorEnd() - pos - aVehicle->getVehicleType().getMinGap(); + } + if (leader != 0) { + if (gap < 0) { + return false; + } + const SUMOReal nspeed = cfModel.insertionFollowSpeed(aVehicle, speed, gap, leader->getSpeed(), leader->getCarFollowModel().getMaxDecel()); + if (checkFailure(aVehicle, speed, dist, nspeed, patchSpeed, "")) { + // we may not drive with the given velocity - we crash into the leader return false; } } @@ -577,7 +597,7 @@ if (predIt != myVehicles.begin()) { // there is direct follower on this lane MSVehicle* follower = *(predIt - 1); - SUMOReal backGapNeeded = follower->getCarFollowModel().getSecureGap(follower->getSpeed(), aVehicle->getSpeed(), cfModel.getMaxDecel()); + SUMOReal backGapNeeded = follower->getCarFollowModel().getSecureGap(follower->getSpeed(), speed, cfModel.getMaxDecel()); SUMOReal gap = MSVehicle::gap(pos, aVehicle->getVehicleType().getLength(), follower->getPositionOnLane() + follower->getVehicleType().getMinGap()); if (gap < backGapNeeded) { // too close to the follower on this lane @@ -585,22 +605,11 @@ } } else { // check approaching vehicles to prevent rear-end collisions - // to compute an uper bound on the look-back distance we need - // the chosenSpeedFactor, minGap and maxDeceleration of approaching vehicles - // since we do not know these we use the values from the vehicle to be inserted - // and add a safety factor - const SUMOReal dist = 2 * (aVehicle->getCarFollowModel().brakeGap(myMaxSpeed) + aVehicle->getVehicleType().getMinGap()); const SUMOReal backOffset = pos - aVehicle->getVehicleType().getLength(); - const SUMOReal missingRearGap = getMissingRearGap(dist, backOffset, speed, aVehicle->getCarFollowModel().getMaxDecel()); + const SUMOReal missingRearGap = getMissingRearGap(backOffset, speed, aVehicle->getCarFollowModel().getMaxDecel()); if (missingRearGap > 0) { // too close to a follower - const SUMOReal neededStartPos = pos + missingRearGap; - if (myVehicles.size() == 0 && notification == MSMoveReminder::NOTIFICATION_TELEPORT && neededStartPos <= myLength) { - // shift starting positiong as needed entering from teleport - pos = neededStartPos; - } else { - return false; - } + return false; } } // may got negative while adaptation @@ -615,6 +624,7 @@ void MSLane::forceVehicleInsertion(MSVehicle* veh, SUMOReal pos) { + veh->updateBestLanes(true, this); incorporateVehicle(veh, pos, veh->getSpeed(), find_if(myVehicles.begin(), myVehicles.end(), bind2nd(VehPosition(), pos))); } @@ -623,11 +633,7 @@ SUMOReal MSLane::setPartialOccupation(MSVehicle* v, SUMOReal leftVehicleLength) { myInlappingVehicle = v; - if (leftVehicleLength > myLength) { - myInlappingVehicleEnd = 0; - } else { - myInlappingVehicleEnd = myLength - leftVehicleLength; - } + myInlappingVehicleEnd = myLength - leftVehicleLength; return myLength; } @@ -636,8 +642,8 @@ MSLane::resetPartialOccupation(MSVehicle* v) { if (v == myInlappingVehicle) { myInlappingVehicleEnd = 10000; + myInlappingVehicle = 0; } - myInlappingVehicle = 0; } @@ -674,58 +680,68 @@ void -MSLane::detectCollisions(SUMOTime timestep, int stage) { - if (myVehicles.size() < 2) { +MSLane::detectCollisions(SUMOTime timestep, const std::string& stage) { + if (myVehicles.size() == 0) { return; } VehCont::iterator lastVeh = myVehicles.end() - 1; for (VehCont::iterator veh = myVehicles.begin(); veh != lastVeh;) { VehCont::iterator pred = veh + 1; - if ((*veh)->hasInfluencer() && (*veh)->getInfluencer().isVTDControlled()) { + if ((*veh)->hasInfluencer() && (*veh)->getInfluencer().isVTDAffected(timestep)) { ++veh; continue; } - if ((*pred)->hasInfluencer() && (*pred)->getInfluencer().isVTDControlled()) { + if ((*pred)->hasInfluencer() && (*pred)->getInfluencer().isVTDAffected(timestep)) { ++veh; continue; } SUMOReal gap = (*pred)->getPositionOnLane() - (*pred)->getVehicleType().getLength() - (*veh)->getPositionOnLane() - (*veh)->getVehicleType().getMinGap(); - if (gap < -0.001) { - MSVehicle* vehV = *veh; - if (vehV->getLane() == this) { - WRITE_WARNING("Teleporting vehicle '" + vehV->getID() + "'; collision with '" - + (*pred)->getID() + "', lane='" + getID() + "', gap=" + toString(gap) - + ", time=" + time2string(MSNet::getInstance()->getCurrentTimeStep()) + " stage=" + toString(stage) + "."); - MSNet::getInstance()->getVehicleControl().registerCollision(); - myVehicleLengthSum -= vehV->getVehicleType().getLengthWithGap(); - MSVehicleTransfer::getInstance()->addVeh(timestep, vehV); - veh = myVehicles.erase(veh); // remove current vehicle - lastVeh = myVehicles.end() - 1; - if (veh == myVehicles.end()) { - break; - } - } else { - WRITE_WARNING("Shadow of vehicle '" + vehV->getID() + "'; collision with '" - + (*pred)->getID() + "', lane='" + getID() + "', gap=" + toString(gap) - + ", time=" + time2string(MSNet::getInstance()->getCurrentTimeStep()) + " stage=" + toString(stage) + "."); - veh = myVehicles.erase(veh); // remove current vehicle - lastVeh = myVehicles.end() - 1; - vehV->getLaneChangeModel().endLaneChangeManeuver(); - if (veh == myVehicles.end()) { - break; - } + if (gap < -NUMERICAL_EPS) { + handleCollision(timestep, stage, *veh, *pred, gap); + veh = myVehicles.erase(veh); // remove current vehicle + lastVeh = myVehicles.end() - 1; + if (veh == myVehicles.end()) { + break; } } else { ++veh; } } + MSVehicle* predV = getPartialOccupator(); + if (predV != 0) { + SUMOReal gap = getPartialOccupatorEnd() - (*lastVeh)->getPositionOnLane() - (*lastVeh)->getVehicleType().getMinGap(); + if (gap < -NUMERICAL_EPS) { + handleCollision(timestep, stage, *lastVeh, predV, gap); + myVehicles.erase(lastVeh); + } + } +} + + +void +MSLane::handleCollision(SUMOTime timestep, const std::string& stage, MSVehicle* collider, MSVehicle* victim, const SUMOReal gap) { + if (collider->getLane() == this) { + WRITE_WARNING("Teleporting vehicle '" + collider->getID() + "'; collision with '" + + victim->getID() + "', lane='" + getID() + "', gap=" + toString(gap) + + ", time=" + time2string(MSNet::getInstance()->getCurrentTimeStep()) + " stage=" + stage + "."); + MSNet::getInstance()->getVehicleControl().registerCollision(); + myBruttoVehicleLengthSum -= collider->getVehicleType().getLengthWithGap(); + myNettoVehicleLengthSum -= collider->getVehicleType().getLength(); + MSVehicleTransfer::getInstance()->add(timestep, collider); + } else { + WRITE_WARNING("Shadow of vehicle '" + collider->getID() + "'; collision with '" + + victim->getID() + "', lane='" + getID() + "', gap=" + toString(gap) + + ", time=" + time2string(MSNet::getInstance()->getCurrentTimeStep()) + " stage=" + stage + "."); + collider->getLaneChangeModel().endLaneChangeManeuver(); + } } bool MSLane::executeMovements(SUMOTime t, std::vector& into) { - for (VehCont::iterator i = myVehicles.begin(); i != myVehicles.end();) { + // iteratate over vehicles in reverse so that move reminders will be called in the correct order + for (VehCont::reverse_iterator i = myVehicles.rbegin(); i != myVehicles.rend();) { MSVehicle* veh = *i; if (veh->getLane() != this || veh->getLaneChangeModel().alreadyMoved()) { // this is the shadow during a continuous lane change @@ -734,6 +750,7 @@ } // length is needed later when the vehicle may not exist anymore const SUMOReal length = veh->getVehicleType().getLengthWithGap(); + const SUMOReal nettoLength = veh->getVehicleType().getLength(); bool moved = veh->executeMove(); MSLane* target = veh->getLane(); #ifndef NO_TRACI @@ -767,44 +784,72 @@ } } else if (veh->isParking()) { // vehicle started to park - veh->leaveLane(MSMoveReminder::NOTIFICATION_JUNCTION); - MSVehicleTransfer::getInstance()->addVeh(t, veh); + MSVehicleTransfer::getInstance()->add(t, veh); } else if (veh->getPositionOnLane() > getLength()) { - // for any reasons the vehicle is beyond its lane... error - WRITE_WARNING("Teleporting vehicle '" + veh->getID() + "'; beyond lane (2), targetLane='" + getID() + "', time=" + + // for any reasons the vehicle is beyond its lane... + // this should never happen because it is handled in MSVehicle::executeMove + assert(false); + WRITE_WARNING("Teleporting vehicle '" + veh->getID() + "'; beyond end of lane, targetLane='" + getID() + "', time=" + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); - MSNet::getInstance()->getVehicleControl().registerTeleport(); - MSVehicleTransfer::getInstance()->addVeh(t, veh); + MSNet::getInstance()->getVehicleControl().registerCollision(); + MSVehicleTransfer::getInstance()->add(t, veh); } else { ++i; continue; } - myVehicleLengthSum -= length; - i = myVehicles.erase(i); + myBruttoVehicleLengthSum -= length; + myNettoVehicleLengthSum -= nettoLength; + ++i; + i = VehCont::reverse_iterator(myVehicles.erase(i.base())); } if (myVehicles.size() > 0) { if (MSGlobals::gTimeToGridlock > 0 || MSGlobals::gTimeToGridlockHighways > 0) { - MSVehicle* last = myVehicles.back(); - bool r1 = MSGlobals::gTimeToGridlock > 0 && !last->isStopped() && last->getWaitingTime() > MSGlobals::gTimeToGridlock; - bool r2 = MSGlobals::gTimeToGridlockHighways > 0 && !last->isStopped() && last->getWaitingTime() > MSGlobals::gTimeToGridlockHighways && last->getLane()->getSpeedLimit() > 69. / 3.6 && !last->getLane()->appropriate(last); - if (r1 || r2) { - MSVehicle* veh = *(myVehicles.end() - 1); - myVehicleLengthSum -= veh->getVehicleType().getLengthWithGap(); - myVehicles.erase(myVehicles.end() - 1); - WRITE_WARNING("Teleporting vehicle '" + veh->getID() + "'; waited too long" - + (r2 ? " on highway" : "") - + ", lane='" + getID() + "', time=" + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); - MSNet::getInstance()->getVehicleControl().registerTeleport(); - MSVehicleTransfer::getInstance()->addVeh(t, veh); - } + MSVehicle* veh = myVehicles.back(); // the vehice at the front of the queue + if (!veh->isStopped()) { + const bool wrongLane = !veh->getLane()->appropriate(veh); + const bool r1 = MSGlobals::gTimeToGridlock > 0 && veh->getWaitingTime() > MSGlobals::gTimeToGridlock; + const bool r2 = MSGlobals::gTimeToGridlockHighways > 0 && veh->getWaitingTime() > MSGlobals::gTimeToGridlockHighways && veh->getLane()->getSpeedLimit() > 69. / 3.6 && wrongLane; + if (r1 || r2) { + const MSLinkCont::const_iterator link = succLinkSec(*veh, 1, *this, veh->getBestLanesContinuation()); + const bool minorLink = !wrongLane && (link != myLinks.end()) && !((*link)->havePriority()); + const std::string reason = (wrongLane ? " (wrong lane)" : (minorLink ? " (yield)" : " (jam)")); + MSVehicle* veh = *(myVehicles.end() - 1); + myBruttoVehicleLengthSum -= veh->getVehicleType().getLengthWithGap(); + myNettoVehicleLengthSum -= veh->getVehicleType().getLength(); + myVehicles.erase(myVehicles.end() - 1); + WRITE_WARNING("Teleporting vehicle '" + veh->getID() + "'; waited too long" + + reason + + (r2 ? " (highway)" : "") + + ", lane='" + getID() + "', time=" + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); + if (wrongLane) { + MSNet::getInstance()->getVehicleControl().registerTeleportWrongLane(); + } else if (minorLink) { + MSNet::getInstance()->getVehicleControl().registerTeleportYield(); + } else { + MSNet::getInstance()->getVehicleControl().registerTeleportJam(); + } + MSVehicleTransfer::getInstance()->add(t, veh); + } + } // else look for a vehicle that isn't stopped? } } return myVehicles.size() == 0; } +const MSEdge* +MSLane::getInternalFollower() const { + const MSEdge* e = myEdge; + while (e->getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { + e = e->getSuccessors()[0]; + } + return e; +} + + +// ------ Static (sic!) container methods ------ bool -MSLane::dictionary(std::string id, MSLane* ptr) { +MSLane::dictionary(const std::string& id, MSLane* ptr) { DictType::iterator it = myDict.find(id); if (it == myDict.end()) { // id not in myDict. @@ -816,7 +861,7 @@ MSLane* -MSLane::dictionary(std::string id) { +MSLane::dictionary(const std::string& id) { DictType::iterator it = myDict.find(id); if (it == myDict.end()) { // id not in myDict. @@ -843,11 +888,37 @@ } +template void +MSLane::fill(RTREE& into) { + for (DictType::iterator i = myDict.begin(); i != myDict.end(); ++i) { + MSLane* l = (*i).second; + Boundary b = l->getShape().getBoxBoundary(); + b.grow(3.); + const float cmin[2] = {(float) b.xmin(), (float) b.ymin()}; + const float cmax[2] = {(float) b.xmax(), (float) b.ymax()}; + into.Insert(cmin, cmax, l); + } +} + +template void MSLane::fill(NamedRTree& into); +#ifndef NO_TRACI +template void MSLane::fill(LANE_RTREE_QUAL& into); +#endif + +// ------ ------ bool MSLane::appropriate(const MSVehicle* veh) { if (myEdge->getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { return true; } + if (veh->succEdge(1) == 0) { + assert(veh->getBestLanes().size() > veh->getLaneIndex()); + if (veh->getBestLanes()[veh->getLaneIndex()].bestLaneOffset == 0) { + return true; + } else { + return false; + } + } MSLinkCont::const_iterator link = succLinkSec(*veh, 1, *this, veh->getBestLanesContinuation()); return (link != myLinks.end()); } @@ -860,7 +931,9 @@ for (std::vector::const_iterator i = myVehBuffer.begin(); i != myVehBuffer.end(); ++i) { MSVehicle* veh = *i; myVehicles.insert(myVehicles.begin(), veh); - myVehicleLengthSum += veh->getVehicleType().getLengthWithGap(); + myBruttoVehicleLengthSum += veh->getVehicleType().getLengthWithGap(); + myNettoVehicleLengthSum += veh->getVehicleType().getLength(); + myEdge->markDelayed(); } myVehBuffer.clear(); return wasInactive && myVehicles.size() != 0; @@ -878,6 +951,10 @@ return i == myLinks.end(); } +bool +MSLane::isEmpty() const { + return (myVehicles.empty() && myInlappingVehicle == 0); +} MSVehicle* MSLane::getLastVehicle() const { @@ -888,7 +965,7 @@ } -const MSVehicle* +MSVehicle* MSLane::getFirstVehicle() const { if (myVehicles.size() == 0) { return 0; @@ -899,7 +976,7 @@ MSLinkCont::const_iterator MSLane::succLinkSec(const SUMOVehicle& veh, unsigned int nRouteSuccs, - const MSLane& succLinkSource, const std::vector& conts) const { + const MSLane& succLinkSource, const std::vector& conts) { const MSEdge* nRouteEdge = veh.succEdge(nRouteSuccs); // check whether the vehicle tried to look beyond its route if (nRouteEdge == 0) { @@ -936,6 +1013,10 @@ return succLinkSource.myLinks.end(); } // the only case where this should happen is for a disconnected route (deliberately ignored) +#ifdef _DEBUG + WRITE_WARNING("Could not find connection between '" + succLinkSource.getID() + "' and '" + conts[nRouteSuccs]->getID() + + "' for vehicle '" + veh.getID() + "' time=" + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); +#endif return succLinkSource.myLinks.end(); } @@ -948,6 +1029,20 @@ void +MSLane::setMaxSpeed(SUMOReal val) { + myMaxSpeed = val; + myEdge->recalcCache(); +} + + +void +MSLane::setLength(SUMOReal val) { + myLength = val; + myEdge->recalcCache(); +} + + +void MSLane::swapAfterLaneChange(SUMOTime) { myVehicles = myTmpVehicles; myTmpVehicles.clear(); @@ -955,12 +1050,15 @@ MSVehicle* -MSLane::removeVehicle(MSVehicle* remVehicle, MSMoveReminder::Notification notification) { +MSLane::removeVehicle(MSVehicle* remVehicle, MSMoveReminder::Notification notification, bool notify) { for (MSLane::VehCont::iterator it = myVehicles.begin(); it < myVehicles.end(); it++) { if (remVehicle == *it) { - remVehicle->leaveLane(notification); + if (notify) { + remVehicle->leaveLane(notification); + } myVehicles.erase(it); - myVehicleLengthSum -= remVehicle->getVehicleType().getLengthWithGap(); + myBruttoVehicleLengthSum -= remVehicle->getVehicleType().getLengthWithGap(); + myNettoVehicleLengthSum -= remVehicle->getVehicleType().getLength(); break; } } @@ -989,6 +1087,10 @@ MSEdge* approachingEdge = &lane->getEdge(); if (myApproachingLanes.find(approachingEdge) == myApproachingLanes.end()) { myApproachingLanes[approachingEdge] = std::vector(); + } else if (approachingEdge->getPurpose() != MSEdge::EDGEFUNCTION_INTERNAL) { + // whenever a normal edge connects twice, there is a corresponding + // internal edge wich connects twice, one warning is sufficient + WRITE_WARNING("Lane '" + getID() + "' is approached multiple times from edge '" + approachingEdge->getID() + "'. This may cause collisions."); } myApproachingLanes[approachingEdge].push_back(lane); } @@ -1020,70 +1122,74 @@ SUMOReal MSLane::getMissingRearGap( - SUMOReal dist, SUMOReal backOffset, SUMOReal leaderSpeed, SUMOReal leaderMaxDecel) const { + SUMOReal backOffset, SUMOReal leaderSpeed, SUMOReal leaderMaxDecel) const { // this follows the same logic as getFollowerOnConsecutive. we do a tree - // search until dist and check for the vehicle with the largest missing rear gap + // search and check for the vehicle with the largest missing rear gap within + // relevant range SUMOReal result = 0; - std::set visited; - std::vector newFound; - std::vector toExamine = myIncomingLanes; - while (toExamine.size() != 0) { - for (std::vector::iterator i = toExamine.begin(); i != toExamine.end(); ++i) { - MSLane* next = (*i).lane; - if (next->getFirstVehicle() != 0) { - MSVehicle* v = (MSVehicle*) next->getFirstVehicle(); - const SUMOReal agap = (*i).length - v->getPositionOnLane() + backOffset - v->getVehicleType().getMinGap(); - const SUMOReal missingRearGap = v->getCarFollowModel().getSecureGap( - v->getCarFollowModel().maxNextSpeed(v->getSpeed(), v), leaderSpeed, leaderMaxDecel) - agap; - result = MAX2(result, missingRearGap); - } else { - if ((*i).length < dist) { - const std::vector& followers = next->getIncomingLanes(); - for (std::vector::const_iterator j = followers.begin(); j != followers.end(); ++j) { - if (visited.find((*j).lane) == visited.end()) { - visited.insert((*j).lane); - MSLane::IncomingLaneInfo ili; - ili.lane = (*j).lane; - ili.length = (*j).length + (*i).length; - ili.viaLink = (*j).viaLink; - newFound.push_back(ili); - } - } - } - } - } - toExamine.clear(); - swap(newFound, toExamine); + std::pair followerInfo = getFollowerOnConsecutive(backOffset, leaderSpeed, leaderMaxDecel); + MSVehicle* v = followerInfo.first; + if (v != 0) { + result = v->getCarFollowModel().getSecureGap(v->getSpeed(), leaderSpeed, leaderMaxDecel) - followerInfo.second; } return result; } +SUMOReal +MSLane::getMaximumBrakeDist() const { + const MSVehicleControl& vc = MSNet::getInstance()->getVehicleControl(); + const SUMOReal maxSpeed = getSpeedLimit() * vc.getMaxSpeedFactor(); + // this is an upper bound on the actual braking distance (see ticket #860) + return maxSpeed * maxSpeed * 0.5 / vc.getMinDeceleration(); +} + + std::pair -MSLane::getFollowerOnConsecutive(SUMOReal dist, SUMOReal seen, SUMOReal leaderSpeed, - SUMOReal backOffset, SUMOReal predMaxDecel) const { - // ok, a vehicle has not noticed the lane about itself; - // iterate as long as necessary to search for an approaching one +MSLane::getFollowerOnConsecutive( + SUMOReal backOffset, SUMOReal leaderSpeed, SUMOReal leaderMaxDecel) const { + // do a tree search among all follower lanes and check for the most + // important vehicle (the one requiring the largest reargap) + // to get a safe bound on the necessary search depth, we need to consider the maximum speed and minimum + // deceleration of potential follower vehicles + SUMOReal dist = getMaximumBrakeDist() - backOffset; + + std::pair result(static_cast(0), -1); + SUMOReal missingRearGapMax = -std::numeric_limits::max(); std::set visited; - std::vector > possible; std::vector newFound; std::vector toExamine = myIncomingLanes; while (toExamine.size() != 0) { for (std::vector::iterator i = toExamine.begin(); i != toExamine.end(); ++i) { - /* - if ((*i).viaLink->getState()==LINKSTATE_TL_RED) { - continue; - } - */ MSLane* next = (*i).lane; - if (next->getFirstVehicle() != 0) { - MSVehicle* v = (MSVehicle*) next->getFirstVehicle(); - SUMOReal agap = (*i).length - v->getPositionOnLane() + backOffset - v->getVehicleType().getMinGap(); - if (agap <= v->getCarFollowModel().getSecureGap(v->getCarFollowModel().maxNextSpeed(v->getSpeed(), v), leaderSpeed, predMaxDecel)) { - possible.push_back(std::make_pair(v, agap)); + dist = MAX2(dist, next->getMaximumBrakeDist() - backOffset); + MSVehicle* v = 0; + SUMOReal agap = 0; + if (next->getPartialOccupator() != 0) { + // the front of v is already on divergent trajectory from the ego vehicle + // for which this method is called (in the context of MSLaneChanger). + // Therefore, technically v is not a follower but only an obstruction and + // the gap is not between the front of v and the back of ego + // but rather between the flank of v and the back of ego. + agap = (*i).length - next->getLength() + backOffset - next->getPartialOccupator()->getVehicleType().getMinGap(); + if (agap < 0) { + // Only if ego overlaps we treat v as if it were a real follower + v = next->getPartialOccupator(); + } + } + if (v == 0 && next->getFirstVehicle() != 0) { + v = next->getFirstVehicle(); + agap = (*i).length - v->getPositionOnLane() + backOffset - v->getVehicleType().getMinGap(); + } + if (v != 0) { + const SUMOReal missingRearGap = v->getCarFollowModel().getSecureGap(v->getSpeed(), leaderSpeed, leaderMaxDecel) - agap; + if (missingRearGap > missingRearGapMax) { + missingRearGapMax = missingRearGap; + result.first = v; + result.second = agap; } } else { - if ((*i).length + seen < dist) { + if ((*i).length < dist) { const std::vector& followers = next->getIncomingLanes(); for (std::vector::const_iterator j = followers.begin(); j != followers.end(); ++j) { if (visited.find((*j).lane) == visited.end()) { @@ -1101,11 +1207,7 @@ toExamine.clear(); swap(newFound, toExamine); } - if (possible.size() == 0) { - return std::pair(static_cast(0), -1); - } - sort(possible.begin(), possible.end(), by_second_sorter()); - return *(possible.begin()); + return result; } @@ -1113,31 +1215,29 @@ MSLane::getLeaderOnConsecutive(SUMOReal dist, SUMOReal seen, SUMOReal speed, const MSVehicle& veh, const std::vector& bestLaneConts) const { if (seen > dist) { - return std::pair(static_cast(0), -1); + return std::make_pair(static_cast(0), -1); } unsigned int view = 1; // loop over following lanes - const MSLane* targetLane = this; - MSVehicle* leader = targetLane->getPartialOccupator(); - if (leader != 0) { - return std::pair(leader, seen - targetLane->getPartialOccupatorEnd() - veh.getVehicleType().getMinGap()); + if (getPartialOccupator() != 0) { + return std::make_pair(getPartialOccupator(), seen - (getLength() - getPartialOccupatorEnd()) - veh.getVehicleType().getMinGap()); } - const MSLane* nextLane = targetLane; - SUMOTime arrivalTime = MSNet::getInstance()->getCurrentTimeStep() + TIME2STEPS(seen / speed); + const MSLane* nextLane = this; + SUMOTime arrivalTime = MSNet::getInstance()->getCurrentTimeStep() + TIME2STEPS(seen / MAX2(speed, NUMERICAL_EPS)); do { // get the next link used - MSLinkCont::const_iterator link = targetLane->succLinkSec(veh, view, *nextLane, bestLaneConts); + MSLinkCont::const_iterator link = succLinkSec(veh, view, *nextLane, bestLaneConts); if (nextLane->isLinkEnd(link) || !(*link)->opened(arrivalTime, speed, speed, veh.getVehicleType().getLength(), - veh.getImpatience(), veh.getCarFollowModel().getMaxDecel(), 0) || (*link)->getState() == LINKSTATE_TL_RED) { + veh.getImpatience(), veh.getCarFollowModel().getMaxDecel(), 0) || (*link)->haveRed()) { break; } #ifdef HAVE_INTERNAL_LANES // check for link leaders - const MSLink::LinkLeaders linkLeaders = (*link)->getLeaderInfo(seen - veh.getVehicleType().getMinGap()); + const MSLink::LinkLeaders linkLeaders = (*link)->getLeaderInfo(seen, veh.getVehicleType().getMinGap()); if (linkLeaders.size() > 0) { // XXX if there is more than one link leader we should return the most important // one (gap, decel) but this is hard to know at this point - return linkLeaders[0]; + return linkLeaders[0].vehAndGap; } bool nextInternal = (*link)->getViaLane() != 0; #endif @@ -1145,20 +1245,102 @@ if (nextLane == 0) { break; } - arrivalTime += TIME2STEPS(nextLane->getLength() / speed); MSVehicle* leader = nextLane->getLastVehicle(); if (leader != 0) { - return std::pair(leader, seen + leader->getPositionOnLane() - leader->getVehicleType().getLength() - veh.getVehicleType().getMinGap()); + return std::make_pair(leader, seen + leader->getPositionOnLane() - leader->getVehicleType().getLength() - veh.getVehicleType().getMinGap()); } else { leader = nextLane->getPartialOccupator(); if (leader != 0) { - return std::pair(leader, seen + nextLane->getPartialOccupatorEnd() - veh.getVehicleType().getMinGap()); + return std::make_pair(leader, seen + nextLane->getPartialOccupatorEnd() - veh.getVehicleType().getMinGap()); + } + } + if (nextLane->getVehicleMaxSpeed(&veh) < speed) { + dist = veh.getCarFollowModel().brakeGap(nextLane->getVehicleMaxSpeed(&veh)); + } + seen += nextLane->getLength(); + if (seen <= dist) { + // delaying the update of arrivalTime and making it conditional to avoid possible integer overflows + arrivalTime += TIME2STEPS(nextLane->getLength() / MAX2(speed, NUMERICAL_EPS)); + } +#ifdef HAVE_INTERNAL_LANES + if (!nextInternal) { + view++; + } +#else + view++; +#endif + } while (seen <= dist); + return std::make_pair(static_cast(0), -1); +} + + +std::pair +MSLane::getCriticalLeader(SUMOReal dist, SUMOReal seen, SUMOReal speed, const MSVehicle& veh) const { + const std::vector& bestLaneConts = veh.getBestLanesContinuation(this); + std::pair result = std::make_pair(static_cast(0), -1); + SUMOReal safeSpeed = std::numeric_limits::max(); + unsigned int view = 1; + // loop over following lanes + // @note: we don't check the partial occupator for this lane since it was + // already checked in MSLaneChanger::getRealLeader() + const MSLane* nextLane = this; + SUMOTime arrivalTime = MSNet::getInstance()->getCurrentTimeStep() + TIME2STEPS(seen / MAX2(speed, NUMERICAL_EPS)); + do { + // get the next link used + MSLinkCont::const_iterator link = succLinkSec(veh, view, *nextLane, bestLaneConts); + if (nextLane->isLinkEnd(link) || !(*link)->opened(arrivalTime, speed, speed, veh.getVehicleType().getLength(), + veh.getImpatience(), veh.getCarFollowModel().getMaxDecel(), 0) || (*link)->haveRed()) { + return result; + } +#ifdef HAVE_INTERNAL_LANES + // check for link leaders + const MSLink::LinkLeaders linkLeaders = (*link)->getLeaderInfo(seen, veh.getVehicleType().getMinGap()); + for (MSLink::LinkLeaders::const_iterator it = linkLeaders.begin(); it != linkLeaders.end(); ++it) { + const MSVehicle* leader = (*it).vehAndGap.first; + if (leader != 0 && leader != result.first) { + // XXX ignoring pedestrians here! + // XXX ignoring the fact that the link leader may alread by following us + // XXX ignoring the fact that we may drive up to the crossing point + const SUMOReal tmpSpeed = veh.getSafeFollowSpeed((*it).vehAndGap, seen, nextLane, (*it).distToCrossing); + if (tmpSpeed < safeSpeed) { + safeSpeed = tmpSpeed; + result = (*it).vehAndGap; + } + } + } + bool nextInternal = (*link)->getViaLane() != 0; +#endif + nextLane = (*link)->getViaLaneOrLane(); + if (nextLane == 0) { + break; + } + MSVehicle* leader = nextLane->getLastVehicle(); + if (leader != 0 && leader != result.first) { + const SUMOReal gap = seen + leader->getPositionOnLane() - leader->getVehicleType().getLength() - veh.getVehicleType().getMinGap(); + const SUMOReal tmpSpeed = veh.getCarFollowModel().insertionFollowSpeed(leader, speed, gap, leader->getSpeed(), leader->getCarFollowModel().getMaxDecel()); + if (tmpSpeed < safeSpeed) { + safeSpeed = tmpSpeed; + result = std::make_pair(leader, gap); + } + } else { + leader = nextLane->getPartialOccupator(); + if (leader != 0 && leader != result.first) { + const SUMOReal gap = seen + nextLane->getPartialOccupatorEnd() - veh.getVehicleType().getMinGap(); + const SUMOReal tmpSpeed = veh.getCarFollowModel().insertionFollowSpeed(leader, speed, gap, leader->getSpeed(), leader->getCarFollowModel().getMaxDecel()); + if (tmpSpeed < safeSpeed) { + safeSpeed = tmpSpeed; + result = std::make_pair(leader, gap); + } } } if (nextLane->getVehicleMaxSpeed(&veh) < speed) { dist = veh.getCarFollowModel().brakeGap(nextLane->getVehicleMaxSpeed(&veh)); } seen += nextLane->getLength(); + if (seen <= dist) { + // delaying the update of arrivalTime and making it conditional to avoid possible integer overflows + arrivalTime += TIME2STEPS(nextLane->getLength() / MAX2(speed, NUMERICAL_EPS)); + } #ifdef HAVE_INTERNAL_LANES if (!nextInternal) { view++; @@ -1167,7 +1349,7 @@ view++; #endif } while (seen <= dist); - return std::pair(static_cast(0), -1); + return result; } @@ -1177,9 +1359,9 @@ return myLogicalPredecessorLane; } if (myLogicalPredecessorLane == 0) { - std::vector pred = myEdge->getIncomingEdges(); + MSEdgeVector pred = myEdge->getIncomingEdges(); // get only those edges which connect to this lane - for (std::vector::iterator i = pred.begin(); i != pred.end();) { + for (MSEdgeVector::iterator i = pred.begin(); i != pred.end();) { std::vector::const_iterator j = find_if(myIncomingLanes.begin(), myIncomingLanes.end(), edge_finder(*i)); if (j == myIncomingLanes.end()) { i = pred.erase(i); @@ -1199,28 +1381,99 @@ } +LinkState +MSLane::getIncomingLinkState() const { + MSLane* pred = getLogicalPredecessorLane(); + if (pred == 0) { + return LINKSTATE_DEADEND; + } else { + return MSLinkContHelper::getConnectingLink(*pred, *this)->getState(); + } +} + + +std::vector +MSLane::getOutgoingLanes() const { + std::vector result; + for (MSLinkCont::const_iterator i = myLinks.begin(); i != myLinks.end(); ++i) { + assert((*i)->getLane() != 0); + result.push_back((*i)->getLane()); + } + return result; +} + + void MSLane::leftByLaneChange(MSVehicle* v) { - myVehicleLengthSum -= v->getVehicleType().getLengthWithGap(); + myBruttoVehicleLengthSum -= v->getVehicleType().getLengthWithGap(); + myNettoVehicleLengthSum -= v->getVehicleType().getLength(); } void MSLane::enteredByLaneChange(MSVehicle* v) { - myVehicleLengthSum += v->getVehicleType().getLengthWithGap(); + myBruttoVehicleLengthSum += v->getVehicleType().getLengthWithGap(); + myNettoVehicleLengthSum += v->getVehicleType().getLength(); } +int +MSLane::getCrossingIndex() const { + for (MSLinkCont::const_iterator i = myLinks.begin(); i != myLinks.end(); ++i) { + if ((*i)->getLane()->getEdge().isCrossing()) { + return (int)(i - myLinks.begin()); + } + } + return -1; +} + // ------------ Current state retrieval SUMOReal -MSLane::getOccupancy() const { - return myVehicleLengthSum / myLength; +MSLane::getBruttoOccupancy() const { + SUMOReal fractions = myInlappingVehicle != 0 ? myLength - myInlappingVehicleEnd : 0; + getVehiclesSecure(); + if (myVehicles.size() != 0) { + MSVehicle* lastVeh = myVehicles.front(); + if (lastVeh->getPositionOnLane() < lastVeh->getVehicleType().getLength()) { + fractions -= (lastVeh->getVehicleType().getLength() - lastVeh->getPositionOnLane()); + } + } + releaseVehicles(); + return (myBruttoVehicleLengthSum + fractions) / myLength; +} + + +SUMOReal +MSLane::getNettoOccupancy() const { + SUMOReal fractions = myInlappingVehicle != 0 ? myLength - myInlappingVehicleEnd : 0; + getVehiclesSecure(); + if (myVehicles.size() != 0) { + MSVehicle* lastVeh = myVehicles.front(); + if (lastVeh->getPositionOnLane() < lastVeh->getVehicleType().getLength()) { + fractions -= (lastVeh->getVehicleType().getLength() - lastVeh->getPositionOnLane()); + } + } + releaseVehicles(); + return (myNettoVehicleLengthSum + fractions) / myLength; } SUMOReal -MSLane::getVehLenSum() const { - return myVehicleLengthSum; +MSLane::getBruttoVehLenSum() const { + return myBruttoVehicleLengthSum; +} + + +SUMOReal +MSLane::getWaitingSeconds() const { + if (myVehicles.size() == 0) { + return 0; + } + SUMOReal wtime = 0; + for (VehCont::const_iterator i = myVehicles.begin(); i != myVehicles.end(); ++i) { + wtime += (*i)->getWaitingSeconds(); + } + return wtime; } @@ -1241,11 +1494,11 @@ SUMOReal -MSLane::getHBEFA_CO2Emissions() const { +MSLane::getCO2Emissions() const { SUMOReal ret = 0; const MSLane::VehCont& vehs = getVehiclesSecure(); for (MSLane::VehCont::const_iterator i = vehs.begin(); i != vehs.end(); ++i) { - ret += (*i)->getHBEFA_CO2Emissions(); + ret += (*i)->getCO2Emissions(); } releaseVehicles(); return ret; @@ -1253,11 +1506,11 @@ SUMOReal -MSLane::getHBEFA_COEmissions() const { +MSLane::getCOEmissions() const { SUMOReal ret = 0; const MSLane::VehCont& vehs = getVehiclesSecure(); for (MSLane::VehCont::const_iterator i = vehs.begin(); i != vehs.end(); ++i) { - ret += (*i)->getHBEFA_COEmissions(); + ret += (*i)->getCOEmissions(); } releaseVehicles(); return ret; @@ -1265,11 +1518,11 @@ SUMOReal -MSLane::getHBEFA_PMxEmissions() const { +MSLane::getPMxEmissions() const { SUMOReal ret = 0; const MSLane::VehCont& vehs = getVehiclesSecure(); for (MSLane::VehCont::const_iterator i = vehs.begin(); i != vehs.end(); ++i) { - ret += (*i)->getHBEFA_PMxEmissions(); + ret += (*i)->getPMxEmissions(); } releaseVehicles(); return ret; @@ -1277,11 +1530,11 @@ SUMOReal -MSLane::getHBEFA_NOxEmissions() const { +MSLane::getNOxEmissions() const { SUMOReal ret = 0; const MSLane::VehCont& vehs = getVehiclesSecure(); for (MSLane::VehCont::const_iterator i = vehs.begin(); i != vehs.end(); ++i) { - ret += (*i)->getHBEFA_NOxEmissions(); + ret += (*i)->getNOxEmissions(); } releaseVehicles(); return ret; @@ -1289,11 +1542,11 @@ SUMOReal -MSLane::getHBEFA_HCEmissions() const { +MSLane::getHCEmissions() const { SUMOReal ret = 0; const MSLane::VehCont& vehs = getVehiclesSecure(); for (MSLane::VehCont::const_iterator i = vehs.begin(); i != vehs.end(); ++i) { - ret += (*i)->getHBEFA_HCEmissions(); + ret += (*i)->getHCEmissions(); } releaseVehicles(); return ret; @@ -1301,11 +1554,11 @@ SUMOReal -MSLane::getHBEFA_FuelConsumption() const { +MSLane::getFuelConsumption() const { SUMOReal ret = 0; const MSLane::VehCont& vehs = getVehiclesSecure(); for (MSLane::VehCont::const_iterator i = vehs.begin(); i != vehs.end(); ++i) { - ret += (*i)->getHBEFA_FuelConsumption(); + ret += (*i)->getFuelConsumption(); } releaseVehicles(); return ret; @@ -1377,7 +1630,7 @@ for (std::vector::const_iterator it = vehIds.begin(); it != vehIds.end(); ++it) { MSVehicle* v = dynamic_cast(vc.getVehicle(*it)); assert(v != 0); - v->getBestLanes(true, this); + v->updateBestLanes(false, this); incorporateVehicle(v, v->getPositionOnLane(), v->getSpeed(), myVehicles.end(), MSMoveReminder::NOTIFICATION_JUNCTION); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLane.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLane.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLane.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLane.h 2015-04-17 00:20:29.000000000 +0000 @@ -8,12 +8,12 @@ /// @author Michael Behrisch /// @author Mario Krumnow /// @date Mon, 12 Mar 2001 -/// @version $Id: MSLane.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSLane.h 18096 2015-03-17 09:50:59Z behrisch $ /// // Representation of a lane in the micro simulation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -42,10 +42,14 @@ #include #include #include -#include +#include +#include #include #include "MSLinkCont.h" #include "MSMoveReminder.h" +#ifndef NO_TRACI +#include +#endif // =========================================================================== @@ -188,10 +192,11 @@ * @return Whether the vehicle could be inserted * @see MSVehicle::enterLaneAtInsertion */ - virtual bool isInsertionSuccess(MSVehicle* vehicle, SUMOReal speed, SUMOReal pos, - bool recheckNextLanes, - MSMoveReminder::Notification notification = MSMoveReminder::NOTIFICATION_DEPARTED); + bool isInsertionSuccess(MSVehicle* vehicle, SUMOReal speed, SUMOReal pos, + bool recheckNextLanes, + MSMoveReminder::Notification notification); + bool checkFailure(MSVehicle* aVehicle, SUMOReal& speed, SUMOReal& dist, const SUMOReal nspeed, const bool patchSpeed, const std::string errorMsg) const; bool pWagGenericInsertion(MSVehicle& veh, SUMOReal speed, SUMOReal maxPos, SUMOReal minPos); bool pWagSimpleInsertion(MSVehicle& veh, SUMOReal speed, SUMOReal maxPos, SUMOReal minPos); bool maxSpeedGapInsertion(MSVehicle& veh, SUMOReal mspeed); @@ -319,6 +324,11 @@ return myShape; } + /// @brief return shape.length() / myLength + inline SUMOReal getLengthGeometryFactor() const { + return myLengthGeometryFactor; + } + /* @brief fit the given lane position to a visibly suitable geometry position * (lane length might differ from geometry length) */ inline SUMOReal interpolateLanePosToGeometryPos(SUMOReal lanePos) const { @@ -378,6 +388,8 @@ } /// @} + /// @brief return the index of the link to the next crossing if this is walkingArea, else -1 + int getCrossingIndex() const; /// @name Vehicle movement (longitudinal) @@ -409,7 +421,7 @@ /// Check if vehicles are too close. - virtual void detectCollisions(SUMOTime timestep, int stage); + virtual void detectCollisions(SUMOTime timestep, const std::string& stage); /** Returns the information whether this lane may be used to continue @@ -427,14 +439,15 @@ return myVehicles.empty(); } - void setMaxSpeed(SUMOReal val) { - myMaxSpeed = val; - } - - void setLength(SUMOReal val) { - myLength = val; - } + /** @brief Sets a new maximum speed for the lane (used by TraCI and MSCalibrator) + * @param[in] val the new speed in m/s + */ + void setMaxSpeed(SUMOReal val); + /** @brief Sets a new length for the lane (used by TraCI only) + * @param[in] val the new length in m + */ + void setLength(SUMOReal val); /** @brief Returns the lane's edge * @return This lane's edge @@ -443,32 +456,74 @@ return *myEdge; } + + /** @brief Returns the lane's follower if it is an internal lane, the edge of the lane otherwise + * @return This lane's follower + */ + const MSEdge* getInternalFollower() const; + + + /// @brief Static (sic!) container methods + /// { + /** @brief Inserts a MSLane into the static dictionary - Returns true if the key id isn't already in the dictionary. - Otherwise returns false. */ - static bool dictionary(std::string id, MSLane* lane); - - /** @brief Returns the MSLane associated to the key id if exists - Otherwise returns 0. */ - static MSLane* dictionary(std::string id); + * + * Returns true if the key id isn't already in the dictionary. + * Otherwise returns false. + * @param[in] id The id of the lane + * @param[in] lane The lane itself + * @return Whether the lane was added + * @todo make non-static + * @todo why is the id given? The lane is named + */ + static bool dictionary(const std::string& id, MSLane* lane); - /** Clears the dictionary */ + + /** @brief Returns the MSLane associated to the key id + * + * The lane is returned if exists, otherwise 0 is returned. + * @param[in] id The id of the lane + * @return The lane + */ + static MSLane* dictionary(const std::string& id); + + + /** @brief Clears the dictionary */ static void clear(); + + /** @brief Returns the number of stored lanes + * @return The number of stored lanes + */ static size_t dictSize() { return myDict.size(); } + + /** @brief Adds the ids of all stored lanes into the given vector + * @param[in, filled] into The vector to add the IDs into + */ static void insertIDs(std::vector& into); + + /** @brief Fills the given RTree with lane instances + * @param[in, filled] into The RTree to fill + * @see TraCILaneRTree + */ + template + static void fill(RTREE& into); + /// @} + + + /** Same as succLink, but does not throw any assertions when the succeeding link could not be found; Returns the myLinks.end() instead; Further, the number of edges to look forward may be given */ - virtual MSLinkCont::const_iterator succLinkSec(const SUMOVehicle& veh, + static MSLinkCont::const_iterator succLinkSec(const SUMOVehicle& veh, unsigned int nRouteSuccs, const MSLane& succLinkSource, - const std::vector& conts) const; + const std::vector& conts); /** Returns the information whether the given link shows at the end @@ -479,15 +534,19 @@ of the list of links (is not valid) */ bool isLinkEnd(MSLinkCont::iterator& i); - /// returns the last vehicle - virtual MSVehicle* getLastVehicle() const; - virtual const MSVehicle* getFirstVehicle() const; - + /** Returns the information whether the lane is has no vehicle and no + partial occupation*/ + bool isEmpty() const; + /// returns the last vehicle + MSVehicle* getLastVehicle() const; + MSVehicle* getFirstVehicle() const; - /// @brief remove the vehicle from this lane - virtual MSVehicle* removeVehicle(MSVehicle* remVehicle, MSMoveReminder::Notification notification); + /* @brief remove the vehicle from this lane + * @param[notify] whether moveReminders of the vehicle shall be triggered + */ + virtual MSVehicle* removeVehicle(MSVehicle* remVehicle, MSMoveReminder::Notification notification, bool notify = true); /// The shape of the lane PositionVector myShape; @@ -533,16 +592,16 @@ - std::pair getFollowerOnConsecutive(SUMOReal dist, SUMOReal seen, - SUMOReal leaderSpeed, SUMOReal backOffset, SUMOReal predMaxDecel) const; + /// @brief return the follower with the largest missing rear gap among all predecessor lanes (within dist) + std::pair getFollowerOnConsecutive( + SUMOReal backOffset, SUMOReal leaderSpeed, SUMOReal leaderMaxDecel) const; /// @brief return by how much further the leader must be inserted to avoid rear end collisions - SUMOReal getMissingRearGap(SUMOReal dist, SUMOReal backOffset, - SUMOReal leaderSpeed, SUMOReal leaderMaxDecel) const; + SUMOReal getMissingRearGap(SUMOReal backOffset, SUMOReal leaderSpeed, SUMOReal leaderMaxDecel) const; - /** @brief Returns the leader and the distance to him + /** @brief Returns the immediate leader and the distance to him * * Goes along the vehicle's estimated used lanes (bestLaneConts). For each link, * it is determined whether the vehicle will pass it. If so, the subsequent lane @@ -568,8 +627,33 @@ SUMOReal speed, const MSVehicle& veh, const std::vector& bestLaneConts) const; + /** @brief Returns the most dangerous leader and the distance to him + * + * Goes along the vehicle's estimated used lanes (bestLaneConts). For each link, + * it is determined whether the ego vehicle will pass it. If so, the subsequent lane + * is investigated. Check all lanes up to the stopping distance of ego. + * Return the leader vehicle (and the gap) which puts the biggest speed constraint on ego. + * + * If no leading vehicle was found, <0, -1> is returned. + * + * Pretty slow, as it has to go along lanes. + * + * @param[in] dist The distance to investigate + * @param[in] seen The already seen place (normally the place in front on own lane) + * @param[in] speed The speed of the vehicle used for determining whether a subsequent link will be opened at arrival time + * @param[in] veh The (ego) vehicle for which the information shall be computed + * @return + */ + std::pair getCriticalLeader(SUMOReal dist, SUMOReal seen, SUMOReal speed, const MSVehicle& veh) const; + + MSLane* getLogicalPredecessorLane() const; + /// @brief get the state of the link from the logical predecessor to this lane + LinkState getIncomingLinkState() const; + + /// @brief get the list of outgoing lanes + std::vector getOutgoingLanes() const; /// @name Current state retrieval //@{ @@ -579,53 +663,64 @@ */ SUMOReal getMeanSpeed() const; + /** @brief Returns the overall waiting time on this lane + * @return The sum of the waiting time of all vehicles during the last step; + */ + SUMOReal getWaitingSeconds() const; + + + /** @brief Returns the brutto (including minGaps) occupancy of this lane during the last step + * @return The occupancy during the last step + */ + SUMOReal getBruttoOccupancy() const; - /** @brief Returns the occupancy of this lane during the last step + + /** @brief Returns the netto (excluding minGaps) occupancy of this lane during the last step (including minGaps) * @return The occupancy during the last step */ - SUMOReal getOccupancy() const; + SUMOReal getNettoOccupancy() const; - /** @brief Returns the sum of lengths of vehicles which were on the lane during the last step + /** @brief Returns the sum of lengths of vehicles, including their minGaps, which were on the lane during the last step * @return The sum of vehicle lengths of vehicles in the last step */ - SUMOReal getVehLenSum() const; + SUMOReal getBruttoVehLenSum() const; /** @brief Returns the sum of last step CO2 emissions * @return CO2 emissions of vehicles on this lane during the last step */ - SUMOReal getHBEFA_CO2Emissions() const; + SUMOReal getCO2Emissions() const; /** @brief Returns the sum of last step CO emissions * @return CO emissions of vehicles on this lane during the last step */ - SUMOReal getHBEFA_COEmissions() const; + SUMOReal getCOEmissions() const; /** @brief Returns the sum of last step PMx emissions * @return PMx emissions of vehicles on this lane during the last step */ - SUMOReal getHBEFA_PMxEmissions() const; + SUMOReal getPMxEmissions() const; /** @brief Returns the sum of last step NOx emissions * @return NOx emissions of vehicles on this lane during the last step */ - SUMOReal getHBEFA_NOxEmissions() const; + SUMOReal getNOxEmissions() const; /** @brief Returns the sum of last step HC emissions * @return HC emissions of vehicles on this lane during the last step */ - SUMOReal getHBEFA_HCEmissions() const; + SUMOReal getHCEmissions() const; /** @brief Returns the sum of last step fuel consumption * @return fuel consumption of vehicles on this lane during the last step */ - SUMOReal getHBEFA_FuelConsumption() const; + SUMOReal getFuelConsumption() const; /** @brief Returns the sum of last step noise emissions @@ -662,6 +757,18 @@ /// @} +#ifndef NO_TRACI + /** @brief Callback for visiting the lane when traversing an RTree + * + * This is used in the TraCIServerAPI_Lane for context subscriptions. + * + * @param[in] cont The context doing all the work + * @see TraCIServerAPI_Lane::StoringVisitor::add + */ + void visit(const TraCIServerAPI_Lane::StoringVisitor& cont) const { + cont.add(this); + } +#endif protected: /// moves myTmpVehicles int myVehicles after a lane change procedure @@ -682,6 +789,12 @@ MSMoveReminder::Notification notification = MSMoveReminder::NOTIFICATION_DEPARTED); + /// @brief issue warning and add the vehicle to MSVehicleTransfer + void handleCollision(SUMOTime timestep, const std::string& stage, MSVehicle* collider, MSVehicle* victim, const SUMOReal gap); + + /// @brief compute maximum braking distance on this lane + SUMOReal getMaximumBrakeDist() const; + protected: /// Unique numerical ID (set on reading by netload) size_t myNumericalID; @@ -699,10 +812,10 @@ SUMOReal myLength; /// Lane width [m] - SUMOReal myWidth; + const SUMOReal myWidth; /// The lane's edge, for routing only. - MSEdge* myEdge; + MSEdge* const myEdge; /// Lane-wide speedlimit [m/s] SUMOReal myMaxSpeed; @@ -722,8 +835,11 @@ mutable MSLane* myLogicalPredecessorLane; - /// @brief The current length of all vehicles on this lane - SUMOReal myVehicleLengthSum; + /// @brief The current length of all vehicles on this lane, including their minGaps + SUMOReal myBruttoVehicleLengthSum; + + /// @brief The current length of all vehicles on this lane, excluding their minGaps + SUMOReal myNettoVehicleLengthSum; /// @brief End position of a vehicle which laps into this lane SUMOReal myInlappingVehicleEnd; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLCM_DK2004.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLCM_DK2004.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLCM_DK2004.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLCM_DK2004.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,672 +0,0 @@ -/****************************************************************************/ -/// @file MSLCM_DK2004.cpp -/// @author Daniel Krajzewicz -/// @author Friedemann Wesner -/// @author Sascha Krieg -/// @author Michael Behrisch -/// @date Tue, 29.05.2005 -/// @version $Id: MSLCM_DK2004.cpp 14506 2013-08-27 13:23:43Z namdre $ -/// -// A lane change model developed by D. Krajzewicz between 2004 and 2010 -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include "MSEdge.h" -#include "MSLane.h" -#include "MSLCM_DK2004.h" - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - -//#define DEBUG_VEHICLE_GUI_SELECTION 1 -#ifdef DEBUG_VEHICLE_GUI_SELECTION -#include -#include -#include -#endif - - - -// =========================================================================== -// variable definitions -// =========================================================================== -// 80km/h will be the threshold for dividing between long/short foresight -#define LOOK_FORWARD_SPEED_DIVIDER 14. - -#define LOOK_FORWARD_FAR 15. -#define LOOK_FORWARD_NEAR 5. - - - -#define JAM_FACTOR 2. -#define JAM_FACTOR2 1. - - -// =========================================================================== -// member method definitions -// =========================================================================== -MSLCM_DK2004::MSLCM_DK2004(MSVehicle& v) - : MSAbstractLaneChangeModel(v), - myChangeProbability(0), - myLeadingBlockerLength(0), myLeftSpace(0) {} - -MSLCM_DK2004::~MSLCM_DK2004() { - changed(); -} - - -int -MSLCM_DK2004::wantsChangeToRight(MSAbstractLaneChangeModel::MSLCMessager& msgPass, - int blocked, - const std::pair& leader, - const std::pair& neighLead, - const std::pair& neighFollow, - const MSLane& neighLane, - const std::vector& preb, - MSVehicle** lastBlocked) { -#ifdef DEBUG_VEHICLE_GUI_SELECTION - if (gSelected.isSelected(GLO_VEHICLE, static_cast(&myVehicle)->getGlID())) { - int bla = 0; - } -#endif - MSVehicle::LaneQ curr, best; - int bestLaneOffset = 0; - SUMOReal currentDist = 0; - SUMOReal neighDist = 0; - SUMOReal neighExtDist = 0; - SUMOReal currExtDist = 0; - int currIdx = 0; - for (int p = 0; p < (int) preb.size(); ++p) { - if (preb[p].lane == myVehicle.getLane()) { - curr = preb[p]; - bestLaneOffset = curr.bestLaneOffset; - currentDist = curr.length; - currExtDist = curr.lane->getLength(); - neighDist = preb[p - 1].length; - neighExtDist = preb[p - 1].lane->getLength(); - best = preb[p + bestLaneOffset]; - currIdx = p; - } - } - - // keep information about being a leader/follower - int ret = (myOwnState & 0x00ffff00); - - if (leader.first != 0 - && - (myOwnState & LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0 - && - (leader.first->getLaneChangeModel().getOwnState()&LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0) { - - myOwnState &= (0xffffffff - LCA_AMBLOCKINGFOLLOWER_DONTBRAKE); - if (myVehicle.getSpeed() > SUMO_const_haltingSpeed) { - myOwnState |= LCA_AMBACKBLOCKER; - } else { - ret |= LCA_AMBACKBLOCKER; - myDontBrake = true; - } - } - - // process information about the last blocked vehicle - // if this vehicle is blocking someone in front, we maybe decelerate to let him in - if ((*lastBlocked) != 0) { - SUMOReal gap = (*lastBlocked)->getPositionOnLane() - (*lastBlocked)->getVehicleType().getLength() - myVehicle.getPositionOnLane() - myVehicle.getVehicleType().getMinGap(); - if (gap > 0.1) { - if (myVehicle.getSpeed() < ACCEL2SPEED(myVehicle.getCarFollowModel().getMaxDecel())) { - if ((*lastBlocked)->getSpeed() < SUMO_const_haltingSpeed) { - ret |= LCA_AMBACKBLOCKER_STANDING; - } else { - ret |= LCA_AMBACKBLOCKER; - } - myVSafes.push_back(myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), (SUMOReal)(gap - 0.1), (*lastBlocked)->getSpeed(), (*lastBlocked)->getCarFollowModel().getMaxDecel())); - (*lastBlocked) = 0; - } - return ret; - } - } - - // we try to estimate the distance which is necessary to get on a lane - // we have to get on in order to keep our route - // we assume we need something that depends on our velocity - // and compare this with the free space on our wished lane - // - // if the free space is somehow less than the space we need, we should - // definitely try to get to the desired lane - // - // this rule forces our vehicle to change the lane if a lane changing is necessary soon - SUMOReal rv = myVehicle.getSpeed() > LOOK_FORWARD_SPEED_DIVIDER - ? myVehicle.getSpeed() * (SUMOReal) LOOK_FORWARD_FAR - : myVehicle.getSpeed() * (SUMOReal) LOOK_FORWARD_NEAR; - rv += myVehicle.getVehicleType().getLengthWithGap() * (SUMOReal) 2.; - - SUMOReal tdist = currentDist - myVehicle.getPositionOnLane() - best.occupation * (SUMOReal) JAM_FACTOR2; - - // assert(best.length > curr.length); - // XXX if (curr.length != best.length) && ... - if (fabs(best.length - curr.length) > MIN2((SUMOReal) .1, best.lane->getLength()) && bestLaneOffset < 0 && currentDistDisallows(tdist/*currentDist*/, bestLaneOffset, rv)) { - informBlocker(msgPass, blocked, LCA_MRIGHT, neighLead, neighFollow); - if (neighLead.second > 0 && neighLead.second > leader.second) { - myVSafes.push_back(myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighLead.second, neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel()) - (SUMOReal) 0.5); - } - - // letting vehicles merge in at the end of the lane in case of counter-lane change, step#1, right - // if there is a leader and he wants to change to left (we want to change to right) - if (neighLead.first != 0 && (neighLead.first->getLaneChangeModel().getOwnState()&LCA_LEFT) != 0) { - // save at least his length in myLeadingBlockerLength - myLeadingBlockerLength = MAX2(neighLead.first->getVehicleType().getLengthWithGap(), myLeadingBlockerLength); - // save the left space - myLeftSpace = currentDist - myVehicle.getPositionOnLane(); - } - // - - return ret | LCA_RIGHT | LCA_URGENT; - } - - - // the opposite lane-changing direction should be done than the one examined herein - // we'll check whether we assume we could change anyhow and get back in time... - // - // this rule prevents the vehicle from moving in opposite direction of the best lane - // unless the way till the end where the vehicle has to be on the best lane - // is long enough - SUMOReal maxJam = MAX2(preb[currIdx - 1].occupation, preb[currIdx].occupation); - SUMOReal neighLeftPlace = MAX2((SUMOReal) 0, neighDist - myVehicle.getPositionOnLane() - maxJam); - if (bestLaneOffset >= 0 && (currentDistDisallows(neighLeftPlace, bestLaneOffset + 2, rv))) { - // ...we will not change the lane if not - return ret; - } - - - // if the current lane is the best and a lane-changing would cause a situation - // of which we assume we will not be able to return to the lane we have to be on... - // - // this rule prevents the vehicle from leaving the current, best lane when it is - // close to this lane's end - if (currExtDist > neighExtDist && (neighLeftPlace * 2. < rv/*||currE[currIdx+1].lengthgetVehicleMaxSpeed(&myVehicle) > 80. / 3.6) { - return ret; - } - // -------- - - // -------- make place on current lane if blocking follower - if (amBlockingFollowerPlusNB() - && - (currentDistAllows(neighDist, bestLaneOffset, rv) || neighDist >= currentDist)) { - - return ret | LCA_RIGHT | LCA_URGENT; - } - // -------- - - - // -------- security checks for krauss - // (vsafe fails when gap<0) - if ((blocked & LCA_BLOCKED) != 0) { - return ret; - } - // -------- - - // -------- higher speed - if ((congested(neighLead.first) && neighLead.second < 20) || predInteraction(leader.first)) { //!!! - return ret; - } - SUMOReal thisLaneVSafe = myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle); - SUMOReal neighLaneVSafe = neighLane.getVehicleMaxSpeed(&myVehicle); - if (neighLead.first == 0) { - neighLaneVSafe = MIN2(neighLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighDist, 0, 0)); - } else { - // @todo: what if leader is below safe gap?!!! - neighLaneVSafe = MIN2(neighLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighLead.second, neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel())); - } - if (leader.first == 0) { - thisLaneVSafe = MIN2(thisLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), currentDist, 0, 0)); - } else { - // @todo: what if leader is below safe gap?!!! - thisLaneVSafe = MIN2(thisLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), leader.second, leader.first->getSpeed(), leader.first->getCarFollowModel().getMaxDecel())); - } - - thisLaneVSafe = MIN2(thisLaneVSafe, myVehicle.getVehicleType().getMaxSpeed()); - neighLaneVSafe = MIN2(neighLaneVSafe, myVehicle.getVehicleType().getMaxSpeed()); - if (thisLaneVSafe - neighLaneVSafe > 5. / 3.6) { - // ok, the current lane is faster than the right one... - if (myChangeProbability < 0) { - myChangeProbability /= 2.0; - } - } else { - // ok, the right lane is faster than the current - myChangeProbability -= (SUMOReal)((neighLaneVSafe - thisLaneVSafe) / (myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle))); - } - - // let's recheck the "Rechtsfahrgebot" - SUMOReal vmax = MIN2(myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle), myVehicle.getVehicleType().getMaxSpeed()); - vmax -= (SUMOReal)(5. / 2.6); - if (neighLaneVSafe >= vmax) { -#ifndef NO_TRACI - /* if there was a request by TraCI for changing to this lane - and holding it, this rule is ignored */ - if (myChangeRequest != MSVehicle::REQUEST_HOLD) { -#endif - myChangeProbability -= (SUMOReal)((neighLaneVSafe - vmax) / (vmax)); -#ifndef NO_TRACI - } -#endif - } - - if (myChangeProbability < -2 && neighDist / MAX2((SUMOReal) .1, myVehicle.getSpeed()) > 20.) { //./MAX2((SUMOReal) .1, myVehicle.getSpeed())) { // -.1 - return ret | LCA_RIGHT | LCA_SPEEDGAIN; - } - // -------- - -#ifndef NO_TRACI - // If there is a request by TraCI, try to change the lane - if (myChangeRequest == MSVehicle::REQUEST_RIGHT) { - return ret | LCA_RIGHT; - } -#endif - - return ret; -} - - -int -MSLCM_DK2004::wantsChangeToLeft(MSAbstractLaneChangeModel::MSLCMessager& msgPass, - int blocked, - const std::pair& leader, - const std::pair& neighLead, - const std::pair& neighFollow, - const MSLane& neighLane, - const std::vector& preb, - MSVehicle** lastBlocked) { -#ifdef DEBUG_VEHICLE_GUI_SELECTION - if (gSelected.isSelected(GLO_VEHICLE, static_cast(&myVehicle)->getGlID())) { - int bla = 0; - } -#endif - MSVehicle::LaneQ curr, best; - int bestLaneOffset = 0; - SUMOReal currentDist = 0; - SUMOReal neighDist = 0; - SUMOReal neighExtDist = 0; - SUMOReal currExtDist = 0; - int currIdx = 0; - for (int p = 0; p < (int) preb.size(); ++p) { - if (preb[p].lane == myVehicle.getLane()) { - curr = preb[p]; - bestLaneOffset = curr.bestLaneOffset; - currentDist = curr.length; - currExtDist = curr.lane->getLength(); - neighDist = preb[p + 1].length; - neighExtDist = preb[p + 1].lane->getLength(); - best = preb[p + bestLaneOffset]; - currIdx = p; - } - } - // keep information about being a leader/follower - int ret = (myOwnState & 0x00ffff00); - - // ?!!! - if (leader.first != 0 - && - (myOwnState & LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0 - && - (leader.first->getLaneChangeModel().getOwnState()&LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0) { - - myOwnState &= (0xffffffff - LCA_AMBLOCKINGFOLLOWER_DONTBRAKE); - if (myVehicle.getSpeed() > SUMO_const_haltingSpeed) { - myOwnState |= LCA_AMBACKBLOCKER; - } else { - ret |= LCA_AMBACKBLOCKER; - myDontBrake = true; - } - } - - // process information about the last blocked vehicle - // if this vehicle is blocking someone in front, we maybe decelerate to let him in - if ((*lastBlocked) != 0) { - SUMOReal gap = (*lastBlocked)->getPositionOnLane() - (*lastBlocked)->getVehicleType().getLength() - myVehicle.getPositionOnLane() - myVehicle.getVehicleType().getMinGap(); - if (gap > 0.1) { - if (myVehicle.getSpeed() < ACCEL2SPEED(myVehicle.getCarFollowModel().getMaxDecel())) { - if ((*lastBlocked)->getSpeed() < SUMO_const_haltingSpeed) { - ret |= LCA_AMBACKBLOCKER_STANDING; - } else { - ret |= LCA_AMBACKBLOCKER; - } - myVSafes.push_back(myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), (SUMOReal)(gap - 0.1), (*lastBlocked)->getSpeed(), (*lastBlocked)->getCarFollowModel().getMaxDecel())); - (*lastBlocked) = 0; - } - return ret; - } - } - - // we try to estimate the distance which is necessary to get on a lane - // we have to get on in order to keep our route - // we assume we need something that depends on our velocity - // and compare this with the free space on our wished lane - // - // if the free space is somehow less than the space we need, we should - // definitely try to get to the desired lane - // - // this rule forces our vehicle to change the lane if a lane changing is necessary soon - SUMOReal lv = myVehicle.getSpeed() > LOOK_FORWARD_SPEED_DIVIDER - ? myVehicle.getSpeed() * (SUMOReal) LOOK_FORWARD_FAR - : myVehicle.getSpeed() * (SUMOReal) LOOK_FORWARD_NEAR; - lv += myVehicle.getVehicleType().getLengthWithGap() * (SUMOReal) 2.; - - - SUMOReal tdist = currentDist - myVehicle.getPositionOnLane() - best.occupation * (SUMOReal) JAM_FACTOR2; - if (fabs(best.length - curr.length) > MIN2((SUMOReal) .1, best.lane->getLength()) && bestLaneOffset > 0 - && - currentDistDisallows(tdist/*currentDist*/, bestLaneOffset, lv)) { - informBlocker(msgPass, blocked, LCA_MLEFT, neighLead, neighFollow); - if (neighLead.second > 0 && neighLead.second > leader.second) { - myVSafes.push_back(myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighLead.second, neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel()) - (SUMOReal) 0.5); - } - - // letting vehicles merge in at the end of the lane in case of counter-lane change, step#1, left - // if there is a leader and he wants to change to right (we want to change to left) - if (neighLead.first != 0 && (neighLead.first->getLaneChangeModel().getOwnState()&LCA_RIGHT) != 0) { - // save at least his length in myLeadingBlockerLength - myLeadingBlockerLength = MAX2(neighLead.first->getVehicleType().getLengthWithGap(), myLeadingBlockerLength); - // save the left space - myLeftSpace = currentDist - myVehicle.getPositionOnLane(); - } - // - - return ret | LCA_LEFT | LCA_URGENT; - } - - // the opposite lane-changing direction should be rather done, not - // the one examined herein - // we'll check whether we assume we could change anyhow and get back in time... - // - // this rule prevents the vehicle from moving in opposite direction of the best lane - // unless the way till the end where the vehicle has to be on the best lane - // is long enough - SUMOReal maxJam = MAX2(preb[currIdx + 1].occupation, preb[currIdx].occupation); - SUMOReal neighLeftPlace = MAX2((SUMOReal) 0, neighDist - myVehicle.getPositionOnLane() - maxJam); - if (bestLaneOffset <= 0 && (currentDistDisallows(neighLeftPlace, bestLaneOffset - 2, lv))) { - // ...we will not change the lane if not - return ret; - } - - - // if the current lane is the best and a lane-changing would cause a situation - // of which we assume we will not be able to return to the lane we have to be on... - // - // this rule prevents the vehicle from leaving the current, best lane when it is - // close to this lane's end - if (currExtDist > neighExtDist && (neighLeftPlace * 2. < lv/*||currE[currIdx+1].length80./3.6) { - return ret; - } - */ - - - /* - // if the current lane is the - if(bestLaneOffset==0&&(neighDist==0||curr.seenVehicles2*JAM_FACTOR>=neighExtDist-curr.length)) { - return ret; - } - */ - // -------- - - // -------- make place on current lane if blocking follower - if (amBlockingFollowerPlusNB() - && - (currentDistAllows(neighDist, bestLaneOffset, lv) || neighDist >= currentDist)) { - - return ret | LCA_LEFT | LCA_URGENT; - } - // -------- - - // -------- security checks for krauss - // (vsafe fails when gap<0) - if ((blocked & LCA_BLOCKED) != 0) { - return ret; - } - - // -------- higher speed - if ((congested(neighLead.first) && neighLead.second < 20) || predInteraction(leader.first)) { //!!! - return ret; - } - SUMOReal neighLaneVSafe = neighLane.getVehicleMaxSpeed(&myVehicle); - SUMOReal thisLaneVSafe = myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle); - if (neighLead.first == 0) { - neighLaneVSafe = MIN2(neighLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighDist, 0, 0)); // !!! warum nicht die Folgesgeschw.? - } else { - // @todo: what if leader is below safe gap?!!! - neighLaneVSafe = MIN2(neighLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighLead.second, neighLead.first->getSpeed(), neighLead.first->getCarFollowModel().getMaxDecel())); - } - if (leader.first == 0) { - thisLaneVSafe = MIN2(thisLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), currentDist, 0, 0)); - } else { - // @todo: what if leader is below safe gap?!!! - thisLaneVSafe = MIN2(thisLaneVSafe, myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), leader.second, leader.first->getSpeed(), leader.first->getCarFollowModel().getMaxDecel())); - } - thisLaneVSafe = MIN2(thisLaneVSafe, myVehicle.getVehicleType().getMaxSpeed()); - neighLaneVSafe = MIN2(neighLaneVSafe, myVehicle.getVehicleType().getMaxSpeed()); - if (thisLaneVSafe > neighLaneVSafe) { - // this lane is better - if (myChangeProbability > 0) { - myChangeProbability /= 2.0; - } - } else { - // right lane is better - myChangeProbability += (SUMOReal)((neighLaneVSafe - thisLaneVSafe) / (myVehicle.getLane()->getVehicleMaxSpeed(&myVehicle))); // !!! Fahrzeuggeschw.! - } - if (myChangeProbability > .2 && neighDist / MAX2((SUMOReal) .1, myVehicle.getSpeed()) > 20.) { // .1 - return ret | LCA_LEFT | LCA_SPEEDGAIN | LCA_URGENT; - } - // -------- - -#ifndef NO_TRACI - // If there is a request by TraCI, try to change the lane - if (myChangeRequest == MSVehicle::REQUEST_LEFT) { - return ret | LCA_LEFT; - } -#endif - - return ret; -} - - -SUMOReal -MSLCM_DK2004::patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, const MSCFModel& cfModel) { -#ifdef DEBUG_VEHICLE_GUI_SELECTION - if (gSelected.isSelected(GLO_VEHICLE, static_cast(&myVehicle)->getGlID())) { - int bla = 0; - } -#endif - int state = myOwnState; - myOwnState = 0; - - // letting vehicles merge in at the end of the lane in case of counter-lane change, step#2 - SUMOReal MAGIC_offset = 1.; - // if we want to change and have a blocking leader and there is enough room for him in front of us - if (myLeadingBlockerLength != 0) { - SUMOReal space = myLeftSpace - myLeadingBlockerLength - MAGIC_offset - myVehicle.getVehicleType().getMinGap(); - if (space > 0) { - // compute speed for decelerating towards a place which allows the blocking leader to merge in in front - SUMOReal safe = cfModel.stopSpeed(&myVehicle, myVehicle.getSpeed(), space); - // if we are approaching this place - if (safe < wanted) { - // return this speed as the speed to use - return MAX2(min, safe); - } - } - } - - // just to make sure to be notified about lane chaning end - if (myVehicle.getLane()->getEdge().getLanes().size() == 1) { - // remove chaning information if on a road with a single lane - changed(); - return wanted; - } - - SUMOReal nVSafe = wanted; - bool gotOne = false; - for (std::vector::const_iterator i = myVSafes.begin(); i != myVSafes.end(); ++i) { - SUMOReal v = (*i); - if (v >= min && v <= max) { - nVSafe = MIN2(v, nVSafe); - gotOne = true; - } - } - - // check whether the vehicle is blocked - if ((state & LCA_WANTS_LANECHANGE) != 0) { - if (gotOne && !myDontBrake) { - return nVSafe; - } - // check whether the vehicle maybe has to be swapped with one of - // the blocking vehicles - if ((state & LCA_BLOCKED) != 0) { - if ((state & LCA_BLOCKED_BY_LEADER) != 0) { - // if interacting with leader and not too slow - return (min + wanted) / (SUMOReal) 2.0; - } - if ((state & LCA_BLOCKED_BY_FOLLOWER) != 0) { - return (max + wanted) / (SUMOReal) 2.0; - } - return (min + wanted) / (SUMOReal) 2.0; - } - } - - - // decelerate if being a blocking follower - // (and does not have to change lanes) - if ((state & LCA_AMBLOCKINGFOLLOWER) != 0) { - if (fabs(max - myVehicle.getCarFollowModel().maxNextSpeed(myVehicle.getSpeed(), &myVehicle)) < 0.001 && min == 0) { // !!! was standing - return 0; - } - return (min + wanted) / (SUMOReal) 2.0; - } - if ((state & LCA_AMBACKBLOCKER) != 0) { - if (max <= myVehicle.getCarFollowModel().maxNextSpeed(myVehicle.getSpeed(), &myVehicle) && min == 0) { // !!! was standing - return min; - } - } - if ((state & LCA_AMBACKBLOCKER_STANDING) != 0) { - return min; - } - // accelerate if being a blocking leader or blocking follower not able to brake - // (and does not have to change lanes) - if ((state & LCA_AMBLOCKINGLEADER) != 0) { - return (max + wanted) / (SUMOReal) 2.0; - } - if ((state & LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0) { - if (max <= myVehicle.getCarFollowModel().maxNextSpeed(myVehicle.getSpeed(), &myVehicle) && min == 0) { // !!! was standing - return wanted; - } - return (min + wanted) / (SUMOReal) 2.0; - } - return wanted; -} - - -void* -MSLCM_DK2004::inform(void* info, MSVehicle* /*sender*/) { - Info* pinfo = (Info*) info; - myOwnState &= 0xffffffff; - myOwnState |= pinfo->second; - delete pinfo; - return (void*) true; -} - - -void -MSLCM_DK2004::changed() { - myOwnState = 0; - myLastLaneChangeOffset = 0; - myChangeProbability = 0; - myLeadingBlockerLength = 0; - myLeftSpace = 0; - myVSafes.clear(); - myDontBrake = false; -} - - -void -MSLCM_DK2004::informBlocker(MSAbstractLaneChangeModel::MSLCMessager& msgPass, - int& blocked, - int dir, - const std::pair& neighLead, - const std::pair& neighFollow) { - if ((blocked & LCA_BLOCKED_BY_FOLLOWER) != 0) { - assert(neighFollow.first != 0); - MSVehicle* nv = neighFollow.first; - SUMOReal decelGap = - neighFollow.second - + SPEED2DIST(myVehicle.getSpeed()) * (SUMOReal) 2.0 - - MAX2(nv->getSpeed() - (SUMOReal) ACCEL2DIST(nv->getCarFollowModel().getMaxDecel()) * (SUMOReal) 2.0, (SUMOReal) 0); - if (neighFollow.second > 0 && decelGap > 0 && decelGap >= nv->getCarFollowModel().getSecureGap(nv->getSpeed(), myVehicle.getSpeed(), myVehicle.getCarFollowModel().getMaxDecel())) { - SUMOReal vsafe = myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighFollow.second, neighFollow.first->getSpeed(), neighFollow.first->getCarFollowModel().getMaxDecel()); - msgPass.informNeighFollower(new Info(vsafe, dir | LCA_AMBLOCKINGFOLLOWER), &myVehicle); - } else { - SUMOReal vsafe = neighFollow.second <= 0 ? 0 : myCarFollowModel.followSpeed(&myVehicle, myVehicle.getSpeed(), neighFollow.second, neighFollow.first->getSpeed(), neighFollow.first->getCarFollowModel().getMaxDecel()); - msgPass.informNeighFollower(new Info(vsafe, dir | LCA_AMBLOCKINGFOLLOWER_DONTBRAKE), &myVehicle); - } - } - if ((blocked & LCA_BLOCKED_BY_LEADER) != 0) { - if (neighLead.first != 0 && neighLead.second > 0) { - msgPass.informNeighLeader(new Info(0, dir | LCA_AMBLOCKINGLEADER), &myVehicle); - } - } -} - - -void -MSLCM_DK2004::prepareStep() { - myLeadingBlockerLength = 0; - myLeftSpace = 0; - myVSafes.clear(); - myDontBrake = false; - // truncate myChangeProbability to work around numerical instability between different builds - myChangeProbability = ceil(myChangeProbability * 100000.0) * 0.00001; -} - - -SUMOReal -MSLCM_DK2004::getProb() const { - return myChangeProbability; -} - - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLCM_DK2004.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLCM_DK2004.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLCM_DK2004.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLCM_DK2004.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,161 +0,0 @@ -/****************************************************************************/ -/// @file MSLCM_DK2004.h -/// @author Daniel Krajzewicz -/// @author Friedemann Wesner -/// @author Sascha Krieg -/// @author Michael Behrisch -/// @date Fri, 29.04.2005 -/// @version $Id: MSLCM_DK2004.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// A lane change model developed by D. Krajzewicz between 2004 and 2010 -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef MSLCM_DK2004_h -#define MSLCM_DK2004_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include - -// =========================================================================== -// enumeration definition -// =========================================================================== -enum MyLCAEnum { - LCA_AMBLOCKINGLEADER = 256, // 0 - LCA_AMBLOCKINGFOLLOWER = 512,// 1 - LCA_MRIGHT = 1024, // 2 - LCA_MLEFT = 2048,// 3 - // !!! never set LCA_UNBLOCK = 4096,// 4 - LCA_AMBLOCKINGFOLLOWER_DONTBRAKE = 8192,// 5 - // !!! never used LCA_AMBLOCKINGSECONDFOLLOWER = 16384, // 6 - // !!! never read LCA_KEEP1 = 65536,// 8 - // !!! never used LCA_KEEP2 = 131072,// 9 - LCA_AMBACKBLOCKER = 262144,// 10 - LCA_AMBACKBLOCKER_STANDING = 524288// 11 - -}; - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class MSLCM_DK2004 - * @brief A lane change model developed by D. Krajzewicz between 2004 and 2010 - */ -class MSLCM_DK2004 : public MSAbstractLaneChangeModel { -public: - MSLCM_DK2004(MSVehicle& v); - - virtual ~MSLCM_DK2004(); - - /** @brief Called to examine whether the vehicle wants to change to right - This method gets the information about the surrounding vehicles - and whether another lane may be more preferable */ - virtual int wantsChangeToRight( - MSAbstractLaneChangeModel::MSLCMessager& msgPass, int blocked, - const std::pair& leader, - const std::pair& neighLead, - const std::pair& neighFollow, - const MSLane& neighLane, - const std::vector& preb, - MSVehicle** lastBlocked); - - /** @brief Called to examine whether the vehicle wants to change to left - This method gets the information about the surrounding vehicles - and whether another lane may be more preferable */ - virtual int wantsChangeToLeft( - MSAbstractLaneChangeModel::MSLCMessager& msgPass, int blocked, - const std::pair& leader, - const std::pair& neighLead, - const std::pair& neighFollow, - const MSLane& neighLane, - const std::vector& preb, - MSVehicle** lastBlocked); - - virtual void* inform(void* info, MSVehicle* sender); - - /** @brief Called to adapt the speed in order to allow a lane change. - * - * @param min The minimum resulting speed - * @param wanted The aspired speed of the car following model - * @param max The maximum resulting speed - * @param cfModel The model used - * @return the new speed of the vehicle as proposed by the lane changer - */ - virtual SUMOReal patchSpeed(const SUMOReal min, const SUMOReal wanted, const SUMOReal max, - const MSCFModel& cfModel); - - virtual void changed(); - - SUMOReal getProb() const; - virtual void prepareStep(); - - SUMOReal getChangeProbability() const { - return myChangeProbability; - } - - -protected: - void informBlocker(MSAbstractLaneChangeModel::MSLCMessager& msgPass, - int& blocked, int dir, - const std::pair& neighLead, - const std::pair& neighFollow); - - inline bool amBlockingLeader() { - return (myOwnState & LCA_AMBLOCKINGLEADER) != 0; - } - inline bool amBlockingFollower() { - return (myOwnState & LCA_AMBLOCKINGFOLLOWER) != 0; - } - inline bool amBlockingFollowerNB() { - return (myOwnState & LCA_AMBLOCKINGFOLLOWER_DONTBRAKE) != 0; - } - inline bool amBlockingFollowerPlusNB() { - return (myOwnState & (LCA_AMBLOCKINGFOLLOWER | LCA_AMBLOCKINGFOLLOWER_DONTBRAKE)) != 0; - } - inline bool currentDistDisallows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist) { - return dist / (abs(laneOffset)) < lookForwardDist; - } - inline bool currentDistAllows(SUMOReal dist, int laneOffset, SUMOReal lookForwardDist) { - return dist / abs(laneOffset) > lookForwardDist; - } - - typedef std::pair Info; - - - -protected: - SUMOReal myChangeProbability; - - SUMOReal myLeadingBlockerLength; - SUMOReal myLeftSpace; - - std::vector myVSafes; - bool myDontBrake; - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLinkCont.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLinkCont.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLinkCont.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLinkCont.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file MSLinkCont.cpp /// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @date 15 Feb 2004 -/// @version $Id: MSLinkCont.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSLinkCont.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Helpers for link vector /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -41,7 +42,7 @@ // =========================================================================== #ifdef HAVE_INTERNAL_LANES const MSEdge* -MSLinkContHelper::getInternalFollowingEdge(MSLane* fromLane, +MSLinkContHelper::getInternalFollowingEdge(const MSLane* fromLane, const MSEdge* followerAfterInternal) { //@todo to be optimized const MSLinkCont& lc = fromLane->getLinkCont(); @@ -57,6 +58,25 @@ } return 0; } + + +const MSLane* +MSLinkContHelper::getInternalFollowingLane(const MSLane* fromLane, + const MSLane* followerAfterInternal) { + //@todo to be optimized + const MSLinkCont& lc = fromLane->getLinkCont(); + for (MSLinkCont::const_iterator j = lc.begin(); j != lc.end(); j++) { + MSLink* link = *j; + if (link->getLane() == followerAfterInternal) { + if (link->getViaLane() != 0) { + return link->getViaLane(); + } else { + return 0; // network without internal links + } + } + } + return 0; +} #endif @@ -67,6 +87,8 @@ MSLink* link = *j; if (link->getLane() == &to) { return link; + } else if (link->getViaLaneOrLane() == &to) { + return link; } } return 0; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLinkCont.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLinkCont.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLinkCont.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLinkCont.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file MSLinkCont.h /// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: MSLinkCont.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSLinkCont.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A vector of links /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -60,15 +61,17 @@ #ifdef HAVE_INTERNAL_LANES /** @brief Returns the internal lane that must be passed in order to get to the desired edge Returns 0 if no such edge exists */ - static const MSEdge* getInternalFollowingEdge(MSLane* fromLane, + static const MSEdge* getInternalFollowingEdge(const MSLane* fromLane, const MSEdge* followerAfterInternal); + + static const MSLane* getInternalFollowingLane(const MSLane* fromLane, + const MSLane* followerAfterInternal); #endif /** @brief Returns the link connecting both lanes Both lanes have to be non-internal; 0 may be returned if no connection exists */ - static MSLink* getConnectingLink(const MSLane& from - , const MSLane& to); + static MSLink* getConnectingLink(const MSLane& from, const MSLane& to); }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLink.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLink.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLink.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLink.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Sept 2002 -/// @version $Id: MSLink.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSLink.cpp 18148 2015-03-25 13:39:50Z namdre $ /// // A connnection between lanes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -31,18 +31,23 @@ #endif #include +#include +#include #include #include "MSNet.h" #include "MSLink.h" #include "MSLane.h" +#include #include "MSEdge.h" #include "MSGlobals.h" #include "MSVehicle.h" +#include #ifdef CHECK_MEMORY_LEAKS #include #endif // CHECK_MEMORY_LEAKS +//#define MSLink_DEBUG_CROSSING_POINTS // =========================================================================== // static member variables @@ -54,44 +59,179 @@ // member method definitions // =========================================================================== #ifndef HAVE_INTERNAL_LANES -MSLink::MSLink(MSLane* succLane, - LinkDirection dir, LinkState state, - SUMOReal length) - : +MSLink::MSLink(MSLane* succLane, LinkDirection dir, LinkState state, SUMOReal length) : myLane(succLane), - myRequestIdx(0), myRespondIdx(0), - myState(state), myDirection(dir), myLength(length) {} + myIndex(-1), + myState(state), + myLastStateChange(-1), + myDirection(dir), + myLength(length), + myHasFoes(false), + myAmCont(false), + myJunction(0) #else -MSLink::MSLink(MSLane* succLane, MSLane* via, - LinkDirection dir, LinkState state, SUMOReal length) - : +MSLink::MSLink(MSLane* succLane, MSLane* via, LinkDirection dir, LinkState state, SUMOReal length) : myLane(succLane), - myRequestIdx(0), myRespondIdx(0), - myState(state), myDirection(dir), myLength(length), - myJunctionInlane(via) {} + myIndex(-1), + myState(state), + myLastStateChange(-1), + myDirection(dir), + myLength(length), + myHasFoes(false), + myAmCont(false), + myJunctionInlane(via), + myInternalLaneBefore(0), + myJunction(0) #endif +{} MSLink::~MSLink() {} void -MSLink::setRequestInformation(unsigned int requestIdx, unsigned int respondIdx, bool isCrossing, bool isCont, +MSLink::setRequestInformation(int index, bool hasFoes, bool isCont, const std::vector& foeLinks, - const std::vector& foeLanes) { - myRequestIdx = requestIdx; - myRespondIdx = respondIdx; - myIsCrossing = isCrossing; + const std::vector& foeLanes, + MSLane* internalLaneBefore) { + myIndex = index; + myHasFoes = hasFoes; myAmCont = isCont; myFoeLinks = foeLinks; - myFoeLanes = foeLanes; + for (std::vector::const_iterator it_lane = foeLanes.begin(); it_lane != foeLanes.end(); ++it_lane) { + // cannot assign vector due to const-ness + myFoeLanes.push_back(*it_lane); + } + myJunction = myLane->getEdge().getFromJunction(); // junctionGraph is initialized after the whole network is loaded +#ifdef HAVE_INTERNAL_LANES + myInternalLaneBefore = internalLaneBefore; + MSLane* lane = 0; + if (internalLaneBefore != 0) { + // this is an exit link. compute crossing points with all foeLanes + lane = internalLaneBefore; + //} else if (myLane->getEdge().isCrossing()) { + // // this is the link to a pedestrian crossing. compute crossing points with all foeLanes + // // @note not currently used by pedestrians + // lane = myLane; + } +#ifdef MSLink_DEBUG_CROSSING_POINTS + std::cout << " link " << myIndex << " to " << getViaLaneOrLane()->getID() << " internalLane=" << (lane == 0 ? "NULL" : lane->getID()) << " has foes: " << toString(foeLanes) << "\n"; +#endif + if (lane != 0) { + const bool beforeInternalJunction = lane->getLinkCont()[0]->getViaLaneOrLane()->getEdge().isInternal(); + assert(lane->getIncomingLanes().size() == 1); + // compute crossing points + for (std::vector::const_iterator it_lane = myFoeLanes.begin(); it_lane != myFoeLanes.end(); ++it_lane) { + const bool sameTarget = myLane == (*it_lane)->getLinkCont()[0]->getLane(); + if (sameTarget && !beforeInternalJunction) { + //if (myLane == (*it_lane)->getLinkCont()[0]->getLane()) { + // this foeLane has the same target and merges at the end (lane exits the junction) + myLengthsBehindCrossing.push_back(std::make_pair(0, 0)); // dummy value, never used +#ifdef MSLink_DEBUG_CROSSING_POINTS + std::cout + << " " << lane->getID() + << " merges with " << (*it_lane)->getID() + << " nextLane " << lane->getLinkCont()[0]->getViaLaneOrLane()->getID() + << " dist1=" << myLengthsBehindCrossing.back().first + << " dist2=" << myLengthsBehindCrossing.back().second + << "\n"; +#endif + } else { + std::vector intersections1 = lane->getShape().intersectsAtLengths2D((*it_lane)->getShape()); +#ifdef MSLink_DEBUG_CROSSING_POINTS + //std::cout << " intersections1=" << toString(intersections1) << "\n"; +#endif + bool haveIntersection = true; + if (intersections1.size() == 0) { + intersections1.push_back(-10000.0); // disregard this foe (using maxdouble leads to nasty problems down the line) + haveIntersection = false; + } else if (intersections1.size() > 1) { + std::sort(intersections1.begin(), intersections1.end()); + } + std::vector intersections2 = (*it_lane)->getShape().intersectsAtLengths2D(lane->getShape()); +#ifdef MSLink_DEBUG_CROSSING_POINTS + //std::cout << " intersections2=" << toString(intersections2) << "\n"; +#endif + if (intersections2.size() == 0) { + intersections2.push_back(0); + } else if (intersections2.size() > 1) { + std::sort(intersections2.begin(), intersections2.end()); + } + if (haveIntersection) { + // lane width affects the crossing point + intersections1.back() -= (*it_lane)->getWidth() / 2; + intersections2.back() -= lane->getWidth() / 2; + // also length/geometry factor + intersections1.back() = lane->interpolateGeometryPosToLanePos(intersections1.back()); + intersections2.back() = (*it_lane)->interpolateGeometryPosToLanePos(intersections2.back()); + + if (internalLaneBefore->getLogicalPredecessorLane()->getEdge().isInternal() && !(*it_lane)->getEdge().isCrossing()) { + // wait at the internal junction + // (except for foes that are crossings since there is no internal junction) + intersections1.back() = 0; + } + } + + myLengthsBehindCrossing.push_back(std::make_pair( + lane->getLength() - intersections1.back(), + (*it_lane)->getLength() - intersections2.back())); + +#ifdef MSLink_DEBUG_CROSSING_POINTS + std::cout + << " intersection of " << lane->getID() + << " totalLength=" << lane->getLength() + << " with " << (*it_lane)->getID() + << " totalLength=" << (*it_lane)->getLength() + << " dist1=" << myLengthsBehindCrossing.back().first + << " dist2=" << myLengthsBehindCrossing.back().second + << "\n"; +#endif + } + } + // check for overlap with internal lanes from the same source lane + const MSLane* pred = lane->getLogicalPredecessorLane(); + // to avoid overlap with vehicles that came from pred (especially when pred has endOffset > 0) + // we add all other internal lanes from pred as foeLanes + const MSLinkCont& predLinks = pred->getLinkCont(); + for (MSLinkCont::const_iterator it = predLinks.begin(); it != predLinks.end(); ++it) { + const MSLane* sibling = (*it)->getViaLane(); + if (sibling != lane && sibling != 0) { + std::vector intersections1 = lane->getShape().intersectsAtLengths2D(sibling->getShape()); +#ifdef MSLink_DEBUG_CROSSING_POINTS + //std::cout << " intersections1=" << toString(intersections1) << "\n"; +#endif + if (intersections1.size() > 0) { + std::sort(intersections1.begin(), intersections1.end()); + if (intersections1.back() > NUMERICAL_EPS) { + // siblings share a common shape up to the last crossing point so intersections are identical and only need to be computed once + myLengthsBehindCrossing.push_back(std::make_pair( + lane->getLength() - intersections1.back(), + sibling->getLength() - intersections1.back())); + myFoeLanes.push_back(sibling); +#ifdef MSLink_DEBUG_CROSSING_POINTS + std::cout << " adding same-origin foe" << sibling->getID() + << " dist1=" << myLengthsBehindCrossing.back().first + << " dist2=" << myLengthsBehindCrossing.back().second + << "\n"; +#endif + } + } + } + } + } +#else + UNUSED_PARAMETER(internalLaneBefore); +#endif } +std::pair +getLastIntersections(const MSLane* lane, const MSLane* foe); + void MSLink::setApproaching(const SUMOVehicle* approaching, const SUMOTime arrivalTime, const SUMOReal arrivalSpeed, const SUMOReal leaveSpeed, const bool setRequest, const SUMOTime arrivalTimeBraking, const SUMOReal arrivalSpeedBraking, const SUMOTime waitingTime) { - const SUMOTime leaveTime = getLeaveTime(arrivalTime, arrivalSpeed, leaveSpeed, approaching->getVehicleType().getLengthWithGap()); + const SUMOTime leaveTime = getLeaveTime(arrivalTime, arrivalSpeed, leaveSpeed, approaching->getVehicleType().getLength()); myApproachingVehicles.insert(std::make_pair(approaching, ApproachingVehicleInformation(arrivalTime, leaveTime, arrivalSpeed, leaveSpeed, setRequest, arrivalTimeBraking, arrivalSpeedBraking, waitingTime))); @@ -134,8 +274,9 @@ SUMOTime -MSLink::getLeaveTime(SUMOTime arrivalTime, SUMOReal arrivalSpeed, SUMOReal leaveSpeed, SUMOReal vehicleLength) const { - return arrivalTime + TIME2STEPS((getLength() + vehicleLength) / (0.5 * (arrivalSpeed + leaveSpeed))); +MSLink::getLeaveTime(const SUMOTime arrivalTime, const SUMOReal arrivalSpeed, + const SUMOReal leaveSpeed, const SUMOReal vehicleLength) const { + return arrivalTime + TIME2STEPS((getLength() + vehicleLength) / MAX2((SUMOReal)0.5 * (arrivalSpeed + leaveSpeed), NUMERICAL_EPS)); } @@ -143,7 +284,7 @@ MSLink::opened(SUMOTime arrivalTime, SUMOReal arrivalSpeed, SUMOReal leaveSpeed, SUMOReal vehicleLength, SUMOReal impatience, SUMOReal decel, SUMOTime waitingTime, std::vector* collectFoes) const { - if (myState == LINKSTATE_TL_RED) { + if (haveRed()) { return false; } if (myAmCont && MSGlobals::gUsingInternalLanes) { @@ -156,7 +297,7 @@ for (std::vector::const_iterator i = myFoeLinks.begin(); i != myFoeLinks.end(); ++i) { #ifdef HAVE_INTERNAL if (MSGlobals::gUseMesoSim) { - if ((*i)->getState() == LINKSTATE_TL_RED) { + if ((*i)->haveRed()) { continue; } } @@ -251,7 +392,7 @@ return true; } } - for (std::vector::const_iterator i = myFoeLanes.begin(); i != myFoeLanes.end(); ++i) { + for (std::vector::const_iterator i = myFoeLanes.begin(); i != myFoeLanes.end(); ++i) { if ((*i)->getVehicleNumber() > 0 || (*i)->getPartialOccupator() != 0) { return true; } @@ -267,7 +408,10 @@ void -MSLink::setTLState(LinkState state, SUMOTime /*t*/) { +MSLink::setTLState(LinkState state, SUMOTime t) { + if (myState != state) { + myLastStateChange = t; + } myState = state; } @@ -277,6 +421,56 @@ return myLane; } +MSLane* +MSLink::getApproachingLane() const { + MSLane* approachedLane; //the lane approached by this link; this lane may be an internal lane +#ifdef HAVE_INTERNAL_LANES + if (myJunctionInlane != 0) { // if there is an internal lane + approachedLane = myJunctionInlane; //consider the internal lane as the approached lane + } else { //if ther is no internal lane + approachedLane = myLane; + } +#else + approachedLane = myLane; +#endif + const std::vector possibleLanes = approachedLane->getIncomingLanes(); + std::vector::const_iterator i; + for (i = possibleLanes.begin(); i != possibleLanes.end(); i++) { + MSLane* lane = (*i).lane; + MSLinkCont outgoingLinks = lane->getLinkCont(); //the links outgoing from lane + for (MSLinkCont::const_iterator j = outgoingLinks.begin(); j != outgoingLinks.end(); j++) { + if ((*j) == this) { + return lane; + } + } + } + WRITE_WARNING("No approaching lane found for the link with the index " + toString(this->getIndex()) + "."); + return 0; +} + + +bool +MSLink::lastWasContMajor() const { +#ifdef HAVE_INTERNAL_LANES + if (myJunctionInlane == 0 || myAmCont) { + return false; + } else { + MSLane* pred = myJunctionInlane->getLogicalPredecessorLane(); + if (pred->getEdge().getPurpose() != MSEdge::EDGEFUNCTION_INTERNAL) { + return false; + } else { + MSLane* pred2 = pred->getLogicalPredecessorLane(); + assert(pred2 != 0); + MSLink* predLink = MSLinkContHelper::getConnectingLink(*pred2, *pred); + assert(predLink != 0); + return predLink->havePriority(); + } + } +#else + return false; +#endif +} + void MSLink::writeApproaching(OutputDevice& od, const std::string fromLaneID) const { @@ -299,9 +493,12 @@ od.openTag("approaching"); const ApproachingVehicleInformation& avi = myApproachingVehicles.find(it->second)->second; od.writeAttr(SUMO_ATTR_ID, it->second->getID()); + od.writeAttr(SUMO_ATTR_IMPATIENCE, it->second->getImpatience()); od.writeAttr("arrivalTime", time2string(avi.arrivalTime)); + od.writeAttr("arrivalTimeBraking", time2string(avi.arrivalTimeBraking)); od.writeAttr("leaveTime", time2string(avi.leavingTime)); od.writeAttr("arrivalSpeed", toString(avi.arrivalSpeed)); + od.writeAttr("arrivalSpeedBraking", toString(avi.arrivalSpeedBraking)); od.writeAttr("leaveSpeed", toString(avi.leaveSpeed)); od.writeAttr("willPass", toString(avi.willPass)); od.closeTag(); @@ -319,35 +516,89 @@ MSLink::LinkLeaders -MSLink::getLeaderInfo(SUMOReal dist) const { +MSLink::getLeaderInfo(SUMOReal dist, SUMOReal minGap, std::vector* collectBlockers) const { LinkLeaders result; - if (MSGlobals::gUsingInternalLanes && myJunctionInlane == 0) { + //gDebugFlag1 = true; + // this link needs to start at an internal lane (either an exit link or between two internal lanes) + if (MSGlobals::gUsingInternalLanes && ( + (myJunctionInlane == 0 && getLane()->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_NORMAL) + || (myJunctionInlane != 0 && myJunctionInlane->getLogicalPredecessorLane()->getEdge().isInternal()))) { + //if (gDebugFlag1) std::cout << SIMTIME << " getLeaderInfo link=" << getViaLaneOrLane()->getID() << "\n"; // this is an exit link - - for (std::vector::const_iterator it_lane = myFoeLanes.begin(); it_lane != myFoeLanes.end(); ++it_lane) { + for (size_t i = 0; i < myFoeLanes.size(); ++i) { + const MSLane* foeLane = myFoeLanes[i]; + // distance from the querying vehicle to the crossing point with foeLane + const SUMOReal distToCrossing = dist - myLengthsBehindCrossing[i].first; + const bool sameTarget = (myLane == foeLane->getLinkCont()[0]->getLane()); + const bool sameSource = (myInternalLaneBefore != 0 && myInternalLaneBefore->getLogicalPredecessorLane() == foeLane->getLogicalPredecessorLane()); + const SUMOReal crossingWidth = (sameTarget || sameSource) ? 0 : foeLane->getWidth(); + const SUMOReal foeCrossingWidth = (sameTarget || sameSource) ? 0 : myInternalLaneBefore->getWidth(); + //if (gDebugFlag1) std::cout << " distToCrossing=" << distToCrossing << " foeLane=" << foeLane->getID() << "\n"; + if (distToCrossing + crossingWidth < 0) { + continue; // vehicle is behind the crossing point, continue with next foe lane + } + const SUMOReal foeDistToCrossing = foeLane->getLength() - myLengthsBehindCrossing[i].second; // it is not sufficient to return the last vehicle on the foeLane because ego might be its leader // therefore we return all vehicles on the lane // // special care must be taken for continuation lanes. (next lane is also internal) // vehicles on these lanes should always block (gap = -1) - const bool contLane = ((*it_lane)->getLinkCont()[0]->getViaLaneOrLane()->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL); - const MSLane::VehCont& vehicles = (*it_lane)->getVehiclesSecure(); - (*it_lane)->releaseVehicles(); + const bool contLane = (foeLane->getLinkCont()[0]->getViaLaneOrLane()->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL); + // vehicles on cont. lanes or on internal lanes with the same target as this link can never be ignored + const bool cannotIgnore = contLane || sameTarget || sameSource; + const MSLane::VehCont& vehicles = foeLane->getVehiclesSecure(); + foeLane->releaseVehicles(); for (MSLane::VehCont::const_iterator it_veh = vehicles.begin(); it_veh != vehicles.end(); ++it_veh) { MSVehicle* leader = *it_veh; - // XXX apply viaLane/foeLane specific distance offset - // to account for the fact that the crossing point has different distances from the lane ends - result.push_back(std::make_pair(leader, - contLane ? -1 : - dist - ((*it_lane)->getLength() - leader->getPositionOnLane()) - leader->getVehicleType().getLength())); + if (!cannotIgnore && !foeLane->getLinkCont()[0]->getApproaching(leader).willPass) { + continue; + } + if (cannotIgnore || leader->getWaitingTime() < MSGlobals::gIgnoreJunctionBlocker) { + // compute distance between vehicles on the the superimposition of both lanes + // where the crossing point is the common point + SUMOReal gap; + if (contLane && !sameSource) { + gap = -1; // always break for vehicles which are on a continuation lane + } else { + const SUMOReal leaderBack = leader->getPositionOnLane() - leader->getVehicleType().getLength(); + const SUMOReal leaderBackDist = foeDistToCrossing - leaderBack; + //if (gDebugFlag1) std::cout << " distToCrossing=" << distToCrossing << " leader back=" << leaderBack << " backDist=" << leaderBackDist << "\n"; + if (leaderBackDist + foeCrossingWidth < 0) { + // leader is completely past the crossing point + // or there is no crossing point + continue; // next vehicle + } + gap = distToCrossing - leaderBackDist - (sameTarget ? minGap : 0); + } + result.push_back(LinkLeader(leader, gap, cannotIgnore ? -1 : distToCrossing)); + } } - // XXX partial occupates should be ignored if they do not extend past the crossing point - MSVehicle* leader = (*it_lane)->getPartialOccupator(); + MSVehicle* leader = foeLane->getPartialOccupator(); if (leader != 0) { - result.push_back(std::make_pair(leader, - contLane ? -1 : - dist - ((*it_lane)->getLength() - (*it_lane)->getPartialOccupatorEnd()))); + if (cannotIgnore || leader->getWaitingTime() < MSGlobals::gIgnoreJunctionBlocker) { + // compute distance between vehicles on the the superimposition of both lanes + // where the crossing point is the common point + SUMOReal gap; + if (contLane && !sameSource) { + gap = -1; // always break for vehicles which are on a continuation lane + } else { + const SUMOReal leaderBackDist = foeDistToCrossing - foeLane->getPartialOccupatorEnd(); + //if (gDebugFlag1) std::cout << " distToCrossing=" << distToCrossing << " leader (partialOccupator) backDist=" << leaderBackDist << "\n"; + if (leaderBackDist + foeCrossingWidth < 0) { + // leader is completely past the crossing point + // or there is no crossing point + continue; // next lane + } + gap = distToCrossing - leaderBackDist - (sameTarget ? minGap : 0); + } + result.push_back(LinkLeader(leader, gap, sameTarget ? -1 : distToCrossing)); + } + } + // check for crossing pedestrians (keep driving if already on top of the crossing + const SUMOReal distToPeds = distToCrossing - MSPModel::SAFETY_GAP; + if (distToPeds >= -MSPModel::SAFETY_GAP && MSPModel::getModel()->blockedAtDist(foeLane, foeDistToCrossing, collectBlockers)) { + result.push_back(LinkLeader((MSVehicle*)0, -1, distToPeds)); } } } @@ -367,12 +618,5 @@ } -unsigned int -MSLink::getRespondIndex() const { - return myRespondIdx; -} - - - /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLink.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLink.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLink.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLink.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: MSLink.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSLink.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A connnection between lanes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -43,8 +43,10 @@ // class declarations // =========================================================================== class MSLane; +class MSJunction; class SUMOVehicle; class MSVehicle; +class MSPerson; class OutputDevice; @@ -74,7 +76,16 @@ class MSLink { public: - typedef std::vector > LinkLeaders; + struct LinkLeader { + LinkLeader(MSVehicle* _veh, SUMOReal _gap, SUMOReal _distToCrossing) : + vehAndGap(std::make_pair(_veh, _gap)), + distToCrossing(_distToCrossing) {} + + std::pair vehAndGap; + SUMOReal distToCrossing; + }; + + typedef std::vector LinkLeaders; /** @struct ApproachingVehicleInformation * @brief A structure holding the information about vehicles approaching a link @@ -156,8 +167,9 @@ * requests and responses after the initialisation. * @todo Unsecure! */ - void setRequestInformation(unsigned int requestIdx, unsigned int respondIdx, bool isCrossing, bool isCont, - const std::vector& foeLinks, const std::vector& foeLanes); + void setRequestInformation(int index, bool hasFoes, bool isCont, + const std::vector& foeLinks, const std::vector& foeLanes, + MSLane* internalLaneBefore = 0); /** @brief Sets the information about an approaching vehicle @@ -226,8 +238,7 @@ * @param[in] decel The maximum deceleration of the checking vehicle * @return Whether a foe of this link is approaching */ - bool hasApproachingFoe(SUMOTime arrivalTime, SUMOTime leaveTime, SUMOReal speed, - SUMOReal decel = DEFAULT_VEH_DECEL) const; + bool hasApproachingFoe(SUMOTime arrivalTime, SUMOTime leaveTime, SUMOReal speed, SUMOReal decel) const; /** @brief Returns the current state of the link @@ -239,6 +250,12 @@ } + //@brief Returns the time of the last state change + inline SUMOTime getLastStateChange() const { + return myLastStateChange; + } + + /** @brief Returns the direction the vehicle passing this link take * * @return The direction of this link @@ -249,6 +266,7 @@ /** @brief Sets the current tl-state * * @param[in] state The current state of the link + * @param[in] t The time of the state change */ void setTLState(LinkState state, SUMOTime t); @@ -260,20 +278,36 @@ MSLane* getLane() const; + /** @brief Returns the lane leading to this link + * + * @return The lane leading to this link + */ + MSLane* getApproachingLane() const; + + /** @brief Returns the respond index (for visualization) * * @return The respond index for this link */ - unsigned int getRespondIndex() const; + inline int getIndex() const { + return myIndex; + } /** @brief Returns whether this link is a major link * @return Whether the link has a large priority */ - bool havePriority() const { + inline bool havePriority() const { return myState >= 'A' && myState <= 'Z'; } + /** @brief Returns whether this link is blocked by a red (or redyellow) traffic light + * @return Whether the link has a red light + */ + inline bool haveRed() const { + return myState == LINKSTATE_TL_RED || myState == LINKSTATE_TL_REDYELLOW; + } + /** @brief Returns the length of this link * @@ -287,8 +321,8 @@ * * @return Whether any foe links exist */ - bool isCrossing() const { - return myIsCrossing; + bool hasFoes() const { + return myHasFoes; } @@ -296,6 +330,11 @@ return myAmCont; } + + /// @brief whether this is a link past an internal junction which currently has priority + bool lastWasContMajor() const; + + #ifdef HAVE_INTERNAL_LANES /** @brief Returns the following inner lane * @@ -307,9 +346,11 @@ /** @brief Returns all potential link leaders (vehicles on foeLanes) * Valid during the planMove() phase * @param[in] dist The distance of the vehicle who is asking about the leader to this link + * @param[in] minGap The minGap of the vehicle who is asking about the leader to this link + * @param[out] blocking Return blocking pedestrians if a vector is given * @return The all vehicles on foeLanes and their (virtual) distances to the asking vehicle */ - LinkLeaders getLeaderInfo(SUMOReal dist) const; + LinkLeaders getLeaderInfo(SUMOReal dist, SUMOReal minGap, std::vector* collectBlockers = 0) const; #endif /// @brief return the via lane if it exists and the lane otherwise @@ -317,11 +358,15 @@ /// @brief return the expected time at which the given vehicle will clear the link - SUMOTime getLeaveTime(SUMOTime arrivalTime, SUMOReal arrivalSpeed, SUMOReal leaveSpeed, SUMOReal vehicleLength) const; + SUMOTime getLeaveTime(const SUMOTime arrivalTime, const SUMOReal arrivalSpeed, const SUMOReal leaveSpeed, const SUMOReal vehicleLength) const; /// @brief write information about all approaching vehicles to the given output device void writeApproaching(OutputDevice& od, const std::string fromLaneID) const; + /// @brief return the junction to which this link belongs + const MSJunction* getJunction() const { + return myJunction; + } private: /// @brief return whether the given vehicles may NOT merge safely @@ -334,21 +379,21 @@ static bool maybeOccupied(MSLane* lane); private: - /// @brief The lane approached by this link + /// @brief The lane (but the internal one) approached by this link MSLane* myLane; std::map myApproachingVehicles; std::set myBlockedFoeLinks; - /// @brief The position of the link within this request - unsigned int myRequestIdx; - /// @brief The position within this respond - unsigned int myRespondIdx; + int myIndex; /// @brief The state of the link LinkState myState; + /// @brief The time of the last state change + SUMOTime myLastStateChange; + /// @brief An abstract (hopefully human readable) definition of the link's direction LinkDirection myDirection; @@ -356,7 +401,7 @@ SUMOReal myLength; /// @brief Whether any foe links exist - bool myIsCrossing; + bool myHasFoes; bool myAmCont; @@ -364,10 +409,22 @@ /// @brief The following junction-internal lane if used MSLane* const myJunctionInlane; + /// @brief The preceding junction-internal lane if used + const MSLane* myInternalLaneBefore; + + /* @brief lengths after the crossing point with foeLane + * (lengthOnThis, lengthOnFoe) + * (index corresponds to myFoeLanes) + * empty vector for entry links + * */ + std::vector > myLengthsBehindCrossing; #endif + /// @brief the junction to which this link belongs + const MSJunction* myJunction; + std::vector myFoeLinks; - std::vector myFoeLanes; + std::vector myFoeLanes; static SUMOTime myLookaheadTime; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLogicJunction.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLogicJunction.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLogicJunction.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLogicJunction.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Christian Roessel /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Wed, 12 Dez 2001 -/// @version $Id: MSLogicJunction.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSLogicJunction.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // with one ore more logics. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,6 +46,7 @@ * methods from MSLogicJunction * ----------------------------------------------------------------------- */ MSLogicJunction::MSLogicJunction(const std::string& id, + SumoXMLNodeType type, const Position& position, const PositionVector& shape, std::vector incoming @@ -52,7 +54,7 @@ , std::vector internal #endif ): - MSJunction(id, position, shape), + MSJunction(id, type, position, shape), myIncomingLanes(incoming) #ifdef HAVE_INTERNAL_LANES , myInternalLanes(internal) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLogicJunction.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLogicJunction.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSLogicJunction.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSLogicJunction.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Christian Roessel /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Wed, 12 Dez 2001 -/// @version $Id: MSLogicJunction.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSLogicJunction.h 18095 2015-03-17 09:39:00Z behrisch $ /// // with one ore more logics. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -74,12 +75,15 @@ protected: /** @brief Constructor * @param[in] id The id of the junction + * @param[in] id The type of the junction * @param[in] position The position of the junction * @param[in] shape The shape of the junction * @param[in] incoming The incoming lanes * @param[in] internal The internal lanes */ - MSLogicJunction(const std::string& id, const Position& position, + MSLogicJunction(const std::string& id, + SumoXMLNodeType type, + const Position& position, const PositionVector& shape, std::vector incoming #ifdef HAVE_INTERNAL_LANES diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSMoveReminder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSMoveReminder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSMoveReminder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSMoveReminder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file MSMoveReminder.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date 2008-10-27 -/// @version $Id: MSMoveReminder.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSMoveReminder.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Something on a lane to be noticed about vehicle movement /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -49,7 +50,8 @@ #ifdef HAVE_INTERNAL void MSMoveReminder::updateDetector(SUMOVehicle& veh, SUMOReal entryPos, SUMOReal leavePos, - SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime) { + SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime, + bool cleanUp) { // each vehicle is tracked linearly across its segment. For each vehicle, // the time and position of the previous call are maintained and only // the increments are sent to notifyMoveInternal @@ -66,7 +68,6 @@ entryTime = previousEntryTime; entryPos = j->second.second; } - myLastVehicleUpdateValues.erase(j); } assert(entryTime <= currentTime); if ((entryTime < leaveTime) && (entryPos < leavePos)) { @@ -83,7 +84,16 @@ // However, in the presence of calibrators, vehicles may jump a bit myLastVehicleUpdateValues[&veh] = std::pair(leaveTime, leavePos); } + if (cleanUp) { + // clean up after the vehicle has left the area of this reminder + removeFromVehicleUpdateValues(veh); + } +} + +void +MSMoveReminder::removeFromVehicleUpdateValues(SUMOVehicle& veh) { + myLastVehicleUpdateValues.erase(&veh); } #endif /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSMoveReminder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSMoveReminder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSMoveReminder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSMoveReminder.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,14 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date 2003-05-21 -/// @version $Id: MSMoveReminder.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSMoveReminder.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Something on a lane to be noticed about vehicle movement /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -182,7 +183,8 @@ #ifdef HAVE_INTERNAL void updateDetector(SUMOVehicle& veh, SUMOReal entryPos, SUMOReal leavePos, - SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime); + SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime, + bool cleanUp); #endif /// @} @@ -206,19 +208,28 @@ UNUSED_PARAMETER(&veh); } + void setDescription(const std::string& description) { + myDescription = description; + } const std::string& getDescription() const { return myDescription; } +#ifdef HAVE_INTERNAL +protected: + void removeFromVehicleUpdateValues(SUMOVehicle& veh); +#endif protected: + /// @brief Lane on which the reminder works MSLane* const myLane; /// @brief a description of this moveReminder - const std::string myDescription; + std::string myDescription; #ifdef HAVE_INTERNAL +private: std::map > myLastVehicleUpdateValues; #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSNet.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSNet.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSNet.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSNet.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -7,13 +7,15 @@ /// @author Eric Nicolay /// @author Mario Krumnow /// @author Michael Behrisch +/// @author Mario Krumnow +/// @author Christoph Sommer /// @date Tue, 06 Mar 2001 -/// @version $Id: MSNet.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSNet.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // The simulated network and simulation perfomer /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,10 +36,6 @@ #include #endif -#ifdef HAVE_VERSION_H -#include -#endif - #include #include #include @@ -45,9 +43,11 @@ #include #include #include +#include #include #include "MSNet.h" #include "MSPersonControl.h" +#include "MSContainerControl.h" #include "MSEdgeControl.h" #include "MSJunctionControl.h" #include "MSInsertionControl.h" @@ -69,6 +69,7 @@ #include #include #include +#include #include "traffic_lights/MSTrafficLightLogic.h" #include #include @@ -80,14 +81,18 @@ #include "output/MSQueueExport.h" #include "output/MSVTKExport.h" #include "output/MSXMLRawOut.h" +#include "output/MSAmitranTrajectories.h" #include #include #include #include +#include #include "MSGlobals.h" +#include +#include #include -#include -#include "MSPerson.h" +#include +#include "MSContainer.h" #include "MSEdgeWeightsStorage.h" #include "MSStateHandler.h" @@ -110,6 +115,10 @@ // =========================================================================== MSNet* MSNet::myInstance = 0; +const std::string MSNet::STAGE_EVENTS("events"); +const std::string MSNet::STAGE_MOVEMENTS("move"); +const std::string MSNet::STAGE_LANECHANGE("laneChange"); +const std::string MSNet::STAGE_INSERTIONS("insertion"); // =========================================================================== // member method definitions @@ -118,10 +127,10 @@ MSNet::getEffort(const MSEdge* const e, const SUMOVehicle* const v, SUMOReal t) { SUMOReal value; const MSVehicle* const veh = dynamic_cast(v); - if (veh != 0 && veh->getWeightsStorage().retrieveExistingEffort(e, v, t, value)) { + if (veh != 0 && veh->getWeightsStorage().retrieveExistingEffort(e, t, value)) { return value; } - if (getInstance()->getWeightsStorage().retrieveExistingEffort(e, v, t, value)) { + if (getInstance()->getWeightsStorage().retrieveExistingEffort(e, t, value)) { return value; } return 0; @@ -132,10 +141,10 @@ MSNet::getTravelTime(const MSEdge* const e, const SUMOVehicle* const v, SUMOReal t) { SUMOReal value; const MSVehicle* const veh = dynamic_cast(v); - if (veh != 0 && veh->getWeightsStorage().retrieveExistingTravelTime(e, v, t, value)) { + if (veh != 0 && veh->getWeightsStorage().retrieveExistingTravelTime(e, t, value)) { return value; } - if (getInstance()->getWeightsStorage().retrieveExistingTravelTime(e, v, t, value)) { + if (getInstance()->getWeightsStorage().retrieveExistingTravelTime(e, t, value)) { return value; } return e->getMinimumTravelTime(v); @@ -159,10 +168,13 @@ MSEventControl* endOfTimestepEvents, MSEventControl* insertionEvents, ShapeContainer* shapeCont): myVehiclesMoved(0), + myHaveRestrictions(false), + myHasInternalLinks(false), myRouterTTInitialized(false), myRouterTTDijkstra(0), myRouterTTAStar(0), - myRouterEffort(0) { + myRouterEffort(0), + myPedestrianRouter(0) { if (myInstance != 0) { throw ProcessError("A network was already constructed."); } @@ -179,12 +191,14 @@ myRouteLoaders = 0; myLogics = 0; myPersonControl = 0; + myContainerControl = 0; myEdgeWeights = 0; myShapeContainer = shapeCont == 0 ? new ShapeContainer() : shapeCont; myBeginOfTimestepEvents = beginOfTimestepEvents; myEndOfTimestepEvents = endOfTimestepEvents; myInsertionEvents = insertionEvents; + myLanesRTree.first = false; #ifdef HAVE_INTERNAL if (MSGlobals::gUseMesoSim) { @@ -202,7 +216,8 @@ SUMORouteLoaderControl* routeLoaders, MSTLLogicControl* tlc, std::vector stateDumpTimes, - std::vector stateDumpFiles) { + std::vector stateDumpFiles, + bool hasInternalLinks) { myEdges = edges; myJunctions = junctions; myRouteLoaders = routeLoaders; @@ -218,14 +233,18 @@ if (myLogExecutionTime) { mySimBeginMillis = SysUtils::getCurrentMillis(); } + myHasInternalLinks = hasInternalLinks; } MSNet::~MSNet() { // delete events first maybe they do some cleanup delete myBeginOfTimestepEvents; + myBeginOfTimestepEvents = 0; delete myEndOfTimestepEvents; + myEndOfTimestepEvents = 0; delete myInsertionEvents; + myInsertionEvents = 0; // delete controls delete myJunctions; delete myDetectorControl; @@ -238,17 +257,21 @@ if (myPersonControl != 0) { delete myPersonControl; } + if (myContainerControl != 0) { + delete myContainerControl; + } delete myShapeContainer; delete myEdgeWeights; delete myRouterTTDijkstra; delete myRouterTTAStar; delete myRouterEffort; + myLanesRTree.second.RemoveAll(); + clearAll(); #ifdef HAVE_INTERNAL if (MSGlobals::gUseMesoSim) { delete MSGlobals::gMesoNet; } #endif - clearAll(); myInstance = 0; } @@ -265,7 +288,7 @@ #ifndef NO_TRACI #ifdef HAVE_PYTHON if (OptionsCont::getOptions().isSet("python-script")) { - traci::TraCIServer::runEmbedded(OptionsCont::getOptions().getString("python-script")); + TraCIServer::runEmbedded(OptionsCont::getOptions().getString("python-script")); closeSimulation(start); WRITE_MESSAGE("Simulation ended at time: " + time2string(getCurrentTimeStep())); WRITE_MESSAGE("Reason: Script ended"); @@ -284,7 +307,7 @@ state = simulationState(stop); #ifndef NO_TRACI if (state != SIMSTATE_RUNNING) { - if (OptionsCont::getOptions().getInt("remote-port") != 0 && !traci::TraCIServer::wasClosed()) { + if (OptionsCont::getOptions().getInt("remote-port") != 0 && !TraCIServer::wasClosed()) { state = SIMSTATE_RUNNING; } } @@ -309,36 +332,53 @@ if (myLogExecutionTime) { long duration = SysUtils::getCurrentMillis() - mySimBeginMillis; std::ostringstream msg; - msg << "Performance: " << "\n" << " Duration: " << duration << " ms" << "\n"; + // print performance notice + msg << "Performance: " << "\n" << " Duration: " << duration << "ms" << "\n"; if (duration != 0) { msg << " Real time factor: " << (STEPS2TIME(myStep - start) * 1000. / (SUMOReal)duration) << "\n"; msg.setf(std::ios::fixed , std::ios::floatfield); // use decimal format msg.setf(std::ios::showpoint); // print decimal point msg << " UPS: " << ((SUMOReal)myVehiclesMoved / ((SUMOReal)duration / 1000)) << "\n"; } - // prepare optional statistics + // print vehicle statistics const std::string discardNotice = ((myVehicleControl->getLoadedVehicleNo() != myVehicleControl->getDepartedVehicleNo()) ? " (Loaded: " + toString(myVehicleControl->getLoadedVehicleNo()) + ")" : ""); - const std::string collisionNotice = ( - myVehicleControl->getCollisionCount() > 0 ? - " (Collisions: " + toString(myVehicleControl->getCollisionCount()) + ")" : ""); - const std::string teleportNotice = ( - myVehicleControl->getTeleportCount() > 0 ? - "Teleports: " + toString(myVehicleControl->getTeleportCount()) + collisionNotice + "\n" : ""); - // print statistics msg << "Vehicles: " << "\n" - << " Emitted: " << myVehicleControl->getDepartedVehicleNo() << discardNotice << "\n" + << " Inserted: " << myVehicleControl->getDepartedVehicleNo() << discardNotice << "\n" << " Running: " << myVehicleControl->getRunningVehicleNo() << "\n" - << " Waiting: " << myInserter->getWaitingVehicleNo() << "\n" - << teleportNotice; + << " Waiting: " << myInserter->getWaitingVehicleNo() << "\n"; + + if (myVehicleControl->getTeleportCount() > 0) { + // print optional teleport statistics + std::vector reasons; + if (myVehicleControl->getCollisionCount() > 0) { + reasons.push_back("Collisions: " + toString(myVehicleControl->getCollisionCount())); + } + if (myVehicleControl->getTeleportsJam() > 0) { + reasons.push_back("Jam: " + toString(myVehicleControl->getTeleportsJam())); + } + if (myVehicleControl->getTeleportsYield() > 0) { + reasons.push_back("Yield: " + toString(myVehicleControl->getTeleportsYield())); + } + if (myVehicleControl->getTeleportsWrongLane() > 0) { + reasons.push_back("Wrong Lane: " + toString(myVehicleControl->getTeleportsWrongLane())); + } + msg << "Teleports: " << myVehicleControl->getTeleportCount() << " (" << joinToString(reasons, ", ") << ")\n"; + } + if (myVehicleControl->getEmergencyStops() > 0) { + msg << "Emergency Stops: " << myVehicleControl->getEmergencyStops() << "\n"; + } WRITE_MESSAGE(msg.str()); } myDetectorControl->close(myStep); if (OptionsCont::getOptions().getBool("vehroute-output.write-unfinished")) { MSDevice_Vehroutes::generateOutputForUnfinished(); } + if (OptionsCont::getOptions().getBool("tripinfo-output.write-unfinished")) { + MSDevice_Tripinfo::generateOutputForUnfinished(); + } #ifndef NO_TRACI - traci::TraCIServer::close(); + TraCIServer::close(); #endif } @@ -346,8 +386,8 @@ void MSNet::simulationStep() { #ifndef NO_TRACI - traci::TraCIServer::processCommandsUntilSimStep(myStep); - traci::TraCIServer* t = traci::TraCIServer::getInstance(); + TraCIServer::processCommandsUntilSimStep(myStep); + TraCIServer* t = TraCIServer::getInstance(); if (t != 0 && t->getTargetTime() != 0 && t->getTargetTime() < myStep) { return; } @@ -363,8 +403,11 @@ MSStateHandler::saveState(myStateDumpFiles[dist], myStep); } myBeginOfTimestepEvents->execute(myStep); +#ifdef HAVE_FOX + MSDevice_Routing::waitForAll(); +#endif if (MSGlobals::gCheck4Accidents) { - myEdges->detectCollisions(myStep, 0); + myEdges->detectCollisions(myStep, STAGE_EVENTS); } // check whether the tls programs need to be switched myLogics->check2Switch(myStep); @@ -385,14 +428,14 @@ // decide right-of-way and execute movements myEdges->executeMovements(myStep); if (MSGlobals::gCheck4Accidents) { - myEdges->detectCollisions(myStep, 1); + myEdges->detectCollisions(myStep, STAGE_MOVEMENTS); } - // Vehicles change Lanes (maybe) + // vehicles may change lanes myEdges->changeLanes(myStep); if (MSGlobals::gCheck4Accidents) { - myEdges->detectCollisions(myStep, 2); + myEdges->detectCollisions(myStep, STAGE_LANECHANGE); } #ifdef HAVE_INTERNAL } @@ -400,14 +443,21 @@ loadRoutes(); // persons - if (myPersonControl != 0) { + if (myPersonControl != 0 && myPersonControl->hasPersons()) { myPersonControl->checkWaitingPersons(this, myStep); } - // emit Vehicles + // insert vehicles + myInserter->determineCandidates(myStep); // containers + if (myContainerControl != 0) { + myContainerControl->checkWaitingContainers(this, myStep); + } myInsertionEvents->execute(myStep); +#ifdef HAVE_FOX + MSDevice_Routing::waitForAll(); +#endif myInserter->emitVehicles(myStep); if (MSGlobals::gCheck4Accidents) { - myEdges->detectCollisions(myStep, 3); + myEdges->detectCollisions(myStep, STAGE_INSERTIONS); } MSVehicleTransfer::getInstance()->checkInsertions(myStep); @@ -415,8 +465,8 @@ myEndOfTimestepEvents->execute(myStep); #ifndef NO_TRACI - if (traci::TraCIServer::getInstance() != 0) { - traci::TraCIServer::getInstance()->postProcessVTD(); + if (TraCIServer::getInstance() != 0) { + TraCIServer::getInstance()->postProcessVTD(); } #endif // update and write (if needed) detector values @@ -437,7 +487,7 @@ return SIMSTATE_TOO_MANY_VEHICLES; } #ifndef NO_TRACI - if (traci::TraCIServer::wasClosed()) { + if (TraCIServer::wasClosed()) { return SIMSTATE_CONNECTION_CLOSED; } if (stopTime < 0 && OptionsCont::getOptions().getInt("remote-port") == 0) { @@ -447,10 +497,14 @@ if (myInsertionEvents->isEmpty() && (myVehicleControl->getActiveVehicleCount() == 0) && (myInserter->getPendingFlowCount() == 0) - && (myPersonControl == 0 || !myPersonControl->hasNonWaiting())) { + && (myPersonControl == 0 || !myPersonControl->hasNonWaiting()) + && (myContainerControl == 0 || !myContainerControl->hasNonWaiting())) { if (myPersonControl) { myPersonControl->abortWaiting(); } + if (myContainerControl) { + myContainerControl->abortWaiting(); + } myVehicleControl->abortWaiting(); return SIMSTATE_NO_FURTHER_VEHICLES; } @@ -493,12 +547,9 @@ MSDevice_Routing::cleanup(); MSTrigger::cleanup(); MSCalibrator::cleanup(); -} - - -SUMOTime -MSNet::getCurrentTimeStep() const { - return myStep; + MSPModel::cleanup(); + MSCModel_NonInteracting::cleanup(); + PedestrianEdge::cleanup(); } @@ -506,10 +557,12 @@ MSNet::writeOutput() { // update detector values myDetectorControl->updateDetectors(myStep); + const OptionsCont& oc = OptionsCont::getOptions(); // check state dumps - if (OptionsCont::getOptions().isSet("netstate-dump")) { - MSXMLRawOut::write(OutputDevice::getDeviceByOption("netstate-dump"), *myEdges, myStep); + if (oc.isSet("netstate-dump")) { + MSXMLRawOut::write(OutputDevice::getDeviceByOption("netstate-dump"), *myEdges, myStep, + oc.getInt("netstate-dump.precision")); } // check fcd dumps @@ -532,6 +585,11 @@ MSQueueExport::write(OutputDevice::getDeviceByOption("queue-output"), myStep); } + // check amitran dumps + if (OptionsCont::getOptions().isSet("amitran-output")) { + MSAmitranTrajectories::write(OutputDevice::getDeviceByOption("amitran-output"), myStep); + } + // check vtk dumps if (OptionsCont::getOptions().isSet("vtk-output")) { @@ -550,25 +608,23 @@ } - // emission output + // summary output if (OptionsCont::getOptions().isSet("summary-output")) { OutputDevice& od = OutputDevice::getDeviceByOption("summary-output"); - od << " getLoadedVehicleNo() << "\" " - << "emitted=\"" << myVehicleControl->getDepartedVehicleNo() << "\" " - << "running=\"" << myVehicleControl->getRunningVehicleNo() << "\" " - << "waiting=\"" << myInserter->getWaitingVehicleNo() << "\" " - << "ended=\"" << myVehicleControl->getEndedVehicleNo() << "\" " - << "meanWaitingTime=\""; - myVehicleControl->printMeanWaitingTime(od); - od << "\" meanTravelTime=\""; - myVehicleControl->printMeanTravelTime(od); - od << "\" "; + unsigned int departedVehiclesNumber = myVehicleControl->getDepartedVehicleNo(); + const SUMOReal meanWaitingTime = departedVehiclesNumber != 0 ? myVehicleControl->getTotalDepartureDelay() / (SUMOReal) departedVehiclesNumber : -1.; + unsigned int endedVehicleNumber = myVehicleControl->getEndedVehicleNo(); + const SUMOReal meanTravelTime = endedVehicleNumber != 0 ? myVehicleControl->getTotalTravelTime() / (SUMOReal) endedVehicleNumber : -1.; + od.openTag("step").writeAttr("time", time2string(myStep)).writeAttr("loaded", myVehicleControl->getLoadedVehicleNo()) + .writeAttr("inserted", myVehicleControl->getDepartedVehicleNo()).writeAttr("running", myVehicleControl->getRunningVehicleNo()) + .writeAttr("waiting", myInserter->getWaitingVehicleNo()).writeAttr("ended", myVehicleControl->getEndedVehicleNo()) + .writeAttr("meanWaitingTime", meanWaitingTime).writeAttr("meanTravelTime", meanTravelTime); if (myLogExecutionTime) { - od << "duration=\"" << mySimStepDuration << "\" "; + od.writeAttr("duration", mySimStepDuration); } - od << "/>\n"; + od.closeTag(); } + // write detector values myDetectorControl->writeOutput(myStep + DELTA_T, false); @@ -577,8 +633,8 @@ OutputDevice& od = OutputDevice::getDeviceByOption("link-output"); od.openTag("timestep"); od.writeAttr(SUMO_ATTR_ID, STEPS2TIME(myStep)); - const std::vector& edges = myEdges->getEdges(); - for (std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + const MSEdgeVector& edges = myEdges->getEdges(); + for (MSEdgeVector::const_iterator i = edges.begin(); i != edges.end(); ++i) { const std::vector& lanes = (*i)->getLanes(); for (std::vector::const_iterator j = lanes.begin(); j != lanes.end(); ++j) { const std::vector& links = (*j)->getLinkCont(); @@ -606,6 +662,14 @@ return *myPersonControl; } +MSContainerControl& +MSNet::getContainerControl() { + if (myContainerControl == 0) { + myContainerControl = new MSContainerControl(); + } + return *myContainerControl; +} + MSEdgeWeightsStorage& MSNet::getWeightsStorage() { @@ -698,20 +762,43 @@ return ""; } +// ------ Insertion and retrieval of container stops ------ +bool +MSNet::addContainerStop(MSContainerStop* containerStop) { + return myContainerStopDict.add(containerStop->getID(), containerStop); +} + +MSContainerStop* +MSNet::getContainerStop(const std::string& id) const { + return myContainerStopDict.get(id); +} + +std::string +MSNet::getContainerStopID(const MSLane* lane, const SUMOReal pos) const { + const std::map& vals = myContainerStopDict.getMyMap(); + for (std::map::const_iterator it = vals.begin(); it != vals.end(); ++it) { + MSContainerStop* stop = it->second; + if (&stop->getLane() == lane && fabs(stop->getEndLanePosition() - pos) < POSITION_EPS) { + return stop->getID(); + } + } + return ""; +} + SUMOAbstractRouter& -MSNet::getRouterTT(const std::vector& prohibited) const { +MSNet::getRouterTT(const MSEdgeVector& prohibited) const { if (!myRouterTTInitialized) { myRouterTTInitialized = true; const std::string routingAlgorithm = OptionsCont::getOptions().getString("routing-algorithm"); if (routingAlgorithm == "dijkstra") { - myRouterTTDijkstra = new DijkstraRouterTT_ByProxi >( + myRouterTTDijkstra = new DijkstraRouterTT >( MSEdge::numericalDictSize(), true, &MSNet::getTravelTime); } else { if (routingAlgorithm != "astar") { WRITE_WARNING("TraCI and Triggers cannot use routing algorithm '" + routingAlgorithm + "'. using 'astar' instead."); } - myRouterTTAStar = new AStarRouterTT_ByProxi >( + myRouterTTAStar = new AStarRouter >( MSEdge::numericalDictSize(), true, &MSNet::getTravelTime); } } @@ -727,9 +814,9 @@ SUMOAbstractRouter& -MSNet::getRouterEffort(const std::vector& prohibited) const { +MSNet::getRouterEffort(const MSEdgeVector& prohibited) const { if (myRouterEffort == 0) { - myRouterEffort = new DijkstraRouterEffort_ByProxi >( + myRouterEffort = new DijkstraRouterEffort >( MSEdge::numericalDictSize(), true, &MSNet::getEffort, &MSNet::getTravelTime); } myRouterEffort->prohibit(prohibited); @@ -737,4 +824,24 @@ } +MSNet::MSPedestrianRouterDijkstra& +MSNet::getPedestrianRouter(const MSEdgeVector& prohibited) const { + if (myPedestrianRouter == 0) { + myPedestrianRouter = new MSPedestrianRouterDijkstra(); + } + myPedestrianRouter->prohibit(prohibited); + return *myPedestrianRouter; +} + + +const NamedRTree& +MSNet::getLanesRTree() const { + if (!myLanesRTree.first) { + MSLane::fill(myLanesRTree.second); + myLanesRTree.first = true; + } + return myLanesRTree.second; +} + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSNet.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSNet.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSNet.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSNet.h 2015-04-17 00:20:29.000000000 +0000 @@ -8,12 +8,12 @@ /// @author Clemens Honomichl /// @author Michael Behrisch /// @date Mon, 12 Mar 2001 -/// @version $Id: MSNet.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSNet.h 18096 2015-03-17 09:50:59Z behrisch $ /// // The simulated network and simulation perfomer /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -50,22 +50,28 @@ #include #include #include +#include #include #include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include + // =========================================================================== // class declarations // =========================================================================== class MSEdge; +class MSJunction; class MSEdgeControl; class MSJunctionControl; class MSInsertionControl; class SUMORouteLoaderControl; class MSPersonControl; +class MSContainerControl; class MSVehicle; class MSRoute; class MSLane; @@ -76,6 +82,7 @@ class MSEdgeWeightsStorage; class SUMOVehicle; +typedef std::vector MSEdgeVector; // =========================================================================== // class definitions @@ -104,6 +111,10 @@ SIMSTATE_TOO_MANY_VEHICLES }; + //typedef PedestrianRouterDijkstra MSPedestrianRouterDijkstra; + typedef PedestrianRouterDijkstra MSPedestrianRouterDijkstra; + + public: /** @brief Returns the pointer to the unique instance of MSNet (singleton). @@ -145,11 +156,27 @@ * @param[in] tlc The control of traffic lights which belong to this network * @param[in] stateDumpTimes List of time steps at which state shall be written * @param[in] stateDumpFiles Filenames for states + * @param[in] hasInternalLinks Whether the network actually contains internal links * @todo Try to move all this to the constructor? */ void closeBuilding(MSEdgeControl* edges, MSJunctionControl* junctions, SUMORouteLoaderControl* routeLoaders, MSTLLogicControl* tlc, - std::vector stateDumpTimes, std::vector stateDumpFiles); + std::vector stateDumpTimes, std::vector stateDumpFiles, + bool hasInternalLinks); + + + /** @brief Returns whether the network has vehicle class restrictions + * @return whether restrictions are present + */ + bool hasRestrictions() const { + return myHaveRestrictions; + } + + + /// @brief Labels the network to contain vehicle class restrictions + void setRestrictionFound() { + myHaveRestrictions = true; + } /** @brief Clears all dictionaries @@ -173,6 +200,7 @@ */ void simulationStep(); + /** @brief loads routes for the next few steps */ void loadRoutes(); @@ -201,10 +229,20 @@ static std::string getStateMessage(SimulationState state); - /** @brief Returns the current simulation step (in s) + /** @brief Returns the current simulation step * @return the current simulation step */ - SUMOTime getCurrentTimeStep() const; + inline SUMOTime getCurrentTimeStep() const { + return myStep; + } + + + /** @brief Sets the current simulation step (used by state loading) + * @param step the current simulation step + */ + inline void setCurrentTimeStep(const SUMOTime step) { + myStep = step; + } /** @brief Write netstate, summary and detector output @@ -219,6 +257,7 @@ bool logSimulationDuration() const; + /// @name Output during the simulation //@{ @@ -237,6 +276,7 @@ //} + /// @name Retrieval of references to substructures /// @{ @@ -260,6 +300,16 @@ */ virtual MSPersonControl& getPersonControl(); + /** @brief Returns the container control + * + * If the container control does not exist, yet, it is created. + * + * @return The container control + * @see MSContainerControl + * @see myContainerControl + */ + virtual MSContainerControl& getContainerControl(); + /** @brief Returns the edge control * @return The edge control @@ -312,32 +362,32 @@ /** @brief Returns the event control for events executed at the begin of a time step - * @return The control reponsible for events that are executed at the begin of a time step + * @return The control responsible for events that are executed at the begin of a time step * @see MSEventControl * @see myBeginOfTimestepEvents */ - MSEventControl& getBeginOfTimestepEvents() { - return *myBeginOfTimestepEvents; + MSEventControl* getBeginOfTimestepEvents() { + return myBeginOfTimestepEvents; } /** @brief Returns the event control for events executed at the end of a time step - * @return The control reponsible for events that are executed at the end of a time step + * @return The control responsible for events that are executed at the end of a time step * @see MSEventControl * @see myEndOfTimestepEvents */ - MSEventControl& getEndOfTimestepEvents() { - return *myEndOfTimestepEvents; + MSEventControl* getEndOfTimestepEvents() { + return myEndOfTimestepEvents; } /** @brief Returns the event control for insertion events - * @return The control reponsible for insertion events + * @return The control responsible for insertion events * @see MSEventControl * @see myInsertionEvents */ - MSEventControl& getInsertionEvents() { - return *myInsertionEvents; + MSEventControl* getInsertionEvents() { + return myInsertionEvents; } @@ -394,7 +444,35 @@ /// @} + /// @name Insertion and retrieval of container stops + /// @{ + /** @brief Adds a container stop + * + * If another container stop with the same id exists, false is returned. + * Otherwise, the container stop is added to the internal container stop + * container "myContainerStopDict". + * + * This control gets responsible for deletion of the added container stop. + * + * @param[in] containerStop The container stop to add + * @return Whether the container stop could be added + */ + bool addContainerStop(MSContainerStop* containerStop); + + /** @brief Returns the named container stop + * @param[in] id The id of the container stop to return. + * @return The named container stop, or 0 if no such stop exists + */ + MSContainerStop* getContainerStop(const std::string& id) const; + + /** @brief Returns the container stop close to the given position + * @param[in] lane the lane of the container stop to return. + * @param[in] pos the position of the container stop to return. + * @return The container stop id on the location, or "" if no such stop exists + */ + std::string getContainerStopID(const MSLane* lane, const SUMOReal pos) const; + /// @} @@ -414,7 +492,15 @@ /// @brief The vehicle arrived at his destination (is deleted) VEHICLE_STATE_ARRIVED, /// @brief The vehicle got a new route - VEHICLE_STATE_NEWROUTE + VEHICLE_STATE_NEWROUTE, + /// @brief The vehicles starts to park + VEHICLE_STATE_STARTING_PARKING, + /// @brief The vehicle ends to park + VEHICLE_STATE_ENDING_PARKING, + /// @brief The vehicles starts to stop + VEHICLE_STATE_STARTING_STOP, + /// @brief The vehicle ends to stop + VEHICLE_STATE_ENDING_STOP }; @@ -459,6 +545,7 @@ /// @} + /** @brief Returns the travel time to pass an edge * @param[in] e The edge for which the travel time to be passed shall be returned * @param[in] v The vehicle that is rerouted @@ -483,10 +570,21 @@ * @param[in] prohibited The vector of forbidden edges (optional) */ SUMOAbstractRouter& getRouterTT( - const std::vector& prohibited = std::vector()) const; + const MSEdgeVector& prohibited = MSEdgeVector()) const; SUMOAbstractRouter& getRouterEffort( - const std::vector& prohibited = std::vector()) const; + const MSEdgeVector& prohibited = MSEdgeVector()) const; + MSPedestrianRouterDijkstra& getPedestrianRouter(const MSEdgeVector& prohibited = MSEdgeVector()) const; + + /** @brief Returns an RTree that contains lane IDs + * @return An Rtree containing lane IDs + */ + const NamedRTree& getLanesRTree() const; + + /// @brief return whether the network contains internal links + bool hasInternalLinks() const { + return myHasInternalLinks; + } protected: /// @brief Unique instance of MSNet @@ -507,6 +605,8 @@ MSVehicleControl* myVehicleControl; /// @brief Controls person building and deletion; @see MSPersonControl MSPersonControl* myPersonControl; + /// @brief Controls container building and deletion; @see MSContainerControl + MSContainerControl* myContainerControl; /// @brief Controls edges, performs vehicle movement; @see MSEdgeControl MSEdgeControl* myEdges; /// @brief Controls junctions, realizes right-of-way rules; @see MSJunctionControl @@ -562,13 +662,22 @@ /// @} + + /// @brief Whether the network contains edges which not all vehicles may pass + bool myHaveRestrictions; + + /// @brief Whether the network contains internal links/lanes/edges + bool myHasInternalLinks; + /// @brief Storage for maximum vehicle number int myTooManyVehicles; - /// @brief Dictionary of bus stops NamedObjectCont myBusStopDict; + /// @brief Dictionary of container stops + NamedObjectCont myContainerStopDict; + /// @brief Container for vehicle state listener std::vector myVehicleStateListeners; @@ -578,10 +687,21 @@ * @note we provide one member for every switchable router type * because the class structure makes it inconvenient to use a superclass*/ mutable bool myRouterTTInitialized; - mutable DijkstraRouterTT_ByProxi >* myRouterTTDijkstra; - mutable AStarRouterTT_ByProxi >* myRouterTTAStar; - mutable DijkstraRouterEffort_ByProxi >* myRouterEffort; + mutable DijkstraRouterTT >* myRouterTTDijkstra; + mutable AStarRouter >* myRouterTTAStar; + mutable DijkstraRouterEffort >* myRouterEffort; + mutable MSPedestrianRouterDijkstra* myPedestrianRouter; + + + /// @brief An RTree structure holding lane IDs + mutable std::pair myLanesRTree; + + /// @brief string constants for simstep stages + static const std::string STAGE_EVENTS; + static const std::string STAGE_MOVEMENTS; + static const std::string STAGE_LANECHANGE; + static const std::string STAGE_INSERTIONS; private: /// @brief Invalidated copy constructor. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSNoLogicJunction.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSNoLogicJunction.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSNoLogicJunction.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSNoLogicJunction.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file MSNoLogicJunction.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Thu, 06 Jun 2002 -/// @version $Id: MSNoLogicJunction.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSNoLogicJunction.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -48,6 +49,7 @@ // method definitions // =========================================================================== MSNoLogicJunction::MSNoLogicJunction(const std::string& id, + SumoXMLNodeType type, const Position& position, const PositionVector& shape, std::vector incoming @@ -55,7 +57,7 @@ , std::vector internal #endif ): - MSJunction(id, position, shape), + MSJunction(id, type, position, shape), myIncomingLanes(incoming) #ifdef HAVE_INTERNAL_LANES , myInternalLanes(internal) @@ -73,7 +75,7 @@ for (i = myIncomingLanes.begin(); i != myIncomingLanes.end(); ++i) { const MSLinkCont& links = (*i)->getLinkCont(); for (MSLinkCont::const_iterator j = links.begin(); j != links.end(); j++) { - (*j)->setRequestInformation(0, 0, false, false, std::vector(), std::vector()); + (*j)->setRequestInformation(-1, false, false, std::vector(), std::vector()); } } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSNoLogicJunction.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSNoLogicJunction.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSNoLogicJunction.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSNoLogicJunction.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Christian Roessel /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Wed, 12 Dez 2001 -/// @version $Id: MSNoLogicJunction.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSNoLogicJunction.h 18095 2015-03-17 09:39:00Z behrisch $ /// // logic, e.g. for exits. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -64,7 +65,7 @@ * @param[in] incoming The incoming lanes * @param[in] internal The internal lanes */ - MSNoLogicJunction(const std::string& id, const Position& position, + MSNoLogicJunction(const std::string& id, SumoXMLNodeType type, const Position& position, const PositionVector& shape, std::vector incoming #ifdef HAVE_INTERNAL_LANES diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSPersonControl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSPersonControl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSPersonControl.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSPersonControl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Mon, 9 Jul 2001 -/// @version $Id: MSPersonControl.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSPersonControl.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Stores all persons in the net and handles their waiting for cars. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,7 +35,7 @@ #include #include "MSNet.h" #include "MSEdge.h" -#include "MSPerson.h" +#include #include "MSVehicle.h" #include "MSPersonControl.h" #include @@ -71,22 +71,28 @@ } +MSPerson* +MSPersonControl::get(const std::string& id) const { + std::map::const_iterator i = myPersons.find(id); + if (i == myPersons.end()) { + return 0; + } + return (*i).second; +} + + void MSPersonControl::erase(MSPerson* person) { const std::string& id = person->getID(); if (OptionsCont::getOptions().isSet("tripinfo-output")) { OutputDevice& od = OutputDevice::getDeviceByOption("tripinfo-output"); - od.openTag("personinfo") << " id=\"" << id << "\" "; - od << "depart=\"" << time2string(person->getDesiredDepart()) << "\""; + od.openTag("personinfo").writeAttr("id", id).writeAttr("depart", time2string(person->getDesiredDepart())); person->tripInfoOutput(od); od.closeTag(); } if (OptionsCont::getOptions().isSet("vehroute-output")) { OutputDevice& od = OutputDevice::getDeviceByOption("vehroute-output"); - od.openTag("person") << " id=\"" << id - << "\" depart=\"" << time2string(person->getDesiredDepart()) - << "\" arrival=\"" << time2string(MSNet::getInstance()->getCurrentTimeStep()) - << "\""; + od.openTag("person").writeAttr("id", id).writeAttr("depart", time2string(person->getDesiredDepart())).writeAttr("arrival", time2string(MSNet::getInstance()->getCurrentTimeStep())); person->routeOutput(od); od.closeTag(); od << "\n"; @@ -160,15 +166,25 @@ bool -MSPersonControl::boardAnyWaiting(MSEdge* edge, MSVehicle* vehicle) { +MSPersonControl::boardAnyWaiting(MSEdge* edge, MSVehicle* vehicle, MSVehicle::Stop* stop) { bool ret = false; if (myWaiting4Vehicle.find(edge) != myWaiting4Vehicle.end()) { PersonVector& waitPersons = myWaiting4Vehicle[edge]; + const std::string& line = vehicle->getParameter().line == "" ? vehicle->getParameter().id : vehicle->getParameter().line; + SUMOTime currentTime = MSNet::getInstance()->getCurrentTimeStep(); for (PersonVector::iterator i = waitPersons.begin(); i != waitPersons.end();) { - const std::string& line = vehicle->getParameter().line == "" ? vehicle->getParameter().id : vehicle->getParameter().line; - if ((*i)->isWaitingFor(line)) { + if ((*i)->isWaitingFor(line) && vehicle->getVehicleType().getPersonCapacity() > vehicle->getPersonNumber() && stop->timeToBoardNextPerson <= currentTime && stop->startPos <= (*i)->getEdgePos() && (*i)->getEdgePos() <= stop->endPos) { edge->removePerson(*i); vehicle->addPerson(*i); + //if the time a person needs to enter the vehicle extends the duration of the stop of the vehicle extend + //the duration by setting it to the boarding duration of the person + const SUMOTime boardingDuration = vehicle->getVehicleType().getBoardingDuration(); + if (boardingDuration >= stop->duration) { + stop->duration = boardingDuration; + } + //update the time point at which the next person can board the vehicle + stop->timeToBoardNextPerson = currentTime + boardingDuration; + static_cast((*i)->getCurrentStage())->setVehicle(vehicle); i = waitPersons.erase(i); ret = true; @@ -183,7 +199,6 @@ return ret; } - bool MSPersonControl::hasPersons() const { return !myPersons.empty(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSPersonControl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSPersonControl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSPersonControl.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSPersonControl.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Mon, 9 Jul 2001 -/// @version $Id: MSPersonControl.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSPersonControl.h 18096 2015-03-17 09:50:59Z behrisch $ /// // Stores all persons in the net and handles their waiting for cars. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,7 +35,8 @@ #include #include -#include "MSPerson.h" +#include +#include "MSVehicle.h" // =========================================================================== @@ -57,18 +58,37 @@ */ class MSPersonControl { public: - + /// @brief Definition of a list of persons typedef std::vector PersonVector; - /// constructor + /// @brief Definition of the internal persons map iterator + typedef std::map::const_iterator constVehIt; + + +public: + /// @brief Constructor MSPersonControl(); - /// destructor + + /// @brief Destructor virtual ~MSPersonControl(); - /// adds a single person, returns false if an id clash occured + + /** @brief Adds a single person, returns false if an id clash occured + * @param[in] id The id of the person + * @param[in] person The person to add + * @return Whether the person could be added (none with the same id existed before) + */ bool add(const std::string& id, MSPerson* person); + + /** @brief Returns the named person, if existing + * @param[in] id The id of the person + * @return The named person, if existing, otherwise 0 + */ + MSPerson* get(const std::string& id) const; + + /// removes a single person virtual void erase(MSPerson* person); @@ -88,9 +108,10 @@ * Boards any people who wait on that edge for the given vehicle and removes them from myWaiting * @param[in] the edge on which the boarding should take place * @param[in] the vehicle which is taking on passengers + * @param[in] the stop at which the vehicle is stopping * @return Whether any persons have been boarded */ - bool boardAnyWaiting(MSEdge* edge, MSVehicle* vehicle); + bool boardAnyWaiting(MSEdge* edge, MSVehicle* vehicle, MSVehicle::Stop* stop); /// checks whether any person waits to finish her plan bool hasPersons() const; @@ -115,11 +136,32 @@ /// @brief returns whether the the given person is waiting for a vehicle on the given edge bool isWaiting4Vehicle(const MSEdge* const edge, MSPerson* p) const; - const std::map& getPersons() const { - return myPersons; + + /** @brief Returns the begin of the internal persons map + * @return The begin of the internal persons map + */ + constVehIt loadedPersonsBegin() const { + return myPersons.begin(); + } + + + /** @brief Returns the end of the internal persons map + * @return The end of the internal persons map + */ + constVehIt loadedPersonsEnd() const { + return myPersons.end(); } -private: + + /** @brief Returns the number of known persons + * @return The number of stored persons + */ + unsigned int size() const { + return (unsigned int) myPersons.size(); + } + + +protected: /// all persons by id std::map myPersons; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSPerson.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSPerson.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSPerson.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSPerson.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,619 +0,0 @@ -/****************************************************************************/ -/// @file MSPerson.cpp -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @author Laura Bieker -/// @date Mon, 9 Jul 2001 -/// @version $Id: MSPerson.cpp 14494 2013-08-24 21:47:48Z behrisch $ -/// -// The class for modelling person-movements -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include "MSNet.h" -#include "MSEdge.h" -#include "MSLane.h" -#include "MSPerson.h" -#include "MSPersonControl.h" -#include "MSInsertionControl.h" -#include "MSVehicle.h" - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - -/* ------------------------------------------------------------------------- - * static member definitions - * ----------------------------------------------------------------------- */ -const SUMOReal MSPerson::SIDEWALK_OFFSET(3); - -// =========================================================================== -// method definitions -// =========================================================================== -/* ------------------------------------------------------------------------- - * MSPerson::MSPersonStage - methods - * ----------------------------------------------------------------------- */ -MSPerson::MSPersonStage::MSPersonStage(const MSEdge& destination, StageType type) - : myDestination(destination), myDeparted(-1), myArrived(-1), myType(type) {} - - -MSPerson::MSPersonStage::~MSPersonStage() {} - - -const MSEdge& -MSPerson::MSPersonStage::getDestination() const { - return myDestination; -} - - -void -MSPerson::MSPersonStage::setDeparted(SUMOTime now) { - if (myDeparted < 0) { - myDeparted = now; - } -} - - -void -MSPerson::MSPersonStage::setArrived(SUMOTime now) { - myArrived = now; -} - - -bool -MSPerson::MSPersonStage::isWaitingFor(const std::string& /*line*/) const { - return false; -} - - -Position -MSPerson::MSPersonStage::getEdgePosition(const MSEdge* e, SUMOReal at, SUMOReal offset) const { - // @todo: well, definitely not the nicest way... Should be precomputed - const MSLane* lane = e->getLanes()[0]; - PositionVector shp = lane->getShape(); - shp.move2side(offset); - return shp.positionAtOffset(lane->interpolateLanePosToGeometryPos(at)); -} - - -SUMOReal -MSPerson::MSPersonStage::getEdgeAngle(const MSEdge* e, SUMOReal at) const { - // @todo: well, definitely not the nicest way... Should be precomputed - PositionVector shp = e->getLanes()[0]->getShape(); - return shp.rotationDegreeAtOffset(at); -} - - -/* ------------------------------------------------------------------------- - * MSPerson::MSPersonStage_Walking - methods - * ----------------------------------------------------------------------- */ -MSPerson::MSPersonStage_Walking::MSPersonStage_Walking(const std::vector& route, - MSBusStop* toBS, - SUMOTime walkingTime, SUMOReal speed, - SUMOReal departPos, SUMOReal arrivalPos) : - MSPersonStage(*route.back(), WALKING), myWalkingTime(walkingTime), myRoute(route), - myDepartPos(departPos), myArrivalPos(arrivalPos), myDestinationBusStop(toBS), - mySpeed(speed) { - myDepartPos = SUMOVehicleParameter::interpretEdgePos( - myDepartPos, myRoute.front()->getLength(), SUMO_ATTR_DEPARTPOS, "person walking from " + myRoute.front()->getID()); - myArrivalPos = SUMOVehicleParameter::interpretEdgePos( - myArrivalPos, myRoute.back()->getLength(), SUMO_ATTR_ARRIVALPOS, "person walking to " + myRoute.back()->getID()); - if (walkingTime > 0) { - SUMOReal length = 0; - for (std::vector::const_iterator i = route.begin(); i != route.end(); ++i) { - length += (*i)->getLength(); - } - length -= myDepartPos; - length -= route.back()->getLength() - myArrivalPos; - mySpeed = length / STEPS2TIME(walkingTime); - } -} - - -MSPerson::MSPersonStage_Walking::~MSPersonStage_Walking() {} - - -const MSEdge* -MSPerson::MSPersonStage_Walking::getEdge(SUMOTime /* now */) const { - return *myRouteStep; -} - - -const MSEdge* -MSPerson::MSPersonStage_Walking::getFromEdge() const { - return myRoute.front(); -} - - -SUMOReal -MSPerson::MSPersonStage_Walking::getEdgePos(SUMOTime now) const { - SUMOReal off = STEPS2TIME(now - myLastEntryTime); - return myCurrentBeginPos + myCurrentLength / myCurrentDuration * off; -} - - -Position -MSPerson::MSPersonStage_Walking::getPosition(SUMOTime now) const { - const MSEdge* e = getEdge(now); - SUMOReal off = STEPS2TIME(now - myLastEntryTime); - return getEdgePosition(e, myCurrentBeginPos + myCurrentLength / myCurrentDuration * off, SIDEWALK_OFFSET); -} - - -SUMOReal -MSPerson::MSPersonStage_Walking::getAngle(SUMOTime now) const { - const MSEdge* e = getEdge(now); - SUMOReal off = STEPS2TIME(now - myLastEntryTime); - return getEdgeAngle(e, myCurrentBeginPos + myCurrentLength / myCurrentDuration * off) + 90; -} - - -void -MSPerson::MSPersonStage_Walking::proceed(MSNet* net, MSPerson* person, SUMOTime now, - MSEdge* previousEdge, const SUMOReal at) { - previousEdge->removePerson(person); - myRouteStep = myRoute.begin(); - myLastEntryTime = now; - if (myWalkingTime == 0) { - if (!person->proceed(net, now)) { - MSNet::getInstance()->getPersonControl().erase(person); - }; - return; - } - MSNet::getInstance()->getPersonControl().setWalking(person); - if (at >= 0) { - myDepartPos = at; - } - ((MSEdge*) *myRouteStep)->addPerson(person); - myRoute.size() == 1 - ? computeWalkingTime(*myRouteStep, myDepartPos, myArrivalPos, myDestinationBusStop) - : computeWalkingTime(*myRouteStep, myDepartPos, -1, 0); - net->getBeginOfTimestepEvents().addEvent(new MoveToNextEdge(person, *this), now + TIME2STEPS(myCurrentDuration), MSEventControl::ADAPT_AFTER_EXECUTION); -} - - -void -MSPerson::MSPersonStage_Walking::computeWalkingTime(const MSEdge* const e, SUMOReal fromPos, SUMOReal toPos, MSBusStop* bs) { - if (bs != 0) { - toPos = bs->getEndLanePosition(); - } else if (toPos < 0) { - toPos = e->getLanes()[0]->getLength(); - } - if (fromPos < 0) { - fromPos = 0; - } - myCurrentBeginPos = fromPos; - myCurrentLength = toPos - fromPos; - assert(myCurrentLength >= 0); - myCurrentDuration = MAX2(myCurrentLength, (SUMOReal)1.0) / mySpeed; -} - - -void -MSPerson::MSPersonStage_Walking::tripInfoOutput(OutputDevice& os) const { - (os.openTag("walk") << - " arrival=\"" << time2string(myArrived) << - "\"").closeTag(); -} - - -void -MSPerson::MSPersonStage_Walking::routeOutput(OutputDevice& os) const { - os.openTag("walk").writeAttr(SUMO_ATTR_EDGES, myRoute); - if (myWalkingTime > 0) { - os.writeAttr(SUMO_ATTR_DURATION, time2string(myWalkingTime)); - } else if (mySpeed > 0) { - os.writeAttr(SUMO_ATTR_SPEED, mySpeed); - } - os.closeTag(); -} - - -void -MSPerson::MSPersonStage_Walking::beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const { - (os.openTag("event") << - " time=\"" << time2string(t) << - "\" type=\"departure" << - "\" agent=\"" << p.getID() << - "\" link=\"" << myRoute.front()->getID() << - "\"").closeTag(); -} - - -void -MSPerson::MSPersonStage_Walking::endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const { - (os.openTag("event") << - " time=\"" << time2string(t) << - "\" type=\"arrival" << - "\" agent=\"" << p.getID() << - "\" link=\"" << myRoute.back()->getID() << - "\"").closeTag(); -} - - -SUMOTime -MSPerson::MSPersonStage_Walking::moveToNextEdge(MSPerson* person, SUMOTime currentTime) { - ((MSEdge*) *myRouteStep)->removePerson(person); - if (myRouteStep == myRoute.end() - 1) { - MSNet::getInstance()->getPersonControl().unsetWalking(person); - if (myDestinationBusStop != 0) { - myDestinationBusStop->addPerson(person); - } - if (!person->proceed(MSNet::getInstance(), currentTime)) { - MSNet::getInstance()->getPersonControl().erase(person); - } - return 0; - } else { - ++myRouteStep; - myRouteStep == myRoute.end() - 1 - ? computeWalkingTime(*myRouteStep, 0, myArrivalPos, myDestinationBusStop) - : computeWalkingTime(*myRouteStep, 0, -1, 0); - ((MSEdge*) *myRouteStep)->addPerson(person); - myLastEntryTime = currentTime; - return TIME2STEPS(myCurrentDuration); - } -} - - - -/* ------------------------------------------------------------------------- - * MSPerson::MSPersonStage_Driving - methods - * ----------------------------------------------------------------------- */ -MSPerson::MSPersonStage_Driving::MSPersonStage_Driving(const MSEdge& destination, - MSBusStop* toBS, const std::vector& lines) - : MSPersonStage(destination, DRIVING), myLines(lines.begin(), lines.end()), - myVehicle(0), myDestinationBusStop(toBS) {} - - -MSPerson::MSPersonStage_Driving::~MSPersonStage_Driving() {} - - -const MSEdge* -MSPerson::MSPersonStage_Driving::getEdge(SUMOTime /* now */) const { - if (myVehicle != 0) { - return myVehicle->getEdge(); - } - return myWaitingEdge; -} - - -const MSEdge* -MSPerson::MSPersonStage_Driving::getFromEdge() const { - return myWaitingEdge; -} - - -SUMOReal -MSPerson::MSPersonStage_Driving::getEdgePos(SUMOTime now) const { - if (myVehicle != 0) { - // vehicle may already have passed the lane (check whether this is correct) - return MIN2(myVehicle->getPositionOnLane(), getEdge(now)->getLength()); - } - return myWaitingPos; -} - - -Position -MSPerson::MSPersonStage_Driving::getPosition(SUMOTime /* now */) const { - if (myVehicle != 0) { - /// @bug this fails while vehicle is driving across a junction - return myVehicle->getEdge()->getLanes()[0]->getShape().positionAtOffset(myVehicle->getPositionOnLane()); - } - return getEdgePosition(myWaitingEdge, myWaitingPos, SIDEWALK_OFFSET); -} - - -SUMOReal -MSPerson::MSPersonStage_Driving::getAngle(SUMOTime /* now */) const { - if (myVehicle != 0) { - MSVehicle* veh = dynamic_cast(myVehicle); - if (veh != 0) { - return veh->getAngle() + 90; - } else { - return 0; - } - } - return getEdgeAngle(myWaitingEdge, myWaitingPos); -} - - - -void -MSPerson::MSPersonStage_Driving::proceed(MSNet* net, MSPerson* person, SUMOTime now, - MSEdge* previousEdge, const SUMOReal at) { - myWaitingEdge = previousEdge; - myWaitingPos = at; - myWaitingSince = now; - myVehicle = net->getVehicleControl().getWaitingVehicle(previousEdge, myLines); - if (myVehicle != 0 && myVehicle->getParameter().departProcedure == DEPART_TRIGGERED) { - previousEdge->removePerson(person); - myVehicle->addPerson(person); - net->getInsertionControl().add(myVehicle); - net->getVehicleControl().removeWaiting(previousEdge, myVehicle); - net->getVehicleControl().unregisterOneWaitingForPerson(); - } else { - net->getPersonControl().addWaiting(previousEdge, person); - previousEdge->addPerson(person); - } -} - - -bool -MSPerson::MSPersonStage_Driving::isWaitingFor(const std::string& line) const { - return myLines.count(line) > 0; -} - - -bool -MSPerson::MSPersonStage_Driving::isWaiting4Vehicle() const { - return myVehicle == 0; -} - - -SUMOTime -MSPerson::MSPersonStage_Driving::timeWaiting4Vehicle(SUMOTime now) const { - return isWaiting4Vehicle() ? now - myWaitingSince : 0; -} - - -std::string -MSPerson::MSPersonStage_Driving::getStageTypeName() const { - return isWaiting4Vehicle() ? "waiting for " + joinToString(myLines, ",") : "driving"; -} - - -void -MSPerson::MSPersonStage_Driving::tripInfoOutput(OutputDevice& os) const { - (os.openTag("ride") << - " depart=\"" << time2string(myDeparted) << - "\" arrival=\"" << time2string(myArrived) << - "\"").closeTag(); -} - - -void -MSPerson::MSPersonStage_Driving::routeOutput(OutputDevice& os) const { - os.openTag("ride").writeAttr(SUMO_ATTR_FROM, getFromEdge()->getID()).writeAttr(SUMO_ATTR_TO, getDestination().getID()); - os.writeAttr(SUMO_ATTR_LINES, myLines).closeTag(); -} - - -void -MSPerson::MSPersonStage_Driving::beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const { - (os.openTag("event") << - " time=\"" << time2string(t) << - "\" type=\"arrival" << - "\" agent=\"" << p.getID() << - "\" link=\"" << getEdge(t)->getID() << - "\"").closeTag(); -} - - -void -MSPerson::MSPersonStage_Driving::endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const { - (os.openTag("event") << - " time=\"" << time2string(t) << - "\" type=\"arrival" << - "\" agent=\"" << p.getID() << - "\" link=\"" << getEdge(t)->getID() << - "\"").closeTag(); -} - - -/* ------------------------------------------------------------------------- - * MSPerson::MSPersonStage_Waiting - methods - * ----------------------------------------------------------------------- */ -MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(const MSEdge& destination, - SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string& actType) : - MSPersonStage(destination, WAITING), - myWaitingDuration(duration), - myWaitingUntil(until), - myActType(actType), - myStartPos(pos) { - myStartPos = SUMOVehicleParameter::interpretEdgePos( - myStartPos, myDestination.getLength(), SUMO_ATTR_DEPARTPOS, "person stopping at " + myDestination.getID()); -} - - -MSPerson::MSPersonStage_Waiting::~MSPersonStage_Waiting() {} - - -const MSEdge* -MSPerson::MSPersonStage_Waiting::getEdge(SUMOTime /* now */) const { - return &myDestination; -} - - -const MSEdge* -MSPerson::MSPersonStage_Waiting::getFromEdge() const { - return &myDestination; -} - - -SUMOReal -MSPerson::MSPersonStage_Waiting::getEdgePos(SUMOTime /* now */) const { - return myStartPos; -} - - -SUMOTime -MSPerson::MSPersonStage_Waiting::getUntil() const { - return myWaitingUntil; -} - - -Position -MSPerson::MSPersonStage_Waiting::getPosition(SUMOTime /* now */) const { - return getEdgePosition(&myDestination, myStartPos, SIDEWALK_OFFSET); -} - - -SUMOReal -MSPerson::MSPersonStage_Waiting::getAngle(SUMOTime /* now */) const { - return getEdgeAngle(&myDestination, myStartPos) + 45; -} - - -void -MSPerson::MSPersonStage_Waiting::proceed(MSNet* net, MSPerson* person, SUMOTime now, - MSEdge* previousEdge, const SUMOReal /* at */) { - previousEdge->addPerson(person); - const SUMOTime until = MAX3(now, now + myWaitingDuration, myWaitingUntil); - net->getPersonControl().setWaitEnd(until, person); -} - - -void -MSPerson::MSPersonStage_Waiting::tripInfoOutput(OutputDevice& os) const { - (os.openTag("stop") << - " arrival=\"" << time2string(myArrived) << - "\"").closeTag(); -} - - -void -MSPerson::MSPersonStage_Waiting::routeOutput(OutputDevice& os) const { - os.openTag("stop").writeAttr(SUMO_ATTR_LANE, getDestination().getID()); - if (myWaitingDuration >= 0) { - os.writeAttr(SUMO_ATTR_DURATION, time2string(myWaitingDuration)); - } - if (myWaitingUntil >= 0) { - os.writeAttr(SUMO_ATTR_UNTIL, time2string(myWaitingUntil)); - } - os.closeTag(); -} - - -void -MSPerson::MSPersonStage_Waiting::beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const { - (os.openTag("event") << - " time=\"" << time2string(t) << - "\" type=\"actstart " << myActType << - "\" agent=\"" << p.getID() << - "\" link=\"" << getEdge(t)->getID() << - "\"").closeTag(); -} - - -void -MSPerson::MSPersonStage_Waiting::endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const { - (os.openTag("event") << - " time=\"" << time2string(t) << - "\" type=\"actend " << myActType << - "\" agent=\"" << p.getID() << - "\" link=\"" << getEdge(t)->getID() << - "\"").closeTag(); -} - -/* ------------------------------------------------------------------------- - * MSPerson - methods - * ----------------------------------------------------------------------- */ -MSPerson::MSPerson(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSPersonPlan* plan) - : myParameter(pars), myVType(vtype), myPlan(plan) { - myStep = myPlan->begin(); -} - - -MSPerson::~MSPerson() { - for (MSPersonPlan::const_iterator i = myPlan->begin(); i != myPlan->end(); ++i) { - delete *i; - } - delete myPlan; - delete myParameter; -} - - -const std::string& -MSPerson::getID() const { - return myParameter->id; -} - - -bool -MSPerson::proceed(MSNet* net, SUMOTime time) { - MSEdge* arrivedAt = (MSEdge*)(*myStep)->getEdge(time); - SUMOReal atPos = (*myStep)->getEdgePos(time); - //MSPersonPlan::iterator prior = myStep; - (*myStep)->setArrived(time); - /* - if(myWriteEvents) { - (*myStep)->endEventOutput(*this, time, OutputDevice::getDeviceByOption("person-event-output")); - } - */ - Position pos = (*myStep)->getPosition(time); - myStep++; - if (myStep != myPlan->end()) { - (*myStep)->proceed(net, this, time, arrivedAt, atPos); - /* - if(myWriteEvents) { - (*myStep)->beginEventOutput(*this, time, OutputDevice::getDeviceByOption("person-event-output")); - } - */ - return true; - } else { - arrivedAt->removePerson(this); - return false; - } -} - - -SUMOTime -MSPerson::getDesiredDepart() const { - return myParameter->depart; -} - - -void -MSPerson::setDeparted(SUMOTime now) { - (*myStep)->setDeparted(now); -} - - -void -MSPerson::tripInfoOutput(OutputDevice& os) const { - for (MSPersonPlan::const_iterator i = myPlan->begin(); i != myPlan->end(); ++i) { - (*i)->tripInfoOutput(os); - } -} - - -void -MSPerson::routeOutput(OutputDevice& os) const { - MSPersonPlan::const_iterator i = myPlan->begin(); - if ((*i)->getStageType() == WAITING && getDesiredDepart() == static_cast(*i)->getUntil()) { - ++i; - } - for (; i != myPlan->end(); ++i) { - (*i)->routeOutput(os); - } -} - - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSPerson.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSPerson.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSPerson.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSPerson.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,611 +0,0 @@ -/****************************************************************************/ -/// @file MSPerson.h -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Sascha Krieg -/// @author Michael Behrisch -/// @date Mon, 9 Jul 2001 -/// @version $Id: MSPerson.h 14494 2013-08-24 21:47:48Z behrisch $ -/// -// The class for modelling person-movements -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef MSPerson_h -#define MSPerson_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class MSNet; -class MSEdge; -class OutputDevice; -class SUMOVehicleParameter; -class MSBusStop; -class SUMOVehicle; -class MSVehicleType; - -typedef std::vector MSEdgeVector; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class MSPerson - * - * The class holds a simulated person together with her movement stages - */ -class MSPerson { -public: - enum StageType { - WALKING = 0, - DRIVING = 1, - WAITING = 2 - }; - - - /** - * The "abstract" class for a single stage of a persons movement - * Contains the destination of the current movement step - */ - class MSPersonStage { - public: - /// constructor - MSPersonStage(const MSEdge& destination, StageType type); - - /// destructor - virtual ~MSPersonStage(); - - /// returns the destination edge - const MSEdge& getDestination() const; - - /// Returns the current edge - virtual const MSEdge* getEdge(SUMOTime now) const = 0; - virtual const MSEdge* getFromEdge() const = 0; - virtual SUMOReal getEdgePos(SUMOTime now) const = 0; - - /// - virtual Position getPosition(SUMOTime now) const = 0; - virtual SUMOReal getAngle(SUMOTime now) const = 0; - - /// - StageType getStageType() const { - return myType; - } - - /// @brief return string representation of the current stage - virtual std::string getStageTypeName() const = 0; - - /// proceeds to the next step - virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at) = 0; - - /// logs end of the step - void setDeparted(SUMOTime now); - - /// logs end of the step - void setArrived(SUMOTime now); - - /// Whether the person waits for a vehicle of the line specified. - virtual bool isWaitingFor(const std::string& line) const; - - /// @brief Whether the person waits for a vehicle - virtual bool isWaiting4Vehicle() const { - return false; - } - - /// @brief the time this person spent waiting for a vehicle - virtual SUMOTime timeWaiting4Vehicle(SUMOTime /*now*/) const { - return false; - } - - /// @brief get position on edge e at length at with orthogonal offset - Position getEdgePosition(const MSEdge* e, SUMOReal at, SUMOReal offset) const; - - SUMOReal getEdgeAngle(const MSEdge* e, SUMOReal at) const; - - /** @brief Called on writing tripinfo output - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void tripInfoOutput(OutputDevice& os) const = 0; - - /** @brief Called on writing vehroute output - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void routeOutput(OutputDevice& os) const = 0; - - /** @brief Called for writing the events output (begin of an action) - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const = 0; - - /** @brief Called for writing the events output (end of an action) - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const = 0; - - - protected: - /// the next edge to reach (either by walking or driving) - const MSEdge& myDestination; - - /// the time at which this stage started - SUMOTime myDeparted; - - /// the time at which this stage ended - SUMOTime myArrived; - - /// The type of this stage - StageType myType; - - private: - /// @brief Invalidated copy constructor. - MSPersonStage(const MSPersonStage&); - - /// @brief Invalidated assignment operator. - MSPersonStage& operator=(const MSPersonStage&); - - }; - - /** - * A "real" stage performing the walking to an edge - * The walking does not need any route as it is not simulated. - * Only the duration is needed - */ - class MSPersonStage_Walking : public MSPersonStage { - public: - /// constructor - MSPersonStage_Walking(const std::vector& route, MSBusStop* toBS, SUMOTime walkingTime, SUMOReal speed, SUMOReal departPos, SUMOReal arrivalPos); - - /// destructor - ~MSPersonStage_Walking(); - - /// proceeds to the next step - virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at); - - /// Returns the current edge - const MSEdge* getEdge(SUMOTime now) const; - const MSEdge* getFromEdge() const; - SUMOReal getEdgePos(SUMOTime now) const; - - /// - Position getPosition(SUMOTime now) const; - - SUMOReal getAngle(SUMOTime now) const; - - std::string getStageTypeName() const { - return "walking"; - } - - /** @brief Called on writing tripinfo output - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void tripInfoOutput(OutputDevice& os) const; - - /** @brief Called on writing vehroute output - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void routeOutput(OutputDevice& os) const; - - /** @brief Called for writing the events output - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const; - - /** @brief Called for writing the events output (end of an action) - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const; - - SUMOTime moveToNextEdge(MSPerson* person, SUMOTime currentTime); - - - class MoveToNextEdge : public Command { - public: - MoveToNextEdge(MSPerson* person, MSPersonStage_Walking& walk) : myParent(walk), myPerson(person) {} - ~MoveToNextEdge() {} - SUMOTime execute(SUMOTime currentTime) { - return myParent.moveToNextEdge(myPerson, currentTime); - } - private: - MSPersonStage_Walking& myParent; - MSPerson* myPerson; - private: - /// @brief Invalidated assignment operator. - MoveToNextEdge& operator=(const MoveToNextEdge&); - - }; - - - private: - void computeWalkingTime(const MSEdge* const e, SUMOReal fromPos, SUMOReal toPos, MSBusStop* bs); - - - private: - /// the time the person is walking - SUMOTime myWalkingTime; - - /// @brief The route of the person - std::vector myRoute; - - - std::vector::iterator myRouteStep; - - /// @brief A vector of computed times an edge is reached - //std::vector myArrivalTimes; - - SUMOReal myDepartPos; - SUMOReal myArrivalPos; - MSBusStop* myDestinationBusStop; - SUMOTime myLastEntryTime; - SUMOReal mySpeed; - - SUMOReal myCurrentBeginPos, myCurrentLength, myCurrentDuration; - //bool myDurationWasGiven; - //SUMOReal myOverallLength; - - class arrival_finder { - public: - /// constructor - explicit arrival_finder(SUMOTime time) : myTime(time) {} - - /// comparison operator - bool operator()(SUMOReal t) const { - return myTime > t; - } - - private: - /// the searched arrival time - SUMOTime myTime; - }; - - private: - /// @brief Invalidated copy constructor. - MSPersonStage_Walking(const MSPersonStage_Walking&); - - /// @brief Invalidated assignment operator. - MSPersonStage_Walking& operator=(const MSPersonStage_Walking&); - - }; - - /** - * A "real" stage performing the travelling by a transport system - * The given route will be chosen. The travel time is computed by the simulation - */ - class MSPersonStage_Driving : public MSPersonStage { - public: - /// constructor - MSPersonStage_Driving(const MSEdge& destination, MSBusStop* toBS, - const std::vector& lines); - - /// destructor - ~MSPersonStage_Driving(); - - /// proceeds to the next step - virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at); - - /// Returns the current edge - const MSEdge* getEdge(SUMOTime now) const; - const MSEdge* getFromEdge() const; - SUMOReal getEdgePos(SUMOTime now) const; - - /// - Position getPosition(SUMOTime now) const; - - SUMOReal getAngle(SUMOTime now) const; - - std::string getStageTypeName() const; - - /// Whether the person waits for a vehicle of the line specified. - bool isWaitingFor(const std::string& line) const; - - /// @brief Whether the person waits for a vehicle - bool isWaiting4Vehicle() const; - - /// @brief time spent waiting for a ride - SUMOTime timeWaiting4Vehicle(SUMOTime now) const; - - void setVehicle(SUMOVehicle* v) { - myVehicle = v; - } - - /** @brief Called on writing tripinfo output - * - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void tripInfoOutput(OutputDevice& os) const; - - /** @brief Called on writing vehroute output - * - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void routeOutput(OutputDevice& os) const; - - /** @brief Called for writing the events output - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const; - - /** @brief Called for writing the events output (end of an action) - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const; - - private: - /// the lines to choose from - const std::set myLines; - - /// @brief The taken vehicle - SUMOVehicle* myVehicle; - - MSBusStop* myDestinationBusStop; - SUMOReal myWaitingPos; - /// @brief The time since which this person is waiting for a ride - SUMOTime myWaitingSince; - const MSEdge* myWaitingEdge; - - private: - /// @brief Invalidated copy constructor. - MSPersonStage_Driving(const MSPersonStage_Driving&); - - /// @brief Invalidated assignment operator. - MSPersonStage_Driving& operator=(const MSPersonStage_Driving&); - - }; - - /** - * A "real" stage performing a waiting over the specified time - */ - class MSPersonStage_Waiting : public MSPersonStage { - public: - /// constructor - MSPersonStage_Waiting(const MSEdge& destination, - SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string& actType); - - /// destructor - ~MSPersonStage_Waiting(); - - /// Returns the current edge - const MSEdge* getEdge(SUMOTime now) const; - const MSEdge* getFromEdge() const; - SUMOReal getEdgePos(SUMOTime now) const; - SUMOTime getUntil() const; - - /// - Position getPosition(SUMOTime now) const; - - SUMOReal getAngle(SUMOTime now) const; - - std::string getStageTypeName() const { - return "waiting (" + myActType + ")"; - } - - /// proceeds to the next step - virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at); - - /** @brief Called on writing tripinfo output - * - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void tripInfoOutput(OutputDevice& os) const; - - /** @brief Called on writing vehroute output - * - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void routeOutput(OutputDevice& os) const; - - /** @brief Called for writing the events output - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const; - - /** @brief Called for writing the events output (end of an action) - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const; - - private: - /// the time the person is waiting - SUMOTime myWaitingDuration; - - /// the time until the person is waiting - SUMOTime myWaitingUntil; - - /// @brief The type of activity - std::string myActType; - - SUMOReal myStartPos; - - - private: - /// @brief Invalidated copy constructor. - MSPersonStage_Waiting(const MSPersonStage_Waiting&); - - /// @brief Invalidated assignment operator. - MSPersonStage_Waiting& operator=(const MSPersonStage_Waiting&); - - }; - -public: - /// the structure holding the plan of a person - typedef std::vector MSPersonPlan; - -protected: - /// the plan of the person - const SUMOVehicleParameter* myParameter; - - /// @brief This Persons's type. (mainly used for drawing related information - const MSVehicleType* myVType; - - /// the plan of the person - MSPersonPlan* myPlan; - - /// the iterator over the route - MSPersonPlan::iterator myStep; - - /// @brief Whether events shall be written - bool myWriteEvents; - -public: - /// constructor - MSPerson(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSPersonPlan* plan); - - /// destructor - virtual ~MSPerson(); - - /// returns the person id - const std::string& getID() const; - - /* @brief proceeds to the next step of the route, - * @return Whether the persons plan continues */ - bool proceed(MSNet* net, SUMOTime time); - - /// Returns the desired departure time. - SUMOTime getDesiredDepart() const; - - /// logs end of the step - void setDeparted(SUMOTime now); - - /// Returns the current destination. - const MSEdge& getDestination() const { - return (*myStep)->getDestination(); - } - - /// @brief Returns the current edge - const MSEdge* getEdge(SUMOTime now) const { - return (*myStep)->getEdge(now); - } - - /// @brief Returns the departure edge - const MSEdge* getFromEdge() const { - return (*myStep)->getFromEdge(); - } - - SUMOReal getEdgePos(SUMOTime now) const { - return (*myStep)->getEdgePos(now); - } - - /// - virtual Position getPosition(SUMOTime now) const { - return (*myStep)->getPosition(now); - } - - - SUMOReal getAngle(SUMOTime now) const { - return (*myStep)->getAngle(now); - } - - /// - StageType getCurrentStageType() const { - return (*myStep)->getStageType(); - } - - - std::string getCurrentStageTypeName() const { - return (*myStep)->getStageTypeName(); - } - - MSPersonStage* getCurrentStage() const { - return *myStep; - } - - /** @brief Called on writing tripinfo output - * - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - void tripInfoOutput(OutputDevice& os) const; - - /** @brief Called on writing vehroute output - * - * @param[in] os The stream to write the information into - * @exception IOError not yet implemented - */ - void routeOutput(OutputDevice& os) const; - - /// Whether the person waits for a vehicle of the line specified. - bool isWaitingFor(const std::string& line) const { - return (*myStep)->isWaitingFor(line); - } - - /// Whether the person waits for a vehicle - bool isWaiting4Vehicle() const { - return (*myStep)->isWaiting4Vehicle(); - } - - - /// @brief the time this person spent waiting for a vehicle - SUMOTime timeWaiting4Vehicle(SUMOTime now) const { - return (*myStep)->timeWaiting4Vehicle(now); - } - - const SUMOVehicleParameter& getParameter() const { - return *myParameter; - } - - - inline const MSVehicleType& getVehicleType() const { - return *myVType; - } - - - /// @brief the offset for computing person positions when walking - static const SUMOReal SIDEWALK_OFFSET; - -private: - /// @brief Invalidated copy constructor. - MSPerson(const MSPerson&); - - /// @brief Invalidated assignment operator. - MSPerson& operator=(const MSPerson&); - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSRightOfWayJunction.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSRightOfWayJunction.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSRightOfWayJunction.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSRightOfWayJunction.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Christian Roessel /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Wed, 12 Dez 2001 -/// @version $Id: MSRightOfWayJunction.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSRightOfWayJunction.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // junction. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,7 +35,6 @@ #include "MSLane.h" #include "MSEdge.h" #include "MSJunctionLogic.h" -#include "MSBitSetLogic.h" #include "MSGlobals.h" #include #include @@ -50,6 +50,7 @@ // method definitions // =========================================================================== MSRightOfWayJunction::MSRightOfWayJunction(const std::string& id, + SumoXMLNodeType type, const Position& position, const PositionVector& shape, std::vector incoming, @@ -57,7 +58,7 @@ std::vector internal, #endif MSJunctionLogic* logic) - : MSLogicJunction(id, position, shape, incoming + : MSLogicJunction(id, type, position, shape, incoming #ifdef HAVE_INTERNAL_LANES , internal), #else @@ -83,21 +84,26 @@ const MSLinkCont& links = (*i)->getLinkCont(); // ... set information for every link for (MSLinkCont::const_iterator j = links.begin(); j != links.end(); j++) { - if (myLogic->getLogicSize() <= requestPos) { - throw ProcessError("Found invalid logic position of a link (network error)"); + if ((*j)->getLane()->getEdge().isWalkingArea() || + ((*i)->getEdge().isWalkingArea() && !(*j)->getLane()->getEdge().isCrossing())) { + continue; } sortedLinks.push_back(std::make_pair(*i, *j)); ++maxNo; } } - bool isCrossing = myLogic->isCrossing(); + const bool hasFoes = myLogic->hasFoes(); for (i = myIncomingLanes.begin(); i != myIncomingLanes.end(); ++i) { const MSLinkCont& links = (*i)->getLinkCont(); // ... set information for every link for (MSLinkCont::const_iterator j = links.begin(); j != links.end(); j++) { + if ((*j)->getLane()->getEdge().isWalkingArea() || + ((*i)->getEdge().isWalkingArea() && !(*j)->getLane()->getEdge().isCrossing())) { + continue; + } if (myLogic->getLogicSize() <= requestPos) { - throw ProcessError("Found invalid logic position of a link (network error)"); + throw ProcessError("Found invalid logic position of a link for junction '" + getID() + "' (" + toString(requestPos) + ", max " + toString(myLogic->getLogicSize()) + ") -> (network error)"); } const MSLogicJunction::LinkFoes& foeLinks = myLogic->getFoesFor(requestPos); // SUMO_ATTR_RESPONSE const std::bitset<64>& internalFoes = myLogic->getInternalFoesFor(requestPos); // SUMO_ATTR_FOES @@ -161,15 +167,15 @@ } } #endif - (*j)->setRequestInformation(requestPos, requestPos, isCrossing, cont, myLinkFoeLinks[*j], myLinkFoeInternalLanes[*j]); + (*j)->setRequestInformation((int)requestPos, hasFoes, cont, myLinkFoeLinks[*j], myLinkFoeInternalLanes[*j]); #ifdef HAVE_INTERNAL_LANES // the exit link for a link before an internal junction is handled in MSInternalJunction // so we need to skip if cont=true if (MSGlobals::gUsingInternalLanes && (*j)->getViaLane() != 0 && !cont) { assert((*j)->getViaLane()->getLinkCont().size() == 1); MSLink* exitLink = (*j)->getViaLane()->getLinkCont()[0]; - exitLink->setRequestInformation(requestPos, requestPos, false, false, std::vector(), - myLinkFoeInternalLanes[*j]); + exitLink->setRequestInformation((int)requestPos, false, false, std::vector(), + myLinkFoeInternalLanes[*j], (*j)->getViaLane()); } #endif for (std::vector::const_iterator k = foes.begin(); k != foes.end(); ++k) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSRightOfWayJunction.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSRightOfWayJunction.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSRightOfWayJunction.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSRightOfWayJunction.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 12 Dez 2001 -/// @version $Id: MSRightOfWayJunction.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSRightOfWayJunction.h 18152 2015-03-26 07:54:46Z namdre $ /// // A junction with right-of-way - rules /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -66,7 +66,7 @@ * @param[in] internal The internal lanes * @param[in] logic The logic of this junction */ - MSRightOfWayJunction(const std::string& id, const Position& position, + MSRightOfWayJunction(const std::string& id, SumoXMLNodeType type, const Position& position, const PositionVector& shape, std::vector incoming, #ifdef HAVE_INTERNAL_LANES @@ -87,6 +87,10 @@ return myLinkFoeInternalLanes.find(srcLink)->second; } + // @brief return the underlying right-of-way and conflict matrix + const MSJunctionLogic* getLogic() const { + return myLogic; + } protected: /** the type of the junction (its logic) */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSRoute.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSRoute.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSRoute.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSRoute.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Friedemann Wesner /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: MSRoute.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSRoute.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A vehicle route /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -51,18 +52,17 @@ // =========================================================================== MSRoute::RouteDict MSRoute::myDict; MSRoute::RouteDistDict MSRoute::myDistDict; -unsigned int MSRoute::MaxRouteDistSize = std::numeric_limits::max(); // =========================================================================== // member method definitions // =========================================================================== MSRoute::MSRoute(const std::string& id, - const MSEdgeVector& edges, - unsigned int references, const RGBColor* const c, + const ConstMSEdgeVector& edges, + const bool isPermanent, const RGBColor* const c, const std::vector& stops) - : Named(id), myEdges(edges), - myReferenceCounter(references), + : Named(id), myEdges(edges), myAmPermanent(isPermanent), + myReferenceCounter(isPermanent ? 1 : 0), myColor(c), myStops(stops) {} @@ -123,9 +123,9 @@ bool -MSRoute::dictionary(const std::string& id, RandomDistributor* routeDist) { +MSRoute::dictionary(const std::string& id, RandomDistributor* const routeDist, const bool permanent) { if (myDict.find(id) == myDict.end() && myDistDict.find(id) == myDistDict.end()) { - myDistDict[id] = routeDist; + myDistDict[id] = std::make_pair(routeDist, permanent); return true; } return false; @@ -133,14 +133,14 @@ const MSRoute* -MSRoute::dictionary(const std::string& id) { +MSRoute::dictionary(const std::string& id, MTRand* rng) { RouteDict::iterator it = myDict.find(id); if (it == myDict.end()) { RouteDistDict::iterator it2 = myDistDict.find(id); - if (it2 == myDistDict.end() || it2->second->getOverallProb() == 0) { + if (it2 == myDistDict.end() || it2->second.first->getOverallProb() == 0) { return 0; } - return it2->second->get(); + return it2->second.first->get(rng); } return it->second; } @@ -152,14 +152,14 @@ if (it2 == myDistDict.end()) { return 0; } - return it2->second; + return it2->second.first; } void MSRoute::clear() { for (RouteDistDict::iterator i = myDistDict.begin(); i != myDistDict.end(); ++i) { - delete i->second; + delete i->second.first; } myDistDict.clear(); for (RouteDict::iterator i = myDict.begin(); i != myDict.end(); ++i) { @@ -170,6 +170,20 @@ void +MSRoute::checkDist(const std::string& id) { + RouteDistDict::iterator it = myDistDict.find(id); + if (it != myDistDict.end() && !it->second.second) { + const std::vector& routes = it->second.first->getVals(); + for (std::vector::const_iterator i = routes.begin(); i != routes.end(); ++i) { + (*i)->release(); + } + delete it->second.first; + myDistDict.erase(it); + } +} + + +void MSRoute::insertIDs(std::vector& into) { into.reserve(myDict.size() + myDistDict.size() + into.size()); for (RouteDict::const_iterator i = myDict.begin(); i != myDict.end(); ++i) { @@ -184,7 +198,7 @@ int MSRoute::writeEdgeIDs(OutputDevice& os, const MSEdge* const from, const MSEdge* const upTo) const { int numWritten = 0; - MSEdgeVector::const_iterator i = myEdges.begin(); + ConstMSEdgeVector::const_iterator i = myEdges.begin(); if (from != 0) { i = std::find(myEdges.begin(), myEdges.end(), from); } @@ -203,8 +217,8 @@ bool -MSRoute::containsAnyOf(const std::vector& edgelist) const { - std::vector::const_iterator i = edgelist.begin(); +MSRoute::containsAnyOf(const MSEdgeVector& edgelist) const { + MSEdgeVector::const_iterator i = edgelist.begin(); for (; i != edgelist.end(); ++i) { if (contains(*i)) { return true; @@ -224,63 +238,84 @@ MSRoute::dict_saveState(OutputDevice& out) { for (RouteDict::iterator it = myDict.begin(); it != myDict.end(); ++it) { out.openTag(SUMO_TAG_ROUTE).writeAttr(SUMO_ATTR_ID, (*it).second->getID()); - out.writeAttr(SUMO_ATTR_STATE, (*it).second->myReferenceCounter); + out.writeAttr(SUMO_ATTR_STATE, (*it).second->myAmPermanent); out.writeAttr(SUMO_ATTR_EDGES, (*it).second->myEdges).closeTag(); } for (RouteDistDict::iterator it = myDistDict.begin(); it != myDistDict.end(); ++it) { out.openTag(SUMO_TAG_ROUTE_DISTRIBUTION).writeAttr(SUMO_ATTR_ID, (*it).first); - out.writeAttr(SUMO_ATTR_ROUTES, (*it).second->getVals()); - out.writeAttr(SUMO_ATTR_PROBS, (*it).second->getProbs()); + out.writeAttr(SUMO_ATTR_STATE, (*it).second.second); + out.writeAttr(SUMO_ATTR_ROUTES, (*it).second.first->getVals()); + out.writeAttr(SUMO_ATTR_PROBS, (*it).second.first->getProbs()); out.closeTag(); } } SUMOReal -MSRoute::getLength() const { - SUMOReal ret = 0; - for (MSEdgeVector::const_iterator i = myEdges.begin(); i != myEdges.end(); ++i) { - ret += (*i)->getLength(); +MSRoute::getDistanceBetween(SUMOReal fromPos, SUMOReal toPos, + const MSEdge* fromEdge, const MSEdge* toEdge, bool includeInternal) const { + ConstMSEdgeVector::const_iterator it = std::find(myEdges.begin(), myEdges.end(), fromEdge); + if (it == myEdges.end() || std::find(it, myEdges.end(), toEdge) == myEdges.end()) { + // start or destination not contained in route + return std::numeric_limits::max(); } - return ret; + ConstMSEdgeVector::const_iterator it2 = std::find(it + 1, myEdges.end(), toEdge); + + if (fromEdge == toEdge) { + if (fromPos < toPos) { + return toPos - fromPos; + } else if (it2 == myEdges.end()) { + // we don't visit the edge again + return std::numeric_limits::max(); + } + } + return getDistanceBetween(fromPos, toPos, it, it2, includeInternal); } SUMOReal -MSRoute::getDistanceBetween(SUMOReal fromPos, SUMOReal toPos, const MSEdge* fromEdge, const MSEdge* toEdge) const { +MSRoute::getDistanceBetween(SUMOReal fromPos, SUMOReal toPos, + const MSRouteIterator& fromEdge, const MSRouteIterator& toEdge, bool includeInternal) const { bool isFirstIteration = true; SUMOReal distance = -fromPos; - MSEdgeVector::const_iterator it = std::find(myEdges.begin(), myEdges.end(), fromEdge); - - if (it == myEdges.end() || std::find(it, myEdges.end(), toEdge) == myEdges.end()) { - // start or destination not contained in route - return std::numeric_limits::max(); - } - if (fromEdge == toEdge && fromPos <= toPos) { + MSRouteIterator it = fromEdge; + if (fromEdge == toEdge) { // destination position is on start edge - return (toPos - fromPos); + if (fromPos <= toPos) { + return toPos - fromPos; + } else { + // we cannot go backwards. Something is wrong here + return std::numeric_limits::max(); + } + } else if (fromEdge > toEdge) { + // we don't visit the edge again + return std::numeric_limits::max(); } for (; it != end(); ++it) { - if ((*it) == toEdge && !isFirstIteration) { + if (it == toEdge && !isFirstIteration) { distance += toPos; break; } else { const std::vector& lanes = (*it)->getLanes(); distance += lanes[0]->getLength(); #ifdef HAVE_INTERNAL_LANES - // add length of internal lanes to the result - for (std::vector::const_iterator laneIt = lanes.begin(); laneIt != lanes.end(); ++laneIt) { - const MSLinkCont& links = (*laneIt)->getLinkCont(); - for (MSLinkCont::const_iterator linkIt = links.begin(); linkIt != links.end(); ++linkIt) { - if ((*linkIt) == 0 || (*linkIt)->getLane() == 0) { - continue; - } - std::string succLaneId = (*(it + 1))->getLanes()[0]->getID(); - if ((*linkIt)->getLane()->getID().compare(succLaneId) == 0) { - distance += (*linkIt)->getLength(); + if (includeInternal) { + // add length of internal lanes to the result + for (std::vector::const_iterator laneIt = lanes.begin(); laneIt != lanes.end(); ++laneIt) { + const MSLinkCont& links = (*laneIt)->getLinkCont(); + for (MSLinkCont::const_iterator linkIt = links.begin(); linkIt != links.end(); ++linkIt) { + if ((*linkIt) == 0 || (*linkIt)->getLane() == 0) { + continue; + } + std::string succLaneId = (*(it + 1))->getLanes()[0]->getID(); + if ((*linkIt)->getLane()->getID().compare(succLaneId) == 0) { + distance += (*linkIt)->getLength(); + } } } } +#else + UNUSED_PARAMETER(includeInternal); #endif } isFirstIteration = false; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSRoute.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSRoute.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSRoute.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSRoute.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,14 @@ /// @author Friedemann Wesner /// @author Sascha Krieg /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: MSRoute.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSRoute.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A vehicle route /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -40,7 +41,7 @@ #include #include #include -#include +#include #include @@ -55,8 +56,9 @@ // =========================================================================== // types definitions // =========================================================================== -typedef std::vector MSEdgeVector; -typedef MSEdgeVector::const_iterator MSRouteIterator; +typedef std::vector ConstMSEdgeVector; +typedef std::vector MSEdgeVector; +typedef ConstMSEdgeVector::const_iterator MSRouteIterator; // =========================================================================== @@ -68,8 +70,8 @@ class MSRoute : public Named, public Parameterised { public: /// Constructor - MSRoute(const std::string& id, const MSEdgeVector& edges, - unsigned int references, const RGBColor* const c, + MSRoute(const std::string& id, const ConstMSEdgeVector& edges, + const bool isPermanent, const RGBColor* const c, const std::vector& stops); /// Destructor @@ -105,7 +107,7 @@ return std::find(myEdges.begin(), myEdges.end(), edge) != myEdges.end(); } - bool containsAnyOf(const std::vector& edgelist) const; + bool containsAnyOf(const MSEdgeVector& edgelist) const; const MSEdge* operator[](unsigned index) const; @@ -119,25 +121,56 @@ static void dict_saveState(OutputDevice& out); /// @} - const MSEdgeVector& getEdges() const { + const ConstMSEdgeVector& getEdges() const { return myEdges; } - SUMOReal getLength() const; + /** @brief Compute the distance between 2 given edges on this route, including the length of internal lanes. + * Note, that for edges which contain loops: + * - the first occurance of fromEdge will be used + * - the first occurance of toEdge after the first occurance of fromEdge will be used + * + * @param[in] fromPos position on the first edge, at wich the computed distance begins + * @param[in] toPos position on the last edge, at which the coumputed distance endsance + * @param[in] fromEdge edge at wich computation begins + * @param[in] toEdge edge at which distance computation shall stop + * @param[in] includeInternal Whether the lengths of internal edges shall be counted + * @return distance between the position fromPos on fromEdge and toPos on toEdge + */ + SUMOReal getDistanceBetween(SUMOReal fromPos, SUMOReal toPos, const MSEdge* fromEdge, const MSEdge* toEdge, bool includeInternal = true) const; /** @brief Compute the distance between 2 given edges on this route, including the length of internal lanes. + * This has the same semantics as above but uses iterators instead of edge + * points so looping routes are not an issue. * * @param[in] fromPos position on the first edge, at wich the computed distance begins - * @param[in] toPos position on the last edge, at which the coumputed distance endsance + * @param[in] toPos position on the last edge, at which the coumputed distance endsance * @param[in] fromEdge edge at wich computation begins * @param[in] toEdge edge at which distance computation shall stop + * @param[in] includeInternal Whether the lengths of internal edges shall be counted * @return distance between the position fromPos on fromEdge and toPos on toEdge */ - SUMOReal getDistanceBetween(SUMOReal fromPos, SUMOReal toPos, const MSEdge* fromEdge, const MSEdge* toEdge) const; + SUMOReal getDistanceBetween(SUMOReal fromPos, SUMOReal toPos, const MSRouteIterator& fromEdge, const MSRouteIterator& toEdge, bool includeInternal = true) const; /// Returns the color const RGBColor& getColor() const; + /** @brief Returns the costs of the route + * + * @return The route's costs (normally the time needed to pass it) + */ + SUMOReal getCosts() const { + return myCosts; + } + + /** @brief Sets the costs of the route + * + * @param[in] costs The new route costs + */ + void setCosts(SUMOReal costs) { + myCosts = costs; + } + /// Returns the stops const std::vector& getStops() const; @@ -158,11 +191,12 @@ * Returns true if the distribution could be added, * false if a route (distribution) with the same name already exists. * - * @param[in] id the id for the new route distribution - * @param[in] route pointer to the distribution object - * @return whether adding was successful + * @param[in] id the id for the new route distribution + * @param[in] routeDist pointer to the distribution object + * @param[in] permanent whether the new route distribution survives more than one vehicle / flow + * @return whether adding was successful */ - static bool dictionary(const std::string& id, RandomDistributor* routeDist); + static bool dictionary(const std::string& id, RandomDistributor* const routeDist, const bool permanent = true); /** @brief Returns the named route or a sample from the named distribution. * @@ -172,7 +206,7 @@ * @param[in] id the id of the route or the distribution * @return the route (sample) */ - static const MSRoute* dictionary(const std::string& id); + static const MSRoute* dictionary(const std::string& id, MTRand* rng = 0); /** @brief Returns the named route distribution. * @@ -186,24 +220,17 @@ /// Clears the dictionary (delete all known routes, too) static void clear(); - static void insertIDs(std::vector& into); + /// Checks the distribution whether it is permanent and deletes it if not + static void checkDist(const std::string& id); - /// @brief release the route (to be used as function pointer with RandomDistributor) - static void releaseRoute(const MSRoute* route) { - route->release(); - } - - static void setMaxRouteDistSize(unsigned int size) { - MaxRouteDistSize = size; - } - - static unsigned int getMaxRouteDistSize() { - return MaxRouteDistSize; - } + static void insertIDs(std::vector& into); private: /// The list of edges to pass - MSEdgeVector myEdges; + ConstMSEdgeVector myEdges; + + /// whether the route may be deleted after the last vehicle abandoned it + const bool myAmPermanent; /// Information by how many vehicles the route is used mutable unsigned int myReferenceCounter; @@ -211,6 +238,9 @@ /// The color const RGBColor* const myColor; + /// @brief The assigned or calculated costs + SUMOReal myCosts; + /// @brief List of the stops on the parsed route std::vector myStops; @@ -222,14 +252,11 @@ static RouteDict myDict; /// Definition of the dictionary container - typedef std::map*> RouteDistDict; + typedef std::map*, bool> > RouteDistDict; /// The dictionary container static RouteDistDict myDistDict; - /// @brief the maximum size for each routeDistribution - static unsigned int MaxRouteDistSize; - private: /** invalid assignment operator */ MSRoute& operator=(const MSRoute& s); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSRouteHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSRouteHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSRouteHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSRouteHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Mon, 9 Jul 2001 -/// @version $Id: MSRouteHandler.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSRouteHandler.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Parser and container for routes during their loading /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -43,6 +44,7 @@ #include #include "MSRouteHandler.h" #include "MSPersonControl.h" +#include "MSContainerControl.h" #include #include #include @@ -53,6 +55,7 @@ #include "MSNet.h" #include +//#include #include #include @@ -62,12 +65,19 @@ // =========================================================================== +// static members +// =========================================================================== +MTRand MSRouteHandler::myParsingRNG; + + +// =========================================================================== // method definitions // =========================================================================== MSRouteHandler::MSRouteHandler(const std::string& file, bool addVehiclesDirectly) : SUMORouteHandler(file), myActivePlan(0), + myActiveContainerPlan(0), myAddVehiclesDirectly(addVehiclesDirectly), myCurrentVTypeDistribution(0), myCurrentRouteDistribution(0) { @@ -80,6 +90,54 @@ void +MSRouteHandler::parseFromViaTo(std::string element, + const SUMOSAXAttributes& attrs) { + myActiveRoute.clear(); + bool useTaz = OptionsCont::getOptions().getBool("with-taz"); + if (useTaz && !myVehicleParameter->wasSet(VEHPARS_FROM_TAZ_SET) && !myVehicleParameter->wasSet(VEHPARS_TO_TAZ_SET)) { + WRITE_WARNING("Taz usage was requested but no taz present in " + element + " '" + myVehicleParameter->id + "'!"); + useTaz = false; + } + bool ok = true; + if ((useTaz || !attrs.hasAttribute(SUMO_ATTR_FROM)) && myVehicleParameter->wasSet(VEHPARS_FROM_TAZ_SET)) { + const MSEdge* fromTaz = MSEdge::dictionary(myVehicleParameter->fromTaz + "-source"); + if (fromTaz == 0) { + throw ProcessError("Source taz '" + myVehicleParameter->fromTaz + "' not known for " + element + " '" + myVehicleParameter->id + "'!"); + } else if (fromTaz->getNumSuccessors() == 0) { + throw ProcessError("Source taz '" + myVehicleParameter->fromTaz + "' has no outgoing edges for " + element + " '" + myVehicleParameter->id + "'!"); + } else { + myActiveRoute.push_back(fromTaz); + } + } else { + MSEdge::parseEdgesList(attrs.getOpt(SUMO_ATTR_FROM, myVehicleParameter->id.c_str(), ok, "", true), + myActiveRoute, "for " + element + " '" + myVehicleParameter->id + "'"); + } + if (!attrs.hasAttribute(SUMO_ATTR_VIA) && !attrs.hasAttribute(SUMO_ATTR_ROUTE)) { + myInsertStopEdgesAt = (int)myActiveRoute.size(); + } + MSEdge::parseEdgesList(attrs.getOpt(SUMO_ATTR_VIA, myVehicleParameter->id.c_str(), ok, "", true), + myActiveRoute, "for " + element + " '" + myVehicleParameter->id + "'"); + if ((useTaz || !attrs.hasAttribute(SUMO_ATTR_TO)) && myVehicleParameter->wasSet(VEHPARS_TO_TAZ_SET)) { + const MSEdge* toTaz = MSEdge::dictionary(myVehicleParameter->toTaz + "-sink"); + if (toTaz == 0) { + throw ProcessError("Sink taz '" + myVehicleParameter->toTaz + "' not known for " + element + " '" + myVehicleParameter->id + "'!"); + } else if (toTaz->getNumPredecessors() == 0) { + throw ProcessError("Sink taz '" + myVehicleParameter->toTaz + "' has no incoming edges for " + element + " '" + myVehicleParameter->id + "'!"); + } else { + myActiveRoute.push_back(toTaz); + } + } else { + MSEdge::parseEdgesList(attrs.getOpt(SUMO_ATTR_TO, myVehicleParameter->id.c_str(), ok, "", true), + myActiveRoute, "for " + element + " '" + myVehicleParameter->id + "'"); + } + myActiveRouteID = "!" + myVehicleParameter->id; + if (myVehicleParameter->routeid == "") { + myVehicleParameter->routeid = myActiveRouteID; + } +} + + +void MSRouteHandler::myStartElement(int element, const SUMOSAXAttributes& attrs) { SUMORouteHandler::myStartElement(element, attrs); @@ -87,6 +145,9 @@ case SUMO_TAG_PERSON: myActivePlan = new MSPerson::MSPersonPlan(); break; + case SUMO_TAG_CONTAINER: + myActiveContainerPlan = new MSContainer::MSContainerPlan(); + break; case SUMO_TAG_RIDE: { const std::string pid = myVehicleParameter->id; bool ok = true; @@ -128,6 +189,31 @@ case SUMO_TAG_WALK: { myActiveRoute.clear(); bool ok = true; + SUMOReal departPos = attrs.getOpt(SUMO_ATTR_DEPARTPOS, myVehicleParameter->id.c_str(), ok, 0); + SUMOReal arrivalPos = attrs.getOpt(SUMO_ATTR_ARRIVALPOS, myVehicleParameter->id.c_str(), ok, -NUMERICAL_EPS); + const SUMOTime duration = attrs.getOptSUMOTimeReporting(SUMO_ATTR_DURATION, 0, ok, -1); + if (attrs.hasAttribute(SUMO_ATTR_DURATION) && duration <= 0) { + throw ProcessError("Non-positive walking duration for '" + myVehicleParameter->id + "'."); + } + SUMOReal speed = DEFAULT_PEDESTRIAN_SPEED; + const MSVehicleType* vtype = MSNet::getInstance()->getVehicleControl().getVType(myVehicleParameter->vtypeid, &myParsingRNG); + // need to check for explicitly set speed since we might have // DEFAULT_VEHTYPE + if (vtype != 0 && vtype->wasSet(VTYPEPARS_MAXSPEED_SET)) { + speed = vtype->getMaxSpeed(); + } + speed = attrs.getOpt(SUMO_ATTR_SPEED, 0, ok, speed); + if (speed <= 0) { + throw ProcessError("Non-positive walking speed for '" + myVehicleParameter->id + "'."); + } + std::string bsID = attrs.getOpt(SUMO_ATTR_BUS_STOP, 0, ok, ""); + MSBusStop* bs = 0; + if (bsID != "") { + bs = MSNet::getInstance()->getBusStop(bsID); + if (bs == 0) { + throw ProcessError("Unknown bus stop '" + bsID + "' for person '" + myVehicleParameter->id + "'."); + } + arrivalPos = bs->getEndLanePosition(); + } if (attrs.hasAttribute(SUMO_ATTR_EDGES)) { MSEdge::parseEdgesList(attrs.get(SUMO_ATTR_EDGES, myVehicleParameter->id.c_str(), ok), myActiveRoute, myActiveRouteID); } else { @@ -142,7 +228,21 @@ if (to == 0) { throw ProcessError("The to edge '" + toID + "' within a walk of person '" + myVehicleParameter->id + "' is not known."); } - MSNet::getInstance()->getRouterTT().compute(from, to, 0, 0, myActiveRoute); // @todo: only footways, current time? + MSNet::getInstance()->getPedestrianRouter().compute(from, to, + SUMOVehicleParameter::interpretEdgePos(departPos, from->getLength(), SUMO_ATTR_DEPARTPOS, "person walking from " + from->getID()), + SUMOVehicleParameter::interpretEdgePos(arrivalPos, to->getLength(), SUMO_ATTR_ARRIVALPOS, "person walking to " + to->getID()), + speed, 0, 0, myActiveRoute); + if (myActiveRoute.empty()) { + const std::string error = "No connection found between '" + from->getID() + "' and '" + to->getID() + "' for person '" + myVehicleParameter->id + "'."; + if (OptionsCont::getOptions().getBool("ignore-route-errors")) { + myActiveRoute.push_back(from); + myActiveRoute.push_back(to); // pedestrian will teleport + //WRITE_WARNING(error); + } else { + WRITE_ERROR(error); + } + } + //std::cout << myVehicleParameter->id << " edges=" << toString(myActiveRoute) << "\n"; } } if (myActiveRoute.empty()) { @@ -151,24 +251,6 @@ if (!myActivePlan->empty() && &myActivePlan->back()->getDestination() != myActiveRoute.front()) { throw ProcessError("Disconnected plan for person '" + myVehicleParameter->id + "' (" + myActiveRoute.front()->getID() + "!=" + myActivePlan->back()->getDestination().getID() + ")."); } - SUMOReal departPos = attrs.getOpt(SUMO_ATTR_DEPARTPOS, myVehicleParameter->id.c_str(), ok, 0); - SUMOReal arrivalPos = attrs.getOpt(SUMO_ATTR_ARRIVALPOS, myVehicleParameter->id.c_str(), ok, -1); - const SUMOTime duration = attrs.getOptSUMOTimeReporting(SUMO_ATTR_DURATION, 0, ok, -1); - SUMOReal speed = DEFAULT_PERSON_SPEED; - if (attrs.hasAttribute(SUMO_ATTR_SPEED)) { - speed = attrs.getOpt(SUMO_ATTR_SPEED, 0, ok, speed); - if (speed < 0) { - throw ProcessError("Negative walking speed for '" + myVehicleParameter->id + "'."); - } - } - std::string bsID = attrs.getOpt(SUMO_ATTR_BUS_STOP, 0, ok, ""); - MSBusStop* bs = 0; - if (bsID != "") { - bs = MSNet::getInstance()->getBusStop(bsID); - if (bs == 0) { - throw ProcessError("Unknown bus stop '" + bsID + "' for person '" + myVehicleParameter->id + "'."); - } - } if (myActivePlan->empty()) { myActivePlan->push_back(new MSPerson::MSPersonStage_Waiting( *myActiveRoute.front(), -1, myVehicleParameter->depart, departPos, "start")); @@ -177,38 +259,115 @@ myActiveRoute.clear(); break; } - case SUMO_TAG_FLOW: - if (attrs.hasAttribute(SUMO_ATTR_FROM) && attrs.hasAttribute(SUMO_ATTR_TO)) { - myActiveRouteID = "!" + myVehicleParameter->id; - bool ok = true; - MSEdge::parseEdgesList(attrs.get(SUMO_ATTR_FROM, myVehicleParameter->id.c_str(), ok), - myActiveRoute, "for vehicle '" + myVehicleParameter->id + "'"); - MSEdge::parseEdgesList(attrs.get(SUMO_ATTR_TO, myVehicleParameter->id.c_str(), ok), - myActiveRoute, "for vehicle '" + myVehicleParameter->id + "'"); - closeRoute(true); + case SUMO_TAG_TRANSPORT: { + const std::string containerId = myVehicleParameter->id; + bool ok = true; + MSEdge* from = 0; + const std::string desc = attrs.get(SUMO_ATTR_LINES, containerId.c_str(), ok); + StringTokenizer st(desc); + std::string csID = attrs.getOpt(SUMO_ATTR_CONTAINER_STOP, 0, ok, ""); + MSContainerStop* cs = 0; + if (csID != "") { + cs = MSNet::getInstance()->getContainerStop(csID); + if (cs == 0) { + throw ProcessError("Unknown container stop '" + csID + "' for container '" + myVehicleParameter->id + "'."); + } + } + if (attrs.hasAttribute(SUMO_ATTR_FROM)) { + const std::string fromID = attrs.get(SUMO_ATTR_FROM, containerId.c_str(), ok); + from = MSEdge::dictionary(fromID); + if (from == 0) { + throw ProcessError("The from edge '" + fromID + "' within a transport of container '" + containerId + "' is not known."); + } + if (!myActiveContainerPlan->empty() && &myActiveContainerPlan->back()->getDestination() != from) { + throw ProcessError("Disconnected plan for container '" + myVehicleParameter->id + "' (" + fromID + "!=" + myActiveContainerPlan->back()->getDestination().getID() + ")."); + } + if (myActiveContainerPlan->empty()) { + myActiveContainerPlan->push_back(new MSContainer::MSContainerStage_Waiting( + *from, -1, myVehicleParameter->depart, myVehicleParameter->departPos, "start")); + } + } else if (myActiveContainerPlan->empty()) { + throw ProcessError("The start edge within a transport of container '" + containerId + "' is not known."); } + const std::string toID = attrs.get(SUMO_ATTR_TO, containerId.c_str(), ok); + MSEdge* to = MSEdge::dictionary(toID); + if (to == 0) { + throw ProcessError("The to edge '" + toID + "' within a transport of container '" + containerId + "' is not known."); + } + myActiveContainerPlan->push_back(new MSContainer::MSContainerStage_Driving(*to, cs, st.getVector())); break; - case SUMO_TAG_TRIP: { + } + case SUMO_TAG_TRANSHIP: { + myActiveRoute.clear(); bool ok = true; - if (attrs.hasAttribute(SUMO_ATTR_FROM) || !myVehicleParameter->wasSet(VEHPARS_TAZ_SET)) { - MSEdge::parseEdgesList(attrs.get(SUMO_ATTR_FROM, myVehicleParameter->id.c_str(), ok), - myActiveRoute, "for vehicle '" + myVehicleParameter->id + "'"); - MSEdge::parseEdgesList(attrs.get(SUMO_ATTR_TO, myVehicleParameter->id.c_str(), ok), - myActiveRoute, "for vehicle '" + myVehicleParameter->id + "'"); + SUMOReal departPos = attrs.getOpt(SUMO_ATTR_DEPARTPOS, myVehicleParameter->id.c_str(), ok, 0); + SUMOReal arrivalPos = attrs.getOpt(SUMO_ATTR_ARRIVALPOS, myVehicleParameter->id.c_str(), ok, -NUMERICAL_EPS); + SUMOReal speed = DEFAULT_CONTAINER_TRANSHIP_SPEED; + const MSVehicleType* vtype = MSNet::getInstance()->getVehicleControl().getVType(myVehicleParameter->vtypeid); + // need to check for explicitly set speed since we might have // DEFAULT_VEHTYPE + if (vtype != 0 && vtype->wasSet(VTYPEPARS_MAXSPEED_SET)) { + speed = vtype->getMaxSpeed(); + } + speed = attrs.getOpt(SUMO_ATTR_SPEED, 0, ok, speed); + if (speed <= 0) { + throw ProcessError("Non-positive tranship speed for container '" + myVehicleParameter->id + "'."); + } + std::string csID = attrs.getOpt(SUMO_ATTR_CONTAINER_STOP, 0, ok, ""); + MSContainerStop* cs = 0; + if (csID != "") { + cs = MSNet::getInstance()->getContainerStop(csID); + if (cs == 0) { + throw ProcessError("Unknown container stop '" + csID + "' for container '" + myVehicleParameter->id + "'."); + } + arrivalPos = cs->getEndLanePosition(); + } + if (attrs.hasAttribute(SUMO_ATTR_EDGES)) { + MSEdge::parseEdgesList(attrs.get(SUMO_ATTR_EDGES, myVehicleParameter->id.c_str(), ok), myActiveRoute, myActiveRouteID); } else { - const MSEdge* fromTaz = MSEdge::dictionary(myVehicleParameter->fromTaz + "-source"); - if (fromTaz == 0) { - WRITE_ERROR("Source district '" + myVehicleParameter->fromTaz + "' not known for '" + myVehicleParameter->id + "'!"); - } else if (fromTaz->getNoFollowing() == 0) { - WRITE_ERROR("Source district '" + myVehicleParameter->fromTaz + "' has no outgoing edges for '" + myVehicleParameter->id + "'!"); - } else { - myActiveRoute.push_back(fromTaz->getFollower(0)); + if (attrs.hasAttribute(SUMO_ATTR_FROM) && attrs.hasAttribute(SUMO_ATTR_TO)) { + const std::string fromID = attrs.get(SUMO_ATTR_FROM, myVehicleParameter->id.c_str(), ok); + MSEdge* from = MSEdge::dictionary(fromID); + if (from == 0) { + throw ProcessError("The from edge '" + fromID + "' within a tranship of container '" + myVehicleParameter->id + "' is not known."); + } + const std::string toID = attrs.get(SUMO_ATTR_TO, myVehicleParameter->id.c_str(), ok); + MSEdge* to = MSEdge::dictionary(toID); + if (to == 0) { + throw ProcessError("The to edge '" + toID + "' within a tranship of container '" + myVehicleParameter->id + "' is not known."); + } + //the route of the container's tranship stage consists only of the 'from' and the 'to' edge + myActiveRoute.push_back(from); + myActiveRoute.push_back(to); + if (myActiveRoute.empty()) { + const std::string error = "No connection found between '" + from->getID() + "' and '" + to->getID() + "' for container '" + myVehicleParameter->id + "'."; + if (OptionsCont::getOptions().getBool("ignore-route-errors")) { + myActiveRoute.push_back(from); + } else { + WRITE_ERROR(error); + } + } } } - closeRoute(true); - closeVehicle(); + if (myActiveRoute.empty()) { + throw ProcessError("No edges to tranship container '" + myVehicleParameter->id + "'."); + } + if (!myActiveContainerPlan->empty() && &myActiveContainerPlan->back()->getDestination() != myActiveRoute.front()) { + throw ProcessError("Disconnected plan for container '" + myVehicleParameter->id + "' (" + myActiveRoute.front()->getID() + "!=" + myActiveContainerPlan->back()->getDestination().getID() + ")."); + } + if (myActiveContainerPlan->empty()) { + myActiveContainerPlan->push_back(new MSContainer::MSContainerStage_Waiting( + *myActiveRoute.front(), -1, myVehicleParameter->depart, departPos, "start")); + } + myActiveContainerPlan->push_back(new MSContainer::MSContainerStage_Tranship(myActiveRoute, cs, speed, departPos, arrivalPos)); + myActiveRoute.clear(); + break; } - break; + case SUMO_TAG_FLOW: + parseFromViaTo("flow", attrs); + break; + case SUMO_TAG_TRIP: + parseFromViaTo("trip", attrs); + break; default: break; } @@ -231,7 +390,7 @@ StringTokenizer st(vTypes); while (st.hasNext()) { std::string vtypeID = st.next(); - MSVehicleType* type = MSNet::getInstance()->getVehicleControl().getVType(vtypeID); + MSVehicleType* type = MSNet::getInstance()->getVehicleControl().getVType(vtypeID, &myParsingRNG); if (type == 0) { throw ProcessError("Unknown vtype '" + vtypeID + "' in distribution '" + myCurrentVTypeDistributionID + "'."); } @@ -245,12 +404,17 @@ void MSRouteHandler::closeVehicleTypeDistribution() { if (myCurrentVTypeDistribution != 0) { + if (MSGlobals::gStateLoaded && MSNet::getInstance()->getVehicleControl().hasVTypeDistribution(myCurrentVTypeDistributionID)) { + delete myCurrentVTypeDistribution; + return; + } if (myCurrentVTypeDistribution->getOverallProb() == 0) { delete myCurrentVTypeDistribution; - WRITE_ERROR("Vehicle type distribution '" + myCurrentVTypeDistributionID + "' is empty."); - } else if (!MSNet::getInstance()->getVehicleControl().addVTypeDistribution(myCurrentVTypeDistributionID, myCurrentVTypeDistribution)) { + throw ProcessError("Vehicle type distribution '" + myCurrentVTypeDistributionID + "' is empty."); + } + if (!MSNet::getInstance()->getVehicleControl().addVTypeDistribution(myCurrentVTypeDistributionID, myCurrentVTypeDistribution)) { delete myCurrentVTypeDistribution; - WRITE_ERROR("Another vehicle type (or distribution) with the id '" + myCurrentVTypeDistributionID + "' exists."); + throw ProcessError("Another vehicle type (or distribution) with the id '" + myCurrentVTypeDistributionID + "' exists."); } myCurrentVTypeDistribution = 0; } @@ -259,6 +423,8 @@ void MSRouteHandler::openRoute(const SUMOSAXAttributes& attrs) { + myActiveRoute.clear(); + myInsertStopEdgesAt = -1; // check whether the id is really necessary std::string rid; if (myCurrentRouteDistribution != 0) { @@ -287,11 +453,15 @@ MSEdge::parseEdgesList(attrs.get(SUMO_ATTR_EDGES, myActiveRouteID.c_str(), ok), myActiveRoute, rid); } myActiveRouteRefID = attrs.getOpt(SUMO_ATTR_REFID, myActiveRouteID.c_str(), ok, ""); - if (myActiveRouteRefID != "" && MSRoute::dictionary(myActiveRouteRefID) == 0) { + if (myActiveRouteRefID != "" && MSRoute::dictionary(myActiveRouteRefID, &myParsingRNG) == 0) { WRITE_ERROR("Invalid reference to route '" + myActiveRouteRefID + "' in route " + rid + "."); } myActiveRouteProbability = attrs.getOpt(SUMO_ATTR_PROB, myActiveRouteID.c_str(), ok, DEFAULT_VEH_PROB); myActiveRouteColor = attrs.hasAttribute(SUMO_ATTR_COLOR) ? new RGBColor(attrs.get(SUMO_ATTR_COLOR, myActiveRouteID.c_str(), ok)) : 0; + myCurrentCosts = attrs.getOpt(SUMO_ATTR_COST, myActiveRouteID.c_str(), ok, -1); + if (ok && myCurrentCosts != -1 && myCurrentCosts < 0) { + WRITE_ERROR("Invalid cost for route '" + myActiveRouteID + "'."); + } } @@ -316,6 +486,14 @@ } } break; + case SUMO_TAG_TRIP: + myVehicleParameter->setParameter |= VEHPARS_FORCE_REROUTE; + closeRoute(true); + closeVehicle(); + delete myVehicleParameter; + myVehicleParameter = 0; + myInsertStopEdgesAt = -1; + break; default: break; } @@ -323,32 +501,49 @@ void -MSRouteHandler::closeRoute(const bool /* mayBeDisconnected */) { +MSRouteHandler::closeRoute(const bool mayBeDisconnected) { + std::string type = "vehicle"; + if (mayBeDisconnected) { + if (myVehicleParameter->repetitionNumber >= 0) { + type = "flow"; + } else { + type = "trip"; + } + } if (myActiveRoute.size() == 0) { delete myActiveRouteColor; myActiveRouteColor = 0; if (myActiveRouteRefID != "" && myCurrentRouteDistribution != 0) { - myCurrentRouteDistribution->add(myActiveRouteProbability, MSRoute::dictionary(myActiveRouteRefID)); + const MSRoute* route = MSRoute::dictionary(myActiveRouteRefID, &myParsingRNG); + if (route != 0) { + if (myCurrentRouteDistribution->add(myActiveRouteProbability, route)) { + route->addReference(); + } + } myActiveRouteID = ""; myActiveRouteRefID = ""; return; } if (myVehicleParameter != 0) { - throw ProcessError("Vehicle's '" + myVehicleParameter->id + "' route has no edges."); + throw ProcessError("The route for " + type + " '" + myVehicleParameter->id + "' has no edges."); } else { throw ProcessError("Route '" + myActiveRouteID + "' has no edges."); } } + if (myActiveRoute.size() == 1 && myActiveRoute.front()->getPurpose() == MSEdge::EDGEFUNCTION_DISTRICT) { + throw ProcessError("The routing information for " + type + " '" + myVehicleParameter->id + "' is insufficient."); + } MSRoute* route = new MSRoute(myActiveRouteID, myActiveRoute, myVehicleParameter == 0 || myVehicleParameter->repetitionNumber >= 1, myActiveRouteColor, myActiveRouteStops); + route->setCosts(myCurrentCosts); myActiveRoute.clear(); if (!MSRoute::dictionary(myActiveRouteID, route)) { delete route; if (!MSGlobals::gStateLoaded) { if (myVehicleParameter != 0) { if (MSNet::getInstance()->getVehicleControl().getVehicle(myVehicleParameter->id) == 0) { - throw ProcessError("Another route for vehicle '" + myVehicleParameter->id + "' exists."); + throw ProcessError("Another route for " + type + " '" + myVehicleParameter->id + "' exists."); } else { throw ProcessError("A vehicle with id '" + myVehicleParameter->id + "' already exists."); } @@ -358,7 +553,9 @@ } } else { if (myCurrentRouteDistribution != 0) { - myCurrentRouteDistribution->add(myActiveRouteProbability, route); + if (myCurrentRouteDistribution->add(myActiveRouteProbability, route)) { + route->addReference(); + } } } myActiveRouteID = ""; @@ -381,7 +578,7 @@ return; } } - myCurrentRouteDistribution = new RandomDistributor(MSRoute::getMaxRouteDistSize(), &MSRoute::releaseRoute); + myCurrentRouteDistribution = new RandomDistributor(); std::vector probs; if (attrs.hasAttribute(SUMO_ATTR_PROBS)) { bool ok = true; @@ -396,12 +593,14 @@ size_t probIndex = 0; while (st.hasNext()) { std::string routeID = st.next(); - const MSRoute* route = MSRoute::dictionary(routeID); + const MSRoute* route = MSRoute::dictionary(routeID, &myParsingRNG); if (route == 0) { throw ProcessError("Unknown route '" + routeID + "' in distribution '" + myCurrentRouteDistributionID + "'."); } const SUMOReal prob = (probs.size() > probIndex ? probs[probIndex] : 1.0); - myCurrentRouteDistribution->add(prob, route, false); + if (myCurrentRouteDistribution->add(prob, route, false)) { + route->addReference(); + } probIndex++; } if (probs.size() > 0 && probIndex != probs.size()) { @@ -415,13 +614,20 @@ void MSRouteHandler::closeRouteDistribution() { if (myCurrentRouteDistribution != 0) { - if (myCurrentRouteDistribution->getOverallProb() == 0) { + const bool haveSameID = MSRoute::dictionary(myCurrentRouteDistributionID, &myParsingRNG) != 0; + if (MSGlobals::gStateLoaded && haveSameID) { + delete myCurrentRouteDistribution; + return; + } + if (haveSameID) { delete myCurrentRouteDistribution; - WRITE_ERROR("Route distribution '" + myCurrentRouteDistributionID + "' is empty."); - } else if (!MSRoute::dictionary(myCurrentRouteDistributionID, myCurrentRouteDistribution)) { + throw ProcessError("Another route (or distribution) with the id '" + myCurrentRouteDistributionID + "' exists."); + } + if (myCurrentRouteDistribution->getOverallProb() == 0) { delete myCurrentRouteDistribution; - WRITE_ERROR("Another route (or distribution) with the id '" + myCurrentRouteDistributionID + "' exists."); + throw ProcessError("Route distribution '" + myCurrentRouteDistributionID + "' is empty."); } + MSRoute::dictionary(myCurrentRouteDistributionID, myCurrentRouteDistribution, myVehicleParameter == 0); myCurrentRouteDistribution = 0; } } @@ -430,7 +636,7 @@ void MSRouteHandler::closeVehicle() { // get nested route - const MSRoute* route = MSRoute::dictionary("!" + myVehicleParameter->id); + const MSRoute* route = MSRoute::dictionary("!" + myVehicleParameter->id, &myParsingRNG); MSVehicleControl& vehControl = MSNet::getInstance()->getVehicleControl(); if (myVehicleParameter->departProcedure == DEPART_GIVEN) { // let's check whether this vehicle had to depart before the simulation starts @@ -445,17 +651,17 @@ // get the vehicle's type MSVehicleType* vtype = 0; if (myVehicleParameter->vtypeid != "") { - vtype = vehControl.getVType(myVehicleParameter->vtypeid); + vtype = vehControl.getVType(myVehicleParameter->vtypeid, &myParsingRNG); if (vtype == 0) { throw ProcessError("The vehicle type '" + myVehicleParameter->vtypeid + "' for vehicle '" + myVehicleParameter->id + "' is not known."); } } else { // there should be one (at least the default one) - vtype = vehControl.getVType(); + vtype = vehControl.getVType(DEFAULT_VTYPE_ID, &myParsingRNG); } if (route == 0) { // if there is no nested route, try via the (hopefully) given route-id - route = MSRoute::dictionary(myVehicleParameter->routeid); + route = MSRoute::dictionary(myVehicleParameter->routeid, &myParsingRNG); } if (route == 0) { // nothing found? -> error @@ -470,14 +676,43 @@ // try to build the vehicle SUMOVehicle* vehicle = 0; if (vehControl.getVehicle(myVehicleParameter->id) == 0) { - vehicle = vehControl.buildVehicle(myVehicleParameter, route, vtype); + const bool ignoreRouteErrors = OptionsCont::getOptions().getBool("ignore-route-errors"); + try { + vehicle = vehControl.buildVehicle(myVehicleParameter, route, vtype, ignoreRouteErrors); + } catch (const ProcessError& e) { + if (ignoreRouteErrors) { + WRITE_WARNING(e.what()); + vehControl.deleteVehicle(0, true); + myVehicleParameter = 0; + vehicle = 0; + return; + } else { + throw e; + } + } // maybe we do not want this vehicle to be inserted due to scaling - if (vehControl.isInQuota()) { - // add the vehicle to the vehicle control + unsigned int quota = vehControl.getQuota(); + if (quota > 0) { vehControl.addVehicle(myVehicleParameter->id, vehicle); if (myVehicleParameter->departProcedure == DEPART_TRIGGERED) { + const MSEdge* const firstEdge = vehicle->getRoute().getEdges()[0]; + static_cast(vehicle)->setTentativeLaneAndPosition(firstEdge->getLanes()[0], myVehicleParameter->departPos); vehControl.addWaiting(*route->begin(), vehicle); vehControl.registerOneWaitingForPerson(); + } else if (myVehicleParameter->departProcedure == DEPART_CONTAINER_TRIGGERED) { + const MSEdge* const firstEdge = vehicle->getRoute().getEdges()[0]; + static_cast(vehicle)->setTentativeLaneAndPosition(firstEdge->getLanes()[0], myVehicleParameter->departPos); + vehControl.addWaiting(*route->begin(), vehicle); + vehControl.registerOneWaitingForContainer(); + } else { + // !!! no scaling for triggered vehicles yet + for (unsigned int i = 1; i < quota; i++) { + MSNet::getInstance()->getInsertionControl().add(vehicle); + SUMOVehicleParameter* newPars = new SUMOVehicleParameter(*myVehicleParameter); + newPars->id = myVehicleParameter->id + "." + toString(i); + vehicle = vehControl.buildVehicle(newPars, route, vtype, OptionsCont::getOptions().getBool("ignore-route-errors")); + vehControl.addVehicle(newPars->id, vehicle); + } } registerLastDepart(); myVehicleParameter = 0; @@ -512,88 +747,143 @@ if (myActivePlan->size() == 0) { throw ProcessError("Person '" + myVehicleParameter->id + "' has no plan."); } - MSVehicleType* type = MSNet::getInstance()->getVehicleControl().getVType(myVehicleParameter->vtypeid); + MSVehicleType* type = MSNet::getInstance()->getVehicleControl().getVType(myVehicleParameter->vtypeid, &myParsingRNG); if (type == 0) { throw ProcessError("The type '" + myVehicleParameter->vtypeid + "' for person '" + myVehicleParameter->id + "' is not known."); } MSPerson* person = MSNet::getInstance()->getPersonControl().buildPerson(myVehicleParameter, type, myActivePlan); // @todo: consider myScale? - if ((myAddVehiclesDirectly || checkLastDepart()) && MSNet::getInstance()->getPersonControl().add(myVehicleParameter->id, person)) { - MSNet::getInstance()->getPersonControl().setDeparture(myVehicleParameter->depart, person); - registerLastDepart(); + if (myAddVehiclesDirectly || checkLastDepart()) { + if (MSNet::getInstance()->getPersonControl().add(myVehicleParameter->id, person)) { + MSNet::getInstance()->getPersonControl().setDeparture(myVehicleParameter->depart, person); + registerLastDepart(); + } else { + ProcessError error("Another person with the id '" + myVehicleParameter->id + "' exists."); + delete person; + throw error; + } } else { + // warning already given delete person; } myVehicleParameter = 0; myActivePlan = 0; } +void +MSRouteHandler::closeContainer() { + if (myActiveContainerPlan->size() == 0) { + throw ProcessError("Container '" + myVehicleParameter->id + "' has no plan."); + } + MSVehicleType* type = MSNet::getInstance()->getVehicleControl().getVType(myVehicleParameter->vtypeid); + if (type == 0) { + throw ProcessError("The type '" + myVehicleParameter->vtypeid + "' for container '" + myVehicleParameter->id + "' is not known."); + } + MSContainer* container = MSNet::getInstance()->getContainerControl().buildContainer(myVehicleParameter, type, myActiveContainerPlan); + // @todo: consider myScale? + if (myAddVehiclesDirectly || checkLastDepart()) { + if (MSNet::getInstance()->getContainerControl().add(myVehicleParameter->id, container)) { + MSNet::getInstance()->getContainerControl().setDeparture(myVehicleParameter->depart, container); + registerLastDepart(); + } else { + ProcessError error("Another container with the id '" + myVehicleParameter->id + "' exists."); + delete container; + throw error; + } + } else { + // warning already given + delete container; + } + myVehicleParameter = 0; + myActiveContainerPlan = 0; +} void MSRouteHandler::closeFlow() { + if (myVehicleParameter->repetitionNumber == 0) { + return; + } // let's check whether vehicles had to depart before the simulation starts myVehicleParameter->repetitionsDone = 0; - SUMOTime offsetToBegin = string2time(OptionsCont::getOptions().getString("begin")) - myVehicleParameter->depart; - while (myVehicleParameter->repetitionsDone * myVehicleParameter->repetitionOffset < offsetToBegin) { - myVehicleParameter->repetitionsDone++; - if (myVehicleParameter->repetitionsDone == myVehicleParameter->repetitionNumber) { - return; + if (myVehicleParameter->repetitionProbability < 0) { + const SUMOTime offsetToBegin = string2time(OptionsCont::getOptions().getString("begin")) - myVehicleParameter->depart; + while (myVehicleParameter->repetitionsDone * myVehicleParameter->repetitionOffset < offsetToBegin) { + myVehicleParameter->repetitionsDone++; + if (myVehicleParameter->repetitionsDone == myVehicleParameter->repetitionNumber) { + return; + } } } - if (MSNet::getInstance()->getVehicleControl().getVType(myVehicleParameter->vtypeid) == 0) { - throw ProcessError("The vehicle type '" + myVehicleParameter->vtypeid + "' for vehicle '" + myVehicleParameter->id + "' is not known."); + if (MSNet::getInstance()->getVehicleControl().getVType(myVehicleParameter->vtypeid, &myParsingRNG) == 0) { + throw ProcessError("The vehicle type '" + myVehicleParameter->vtypeid + "' for flow '" + myVehicleParameter->id + "' is not known."); } - if (MSRoute::dictionary("!" + myVehicleParameter->id) == 0) { - // if not, try via the (hopefully) given route-id - if (MSRoute::dictionary(myVehicleParameter->routeid) == 0) { - if (myVehicleParameter->routeid != "") { - throw ProcessError("The route '" + myVehicleParameter->routeid + "' for vehicle '" + myVehicleParameter->id + "' is not known."); - } else { - throw ProcessError("Vehicle '" + myVehicleParameter->id + "' has no route."); - } - } - } else { - myVehicleParameter->routeid = "!" + myVehicleParameter->id; + if (myVehicleParameter->routeid[0] == '!' && MSRoute::dictionary(myVehicleParameter->routeid, &myParsingRNG) == 0) { + myVehicleParameter->setParameter |= VEHPARS_FORCE_REROUTE; + closeRoute(true); + } + if (MSRoute::dictionary(myVehicleParameter->routeid, &myParsingRNG) == 0) { + throw ProcessError("The route '" + myVehicleParameter->routeid + "' for flow '" + myVehicleParameter->id + "' is not known."); } myActiveRouteID = ""; // check whether the vehicle shall be added directly to the network or // shall stay in the internal buffer if (myAddVehiclesDirectly || checkLastDepart()) { - MSNet::getInstance()->getInsertionControl().add(myVehicleParameter); - registerLastDepart(); + if (MSNet::getInstance()->getInsertionControl().add(myVehicleParameter)) { + registerLastDepart(); + } else { + throw ProcessError("Another flow with the id '" + myVehicleParameter->id + "' exists."); + } } myVehicleParameter = 0; + myInsertStopEdgesAt = -1; } void MSRouteHandler::addStop(const SUMOSAXAttributes& attrs) { - bool ok = true; std::string errorSuffix; - if (myActiveRouteID != "") { - errorSuffix = " in route '" + myActiveRouteID + "'."; - } else if (myActivePlan) { + if (myActivePlan != 0) { errorSuffix = " in person '" + myVehicleParameter->id + "'."; - } else { + } else if (myVehicleParameter != 0) { errorSuffix = " in vehicle '" + myVehicleParameter->id + "'."; + } else if (myActiveContainerPlan != 0) { + errorSuffix = " in container '" + myVehicleParameter->id + "'."; + } else { + errorSuffix = " in route '" + myActiveRouteID + "'."; } SUMOVehicleParameter::Stop stop; - SUMOVehicleParserHelper::parseStop(stop, attrs); + bool ok = parseStop(stop, attrs, errorSuffix, MsgHandler::getErrorInstance()); + if (!ok) { + return; + } + MSEdge* edge = 0; // try to parse the assigned bus stop - stop.busstop = attrs.getOpt(SUMO_ATTR_BUS_STOP, 0, ok, ""); if (stop.busstop != "") { // ok, we have obviously a bus stop MSBusStop* bs = MSNet::getInstance()->getBusStop(stop.busstop); - if (bs != 0) { - const MSLane& l = bs->getLane(); - stop.lane = l.getID(); - stop.endPos = bs->getEndLanePosition(); - stop.startPos = bs->getBeginLanePosition(); - } else { + if (bs == 0) { WRITE_ERROR("The bus stop '" + stop.busstop + "' is not known" + errorSuffix); return; } + const MSLane& l = bs->getLane(); + stop.lane = l.getID(); + stop.endPos = bs->getEndLanePosition(); + stop.startPos = bs->getBeginLanePosition(); + edge = &l.getEdge(); + } //try to parse the assigned container stop + else if (stop.containerstop != "") { + // ok, we have obviously a container stop + MSContainerStop* cs = MSNet::getInstance()->getContainerStop(stop.containerstop); + if (cs == 0) { + WRITE_ERROR("The container stop '" + stop.containerstop + "' is not known" + errorSuffix); + return; + } + const MSLane& l = cs->getLane(); + stop.lane = l.getID(); + stop.endPos = cs->getEndLanePosition(); + stop.startPos = cs->getBeginLanePosition(); + edge = &l.getEdge(); } else { // no, the lane and the position should be given // get the lane @@ -604,77 +894,56 @@ return; } } else { - WRITE_ERROR("A stop must be placed on a bus stop or a lane" + errorSuffix); + WRITE_ERROR("A stop must be placed on a bus stop, a container stop or a lane" + errorSuffix); return; } + edge = &MSLane::dictionary(stop.lane)->getEdge(); if (myActivePlan && !myActivePlan->empty() && - &myActivePlan->back()->getDestination() != &MSLane::dictionary(stop.lane)->getEdge()) { - throw ProcessError("Disconnected plan for person '" + myVehicleParameter->id + "' (" + MSLane::dictionary(stop.lane)->getEdge().getID() + "!=" + myActivePlan->back()->getDestination().getID() + ")."); + &myActivePlan->back()->getDestination() != edge) { + throw ProcessError("Disconnected plan for person '" + myVehicleParameter->id + "' (" + edge->getID() + "!=" + myActivePlan->back()->getDestination().getID() + ")."); } if (myActivePlan && myActivePlan->empty()) { myActivePlan->push_back(new MSPerson::MSPersonStage_Waiting( - MSLane::dictionary(stop.lane)->getEdge(), -1, myVehicleParameter->depart, myVehicleParameter->departPos, "start")); + *edge, -1, myVehicleParameter->depart, myVehicleParameter->departPos, "start")); + } + if (myActiveContainerPlan && + !myActiveContainerPlan->empty() && + &myActiveContainerPlan->back()->getDestination() != &MSLane::dictionary(stop.lane)->getEdge()) { + throw ProcessError("Disconnected plan for container '" + myVehicleParameter->id + "' (" + MSLane::dictionary(stop.lane)->getEdge().getID() + "!=" + myActiveContainerPlan->back()->getDestination().getID() + ")."); + } + if (myActiveContainerPlan && myActiveContainerPlan->empty()) { + myActiveContainerPlan->push_back(new MSContainer::MSContainerStage_Waiting( + MSLane::dictionary(stop.lane)->getEdge(), -1, myVehicleParameter->depart, myVehicleParameter->departPos, "start")); } stop.endPos = attrs.getOpt(SUMO_ATTR_ENDPOS, 0, ok, MSLane::dictionary(stop.lane)->getLength()); if (attrs.hasAttribute(SUMO_ATTR_POSITION)) { WRITE_WARNING("Deprecated attribute 'pos' in description of stop" + errorSuffix); stop.endPos = attrs.getOpt(SUMO_ATTR_POSITION, 0, ok, stop.endPos); } - stop.startPos = attrs.getOpt(SUMO_ATTR_STARTPOS, 0, ok, MAX2(0., stop.endPos - 2 * POSITION_EPS)); + stop.startPos = attrs.getOpt(SUMO_ATTR_STARTPOS, 0, ok, MAX2((SUMOReal)0., stop.endPos - 2 * POSITION_EPS)); const bool friendlyPos = attrs.getOpt(SUMO_ATTR_FRIENDLY_POS, 0, ok, false); if (!ok || !checkStopPos(stop.startPos, stop.endPos, MSLane::dictionary(stop.lane)->getLength(), POSITION_EPS, friendlyPos)) { WRITE_ERROR("Invalid start or end position for stop on lane '" + stop.lane + "'" + errorSuffix); return; } } - - // get the standing duration - if (!attrs.hasAttribute(SUMO_ATTR_DURATION) && !attrs.hasAttribute(SUMO_ATTR_UNTIL)) { - stop.triggered = attrs.getOpt(SUMO_ATTR_TRIGGERED, 0, ok, true); - stop.duration = -1; - stop.until = -1; - } else { - stop.duration = attrs.getOptSUMOTimeReporting(SUMO_ATTR_DURATION, 0, ok, -1); - stop.until = attrs.getOptSUMOTimeReporting(SUMO_ATTR_UNTIL, 0, ok, -1); - if (!ok || (stop.duration < 0 && stop.until < 0)) { - WRITE_ERROR("Invalid duration or end time is given for a stop on lane '" + stop.lane + "'" + errorSuffix); - return; - } - stop.triggered = attrs.getOpt(SUMO_ATTR_TRIGGERED, 0, ok, false); - } - stop.parking = attrs.getOpt(SUMO_ATTR_PARKING, 0, ok, stop.triggered); - if (!ok) { - WRITE_ERROR("Invalid bool for 'triggered' or 'parking' for stop on lane '" + stop.lane + "'" + errorSuffix); - return; - } - - // expected persons - std::string expectedStr = attrs.getOpt(SUMO_ATTR_EXPECTED, 0, ok, ""); - std::set personIDs; - SUMOSAXAttributes::parseStringSet(expectedStr, personIDs); - stop.awaitedPersons = personIDs; - - const std::string idx = attrs.getOpt(SUMO_ATTR_INDEX, 0, ok, "end"); - if (idx == "end") { - stop.index = STOP_INDEX_END; - } else if (idx == "fit") { - stop.index = STOP_INDEX_FIT; - } else { - stop.index = attrs.get(SUMO_ATTR_INDEX, 0, ok); - if (!ok || stop.index < 0) { - WRITE_ERROR("Invalid 'index' for stop on lane '" + stop.lane + "'" + errorSuffix); - return; - } - } - if (myActiveRouteID != "") { - myActiveRouteStops.push_back(stop); - } else if (myActivePlan) { + if (myActivePlan != 0) { std::string actType = attrs.getOpt(SUMO_ATTR_ACTTYPE, 0, ok, "waiting"); myActivePlan->push_back(new MSPerson::MSPersonStage_Waiting( MSLane::dictionary(stop.lane)->getEdge(), stop.duration, stop.until, stop.startPos, actType)); - } else { + } else if (myActiveContainerPlan != 0) { + std::string actType = attrs.getOpt(SUMO_ATTR_ACTTYPE, 0, ok, "waiting"); + myActiveContainerPlan->push_back(new MSContainer::MSContainerStage_Waiting( + MSLane::dictionary(stop.lane)->getEdge(), stop.duration, stop.until, stop.startPos, actType)); + } else if (myVehicleParameter != 0) { myVehicleParameter->stops.push_back(stop); + } else { + myActiveRouteStops.push_back(stop); + } + if (myInsertStopEdgesAt >= 0) { + myActiveRoute.insert(myActiveRoute.begin() + myInsertStopEdgesAt, edge); + myInsertStopEdgesAt++; } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSRouteHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSRouteHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSRouteHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSRouteHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 9 Jul 2001 -/// @version $Id: MSRouteHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSRouteHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Parser and container for routes during their loading /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,7 +33,8 @@ #endif #include -#include "MSPerson.h" +#include +#include "MSContainer.h" #include "MSVehicle.h" #include #include @@ -66,6 +67,10 @@ /// standard destructor virtual ~MSRouteHandler(); + static MTRand* getParsingRNG() { + return &myParsingRNG; + } + protected: /// @name inherited from GenericSAXHandler //@{ @@ -91,6 +96,16 @@ //@} + /** @brief Called for parsing from and to and the corresponding taz attributes + * + * @param[in] element description of the currently opened element + * @param[in] attrs Attributes within the currently opened element + * @exception ProcessError If something fails + */ + void parseFromViaTo(std::string element, + const SUMOSAXAttributes& attrs); + + /** opens a type distribution for reading */ void openVehicleTypeDistribution(const SUMOSAXAttributes& attrs); @@ -119,6 +134,9 @@ /// Ends the processing of a person void closePerson(); + /// Ends the processing of a container + void closeContainer(); + /// Ends the processing of a flow void closeFlow(); @@ -127,11 +145,14 @@ protected: /// @brief The current route - MSEdgeVector myActiveRoute; + ConstMSEdgeVector myActiveRoute; /// @brief The plan of the current person MSPerson::MSPersonPlan* myActivePlan; + /// @brief The plan of the current container + MSContainer::MSContainerPlan* myActiveContainerPlan; + /// @brief Information whether vehicles shall be directly added to the network or kept within the buffer bool myAddVehiclesDirectly; @@ -147,6 +168,9 @@ /// @brief The id of the currently parsed route distribution std::string myCurrentRouteDistributionID; + /// @brief A random number generator used to choose from vtype/route distributions and computing the speed factors + static MTRand myParsingRNG; + private: /// @brief Invalidated copy constructor MSRouteHandler(const MSRouteHandler& s); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSStateHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSStateHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSStateHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSStateHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,14 +1,15 @@ /****************************************************************************/ /// @file MSStateHandler.cpp +/// @author Daniel Krajzewicz /// @author Michael Behrisch /// @author Jakob Erdmann /// @date Thu, 13 Dec 2012 -/// @version $Id: MSStateHandler.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSStateHandler.cpp 17899 2015-02-18 09:21:14Z namdre $ /// // Parser and output filter for routes and vehicles state saving and loading /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 200122014 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -29,6 +30,10 @@ #include #endif +#ifdef HAVE_VERSION_H +#include +#endif + #include #include #include @@ -37,6 +42,7 @@ #include #include #include +#include #include #include "MSStateHandler.h" @@ -45,7 +51,6 @@ #include #endif - #ifdef CHECK_MEMORY_LEAKS #include #endif // CHECK_MEMORY_LEAKS @@ -59,7 +64,8 @@ #ifdef HAVE_INTERNAL mySegment(0), #endif - myEdgeAndLane(0, -1) { + myEdgeAndLane(0, -1), + myCurrentVType(0) { } @@ -113,9 +119,9 @@ case SUMO_TAG_ROUTE: { const std::string id = attrs.getString(SUMO_ATTR_ID); if (MSRoute::dictionary(id) == 0) { - MSEdgeVector edges; + ConstMSEdgeVector edges; MSEdge::parseEdgesList(attrs.getString(SUMO_ATTR_EDGES), edges, id); - MSRoute* r = new MSRoute(id, edges, attrs.getInt(SUMO_ATTR_STATE), + MSRoute* r = new MSRoute(id, edges, attrs.getBool(SUMO_ATTR_STATE), 0, std::vector()); MSRoute::dictionary(id, r); } @@ -124,7 +130,7 @@ case SUMO_TAG_ROUTE_DISTRIBUTION: { const std::string id = attrs.getString(SUMO_ATTR_ID); if (MSRoute::dictionary(id) == 0) { - RandomDistributor* dist = new RandomDistributor(MSRoute::getMaxRouteDistSize(), &MSRoute::releaseRoute); + RandomDistributor* dist = new RandomDistributor(); std::vector routeIDs; std::istringstream iss(attrs.getString(SUMO_ATTR_PROBS)); SUMOSAXAttributes::parseStringVector(attrs.getString(SUMO_ATTR_ROUTES), routeIDs); @@ -134,15 +140,15 @@ const MSRoute* r = MSRoute::dictionary(*it); assert(r != 0); dist->add(prob, r, false); + r->addReference(); } - MSRoute::dictionary(id, dist); + MSRoute::dictionary(id, dist, attrs.getBool(SUMO_ATTR_STATE)); } break; } case SUMO_TAG_VTYPE: { - SUMOVTypeParameter* def = SUMOVehicleParserHelper::beginVTypeParsing(attrs, getFileName()); - vc.addVType(MSVehicleType::build(*def)); - delete def; + myCurrentVType = SUMOVehicleParserHelper::beginVTypeParsing(attrs, getFileName()); + break; } case SUMO_TAG_VTYPE_DISTRIBUTION: { const std::string id = attrs.getString(SUMO_ATTR_ID); @@ -174,11 +180,15 @@ assert(type != 0); assert(vc.getVehicle(p->id) == 0); - SUMOVehicle* v = vc.buildVehicle(p, route, type); + SUMOVehicle* v = vc.buildVehicle(p, route, type, true); v->loadState(attrs, myOffset); if (!vc.addVehicle(p->id, v)) { throw ProcessError("Error: Could not build vehicle " + p->id + "!"); } + if (!v->hasDeparted()) { + // !!! the save did not keep the order in which the vehicles are checked for insertion + MSNet::getInstance()->getInsertionControl().add(v); + } break; } #ifdef HAVE_INTERNAL @@ -216,6 +226,10 @@ break; } default: + // parse embedded vtype information + if (myCurrentVType != 0) { + SUMOVehicleParserHelper::parseVTypeEmbedded(*myCurrentVType, element, attrs); + } break; } } @@ -225,6 +239,9 @@ MSStateHandler::myEndElement(int element) { switch (element) { case SUMO_TAG_VTYPE: + MSNet::getInstance()->getVehicleControl().addVType(MSVehicleType::build(*myCurrentVType)); + delete myCurrentVType; + myCurrentVType = 0; break; default: break; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSStateHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSStateHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSStateHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSStateHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,14 +1,15 @@ /****************************************************************************/ /// @file MSStateHandler.h +/// @author Daniel Krajzewicz /// @author Michael Behrisch /// @author Jakob Erdmann /// @date Thu, 13 Dec 2012 -/// @version $Id: MSStateHandler.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSStateHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Parser and output filter for routes and vehicles state saving and loading /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -102,6 +103,9 @@ std::pair myEdgeAndLane; unsigned int myQueIndex; + /// @brief The currently parsed vehicle type + SUMOVTypeParameter* myCurrentVType; + private: /// @brief Invalidated copy constructor MSStateHandler(const MSStateHandler& s); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleContainer.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleContainer.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleContainer.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleContainer.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 12 Mar 2001 -/// @version $Id: MSVehicleContainer.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSVehicleContainer.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // vehicles sorted by their departures /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -122,8 +122,8 @@ MSVehicleContainer::addReplacing(const VehicleDepartureVector& x) { if (isFull()) { std::vector array2((array.size() - 1) * 2 + 1, VehicleDepartureVector()); - for (size_t i = array.size(); i-- > 0;) { - assert(array2.size() > i); + for (int i = (int)array.size(); i-- > 0;) { + assert(i < (int)array2.size()); array2[i] = array[i]; } array = array2; @@ -141,10 +141,8 @@ bool -MSVehicleContainer::anyWaitingFor(SUMOTime time) const { - VehicleHeap::const_iterator j = - find_if(array.begin() + 1, array.begin() + currentSize + 1, DepartFinder(time)); - return j != array.begin() + currentSize + 1; +MSVehicleContainer::anyWaitingBefore(SUMOTime time) const { + return !isEmpty() && topTime() < time; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleContainer.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleContainer.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleContainer.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleContainer.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 12 Mar 2001 -/// @version $Id: MSVehicleContainer.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSVehicleContainer.h 18095 2015-03-17 09:39:00Z behrisch $ /// // vehicles sorted by their departures /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -74,8 +74,8 @@ /// Adds a container with vehicles departing at the given time void add(SUMOTime time, const VehicleVector& cont); - /// Returns the information whether any vehicles want to depart at the given time - bool anyWaitingFor(SUMOTime time) const; + /// Returns the information whether any vehicles want to depart before the given time + bool anyWaitingBefore(SUMOTime time) const; /// Returns the uppermost vehicle vector const VehicleVector& top(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleControl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleControl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleControl.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleControl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Wed, 10. Dec 2003 -/// @version $Id: MSVehicleControl.cpp 14469 2013-08-22 09:12:33Z namdre $ +/// @version $Id: MSVehicleControl.cpp 18131 2015-03-24 13:26:29Z behrisch $ /// // The class responsible for building and deletion of vehicles /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,11 +33,13 @@ #include "MSVehicleControl.h" #include "MSVehicle.h" #include "MSLane.h" +#include "MSEdge.h" #include "MSNet.h" +#include "MSRouteHandler.h" #include #include #include -#include +#include #include #include #include @@ -48,12 +50,6 @@ // =========================================================================== -// static members -// =========================================================================== -MTRand MSVehicleControl::myVehicleParamsRNG; - - -// =========================================================================== // member method definitions // =========================================================================== MSVehicleControl::MSVehicleControl() : @@ -62,21 +58,28 @@ myEndedVehNo(0), myDiscarded(0), myCollisions(0), - myTeleports(0), + myTeleportsJam(0), + myTeleportsYield(0), + myTeleportsWrongLane(0), + myEmergencyStops(0), myTotalDepartureDelay(0), myTotalTravelTime(0), myDefaultVTypeMayBeDeleted(true), myWaitingForPerson(0), - myScale(-1) { - SUMOVTypeParameter defType; + myWaitingForContainer(0), + myScale(-1), + myMaxSpeedFactor(1), + myMinDeceleration(SUMOVTypeParameter::getDefaultDecel(SVC_IGNORING)) { + SUMOVTypeParameter defType(DEFAULT_VTYPE_ID, SVC_IGNORING); myVTypeDict[DEFAULT_VTYPE_ID] = MSVehicleType::build(defType); + SUMOVTypeParameter defPedType(DEFAULT_PEDTYPE_ID, SVC_PEDESTRIAN); + defPedType.setParameter |= VTYPEPARS_VEHICLECLASS_SET; + myVTypeDict[DEFAULT_PEDTYPE_ID] = MSVehicleType::build(defPedType); OptionsCont& oc = OptionsCont::getOptions(); - if (oc.isSet("incremental-dua-step")) { - myScale = oc.getInt("incremental-dua-step") / static_cast(oc.getInt("incremental-dua-base")); - } if (oc.isSet("scale")) { myScale = oc.getFloat("scale"); } + myMaxRandomDepartOffset = string2time(oc.getString("random-depart-offset")); } @@ -98,13 +101,27 @@ myVTypeDict.clear(); } +SUMOTime +MSVehicleControl::computeRandomDepartOffset() const { + if (myMaxRandomDepartOffset > 0) { + // round to the closest usable simulation step + return DELTA_T * int((MSRouteHandler::getParsingRNG()->rand((int)myMaxRandomDepartOffset) + 0.5 * DELTA_T) / DELTA_T); + } else { + return 0; + } +} SUMOVehicle* MSVehicleControl::buildVehicle(SUMOVehicleParameter* defs, const MSRoute* route, - const MSVehicleType* type) { + const MSVehicleType* type, + const bool ignoreStopErrors, const bool fromRouteFile) { myLoadedVehNo++; - MSVehicle* built = new MSVehicle(defs, route, type, type->computeChosenSpeedDeviation(myVehicleParamsRNG), myLoadedVehNo - 1); + if (fromRouteFile) { + defs->depart += computeRandomDepartOffset(); + } + MSVehicle* built = new MSVehicle(defs, route, type, type->computeChosenSpeedDeviation(fromRouteFile ? MSRouteHandler::getParsingRNG() : 0)); + built->addStops(ignoreStopErrors); MSNet::getInstance()->informVehicleStateListener(built, MSNet::VEHICLE_STATE_BUILT); return built; } @@ -113,44 +130,27 @@ void MSVehicleControl::scheduleVehicleRemoval(SUMOVehicle* veh) { assert(myRunningVehNo > 0); + myTotalTravelTime += STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep() - veh->getDeparture()); + myRunningVehNo--; + MSNet::getInstance()->informVehicleStateListener(veh, MSNet::VEHICLE_STATE_ARRIVED); for (std::vector::const_iterator i = veh->getDevices().begin(); i != veh->getDevices().end(); ++i) { (*i)->generateOutput(); } if (OptionsCont::getOptions().isSet("tripinfo-output")) { + // close tag after tripinfo (possibly including emissions from another device) have been written OutputDevice::getDeviceByOption("tripinfo-output").closeTag(); } - myTotalTravelTime += STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep() - veh->getDeparture()); - myRunningVehNo--; - MSNet::getInstance()->informVehicleStateListener(veh, MSNet::VEHICLE_STATE_ARRIVED); deleteVehicle(veh); } void -MSVehicleControl::printMeanWaitingTime(OutputDevice& od) const { - if (getDepartedVehicleNo() == 0) { - od << -1.; - } else { - od << (myTotalDepartureDelay / (SUMOReal) getDepartedVehicleNo()); - } -} - - -void -MSVehicleControl::printMeanTravelTime(OutputDevice& od) const { - if (myEndedVehNo == 0) { - od << -1.; - } else { - od << (myTotalTravelTime / (SUMOReal) myEndedVehNo); - } -} - - -void MSVehicleControl::vehicleDeparted(const SUMOVehicle& v) { ++myRunningVehNo; myTotalDepartureDelay += STEPS2TIME(v.getDeparture() - STEPFLOOR(v.getParameter().depart)); MSNet::getInstance()->informVehicleStateListener(&v, MSNet::VEHICLE_STATE_DEPARTED); + myMaxSpeedFactor = MAX2(myMaxSpeedFactor, v.getChosenSpeedFactor()); + myMinDeceleration = MIN2(myMinDeceleration, v.getVehicleType().getCarFollowModel().getMaxDecel()); } @@ -211,23 +211,13 @@ if (discard) { myDiscarded++; } - myVehicleDict.erase(veh->getID()); + if (veh != 0) { + myVehicleDict.erase(veh->getID()); + } delete veh; } -MSVehicleControl::constVehIt -MSVehicleControl::loadedVehBegin() const { - return myVehicleDict.begin(); -} - - -MSVehicleControl::constVehIt -MSVehicleControl::loadedVehEnd() const { - return myVehicleDict.end(); -} - - bool MSVehicleControl::checkVType(const std::string& id) { if (id == DEFAULT_VTYPE_ID) { @@ -238,6 +228,14 @@ } else { return false; } + } else if (id == DEFAULT_PEDTYPE_ID) { + if (myDefaultPedTypeMayBeDeleted) { + delete myVTypeDict[id]; + myVTypeDict.erase(myVTypeDict.find(id)); + myDefaultPedTypeMayBeDeleted = false; + } else { + return false; + } } else { if (myVTypeDict.find(id) != myVTypeDict.end() || myVTypeDistDict.find(id) != myVTypeDistDict.end()) { return false; @@ -273,17 +271,19 @@ MSVehicleType* -MSVehicleControl::getVType(const std::string& id) { +MSVehicleControl::getVType(const std::string& id, MTRand* rng) { VTypeDictType::iterator it = myVTypeDict.find(id); if (it == myVTypeDict.end()) { VTypeDistDictType::iterator it2 = myVTypeDistDict.find(id); if (it2 == myVTypeDistDict.end()) { return 0; } - return it2->second->get(&myVehicleParamsRNG); + return it2->second->get(rng); } if (id == DEFAULT_VTYPE_ID) { myDefaultVTypeMayBeDeleted = false; + } else if (id == DEFAULT_PEDTYPE_ID) { + myDefaultPedTypeMayBeDeleted = false; } return it->second; } @@ -322,14 +322,33 @@ SUMOVehicle* -MSVehicleControl::getWaitingVehicle(const MSEdge* const edge, const std::set& lines) { +MSVehicleControl::getWaitingVehicle(const MSEdge* const edge, const std::set& lines, const SUMOReal position, const std::string ridingID) { if (myWaiting.find(edge) != myWaiting.end()) { + // for every vehicle waiting vehicle at this edge + std::vector waitingTooFarAway; for (std::vector::const_iterator it = myWaiting[edge].begin(); it != myWaiting[edge].end(); ++it) { const std::string& line = (*it)->getParameter().line == "" ? (*it)->getParameter().id : (*it)->getParameter().line; + SUMOReal vehiclePosition = (*it)->getPositionOnLane(); + // if the line of the vehicle is contained in the set of given lines and the vehicle is stopped and is positioned + // in the interval [position - t, position + t] for a tolerance t=10 if (lines.count(line)) { - return (*it); + if ((position - 10 <= vehiclePosition) && (vehiclePosition <= position + 10)) { + return (*it); + } else if ((*it)->isStoppedTriggered() || + (*it)->getParameter().departProcedure == DEPART_TRIGGERED) { + // maybe we are within the range of the stop + MSVehicle* veh = static_cast(*it); + if (veh->isStoppedInRange(position)) { + return (*it); + } else { + waitingTooFarAway.push_back(*it); + } + } } } + for (std::vector::iterator it = waitingTooFarAway.begin(); it != waitingTooFarAway.end(); ++it) { + WRITE_WARNING(ridingID + " at edge '" + edge->getID() + "' position " + toString(position) + " cannot use waiting vehicle '" + (*it)->getID() + "' at position " + toString((*it)->getPositionOnLane()) + " because it is too far away."); + } } return 0; } @@ -338,22 +357,27 @@ void MSVehicleControl::abortWaiting() { for (VehicleDictType::iterator i = myVehicleDict.begin(); i != myVehicleDict.end(); ++i) { - WRITE_WARNING("Vehicle " + i->first + " aborted waiting for a person that will never come."); + WRITE_WARNING("Vehicle " + i->first + " aborted waiting for a person or a container that will never come."); } } -bool -MSVehicleControl::isInQuota(SUMOReal frac) const { +unsigned int +MSVehicleControl::getQuota(SUMOReal frac) const { frac = frac < 0 ? myScale : frac; - if (frac < 0) { - return true; + if (frac < 0 || frac == 1.) { + return 1; } - const unsigned int resolution = 1000; - const unsigned int intFrac = (unsigned int)floor(frac * resolution + 0.5); // the vehicle in question has already been loaded, hence the '-1' + const unsigned int loaded = frac > 1. ? (unsigned int)(myLoadedVehNo / frac) : myLoadedVehNo - 1; + const unsigned int base = (unsigned int)frac; + const unsigned int resolution = 1000; + const unsigned int intFrac = (unsigned int)floor((frac - base) * resolution + 0.5); // apply % twice to avoid integer overflow - return (((myLoadedVehNo - 1) % resolution) * intFrac) % resolution < intFrac; + if (((loaded % resolution) * intFrac) % resolution < intFrac) { + return base + 1; + } + return base; } /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleControl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleControl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleControl.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleControl.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Wed, 10. Dec 2003 -/// @version $Id: MSVehicleControl.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSVehicleControl.h 18096 2015-03-17 09:50:59Z behrisch $ /// // The class responsible for building and deletion of vehicles /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,21 +36,20 @@ #include #include #include -#include "MSGlobals.h" -#include -#include #include -#include +#include +#include // =========================================================================== // class declarations // =========================================================================== class SUMOVehicle; +class SUMOVehicleParameter; class MSVehicle; class MSRoute; class MSVehicleType; -class BinaryInputDevice; +class OutputDevice; class MSEdge; @@ -97,10 +96,13 @@ * @param[in] defs The parameter defining the vehicle * @param[in] route The route of this vehicle * @param[in] type The type of this vehicle + * @param[in] ignoreStopErrors whether invalid stops trigger a warning only + * @param[in] fromRouteFile whether we are just reading the route file or creating via trigger, traci, ... * @return The built vehicle (MSVehicle instance) */ virtual SUMOVehicle* buildVehicle(SUMOVehicleParameter* defs, const MSRoute* route, - const MSVehicleType* type); + const MSVehicleType* type, + const bool ignoreStopErrors, const bool fromRouteFile = true); /// @} @@ -158,17 +160,19 @@ /** @brief Returns the begin of the internal vehicle map - * * @return The begin of the internal vehicle map */ - constVehIt loadedVehBegin() const; + constVehIt loadedVehBegin() const { + return myVehicleDict.begin(); + } /** @brief Returns the end of the internal vehicle map - * * @return The end of the internal vehicle map */ - constVehIt loadedVehEnd() const; + constVehIt loadedVehEnd() const { + return myVehicleDict.end(); + } /// @} @@ -223,56 +227,73 @@ } - /** @brief Returns the information whether the currently vehicle number shall be emitted - * considering that only frac of all vehicles shall be emitted overall + /** @brief Returns the number of instances of the current vehicle that shall be emitted + * considering that "frac" of all vehicles shall be emitted overall * if a negative fraction is given the demand scaling factor is used - * (--scale or --incremental-dua-step / --incremental-dua-base) - * @return True iff the vehicle number is acceptable + * (--scale) + * @return the number of vehicles to create (something between 0 and ceil(frac)) */ - bool isInQuota(SUMOReal frac = -1) const; + unsigned int getQuota(SUMOReal frac = -1) const; - /** @brief Returns the number of build vehicles that have not been removed - * or need to wait for a passenger + /** @brief Returns the number of build vehicles that have not been removed or + * need to wait for a passenger or a container * @return Number of active vehicles */ int getActiveVehicleCount() const { - return myLoadedVehNo - (myWaitingForPerson + myEndedVehNo); + return myLoadedVehNo - (myWaitingForPerson + myWaitingForContainer + myEndedVehNo); } + /// @brief return the number of collisions unsigned int getCollisionCount() const { return myCollisions; } + /// @brief return the number of teleports due to jamming + unsigned int getTeleportsJam() const { + return myTeleportsJam; + } + + /// @brief return the number of teleports due to vehicles stuck on a minor road + unsigned int getTeleportsYield() const { + return myTeleportsYield; + } + + /// @brief return the number of teleports due to vehicles stuck on the wrong lane + unsigned int getTeleportsWrongLane() const { + return myTeleportsWrongLane; + } /// @brief return the number of teleports (including collisions) unsigned int getTeleportCount() const { - return myTeleports; + return myCollisions + myTeleportsJam + myTeleportsYield + myTeleportsWrongLane; } - /// @} + /// @brief return the number of emergency stops + unsigned int getEmergencyStops() const { + return myEmergencyStops; + } - /// @name Retrieval of vehicle statistics (availability depends on simulation settings) - /// @{ - /** @brief Prints the mean waiting time of vehicles. - * The mean time vehicles had to wait for being inserted (-1 if no vehicle was inserted, yet) - * @todo Enable this for guisim? + /** @brief Returns the total departure delay + * @return Sum of steps vehicles had to wait until being inserted */ - void printMeanWaitingTime(OutputDevice& od) const; + SUMOReal getTotalDepartureDelay() const { + return myTotalDepartureDelay; + } - /** @brief Returns the mean travel time of vehicles - * The mean travel time of ended vehicles (-1 if no vehicle has ended, yet) - * @todo Enable this for guisim? + /** @brief Returns the total travel time + * @return Sum of travel times of arrived vehicles */ - void printMeanTravelTime(OutputDevice& od) const; + SUMOReal getTotalTravelTime() const { + return myTotalTravelTime; + } /// @} - /// @name Insertion and retrieval of vehicle types /// @{ @@ -321,7 +342,7 @@ * @param[in] id The id of the vehicle type to return. If left out, the default type is returned. * @return The named vehicle type, or 0 if no such type exists */ - MSVehicleType* getVType(const std::string& id = DEFAULT_VTYPE_ID); + MSVehicleType* getVType(const std::string& id = DEFAULT_VTYPE_ID, MTRand* rng = 0); /** @brief Inserts ids of all known vehicle types and vehicle type distributions to the given vector @@ -330,11 +351,19 @@ void insertVTypeIDs(std::vector& into) const; /// @} + /// @brief Adds a vehicle to the list of waiting vehiclse to a given edge void addWaiting(const MSEdge* const edge, SUMOVehicle* vehicle); + /// @brief Removes a vehicle from the list of waiting vehicles to a given edge void removeWaiting(const MSEdge* const edge, SUMOVehicle* vehicle); - SUMOVehicle* getWaitingVehicle(const MSEdge* const edge, const std::set& lines); + /* @brief returns a vehicle of the given lines that is waiting for a for a person or a container at this edge at the given positions + * @param[in] edge The edge at which the vehicle is positioned. + * @param[in] lines The set of lines from which at least one must correspond to the line of the vehicle + * @param[in] position The vehicle shall be positioned in the interval [position - t, position + t], where t is some tolerance + * @param[in] ridingID The id of the person or container that wants to ride + */ + SUMOVehicle* getWaitingVehicle(const MSEdge* const edge, const std::set& lines, const SUMOReal position, const std::string ridingID); /** @brief increases the count of vehicles waiting for a person to allow recogniztion of person related deadlocks */ @@ -348,15 +377,41 @@ myWaitingForPerson--; } + /** @brief increases the count of vehicles waiting for a container to allow recogniztion of container related deadlocks + */ + void registerOneWaitingForContainer() { + myWaitingForContainer++; + } + + /** @brief decreases the count of vehicles waiting for a container to allow recogniztion of container related deadlocks + */ + void unregisterOneWaitingForContainer() { + myWaitingForContainer--; + } + /// @brief registers one collision-related teleport void registerCollision() { - myTeleports++; myCollisions++; } /// @brief register one non-collision-related teleport - void registerTeleport() { - myTeleports++; + void registerTeleportJam() { + myTeleportsJam++; + } + + /// @brief register one non-collision-related teleport + void registerTeleportYield() { + myTeleportsYield++; + } + + /// @brief register one non-collision-related teleport + void registerTeleportWrongLane() { + myTeleportsWrongLane++; + } + + /// @brief register emergency stop + void registerEmergencyStop() { + myEmergencyStops++; } /// @name State I/O (mesosim only) @@ -372,15 +427,22 @@ /// @} - /** @brief removes any vehicles that are still waiting + /** @brief informes about all waiting vehicles (deletion in destructor) */ void abortWaiting(); + /// @brief compute (optional) random offset to the departure time + SUMOTime computeRandomDepartOffset() const; -public: - /// @brief A random number generator used to choose from vtype/route distributions and computing the speed factors - static MTRand myVehicleParamsRNG; + /// @brief return the maximum speed factor for all vehicles that ever entered the network + SUMOReal getMaxSpeedFactor() const { + return myMaxSpeedFactor; + } + /// @brief return the minimum deceleration capability for all vehicles that ever entered the network + SUMOReal getMinDeceleration() const { + return myMinDeceleration; + } private: /** @brief Checks whether the vehicle type (distribution) may be added @@ -410,8 +472,18 @@ /// @brief The number of collisions unsigned int myCollisions; - /// @brief The number of teleports (including collisions) - unsigned int myTeleports; + /// @brief The number of teleports due to jam + unsigned int myTeleportsJam; + + /// @brief The number of teleports due to vehicles stuck on a minor road + unsigned int myTeleportsYield; + + /// @brief The number of teleports due to vehicles stuck on the wrong lane + unsigned int myTeleportsWrongLane; + + /// @brief The number of emergency stops + unsigned int myEmergencyStops; + /// @} @@ -452,15 +524,30 @@ /// @brief Whether no vehicle type was loaded bool myDefaultVTypeMayBeDeleted; - /// the lists of waiting vehicles + /// @brief Whether no pedestrian type was loaded + bool myDefaultPedTypeMayBeDeleted; + + /// the lists of waiting vehicles to a given edge std::map > myWaiting; - /// the number of vehicles contained in myWaiting which can only continue by being triggered + /// the number of vehicles wainting for persons contained in myWaiting which can only continue by being triggered unsigned int myWaitingForPerson; + /// the number of vehicles wainting for containers contained in myWaiting which can only continue by being triggered + unsigned int myWaitingForContainer; + /// @brief The scaling factor (especially for inc-dua) SUMOReal myScale; + /// @brief The maximum random offset to be added to vehicles departure times (non-negative) + SUMOTime myMaxRandomDepartOffset; + + /// @brief The maximum speed factor for all vehicles in the network + SUMOReal myMaxSpeedFactor; + + /// @brief The minimum deceleration capability for all vehicles in the network + SUMOReal myMinDeceleration; + private: /// @brief invalidated copy constructor MSVehicleControl(const MSVehicleControl& s); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicle.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicle.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicle.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicle.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -12,12 +12,12 @@ /// @author Axel Wegener /// @author Christoph Sommer /// @date Mon, 05 Mar 2001 -/// @version $Id: MSVehicle.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSVehicle.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Representation of a vehicle in the micro simulation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -43,28 +43,32 @@ #include #include #include -#include #include #include -#include +#include #include -#include -#include +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include "trigger/MSBusStop.h" #include "devices/MSDevice_Person.h" +#include "devices/MSDevice_Container.h" #include "MSEdgeWeightsStorage.h" -#include "MSLCM_DK2004.h" +#include #include "MSMoveReminder.h" -#include "MSPerson.h" +#include #include "MSPersonControl.h" +#include "MSContainer.h" +#include "MSContainerControl.h" #include "MSLane.h" #include "MSVehicle.h" #include "MSEdge.h" @@ -93,6 +97,10 @@ #define BUS_STOP_OFFSET 0.5 +#define CRLL_LOOK_AHEAD 5 + +// @todo Calibrate with real-world values / make configurable +#define DIST_TO_STOPLINE_EXPECT_PRIORITY 1.0 // =========================================================================== // static value definitions @@ -141,10 +149,21 @@ * methods of MSVehicle::Influencer * ----------------------------------------------------------------------- */ #ifndef NO_TRACI -MSVehicle::Influencer::Influencer() - : mySpeedAdaptationStarted(true), myConsiderSafeVelocity(true), - myConsiderMaxAcceleration(true), myConsiderMaxDeceleration(true), - myAmVTDControlled(false) {} +MSVehicle::Influencer::Influencer() : + mySpeedAdaptationStarted(true), + myConsiderSafeVelocity(true), + myConsiderMaxAcceleration(true), + myConsiderMaxDeceleration(true), + myRespectJunctionPriority(true), + myEmergencyBrakeRedLight(true), + myAmVTDControlled(false), + myLastVTDAccess(-TIME2STEPS(20)), + myStrategicLC(LC_NOCONFLICT), + myCooperativeLC(LC_NOCONFLICT), + mySpeedGainLC(LC_NOCONFLICT), + myRightDriveLC(LC_NOCONFLICT), + myTraciLaneChangePriority(LCP_URGENT) +{} MSVehicle::Influencer::~Influencer() {} @@ -196,30 +215,96 @@ } -MSVehicle::ChangeRequest -MSVehicle::Influencer::checkForLaneChanges(SUMOTime currentTime, const MSEdge& currentEdge, unsigned int currentLaneIndex) { +int +MSVehicle::Influencer::influenceChangeDecision(const SUMOTime currentTime, const MSEdge& currentEdge, const unsigned int currentLaneIndex, int state) { // remove leading commands which are no longer valid while (myLaneTimeLine.size() == 1 || (myLaneTimeLine.size() > 1 && currentTime > myLaneTimeLine[1].first)) { myLaneTimeLine.erase(myLaneTimeLine.begin()); } + ChangeRequest changeRequest = REQUEST_NONE; // do nothing if the time line does not apply for the current time - if (myLaneTimeLine.size() < 2 || currentTime < myLaneTimeLine[0].first) { - return REQUEST_NONE; + if (myLaneTimeLine.size() >= 2 && currentTime >= myLaneTimeLine[0].first) { + const unsigned int destinationLaneIndex = myLaneTimeLine[1].second; + if (destinationLaneIndex < (unsigned int)currentEdge.getLanes().size()) { + if (currentLaneIndex > destinationLaneIndex) { + changeRequest = REQUEST_RIGHT; + } else if (currentLaneIndex < destinationLaneIndex) { + changeRequest = REQUEST_LEFT; + } else { + changeRequest = REQUEST_HOLD; + } + } } - unsigned int destinationLaneIndex = myLaneTimeLine[1].second; - if ((unsigned int)currentEdge.getLanes().size() <= destinationLaneIndex) { - return REQUEST_NONE; - } - if (currentLaneIndex > destinationLaneIndex) { - return REQUEST_RIGHT; - } else if (currentLaneIndex < destinationLaneIndex) { - return REQUEST_LEFT; + // check whether the current reason shall be canceled / overridden + if ((state & LCA_WANTS_LANECHANGE_OR_STAY) != 0) { + // flags for the current reason + LaneChangeMode mode = LC_NEVER; + if ((state & LCA_STRATEGIC) != 0) { + mode = myStrategicLC; + } else if ((state & LCA_COOPERATIVE) != 0) { + mode = myCooperativeLC; + } else if ((state & LCA_SPEEDGAIN) != 0) { + mode = mySpeedGainLC; + } else if ((state & LCA_KEEPRIGHT) != 0) { + mode = myRightDriveLC; + } else if ((state & LCA_TRACI) != 0) { + mode = LC_NEVER; + } else { + WRITE_WARNING("Lane change model did not provide a reason for changing (state=" + toString(state) + ", time=" + time2string(currentTime) + "\n"); + } + if (mode == LC_NEVER) { + // cancel all lcModel requests + state &= ~LCA_WANTS_LANECHANGE_OR_STAY; + state &= ~LCA_URGENT; + } else if (mode == LC_NOCONFLICT && changeRequest != REQUEST_NONE) { + if ( + ((state & LCA_LEFT) != 0 && changeRequest != REQUEST_LEFT) || + ((state & LCA_RIGHT) != 0 && changeRequest != REQUEST_RIGHT) || + ((state & LCA_STAY) != 0 && changeRequest != REQUEST_HOLD)) { + // cancel conflicting lcModel request + state &= ~LCA_WANTS_LANECHANGE_OR_STAY; + state &= ~LCA_URGENT; + } + } else if (mode == LC_ALWAYS) { + // ignore any TraCI requests + return state; + } + } + // apply traci requests + if (changeRequest == REQUEST_NONE) { + return state; } else { - return REQUEST_HOLD; + state |= LCA_TRACI; + // security checks + if ((myTraciLaneChangePriority == LCP_ALWAYS) + || (myTraciLaneChangePriority == LCP_NOOVERLAP && (state & LCA_OVERLAPPING) == 0)) { + state &= ~(LCA_BLOCKED | LCA_OVERLAPPING); + } + if (changeRequest != REQUEST_HOLD && myTraciLaneChangePriority != LCP_OPPORTUNISTIC) { + state |= LCA_URGENT; + } + switch (changeRequest) { + case REQUEST_HOLD: + return state | LCA_STAY; + case REQUEST_LEFT: + return state | LCA_LEFT; + case REQUEST_RIGHT: + return state | LCA_RIGHT; + default: + throw ProcessError("should not happen"); + } } } +SUMOReal +MSVehicle::Influencer::changeRequestRemainingSeconds(const SUMOTime currentTime) const { + assert(myLaneTimeLine.size() >= 2); + assert(currentTime >= myLaneTimeLine[0].first); + return STEPS2TIME(myLaneTimeLine[1].first - currentTime); +} + + void MSVehicle::Influencer::setConsiderSafeVelocity(bool value) { myConsiderSafeVelocity = value; @@ -239,6 +324,28 @@ void +MSVehicle::Influencer::setRespectJunctionPriority(bool value) { + myRespectJunctionPriority = value; +} + + +void +MSVehicle::Influencer::setEmergencyBrakeRedLight(bool value) { + myEmergencyBrakeRedLight = value; +} + + +void +MSVehicle::Influencer::setLaneChangeMode(int value) { + myStrategicLC = (LaneChangeMode)(value & (1 + 2)); + myCooperativeLC = (LaneChangeMode)((value & (4 + 8)) >> 2); + mySpeedGainLC = (LaneChangeMode)((value & (16 + 32)) >> 4); + myRightDriveLC = (LaneChangeMode)((value & (64 + 128)) >> 6); + myTraciLaneChangePriority = (TraciLaneChangePriority)((value & (256 + 512)) >> 8); +} + + +void MSVehicle::Influencer::postProcessVTD(MSVehicle* v) { v->onRemovalFromNet(MSMoveReminder::NOTIFICATION_TELEPORT); v->getLane()->removeVehicle(v, MSMoveReminder::NOTIFICATION_TELEPORT); @@ -250,7 +357,7 @@ myVTDPos = myVTDLane->getLength(); } myVTDLane->forceVehicleInsertion(v, myVTDPos); - v->getBestLanes(); + v->updateBestLanes(); myAmVTDControlled = false; } @@ -283,58 +390,51 @@ } -MSVehicle::MSVehicle(SUMOVehicleParameter* pars, - const MSRoute* route, - const MSVehicleType* type, - SUMOReal speedFactor, - int /*vehicleIndex*/) : +MSVehicle::MSVehicle(SUMOVehicleParameter* pars, const MSRoute* route, + const MSVehicleType* type, const SUMOReal speedFactor) : MSBaseVehicle(pars, route, type, speedFactor), myWaitingTime(0), myState(0, 0), // myLane(0), myLastBestLanesEdge(0), + myLastBestLanesInternalLane(0), myPersonDevice(0), + myContainerDevice(0), myAcceleration(0), mySignals(0), myAmOnNet(false), myAmRegisteredAsWaitingForPerson(false), + myAmRegisteredAsWaitingForContainer(false), myHaveToWaitOnNextLink(false), + myCachedPosition(Position::INVALID), myEdgeWeights(0) #ifndef NO_TRACI , myInfluencer(0) #endif { - for (std::vector::iterator i = pars->stops.begin(); i != pars->stops.end(); ++i) { - if (!addStop(*i)) { - throw ProcessError("Stop for vehicle '" + pars->id + - "' on lane '" + i->lane + "' is not downstream the current route."); + if ((*myCurrEdge)->getPurpose() != MSEdge::EDGEFUNCTION_DISTRICT) { + if (pars->departLaneProcedure == DEPART_LANE_GIVEN) { + if ((*myCurrEdge)->getDepartLane(*this) == 0) { + throw ProcessError("Invalid departlane definition for vehicle '" + pars->id + "'."); + } + } else { + if ((*myCurrEdge)->allowedLanes(type->getVehicleClass()) == 0) { + throw ProcessError("Vehicle '" + pars->id + "' is not allowed to depart on any lane of its first edge."); + } } - } - for (std::vector::const_iterator i = route->getStops().begin(); i != route->getStops().end(); ++i) { - if (!addStop(*i)) { - throw ProcessError("Stop for vehicle '" + pars->id + - "' on lane '" + i->lane + "' is not downstream the current route."); + if (pars->departSpeedProcedure == DEPART_SPEED_GIVEN && pars->departSpeed > type->getMaxSpeed()) { + throw ProcessError("Departure speed for vehicle '" + pars->id + + "' is too high for the vehicle type '" + type->getID() + "'."); } } - const MSLane* const depLane = (*myCurrEdge)->getDepartLane(*this); - if (depLane == 0) { - throw ProcessError("Invalid departlane definition for vehicle '" + pars->id + "'."); - } - if (pars->departSpeedProcedure == DEPART_SPEED_GIVEN && pars->departSpeed > depLane->getSpeedLimit()) { - throw ProcessError("Departure speed for vehicle '" + pars->id + - "' is too high for the departure lane '" + depLane->getID() + "'."); - } - if (pars->departSpeedProcedure == DEPART_SPEED_GIVEN && pars->departSpeed > type->getMaxSpeed()) { - throw ProcessError("Departure speed for vehicle '" + pars->id + - "' is too high for the vehicle type '" + type->getID() + "'."); - } - myLaneChangeModel = new MSLCM_DK2004(*this); + myLaneChangeModel = MSAbstractLaneChangeModel::build(type->getLaneChangeModel(), *this); myCFVariables = type->getCarFollowModel().createVehicleVariables(); } void MSVehicle::onRemovalFromNet(const MSMoveReminder::Notification reason) { + MSVehicleTransfer::getInstance()->remove(this); workOnMoveReminders(myState.myPos - SPEED2DIST(myState.mySpeed), myState.myPos, myState.mySpeed); for (DriveItemVector::iterator i = myLFLinkLanes.begin(); i != myLFLinkLanes.end(); ++i) { if ((*i).myLink != 0) { @@ -348,13 +448,14 @@ // ------------ interaction with the route bool MSVehicle::hasArrived() const { - return myCurrEdge == myRoute->end() - 1 && myState.myPos > myArrivalPos - POSITION_EPS; + return myCurrEdge == myRoute->end() - 1 && (myStops.empty() || myStops.front().edge != myCurrEdge) + && myState.myPos > myArrivalPos - POSITION_EPS; } bool -MSVehicle::replaceRoute(const MSRoute* newRoute, bool onInit) { - const MSEdgeVector& edges = newRoute->getEdges(); +MSVehicle::replaceRoute(const MSRoute* newRoute, bool onInit, int offset) { + const ConstMSEdgeVector& edges = newRoute->getEdges(); // assert the vehicle may continue (must not be "teleported" or whatever to another position) if (!onInit && !newRoute->contains(*myCurrEdge)) { return false; @@ -364,7 +465,7 @@ if (onInit) { myCurrEdge = newRoute->begin(); } else { - myCurrEdge = find(edges.begin(), edges.end(), *myCurrEdge); + myCurrEdge = find(edges.begin() + offset, edges.end(), *myCurrEdge); } // check whether the old route may be deleted (is not used by anyone else) newRoute->addReference(); @@ -372,23 +473,30 @@ // assign new route myRoute = newRoute; myLastBestLanesEdge = 0; - if (!onInit) { - getBestLanes(true); - } + myLastBestLanesInternalLane = 0; + updateBestLanes(true, onInit ? (*myCurrEdge)->getLanes().front() : 0); // update arrival definition calculateArrivalPos(); // save information that the vehicle was rerouted myNumberReroutes++; MSNet::getInstance()->informVehicleStateListener(this, MSNet::VEHICLE_STATE_NEWROUTE); - // recheck stops + // recheck old stops for (std::list::iterator iter = myStops.begin(); iter != myStops.end();) { - if (find(edges.begin(), edges.end(), &iter->lane->getEdge()) == edges.end()) { + if (find(myCurrEdge, edges.end(), &iter->lane->getEdge()) == edges.end()) { iter = myStops.erase(iter); } else { - iter->edge = find(edges.begin(), edges.end(), &iter->lane->getEdge()); + iter->edge = find(myCurrEdge, edges.end(), &iter->lane->getEdge()); ++iter; } } + // add new stops + for (std::vector::const_iterator i = newRoute->getStops().begin(); i != newRoute->getStops().end(); ++i) { + std::string error; + addStop(*i, error); + if (error != "") { + WRITE_WARNING(error); + } + } return true; } @@ -480,8 +588,19 @@ // ------------ Other getter methods +SUMOReal +MSVehicle::getSlope() const { + if (myLane == 0) { + return 0; + } + const SUMOReal lp = getPositionOnLane(); + const SUMOReal gp = myLane->interpolateLanePosToGeometryPos(lp); + return myLane->getShape().slopeDegreeAtOffset(gp); +} + + Position -MSVehicle::getPosition(SUMOReal offset) const { +MSVehicle::getPosition(const SUMOReal offset) const { if (myLane == 0) { return Position::INVALID; } @@ -490,8 +609,15 @@ shp.move2side(SUMO_const_laneWidth); return shp.positionAtOffset(myLane->interpolateLanePosToGeometryPos(getPositionOnLane() + offset)); } + const bool changingLanes = getLaneChangeModel().isChangingLanes(); + if (offset == 0. && !changingLanes) { + if (myCachedPosition == Position::INVALID) { + myCachedPosition = myLane->geometryPositionAtOffset(myState.myPos); + } + return myCachedPosition; + } Position result = myLane->geometryPositionAtOffset(getPositionOnLane() + offset); - if (getLaneChangeModel().isChangingLanes()) { + if (changingLanes) { const Position other = getLaneChangeModel().getShadowLane()->geometryPositionAtOffset(getPositionOnLane() + offset); Line line = getLaneChangeModel().isLaneChangeMidpointPassed() ? Line(other, result) : Line(result, other); return line.getPositionAtDistance(getLaneChangeModel().getLaneChangeCompletion() * line.length()); @@ -500,15 +626,46 @@ } +const MSEdge* +MSVehicle::getRerouteOrigin() const { + // too close to the next junction, so avoid an emergency brake here + if (myLane != 0 && (myCurrEdge + 1) != myRoute->end() && + myState.myPos > myLane->getLength() - getCarFollowModel().brakeGap(myState.mySpeed, getCarFollowModel().getMaxDecel(), 0.)) { + return *(myCurrEdge + 1); + } +#ifdef HAVE_INTERNAL_LANES + if (myLane != 0) { + return myLane->getInternalFollower(); + } +#endif + return *myCurrEdge; +} + + SUMOReal MSVehicle::getAngle() const { - Position p1 = myLane->getShape().positionAtOffset(myState.pos()); - Position p2 = myFurtherLanes.size() > 0 - ? myFurtherLanes.back()->getShape().positionAtOffset(myFurtherLanes.back()->getPartialOccupatorEnd()) - : myLane->getShape().positionAtOffset(myState.pos() - myType->getLength()); + Position p1; + Position p2; + if (isParking()) { + return -myLane->getShape().rotationDegreeAtOffset(myLane->interpolateLanePosToGeometryPos(getPositionOnLane())); + } + if (getLaneChangeModel().isChangingLanes()) { + // cannot use getPosition() because it already includes the offset to the side and thus messes up the angle + p1 = myLane->geometryPositionAtOffset(myState.myPos); + } else { + p1 = getPosition(); + } + if (myState.myPos >= myType->getLength()) { + // vehicle is fully on the new lane + p2 = myLane->geometryPositionAtOffset(myState.myPos - myType->getLength()); + } else { + p2 = myFurtherLanes.size() > 0 + ? myFurtherLanes.back()->geometryPositionAtOffset(myFurtherLanes.back()->getPartialOccupatorEnd()) + : myLane->getShape().front(); + } SUMOReal result = (p1 != p2 ? - atan2(p1.x() - p2.x(), p2.y() - p1.y()) * 180. / PI : - -myLane->getShape().rotationDegreeAtOffset(getPositionOnLane())); + atan2(p1.x() - p2.x(), p2.y() - p1.y()) * 180. / M_PI : + -myLane->getShape().rotationDegreeAtOffset(myLane->interpolateLanePosToGeometryPos(getPositionOnLane()))); if (getLaneChangeModel().isChangingLanes()) { const SUMOReal angleOffset = 60 / STEPS2TIME(MSGlobals::gLaneChangeDuration) * (getLaneChangeModel().isLaneChangeMidpointPassed() ? 1 - getLaneChangeModel().getLaneChangeCompletion() : getLaneChangeModel().getLaneChangeCompletion()); result += getLaneChangeModel().getLaneChangeDirection() * angleOffset; @@ -519,24 +676,45 @@ // ------------ bool -MSVehicle::addStop(const SUMOVehicleParameter::Stop& stopPar, SUMOTime untilOffset) { +MSVehicle::addStop(const SUMOVehicleParameter::Stop& stopPar, std::string& errorMsg, SUMOTime untilOffset) { Stop stop; stop.lane = MSLane::dictionary(stopPar.lane); + if (!stop.lane->allowsVehicleClass(myType->getVehicleClass())) { + errorMsg = "Vehicle '" + myParameter->id + "' is not allowed to stop on lane '" + stopPar.lane + "'."; + return false; + } stop.busstop = MSNet::getInstance()->getBusStop(stopPar.busstop); + stop.containerstop = MSNet::getInstance()->getContainerStop(stopPar.containerstop); stop.startPos = stopPar.startPos; stop.endPos = stopPar.endPos; stop.duration = stopPar.duration; stop.until = stopPar.until; + stop.timeToBoardNextPerson = 0; + stop.timeToLoadNextContainer = 0; stop.awaitedPersons = stopPar.awaitedPersons; + stop.awaitedContainers = stopPar.awaitedContainers; if (stop.until != -1) { stop.until += untilOffset; } stop.triggered = stopPar.triggered; + stop.containerTriggered = stopPar.containerTriggered; stop.parking = stopPar.parking; stop.reached = false; if (stop.startPos < 0 || stop.endPos > stop.lane->getLength()) { + if (stop.busstop != 0) { + errorMsg = "Bus stop '" + stop.busstop->getID() + "'"; + } else { + errorMsg = "Stop"; + } + errorMsg += " for vehicle '" + myParameter->id + "' on lane '" + stopPar.lane + "' has an invalid position."; return false; } + if (stop.busstop != 0 && myType->getLength() / 2. > stop.endPos - stop.startPos) { + errorMsg = "Bus stop '" + stop.busstop->getID() + "' on lane '" + stopPar.lane + "' is too short for vehicle '" + myParameter->id + "'."; + } + if (stop.containerstop != 0 && myType->getLength() / 2. > stop.endPos - stop.startPos) { + errorMsg = "Container stop '" + stop.containerstop->getID() + "' on lane '" + stopPar.lane + "' is too short for vehicle '" + myParameter->id + "'."; + } stop.edge = find(myCurrEdge, myRoute->end(), &stop.lane->getEdge()); MSRouteIterator prevStopEdge = myCurrEdge; SUMOReal prevStopPos = myState.myPos; @@ -548,6 +726,9 @@ prevStopPos = myStops.back().endPos; iter = myStops.end(); stop.edge = find(prevStopEdge, myRoute->end(), &stop.lane->getEdge()); + if (prevStopEdge == stop.edge && prevStopPos > stop.endPos) { + stop.edge = find(prevStopEdge + 1, myRoute->end(), &stop.lane->getEdge()); + } } } else { if (stopPar.index == STOP_INDEX_FIT) { @@ -570,13 +751,53 @@ } if (stop.edge == myRoute->end() || prevStopEdge > stop.edge || (prevStopEdge == stop.edge && prevStopPos > stop.endPos)) { + if (stop.busstop != 0) { + errorMsg = "Bus stop '" + stop.busstop->getID() + "'"; + } else { + errorMsg = "Stop"; + } + errorMsg += " for vehicle '" + myParameter->id + "' on lane '" + stopPar.lane + "' is not downstream the current route."; return false; } // David.C: //if (!stop.parking && (myCurrEdge == stop.edge && myState.myPos > stop.endPos - getCarFollowModel().brakeGap(myState.mySpeed))) { if (myCurrEdge == stop.edge && myState.myPos > stop.endPos - getCarFollowModel().brakeGap(myState.mySpeed)) { + errorMsg = "Stop for vehicle '" + myParameter->id + "' on lane '" + stopPar.lane + "' is too close to break."; return false; } + if (!hasDeparted() && myCurrEdge == stop.edge) { + SUMOReal pos = -1; + if (myParameter->departPosProcedure == DEPART_POS_GIVEN) { + pos = myParameter->departPos; + if (pos < 0.) { + pos += (*myCurrEdge)->getLength(); + } + } + if (myParameter->departPosProcedure == DEPART_POS_BASE || myParameter->departPosProcedure == DEPART_POS_DEFAULT) { + pos = MIN2(static_cast(getVehicleType().getLength() + POSITION_EPS), (*myCurrEdge)->getLength()); + } + if (pos > stop.endPos) { + if (stop.busstop != 0) { + errorMsg = "Bus stop '" + stop.busstop->getID() + "'"; + } else { + errorMsg = "Stop"; + } + errorMsg += " for vehicle '" + myParameter->id + "' on lane '" + stopPar.lane + "' is behind departPos."; + return false; + } + } + if (iter != myStops.begin()) { + std::list::iterator iter2 = iter; + iter2--; + if (stop.until >= 0 && iter2->until > stop.until) { + if (stop.busstop != 0) { + errorMsg = "Bus stop '" + stop.busstop->getID() + "'"; + } else { + errorMsg = "Stop"; + } + errorMsg += " for vehicle '" + myParameter->id + "' on lane '" + stopPar.lane + "' ends earlier than previous stop."; + } + } myStops.insert(iter, stop); return true; } @@ -596,7 +817,13 @@ bool MSVehicle::isStoppedTriggered() const { - return isStopped() && myStops.begin()->triggered; + return isStopped() && (myStops.begin()->triggered || myStops.begin()->containerTriggered); +} + + +bool +MSVehicle::isStoppedInRange(SUMOReal pos) const { + return isStopped() && myStops.begin()->startPos <= pos && myStops.begin()->endPos >= pos; } @@ -610,8 +837,11 @@ if (stop.reached) { // ok, we have already reached the next stop // any waiting persons may board now - bool boarded = MSNet::getInstance()->getPersonControl().boardAnyWaiting(&myLane->getEdge(), this); + bool boarded = MSNet::getInstance()->getPersonControl().boardAnyWaiting(&myLane->getEdge(), this, &stop); boarded &= stop.awaitedPersons.size() == 0; + // load containers + bool loaded = MSNet::getInstance()->getContainerControl().loadAnyWaiting(&myLane->getEdge(), this, &stop); + loaded &= stop.awaitedContainers.size() == 0; if (boarded) { if (stop.busstop != 0) { const std::vector& persons = myPersonDevice->getPersons(); @@ -626,21 +856,22 @@ myAmRegisteredAsWaitingForPerson = false; } } - if (stop.duration <= 0 && !stop.triggered) { - // we have waited long enough and fulfilled any passenger-requirements - if (stop.busstop != 0) { - // inform bus stop about leaving it - stop.busstop->leaveFrom(this); + if (loaded) { + if (stop.containerstop != 0) { + const std::vector& containers = myContainerDevice->getContainers(); + for (std::vector::const_iterator i = containers.begin(); i != containers.end(); ++i) { + stop.containerstop->removeContainer(*i); + } + } + // the triggering condition has been fulfilled + stop.containerTriggered = false; + if (myAmRegisteredAsWaitingForContainer) { + MSNet::getInstance()->getVehicleControl().unregisterOneWaitingForContainer(); + myAmRegisteredAsWaitingForContainer = false; } - // the current stop is no longer valid - MSNet::getInstance()->getVehicleControl().removeWaiting(&myLane->getEdge(), this); - myStops.pop_front(); - // do not count the stopping time towards gridlock time. - // Other outputs use an independent counter and are not affected. - myWaitingTime = 0; - // maybe the next stop is on the same edge; let's rebuild best lanes - getBestLanes(true); - // continue as wished... + } + if (stop.duration <= 0 && !stop.triggered && !stop.containerTriggered) { + resumeFromStopping(); } else { // we have to wait some more time if (stop.triggered && !myAmRegisteredAsWaitingForPerson) { @@ -648,6 +879,11 @@ MSNet::getInstance()->getVehicleControl().registerOneWaitingForPerson(); myAmRegisteredAsWaitingForPerson = true; } + if (stop.containerTriggered && !myAmRegisteredAsWaitingForContainer) { + // we can only register after waiting for one step. otherwise we might falsely signal a deadlock + MSNet::getInstance()->getVehicleControl().registerOneWaitingForContainer(); + myAmRegisteredAsWaitingForContainer = true; + } stop.duration -= DELTA_T; return 0; } @@ -660,14 +896,27 @@ if (stop.busstop != 0) { // on bus stops, we have to wait for free place if they are in use... endPos = stop.busstop->getLastFreePos(*this); - if (endPos - 5. < stop.busstop->getBeginLanePosition()) { // !!! explicit offset + // at least half the bus has to fit on non-empty bus stops + if (endPos != stop.busstop->getEndLanePosition() && endPos - myType->getLength() / 2. < stop.busstop->getBeginLanePosition()) { busStopsMustHaveSpace = false; } } - if (myState.pos() + getVehicleType().getMinGap() >= endPos - BUS_STOP_OFFSET && busStopsMustHaveSpace) { + bool containerStopsMustHaveSpace = true; + // if the stop is a container stop we check if the vehicle fits into the last free position of the stop + if (stop.containerstop != 0) { + // on container stops, we have to wait for free place if they are in use... + endPos = stop.containerstop->getLastFreePos(*this); + if (endPos != stop.containerstop->getEndLanePosition() && endPos - myType->getLength() / 2. < stop.containerstop->getBeginLanePosition()) { + containerStopsMustHaveSpace = false; + } + } + // we use the same offset for container stops as for bus stops. we might have to change it at some point! + if (myState.pos() + getVehicleType().getMinGap() >= endPos - BUS_STOP_OFFSET && busStopsMustHaveSpace + && containerStopsMustHaveSpace && myLane == stop.lane) { // ok, we may stop (have reached the stop) stop.reached = true; MSNet::getInstance()->getVehicleControl().addWaiting(&myLane->getEdge(), this); + MSNet::getInstance()->informVehicleStateListener(this, MSNet::VEHICLE_STATE_STARTING_STOP); // compute stopping time if (stop.until >= 0) { if (stop.duration == -1) { @@ -680,6 +929,10 @@ // let the bus stop know the vehicle stop.busstop->enter(this, myState.pos() + getVehicleType().getMinGap(), myState.pos() - myType->getLength()); } + if (stop.containerstop != 0) { + // let the container stop know the vehicle + stop.containerstop->enter(this, myState.pos() + getVehicleType().getMinGap(), myState.pos() - myType->getLength()); + } } // decelerate return getCarFollowModel().stopSpeed(this, getSpeed(), endPos - myState.pos()); @@ -689,6 +942,16 @@ } +const ConstMSEdgeVector +MSVehicle::getStopEdges() const { + ConstMSEdgeVector result; + for (std::list::const_iterator iter = myStops.begin(); iter != myStops.end(); ++iter) { + result.push_back(*iter->edge); + } + return result; +} + + void MSVehicle::planMove(const SUMOTime t, const MSVehicle* pred, const SUMOReal lengthsInFront) { planMoveInternal(t, pred, myLFLinkLanes); @@ -762,10 +1025,11 @@ if (!myStops.empty() && &myStops.begin()->lane->getEdge() == &lane->getEdge()) { // we are approaching a stop on the edge; must not drive further const Stop& stop = *myStops.begin(); - SUMOReal stopDist = stop.busstop == 0 ? seen + stop.endPos - lane->getLength() : seen + stop.busstop->getLastFreePos(*this) - POSITION_EPS - lane->getLength(); - SUMOReal stopSpeed = cfModel.stopSpeed(this, getSpeed(), stopDist); + const SUMOReal endPos = stop.busstop == 0 ? stop.endPos : stop.busstop->getLastFreePos(*this); + const SUMOReal stopDist = seen + endPos - lane->getLength(); + const SUMOReal stopSpeed = cfModel.stopSpeed(this, getSpeed(), stopDist); if (lastLink != 0) { - lastLink->adaptLeaveSpeed(stopSpeed); + lastLink->adaptLeaveSpeed(cfModel.stopSpeed(this, vLinkPass, endPos)); } v = MIN2(v, stopSpeed); lfLinks.push_back(DriveProcessItem(v, stopDist)); @@ -774,7 +1038,7 @@ // move to next lane // get the next link used - MSLinkCont::const_iterator link = myLane->succLinkSec(*this, view + 1, *lane, bestLaneConts); + MSLinkCont::const_iterator link = MSLane::succLinkSec(*this, view + 1, *lane, bestLaneConts); // check whether the vehicle is on its final edge if (myCurrEdge + view + 1 == myRoute->end()) { const SUMOReal arrivalSpeed = (myParameter->arrivalSpeedProcedure == ARRIVAL_SPEED_GIVEN ? @@ -790,16 +1054,8 @@ break; } // check whether the lane is a dead end - // @todo: recheck propper value for laneStopOffset based on real-world - // measurements. - // For links that require stopping it is important that vehicles stop close to the stopping line - const SUMOReal laneStopOffset = ((lane->getLength() <= getVehicleType().getMinGap() - || (!lane->isLinkEnd(link) && ( - (*link)->getState() == LINKSTATE_ALLWAY_STOP || (*link)->getState() == LINKSTATE_STOP))) - ? POSITION_EPS : getVehicleType().getMinGap()); - const SUMOReal stopDist = MAX2(SUMOReal(0), seen - laneStopOffset); if (lane->isLinkEnd(link)) { - SUMOReal va = MIN2(cfModel.stopSpeed(this, getSpeed(), stopDist), laneMaxV); + SUMOReal va = MIN2(cfModel.stopSpeed(this, getSpeed(), seen), laneMaxV); if (lastLink != 0) { lastLink->adaptLeaveSpeed(va); } @@ -807,6 +1063,22 @@ lfLinks.push_back(DriveProcessItem(v, seen)); break; } + const bool yellowOrRed = (*link)->getState() == LINKSTATE_TL_RED || + (*link)->getState() == LINKSTATE_TL_REDYELLOW || + (*link)->getState() == LINKSTATE_TL_YELLOW_MAJOR || + (*link)->getState() == LINKSTATE_TL_YELLOW_MINOR; + // We distinguish 3 cases when determining the point at which a vehicle stops: + // - links that require stopping: here the vehicle needs to stop close to the stop line + // to ensure it gets onto the junction in the next step. Othwise the vehicle would 'forget' + // that it already stopped and need to stop again. This is necessary pending implementation of #999 + // - red/yellow light: here the vehicle 'knows' that it will have priority eventually and does not need to stop on a precise spot + // - other types of minor links: the vehicle needs to stop as close to the junction as necessary + // to minimize the time window for passing the junction. If the + // vehicle 'decides' to accelerate and cannot enter the junction in + // the next step, new foes may appear and cause a collision (see #1096) + // - major links: stopping point is irrelevant + const SUMOReal laneStopOffset = yellowOrRed || (*link)->havePriority() ? DIST_TO_STOPLINE_EXPECT_PRIORITY : POSITION_EPS; + const SUMOReal stopDist = MAX2(SUMOReal(0), seen - laneStopOffset); // check whether we need to slow down in order to finish a continuous lane change if (getLaneChangeModel().isChangingLanes()) { if ( // slow down to finish lane change before a turn lane @@ -820,58 +1092,68 @@ } } - const bool yellowOrRed = (*link)->getState() == LINKSTATE_TL_RED || - (*link)->getState() == LINKSTATE_TL_YELLOW_MAJOR || - (*link)->getState() == LINKSTATE_TL_YELLOW_MINOR; - const bool setRequest = v > 0; // even if red, if we cannot break we should issue a request - const SUMOReal vLinkWait = MIN2(v, cfModel.stopSpeed(this, getSpeed(), stopDist)); - if (yellowOrRed && seen > cfModel.brakeGap(myState.mySpeed) - myState.mySpeed * cfModel.getHeadwayTime()) { + bool setRequest = v > 0; // even if red, if we cannot break we should issue a request + SUMOReal vLinkWait = MIN2(v, cfModel.stopSpeed(this, getSpeed(), stopDist)); + const SUMOReal brakeDist = cfModel.brakeGap(myState.mySpeed) - myState.mySpeed * cfModel.getHeadwayTime(); + if (yellowOrRed && seen >= brakeDist) { // the vehicle is able to brake in front of a yellow/red traffic light - lfLinks.push_back(DriveProcessItem(*link, vLinkWait, vLinkWait, false, t + TIME2STEPS(seen / vLinkWait), vLinkWait, 0, SUMOTime_MAX, stopDist)); - // XXX division by 0 (vLinkWait) should be avoided + lfLinks.push_back(DriveProcessItem(*link, vLinkWait, vLinkWait, false, t + TIME2STEPS(seen / MAX2(vLinkWait, NUMERICAL_EPS)), vLinkWait, 0, SUMOTime_MAX, seen)); //lfLinks.push_back(DriveProcessItem(0, vLinkWait, vLinkWait, false, 0, 0, stopDist)); break; } #ifdef HAVE_INTERNAL_LANES // we want to pass the link but need to check for foes on internal lanes - const MSLink::LinkLeaders linkLeaders = (*link)->getLeaderInfo(seen - getVehicleType().getMinGap()); + const MSLink::LinkLeaders linkLeaders = (*link)->getLeaderInfo(seen, getVehicleType().getMinGap()); for (MSLink::LinkLeaders::const_iterator it = linkLeaders.begin(); it != linkLeaders.end(); ++it) { // the vehicle to enter the junction first has priority - const MSVehicle* leader = it->first; - if (leader->myLinkLeaders.count(getID()) == 0) { + const MSVehicle* leader = (*it).vehAndGap.first; + if (leader == 0) { + // leader is a pedestrian. Passing 'this' as a dummy. + //std::cout << SIMTIME << " veh=" << getID() << " is blocked on link to " << (*link)->getViaLaneOrLane()->getID() << " by pedestrian. dist=" << it->distToCrossing << "\n"; + adaptToLeader(std::make_pair(this, -1), seen, lastLink, lane, v, vLinkPass, it->distToCrossing); + } else if (leader->myLinkLeaders[(*link)->getJunction()].count(getID()) == 0) { // leader isn't already following us, now we follow it - myLeaderForLink[*link] = leader->getID(); - myLinkLeaders.insert(leader->getID()); - adaptToLeader(*it, seen, lastLink, lane, v, vLinkPass); - if (view > 0) { + myLinkLeaders[(*link)->getJunction()].insert(leader->getID()); + adaptToLeader(it->vehAndGap, seen, lastLink, lane, v, vLinkPass, it->distToCrossing); + if (lastLink != 0) { // we are not yet on the junction with this linkLeader. - // at least we can drive up to the junction and stop there - v = MAX2(v, vLinkWait); + // at least we can drive up to the previous link and stop there + v = MAX2(v, lastLink->myVLinkWait); + } + // if blocked by a leader from the same lane we must yield our request + if (v < SUMO_const_haltingSpeed && leader->getLane()->getLogicalPredecessorLane() == myLane->getLogicalPredecessorLane()) { + setRequest = false; } } } + // if this is the link between two internal lanes we may have to slow down for pedestrians + vLinkWait = MIN2(vLinkWait, v); #endif if (lastLink != 0) { lastLink->adaptLeaveSpeed(laneMaxV); } SUMOReal arrivalSpeed = vLinkPass; - SUMOTime arrivalTime; // vehicles should decelerate when approaching a minor link - if (!(*link)->havePriority() && stopDist > cfModel.getMaxDecel()) { + // - unless they are close enough to have clear visibility and may start to accelerate again + // - and unless they are so close that stopping is impossible (i.e. when a green light turns to yellow when close to the junction) + if (!(*link)->havePriority() && stopDist > cfModel.getMaxDecel() && brakeDist < seen) { // vehicle decelerates just enough to be able to stop if necessary and then accelerates arrivalSpeed = cfModel.getMaxDecel() + cfModel.getMaxAccel(); - const SUMOReal v1 = MAX2(vLinkWait, arrivalSpeed); - // now + time spent decelerating + time spent at full speed - arrivalTime = t + TIME2STEPS((v1 - arrivalSpeed) / cfModel.getMaxDecel() - + (seen - (v1 * v1 - arrivalSpeed * arrivalSpeed) * 0.5 / cfModel.getMaxDecel()) / vLinkWait); - } else { - const SUMOReal accel = (vLinkPass >= v) ? cfModel.getMaxAccel() : -cfModel.getMaxDecel(); - const SUMOReal accelTime = (vLinkPass - v) / accel; - const SUMOReal accelWay = accelTime * (vLinkPass + v) * 0.5; - arrivalTime = t + TIME2STEPS(accelTime + MAX2(SUMOReal(0), seen - accelWay) / vLinkPass); } + // @note intuitively it would make sense to compare arrivalSpeed with getSpeed() instead of v + // however, due to the current position update rule (ticket #860) the vehicle moves with v in this step + const SUMOReal accel = (arrivalSpeed >= v) ? cfModel.getMaxAccel() : -cfModel.getMaxDecel(); + const SUMOReal accelTime = (arrivalSpeed - v) / accel; + const SUMOReal accelWay = accelTime * (arrivalSpeed + v) * 0.5; + const SUMOReal nonAccelWay = MAX2(SUMOReal(0), seen - accelWay); + // will either drive as fast as possible and decelerate as late as possible + // or accelerate as fast as possible and then hold that speed + const SUMOReal nonAccelSpeed = MAX3(v, arrivalSpeed, SUMO_const_haltingSpeed); + // subtract DELTA_T because t is the time at the end of this step and the movement is not carried out yet + const SUMOTime arrivalTime = t - DELTA_T + TIME2STEPS(accelTime + nonAccelWay / nonAccelSpeed); + // compute speed, time if vehicle starts braking now // if stopping is possible, arrivalTime can be arbitrarily large. A small value keeps fractional times (impatience) meaningful SUMOReal arrivalSpeedBraking = 0; @@ -882,8 +1164,10 @@ // we need to handle the mismatch with the discrete dynamics if (seen < v) { arrivalSpeedBraking = arrivalSpeed; // no time left for braking after this step - } else if (2 * seen * -getVehicleType().getCarFollowModel().getMaxDecel() + v * v >= 0) { - arrivalSpeedBraking = estimateSpeedAfterDistance(seen, v, -getVehicleType().getCarFollowModel().getMaxDecel()); + } else if (2 * (seen - v * cfModel.getHeadwayTime()) * -cfModel.getMaxDecel() + v * v >= 0) { + arrivalSpeedBraking = estimateSpeedAfterDistance(seen - v * cfModel.getHeadwayTime(), v, -cfModel.getMaxDecel()); + } else { + arrivalSpeedBraking = cfModel.getMaxDecel(); } // due to discrecte/continuous mismatch we have to ensure that braking actually helps arrivalSpeedBraking = MIN2(arrivalSpeedBraking, arrivalSpeed); @@ -892,7 +1176,7 @@ lfLinks.push_back(DriveProcessItem(*link, v, vLinkWait, setRequest, arrivalTime, arrivalSpeed, arrivalTimeBraking, arrivalSpeedBraking, - stopDist, + seen, estimateLeaveSpeed(*link, vLinkPass))); #ifdef HAVE_INTERNAL_LANES if ((*link)->getViaLane() == 0) { @@ -902,7 +1186,8 @@ #else ++view; #endif - if (!setRequest || ((v <= 0 || seen > dist) && hadNonInternal && seenNonInternal > vehicleLength * 2)) { + // we need to look ahead far enough to see available space for checkRewindLinkLanes + if (!setRequest || ((v <= 0 || seen > dist) && hadNonInternal && seenNonInternal > vehicleLength * CRLL_LOOK_AHEAD)) { break; } // get the following lane @@ -920,23 +1205,17 @@ vLinkPass = MIN2(estimateSpeedAfterDistance(lane->getLength(), v, getVehicleType().getCarFollowModel().getMaxAccel()), laneMaxV); // upper bound lastLink = &lfLinks.back(); } + } void MSVehicle::adaptToLeader(const std::pair leaderInfo, const SUMOReal seen, DriveProcessItem* const lastLink, - const MSLane* const lane, SUMOReal& v, SUMOReal& vLinkPass) const { + const MSLane* const lane, SUMOReal& v, SUMOReal& vLinkPass, + SUMOReal distToCrossing) const { if (leaderInfo.first != 0) { - const MSCFModel& cfModel = getCarFollowModel(); - SUMOReal vsafeLeader = 0; - if (leaderInfo.second >= 0) { - vsafeLeader = cfModel.followSpeed(this, getSpeed(), leaderInfo.second, leaderInfo.first->getSpeed(), leaderInfo.first->getCarFollowModel().getMaxDecel()); - } else { - // the leading, in-lapping vehicle is occupying the complete next lane - // stop before entering this lane - vsafeLeader = cfModel.stopSpeed(this, getSpeed(), seen - lane->getLength() - POSITION_EPS); - } + const SUMOReal vsafeLeader = getSafeFollowSpeed(leaderInfo, seen, lane, distToCrossing); if (lastLink != 0) { lastLink->adaptLeaveSpeed(vsafeLeader); } @@ -946,6 +1225,27 @@ } +SUMOReal +MSVehicle::getSafeFollowSpeed(const std::pair leaderInfo, + const SUMOReal seen, const MSLane* const lane, SUMOReal distToCrossing) const { + assert(leaderInfo.first != 0); + const MSCFModel& cfModel = getCarFollowModel(); + SUMOReal vsafeLeader = 0; + if (leaderInfo.second >= 0) { + vsafeLeader = cfModel.followSpeed(this, getSpeed(), leaderInfo.second, leaderInfo.first->getSpeed(), leaderInfo.first->getCarFollowModel().getMaxDecel()); + } else { + // the leading, in-lapping vehicle is occupying the complete next lane + // stop before entering this lane + vsafeLeader = cfModel.stopSpeed(this, getSpeed(), seen - lane->getLength() - POSITION_EPS); + } + if (distToCrossing >= 0) { + // drive up to the crossing point with the current link leader + vsafeLeader = MAX2(vsafeLeader, cfModel.stopSpeed(this, getSpeed(), distToCrossing)); + } + return vsafeLeader; +} + + bool MSVehicle::executeMove() { #ifdef DEBUG_VEHICLE_GUI_SELECTION @@ -953,8 +1253,12 @@ int bla = 0; } #endif - // get vsafe - SUMOReal vSafe = 0; + // get safe velocities from DriveProcessItems + SUMOReal vSafe = 0; // maximum safe velocity + SUMOReal vSafeMin = 0; // minimum safe velocity + // the distance to a link which should either be crossed this step or in + // front of which we need to stop + SUMOReal vSafeMinDist = 0; myHaveToWaitOnNextLink = false; #ifndef NO_TRACI if (myInfluencer != 0) { @@ -966,8 +1270,6 @@ assert(myLFLinkLanes.size() != 0 || (myInfluencer != 0 && myInfluencer->isVTDControlled())); DriveItemVector::iterator i; - bool braking = false; - bool lastWasGreenCont = false; for (i = myLFLinkLanes.begin(); i != myLFLinkLanes.end(); ++i) { MSLink* link = (*i).myLink; // the vehicle must change the lane on one of the next lanes @@ -978,33 +1280,50 @@ const SUMOReal brakeGap = getCarFollowModel().brakeGap(myState.mySpeed) - getCarFollowModel().getHeadwayTime() * myState.mySpeed; if (yellow && ((*i).myDistance > brakeGap || myState.mySpeed < ACCEL2SPEED(getCarFollowModel().getMaxDecel()))) { vSafe = (*i).myVLinkWait; - braking = true; - lastWasGreenCont = false; + myHaveToWaitOnNextLink = true; link->removeApproaching(this); break; } // - const bool opened = yellow || link->opened((*i).myArrivalTime, (*i).myArrivalSpeed, (*i).getLeaveSpeed(), - getVehicleType().getLengthWithGap(), getImpatience(), getCarFollowModel().getMaxDecel(), getWaitingTime()); +#ifdef NO_TRACI + const bool influencerPrio = false; +#else + const bool influencerPrio = (myInfluencer != 0 && !myInfluencer->getRespectJunctionPriority()); +#endif + const bool opened = yellow || influencerPrio || + link->opened((*i).myArrivalTime, (*i).myArrivalSpeed, (*i).getLeaveSpeed(), + getVehicleType().getLength(), getImpatience(), + getCarFollowModel().getMaxDecel(), getWaitingTime()); // vehicles should decelerate when approaching a minor link - // XXX check if this is still necessary - if (opened && !lastWasGreenCont && !link->havePriority() && (*i).myDistance > getCarFollowModel().getMaxDecel()) { - vSafe = (*i).myVLinkWait; - braking = true; - lastWasGreenCont = false; - if (ls == LINKSTATE_EQUAL) { - link->removeApproaching(this); + if (opened && !influencerPrio && !link->havePriority() && !link->lastWasContMajor() && !link->isCont()) { + if ((*i).myDistance > getCarFollowModel().getMaxDecel()) { + vSafe = (*i).myVLinkWait; + myHaveToWaitOnNextLink = true; + if (ls == LINKSTATE_EQUAL) { + link->removeApproaching(this); + } + break; // could be revalidated + } else { + // past the point of no return. we need to drive fast enough + // to make it across the link. However, minor slowdowns + // should be permissible to follow leading traffic safely + // There is a problem in subsecond simulation: If we cannot + // make it across the minor link in one step, new traffic + // could appear on a major foe link and cause a collision + vSafeMin = MIN2((SUMOReal) DIST2SPEED(myLane->getLength() - getPositionOnLane() + POSITION_EPS), (*i).myVLinkPass); + vSafeMinDist = myLane->getLength() - getPositionOnLane(); } - break; // could be revalidated } // have waited; may pass if opened... if (opened) { vSafe = (*i).myVLinkPass; - lastWasGreenCont = link->isCont() && (ls == LINKSTATE_TL_GREEN_MAJOR); + if (vSafe < getCarFollowModel().getMaxDecel() && vSafe <= (*i).myVLinkWait && vSafe < getCarFollowModel().maxNextSpeed(getSpeed(), this)) { + // this vehicle is probably not gonna drive accross the next junction (heuristic) + myHaveToWaitOnNextLink = true; + } } else { - lastWasGreenCont = false; vSafe = (*i).myVLinkWait; - braking = true; + myHaveToWaitOnNextLink = true; if (ls == LINKSTATE_EQUAL) { link->removeApproaching(this); } @@ -1012,18 +1331,37 @@ } } else { vSafe = (*i).myVLinkWait; - braking = vSafe < getSpeed(); + if (vSafe < getSpeed()) { + myHaveToWaitOnNextLink = true; + } break; } } - if (braking) { + if (vSafe + NUMERICAL_EPS < vSafeMin) { + // cannot drive across a link so we need to stop before it + vSafe = MIN2(vSafe, getCarFollowModel().stopSpeed(this, getSpeed(), vSafeMinDist)); + vSafeMin = 0; myHaveToWaitOnNextLink = true; } - - SUMOReal vNext = getCarFollowModel().moveHelper(this, vSafe); - //if (vNext > vSafe) { + // vehicles inside a roundabout should maintain their requests + if (myLane->getEdge().isRoundabout()) { + myHaveToWaitOnNextLink = false; + } + + // XXX braking due to lane-changing is not registered + bool braking = vSafe < getSpeed(); + // apply speed reduction due to dawdling / lane changing but ensure minimum safe speed + SUMOReal vNext = MAX2(getCarFollowModel().moveHelper(this, vSafe), vSafeMin); + + // vNext may be higher than vSafe without implying a bug: + // - when approaching a green light that suddenly switches to yellow + // - when using unregulated junctions + // - when using tau < step-size + // - when using unsafe car following models + // - when using TraCI and some speedMode / laneChangeMode settings + //if (vNext > vSafe + NUMERICAL_EPS) { // WRITE_WARNING("vehicle '" + getID() + "' cannot brake hard enough to reach safe speed " - // + toString(vSafe) + ", moving at " + toString(vNext) + " instead. time=" + // + toString(vSafe, 4) + ", moving at " + toString(vNext, 4) + " instead. time=" // + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); //} vNext = MAX2(vNext, (SUMOReal) 0.); @@ -1044,9 +1382,6 @@ } else { myWaitingTime = 0; } - if (myState.mySpeed < vNext) { - braking = false; - } if (braking) { switchOnSignal(VEH_SIGNAL_BRAKELIGHT); } else { @@ -1056,9 +1391,10 @@ const SUMOReal pos = myState.myPos; // update position and speed - myAcceleration = vNext - myState.mySpeed; + myAcceleration = SPEED2ACCEL(vNext - myState.mySpeed); myState.myPos += SPEED2DIST(vNext); myState.mySpeed = vNext; + myCachedPosition = Position::INVALID; std::vector passedLanes; for (std::vector::reverse_iterator i = myFurtherLanes.rbegin(); i != myFurtherLanes.rend(); ++i) { passedLanes.push_back(*i); @@ -1067,6 +1403,7 @@ passedLanes.push_back(myLane); } bool moved = false; + std::string emergencyReason = " for unknown reasons"; // move on lane(s) if (myState.myPos <= myLane->getLength()) { // we are staying at our lane @@ -1086,8 +1423,20 @@ // proceed to the next lane if (link != 0) { approachedLane = link->getViaLaneOrLane(); +#ifndef NO_TRACI + if (myInfluencer == 0 || myInfluencer->getEmergencyBrakeRedLight()) { +#endif + if (link->getState() == LINKSTATE_TL_RED) { + emergencyReason = " because of a red traffic light"; + break; + } +#ifndef NO_TRACI + } +#endif } else { + emergencyReason = " because there is no connection to the next edge"; approachedLane = 0; + break; } if (approachedLane != myLane && approachedLane != 0) { myState.myPos -= myLane->getLength(); @@ -1103,10 +1452,9 @@ } } #ifdef HAVE_INTERNAL_LANES - // erase leader for the past link - if (myLeaderForLink.find(link) != myLeaderForLink.end()) { - myLinkLeaders.erase(myLeaderForLink[link]); - myLeaderForLink.erase(link); + // erase leaders when past the junction + if (link->getViaLane() == 0) { + myLinkLeaders[link->getJunction()].clear(); } #endif moved = true; @@ -1127,15 +1475,16 @@ if (myInfluencer != 0 && myInfluencer->isVTDControlled()) { myWaitingTime = 0; -// myInfluencer->setVTDControlled(false); return false; } if (!hasArrived() && !myLane->getEdge().isVaporizing()) { if (myState.myPos > myLane->getLength()) { - WRITE_WARNING("Vehicle '" + getID() + "' performs emergency stop on lane '" + myLane->getID() + " at position " + - toString(myState.myPos) + " (decel=" + toString(myAcceleration - myState.mySpeed) + "), time=" - + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); + WRITE_WARNING("Vehicle '" + getID() + "' performs emergency stop at the end of lane '" + myLane->getID() + + emergencyReason + + " (decel=" + toString(myAcceleration - myState.mySpeed) + + "), time=" + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); + MSNet::getInstance()->getVehicleControl().registerEmergencyStop(); myState.myPos = myLane->getLength(); myState.mySpeed = 0; } @@ -1148,11 +1497,16 @@ ++i; } } + updateBestLanes(); + // bestLanes need to be updated before lane changing starts if (getLaneChangeModel().isChangingLanes()) { getLaneChangeModel().continueLaneChangeManeuver(moved); } - setBlinkerInformation(); + setBlinkerInformation(); // needs updated bestLanes + // State needs to be reset for all vehicles before the next call to MSEdgeControl::changeLanes + getLaneChangeModel().prepareStep(); } + // State needs to be reset for all vehicles before the next call to MSEdgeControl::changeLanes return moved; } @@ -1162,7 +1516,7 @@ SUMOReal lengths = 0; const MSLane::VehCont& vehs = l->getVehiclesSecure(); for (MSLane::VehCont::const_iterator i = vehs.begin(); i != vehs.end(); ++i) { - if ((*i)->getSpeed() < SUMO_const_haltingSpeed) { + if ((*i)->getSpeed() < SUMO_const_haltingSpeed && !(*i)->getLane()->getEdge().isRoundabout()) { foundStopped = true; const SUMOReal ret = (*i)->getPositionOnLane() - (*i)->getVehicleType().getLengthWithGap() - lengths; l->releaseVehicles(); @@ -1186,7 +1540,7 @@ } #endif #ifdef HAVE_INTERNAL_LANES - if (MSGlobals::gUsingInternalLanes) { + if (MSGlobals::gUsingInternalLanes && !myLane->getEdge().isRoundabout()) { bool hadVehicle = false; SUMOReal seenSpace = -lengthsInFront; @@ -1204,11 +1558,11 @@ // get the next lane, determine whether it is an internal lane const MSLane* approachedLane = item.myLink->getViaLane(); if (approachedLane != 0) { - if (item.myLink->isCrossing()/* && item.myLink->willHaveBlockedFoe()*/) { - seenSpace = seenSpace - approachedLane->getVehLenSum(); + if (item.myLink->hasFoes()/* && item.myLink->willHaveBlockedFoe()*/) { + seenSpace = seenSpace - approachedLane->getBruttoVehLenSum(); hadVehicle |= approachedLane->getVehicleNumber() != 0; } else { - seenSpace = seenSpace + getSpaceTillLastStanding(approachedLane, foundStopped);// - approachedLane->getVehLenSum() + approachedLane->getLength(); + seenSpace = seenSpace + getSpaceTillLastStanding(approachedLane, foundStopped);// - approachedLane->getBruttoVehLenSum() + approachedLane->getLength(); hadVehicle |= approachedLane->getVehicleNumber() != 0; } item.availableSpace = seenSpace; @@ -1224,7 +1578,7 @@ item.availableSpace = MAX2(seenSpace, seenSpace + approachedLane->getPartialOccupatorEnd() + last->getCarFollowModel().brakeGap(last->getSpeed())); hadVehicle = true; /// XXX spaceTillLastStanding should already be covered by getPartialOccupatorEnd() - seenSpace = seenSpace + getSpaceTillLastStanding(approachedLane, foundStopped);// - approachedLane->getVehLenSum() + approachedLane->getLength(); + seenSpace = seenSpace + getSpaceTillLastStanding(approachedLane, foundStopped);// - approachedLane->getBruttoVehLenSum() + approachedLane->getLength(); /// XXX why not check BRAKELIGHT? if (last->myHaveToWaitOnNextLink) { foundStopped = true; @@ -1238,7 +1592,7 @@ const SUMOReal lastBrakeGap = last->getCarFollowModel().brakeGap(approachedLane->getLastVehicle()->getSpeed()); const SUMOReal lastGap = last->getPositionOnLane() - last->getVehicleType().getLengthWithGap() + lastBrakeGap - last->getSpeed() * last->getCarFollowModel().getHeadwayTime(); item.availableSpace = MAX2(seenSpace, seenSpace + lastGap); - seenSpace += getSpaceTillLastStanding(approachedLane, foundStopped);// - approachedLane->getVehLenSum() + approachedLane->getLength(); + seenSpace += getSpaceTillLastStanding(approachedLane, foundStopped);// - approachedLane->getBruttoVehLenSum() + approachedLane->getLength(); } else { seenSpace += getSpaceTillLastStanding(approachedLane, foundStopped); item.availableSpace = seenSpace; @@ -1260,9 +1614,13 @@ // check which links allow continuation and add pass available to the previous item for (int i = (int)(lfLinks.size() - 1); i > 0; --i) { DriveProcessItem& item = lfLinks[i - 1]; - const bool opened = item.myLink != 0 && (item.myLink->havePriority() || + const bool canLeaveJunction = item.myLink->getViaLane() == 0 || lfLinks[i].mySetRequest; + const bool opened = item.myLink != 0 && canLeaveJunction && (item.myLink->havePriority() || +#ifndef NO_TRACI + (myInfluencer != 0 && !myInfluencer->getRespectJunctionPriority()) || +#endif item.myLink->opened(item.myArrivalTime, item.myArrivalSpeed, - item.getLeaveSpeed(), getVehicleType().getLengthWithGap(), + item.getLeaveSpeed(), getVehicleType().getLength(), getImpatience(), getCarFollowModel().getMaxDecel(), getWaitingTime())); bool allowsContinuation = item.myLink == 0 || item.myLink->isCont() || !lfLinks[i].hadVehicle || opened; if (!opened && item.myLink != 0) { @@ -1301,7 +1659,7 @@ impatienceCorrection = MAX2(SUMOReal(0), STEPS2TIME(myWaitingTime)); } */ - if (leftSpace < -impatienceCorrection / 10. && item.myLink->isCrossing()) { + if (leftSpace < -impatienceCorrection / 10. && item.myLink->hasFoes()) { removalBegin = i; } //removalBegin = i; @@ -1386,18 +1744,12 @@ ++myCurrEdge; } if (!onTeleporting) { - // may be optimized: compute only, if the current or the next have more than one lane...!!! - getBestLanes(true); activateReminders(MSMoveReminder::NOTIFICATION_JUNCTION); -#ifndef NO_TRACI - if (myInfluencer != 0) { - myLaneChangeModel->requestLaneChange(myInfluencer->checkForLaneChanges(MSNet::getInstance()->getCurrentTimeStep(), **myCurrEdge, getLaneIndex())); - } -#endif } else { activateReminders(MSMoveReminder::NOTIFICATION_TELEPORT); // normal move() isn't called so reset position here myState.myPos = 0; + myCachedPosition = Position::INVALID; } return hasArrived(); } @@ -1407,8 +1759,9 @@ MSVehicle::enterLaneAtLaneChange(MSLane* enteredLane) { myAmOnNet = true; myLane = enteredLane; + myCachedPosition = Position::INVALID; // need to update myCurrentLaneInBestLanes - getBestLanes(); + updateBestLanes(); // switch to and activate the new lane's reminders // keep OldLaneReminders for (std::vector< MSMoveReminder* >::const_iterator rem = enteredLane->getMoveReminders().begin(); rem != enteredLane->getMoveReminders().end(); ++rem) { @@ -1452,22 +1805,18 @@ */ } } -#ifndef NO_TRACI - // check if further changes are necessary - if (myInfluencer != 0) { - myLaneChangeModel->requestLaneChange(myInfluencer->checkForLaneChanges(MSNet::getInstance()->getCurrentTimeStep(), **myCurrEdge, getLaneIndex())); - } -#endif } void MSVehicle::enterLaneAtInsertion(MSLane* enteredLane, SUMOReal pos, SUMOReal speed, MSMoveReminder::Notification notification) { myState = State(pos, speed); + myCachedPosition = Position::INVALID; assert(myState.myPos >= 0); assert(myState.mySpeed >= 0); myWaitingTime = 0; myLane = enteredLane; + myAmOnNet = true; // set and activate the new lane's reminders for (std::vector< MSMoveReminder* >::const_iterator rem = enteredLane->getMoveReminders().begin(); rem != enteredLane->getMoveReminders().end(); ++rem) { addReminder(*rem); @@ -1477,7 +1826,6 @@ if (MSGlobals::gCheckRoutes && !hasValidRoute(msg)) { throw ProcessError("Vehicle '" + getID() + "' has no valid route. " + msg); } - myAmOnNet = true; // build the list of lanes the vehicle is lapping into SUMOReal leftLength = myType->getLength() - pos; MSLane* clane = enteredLane; @@ -1520,6 +1868,15 @@ if (reason >= MSMoveReminder::NOTIFICATION_TELEPORT) { myAmOnNet = false; } + if (reason != MSMoveReminder::NOTIFICATION_PARKING && resumeFromStopping()) { + WRITE_WARNING("Vehicle '" + getID() + "' aborts stop."); + } + if (reason != MSMoveReminder::NOTIFICATION_PARKING && reason != MSMoveReminder::NOTIFICATION_LANE_CHANGE) { + while (!myStops.empty() && myStops.front().edge == myCurrEdge) { + WRITE_WARNING("Vehicle '" + getID() + "' skips stop on lane '" + myStops.front().lane->getID() + "'."); + myStops.pop_front(); + } + } } @@ -1536,35 +1893,84 @@ const std::vector& -MSVehicle::getBestLanes(bool forceRebuild, MSLane* startLane) const { +MSVehicle::getBestLanes() const { + return *myBestLanes.begin(); +} + + +void +MSVehicle::updateBestLanes(bool forceRebuild, const MSLane* startLane) { #ifdef DEBUG_VEHICLE_GUI_SELECTION if (gSelected.isSelected(GLO_VEHICLE, static_cast(this)->getGlID())) { int bla = 0; myLastBestLanesEdge = 0; } #endif - if (startLane == 0) { startLane = myLane; } assert(startLane != 0); - // update occupancy and current lane index, only, if the vehicle has not moved to a new lane - // (never for internal lanes) - if ((myLastBestLanesEdge == &startLane->getEdge() && !forceRebuild) || - (startLane->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL && myBestLanes.size() > 0)) { - std::vector& lanes = *myBestLanes.begin(); - std::vector::iterator i; - for (i = lanes.begin(); i != lanes.end(); ++i) { - SUMOReal nextOccupation = 0; - for (std::vector::const_iterator j = (*i).bestContinuations.begin() + 1; j != (*i).bestContinuations.end(); ++j) { - nextOccupation += (*j)->getVehLenSum(); - } - (*i).nextOccupation = nextOccupation; - if ((*i).lane == startLane) { - myCurrentLaneInBestLanes = i; + if (myBestLanes.size() > 0 && !forceRebuild && myLastBestLanesEdge == &startLane->getEdge()) { + updateOccupancyAndCurrentBestLane(startLane); + return; + } + if (startLane->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { + if (myBestLanes.size() == 0 || forceRebuild) { + // rebuilt from previous non-internal lane (may backtrack twice if behind an internal junction) + updateBestLanes(true, startLane->getLogicalPredecessorLane()); + } + if (myLastBestLanesInternalLane == startLane && !forceRebuild) { + return; + } + // adapt best lanes to fit the current internal edge: + // keep the entries that are reachable from this edge + const MSEdge* nextEdge = startLane->getInternalFollower(); + assert(nextEdge->getPurpose() != MSEdge::EDGEFUNCTION_INTERNAL); + for (std::vector >::iterator it = myBestLanes.begin(); it != myBestLanes.end();) { + std::vector& lanes = *it; + assert(lanes.size() > 0); + if (&(lanes[0].lane->getEdge()) == nextEdge) { + // keep those lanes which are successors of internal lanes from the edge of startLane + std::vector oldLanes = lanes; + lanes.clear(); + const std::vector& sourceLanes = startLane->getEdge().getLanes(); + for (std::vector::const_iterator it_source = sourceLanes.begin(); it_source != sourceLanes.end(); ++it_source) { + for (std::vector::iterator it_lane = oldLanes.begin(); it_lane != oldLanes.end(); ++it_lane) { + if ((*it_source)->getLinkCont()[0]->getLane() == (*it_lane).lane) { + lanes.push_back(*it_lane); + break; + } + } + } + assert(lanes.size() == startLane->getEdge().getLanes().size()); + // patch invalid bestLaneOffset and updated myCurrentLaneInBestLanes + for (int i = 0; i < (int)lanes.size(); ++i) { + if (i + lanes[i].bestLaneOffset < 0) { + lanes[i].bestLaneOffset = -i; + } + if (i + lanes[i].bestLaneOffset >= (int)lanes.size()) { + lanes[i].bestLaneOffset = (int)lanes.size() - i - 1; + } + assert(i + lanes[i].bestLaneOffset >= 0); + assert(i + lanes[i].bestLaneOffset < (int)lanes.size()); + if (lanes[i].bestContinuations[0] != 0) { + // patch length of bestContinuation to match expectations (only once) + lanes[i].bestContinuations.insert(lanes[i].bestContinuations.begin(), (MSLane*)0); + } + if (startLane->getLinkCont()[0]->getLane() == lanes[i].lane) { + myCurrentLaneInBestLanes = lanes.begin() + i; + } + assert(&(lanes[i].lane->getEdge()) == nextEdge); + } + myLastBestLanesInternalLane = startLane; + updateOccupancyAndCurrentBestLane(startLane); + return; + } else { + // remove passed edges + it = myBestLanes.erase(it); } } - return *myBestLanes.begin(); + assert(false); // should always find the next edge } // start rebuilding myLastBestLanesEdge = &startLane->getEdge(); @@ -1588,7 +1994,7 @@ if (nextStopEdge != 0) { // make sure that the "wrong" lanes get a penalty. (penalty needs to be // large enough to overcome a magic threshold in MSLCM_DK2004.cpp:383) - nextStopPos = MIN2((SUMOReal)nextStopPos, (SUMOReal)(nextStopEdge->getLength() - 2 * POSITION_EPS)); + nextStopPos = MAX2(POSITION_EPS, MIN2((SUMOReal)nextStopPos, (SUMOReal)(nextStopEdge->getLength() - 2 * POSITION_EPS))); } // go forward along the next lanes; @@ -1610,7 +2016,7 @@ q.lane = cl; q.bestContinuations.push_back(cl); q.bestLaneOffset = 0; - q.length = cl->getLength(); + q.length = cl->allowsVehicleClass(myType->getVehicleClass()) ? cl->getLength() : 0; q.allowsContinuation = allowed == 0 || find(allowed->begin(), allowed->end(), cl) != allowed->end(); currentLanes.push_back(q); } @@ -1634,7 +2040,7 @@ progress &= ce != myRoute->end(); /* if(progress) { - progress &= (currentLanes.size()!=1||(*ce)->getLanes().size()!=1); + progress &= (currentLanes.size()!=1||(*ce)->getLanes().size()!=1); } */ } @@ -1676,8 +2082,9 @@ bestLength = (*j).length; } } + // compute index of the best lane (highest length and least offset from the best next lane) + int bestThisIndex = 0; if (bestConnectedLength > 0) { - int bestThisIndex = 0; index = 0; for (std::vector::iterator j = clanes.begin(); j != clanes.end(); ++j, ++index) { LaneQ bestConnectedNext; @@ -1695,25 +2102,15 @@ } else { (*j).length += bestConnectedNext.length; } + (*j).bestLaneOffset = bestConnectedNext.bestLaneOffset; } - if (clanes[bestThisIndex].length < (*j).length || (clanes[bestThisIndex].length == (*j).length && abs(abs(clanes[bestThisIndex].bestLaneOffset > (*j).bestLaneOffset)))) { + if (clanes[bestThisIndex].length < (*j).length || (clanes[bestThisIndex].length == (*j).length && abs(clanes[bestThisIndex].bestLaneOffset) > abs((*j).bestLaneOffset))) { bestThisIndex = index; } copy(bestConnectedNext.bestContinuations.begin(), bestConnectedNext.bestContinuations.end(), back_inserter((*j).bestContinuations)); } - index = 0; - for (std::vector::iterator j = clanes.begin(); j != clanes.end(); ++j, ++index) { - if ((*j).length < clanes[bestThisIndex].length || ((*j).length == clanes[bestThisIndex].length && abs((*j).bestLaneOffset) < abs(clanes[bestThisIndex].bestLaneOffset))) { - (*j).bestLaneOffset = bestThisIndex - index; - } else { - (*j).bestLaneOffset = 0; - } - } - } else { - - int bestThisIndex = 0; int bestNextIndex = 0; int bestDistToNeeded = (int) clanes.size(); index = 0; @@ -1733,33 +2130,37 @@ } clanes[bestThisIndex].length += nextLanes[bestNextIndex].length; copy(nextLanes[bestNextIndex].bestContinuations.begin(), nextLanes[bestNextIndex].bestContinuations.end(), back_inserter(clanes[bestThisIndex].bestContinuations)); - index = 0; - for (std::vector::iterator j = clanes.begin(); j != clanes.end(); ++j, ++index) { - if ((*j).length < clanes[bestThisIndex].length || ((*j).length == clanes[bestThisIndex].length && abs((*j).bestLaneOffset) < abs(clanes[bestThisIndex].bestLaneOffset))) { - (*j).bestLaneOffset = bestThisIndex - index; - } else { - (*j).bestLaneOffset = 0; - } - } } - + // set bestLaneOffset for all lanes + index = 0; + for (std::vector::iterator j = clanes.begin(); j != clanes.end(); ++j, ++index) { + if ((*j).length < clanes[bestThisIndex].length || ((*j).length == clanes[bestThisIndex].length && abs((*j).bestLaneOffset) > abs(clanes[bestThisIndex].bestLaneOffset))) { + (*j).bestLaneOffset = bestThisIndex - index; + } else { + (*j).bestLaneOffset = 0; + } + } } + updateOccupancyAndCurrentBestLane(startLane); + return; +} - // update occupancy and current lane index + +void +MSVehicle::updateOccupancyAndCurrentBestLane(const MSLane* startLane) { std::vector& currLanes = *myBestLanes.begin(); std::vector::iterator i; for (i = currLanes.begin(); i != currLanes.end(); ++i) { SUMOReal nextOccupation = 0; for (std::vector::const_iterator j = (*i).bestContinuations.begin() + 1; j != (*i).bestContinuations.end(); ++j) { - nextOccupation += (*j)->getVehLenSum(); + nextOccupation += (*j)->getBruttoVehLenSum(); } (*i).nextOccupation = nextOccupation; if ((*i).lane == startLane) { myCurrentLaneInBestLanes = i; } } - return *myBestLanes.begin(); } @@ -1774,11 +2175,16 @@ const std::vector& MSVehicle::getBestLanesContinuation(const MSLane* const l) const { + const MSLane* lane = l; + if (lane->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { + // internal edges are not kept inside the bestLanes structure + lane = lane->getLinkCont()[0]->getLane(); + } if (myBestLanes.size() == 0) { return myEmptyLaneVector; } for (std::vector::const_iterator i = myBestLanes[0].begin(); i != myBestLanes[0].end(); ++i) { - if ((*i).lane == l) { + if ((*i).lane == lane) { return (*i).bestContinuations; } } @@ -1786,14 +2192,21 @@ } -bool -MSVehicle::fixContinuations() { - std::vector& bestLaneConts = (*myCurrentLaneInBestLanes).bestContinuations; - if (myLane->getLinkCont()[0]->getLane() != bestLaneConts[1]) { - bestLaneConts.erase(bestLaneConts.begin() + 1, bestLaneConts.end()); - return true; +int +MSVehicle::getBestLaneOffset() const { + if (myBestLanes.empty() || myBestLanes[0].empty()) { + return 0; + } else { + return (*myCurrentLaneInBestLanes).bestLaneOffset; } - return false; +} + + +void +MSVehicle::adaptBestLanesOccupation(int laneIndex, SUMOReal density) { + std::vector& preb = myBestLanes.front(); + assert(laneIndex < (int)preb.size()); + preb[laneIndex].occupation = density + preb[laneIndex].nextOccupation; } @@ -1801,6 +2214,7 @@ MSVehicle::fixPosition() { if (getPositionOnLane() > myLane->getLength()) { myState.myPos = myLane->getLength(); + myCachedPosition = Position::INVALID; return true; } return false; @@ -1828,39 +2242,73 @@ } +std::pair +MSVehicle::getLeader(SUMOReal dist) const { + if (myLane == 0) { + return std::make_pair(static_cast(0), -1); + } + if (dist == 0) { + dist = getCarFollowModel().brakeGap(getSpeed()) + getVehicleType().getMinGap(); + } + const MSVehicle* lead = 0; + const MSLane::VehCont& vehs = myLane->getVehiclesSecure(); + MSLane::VehCont::const_iterator pred = std::find(vehs.begin(), vehs.end(), this) + 1; + if (pred != vehs.end()) { + lead = *pred; + } + myLane->releaseVehicles(); + if (lead != 0) { + return std::make_pair(lead, lead->getPositionOnLane() - lead->getVehicleType().getLength() - getPositionOnLane() - getVehicleType().getMinGap()); + } + const SUMOReal seen = myLane->getLength() - getPositionOnLane(); + const std::vector& bestLaneConts = getBestLanesContinuation(myLane); + return myLane->getLeaderOnConsecutive(dist, seen, getSpeed(), *this, bestLaneConts); +} + + +SUMOReal +MSVehicle::getTimeGap() const { + std::pair leaderInfo = getLeader(); + if (leaderInfo.first == 0 || getSpeed() == 0) { + return -1; + } + return (leaderInfo.second + getVehicleType().getMinGap()) / getSpeed(); +} + + SUMOReal -MSVehicle::getHBEFA_CO2Emissions() const { - return HelpersHBEFA::computeCO2(myType->getEmissionClass(), myState.speed(), myAcceleration); +MSVehicle::getCO2Emissions() const { + return PollutantsInterface::compute(myType->getEmissionClass(), PollutantsInterface::CO2, myState.speed(), myAcceleration, getSlope()); } SUMOReal -MSVehicle::getHBEFA_COEmissions() const { - return HelpersHBEFA::computeCO(myType->getEmissionClass(), myState.speed(), myAcceleration); +MSVehicle::getCOEmissions() const { + return PollutantsInterface::compute(myType->getEmissionClass(), PollutantsInterface::CO, myState.speed(), myAcceleration, getSlope()); } SUMOReal -MSVehicle::getHBEFA_HCEmissions() const { - return HelpersHBEFA::computeHC(myType->getEmissionClass(), myState.speed(), myAcceleration); +MSVehicle::getHCEmissions() const { + return PollutantsInterface::compute(myType->getEmissionClass(), PollutantsInterface::HC, myState.speed(), myAcceleration, getSlope()); } SUMOReal -MSVehicle::getHBEFA_NOxEmissions() const { - return HelpersHBEFA::computeNOx(myType->getEmissionClass(), myState.speed(), myAcceleration); +MSVehicle::getNOxEmissions() const { + return PollutantsInterface::compute(myType->getEmissionClass(), PollutantsInterface::NO_X, myState.speed(), myAcceleration, getSlope()); } SUMOReal -MSVehicle::getHBEFA_PMxEmissions() const { - return HelpersHBEFA::computePMx(myType->getEmissionClass(), myState.speed(), myAcceleration); +MSVehicle::getPMxEmissions() const { + return PollutantsInterface::compute(myType->getEmissionClass(), PollutantsInterface::PM_X, myState.speed(), myAcceleration, getSlope()); } SUMOReal -MSVehicle::getHBEFA_FuelConsumption() const { - return HelpersHBEFA::computeFuel(myType->getEmissionClass(), myState.speed(), myAcceleration); +MSVehicle::getFuelConsumption() const { + return PollutantsInterface::compute(myType->getEmissionClass(), PollutantsInterface::FUEL, myState.speed(), myAcceleration, getSlope()); } @@ -1892,6 +2340,25 @@ } } +void +MSVehicle::addContainer(MSContainer* container) { + if (myContainerDevice == 0) { + myContainerDevice = MSDevice_Container::buildVehicleDevices(*this, myDevices); + myMoveReminders.push_back(std::make_pair(myContainerDevice, 0.)); + } + myContainerDevice->addContainer(container); + if (myStops.size() > 0 && myStops.front().reached && myStops.front().containerTriggered) { + unsigned int numExpected = (unsigned int) myStops.front().awaitedContainers.size(); + if (numExpected != 0) { + myStops.front().awaitedContainers.erase(container->getID()); + numExpected = (unsigned int) myStops.front().awaitedContainers.size(); + } + if (numExpected == 0) { + myStops.front().duration = 0; + } + } +} + unsigned int MSVehicle::getPersonNumber() const { @@ -1899,6 +2366,12 @@ return boarded + myParameter->personNumber; } +unsigned int +MSVehicle::getContainerNumber() const { + unsigned int loaded = myContainerDevice == 0 ? 0 : myContainerDevice->size(); + return loaded + myParameter->containerNumber; +} + void MSVehicle::setBlinkerInformation() { @@ -1910,7 +2383,7 @@ switchOnSignal(VEH_SIGNAL_BLINKER_RIGHT); } else { const MSLane* lane = getLane(); - MSLinkCont::const_iterator link = lane->succLinkSec(*this, 1, *lane, getBestLanesContinuation()); + MSLinkCont::const_iterator link = MSLane::succLinkSec(*this, 1, *lane, getBestLanesContinuation()); if (link != lane->getLinkCont().end() && lane->getLength() - getPositionOnLane() < lane->getVehicleMaxSpeed(this) * (SUMOReal) 7.) { switch ((*link)->getDirection()) { case LINKDIR_TURN: @@ -1941,21 +2414,23 @@ unsigned int MSVehicle::getLaneIndex() const { - std::vector::const_iterator laneP = std::find((*myCurrEdge)->getLanes().begin(), (*myCurrEdge)->getLanes().end(), myLane); - return (unsigned int) std::distance((*myCurrEdge)->getLanes().begin(), laneP); + std::vector::const_iterator laneP = std::find(myLane->getEdge().getLanes().begin(), myLane->getEdge().getLanes().end(), myLane); + return (unsigned int) std::distance(myLane->getEdge().getLanes().begin(), laneP); } -SUMOReal -MSVehicle::getImpatience() const { - return MAX2((SUMOReal)0, MIN2((SUMOReal)1, getVehicleType().getImpatience() + - (MSGlobals::gTimeToGridlock > 0 ? (SUMOReal)myWaitingTime / MSGlobals::gTimeToGridlock : 0))); +void +MSVehicle::setTentativeLaneAndPosition(MSLane* lane, const SUMOReal pos) { + assert(lane != 0); + myLane = lane; + myState.myPos = pos; } #ifndef NO_TRACI bool -MSVehicle::addTraciStop(MSLane* lane, SUMOReal pos, SUMOReal /*radius*/, SUMOTime duration, bool parking, bool triggered) { +MSVehicle::addTraciStop(MSLane* lane, SUMOReal pos, SUMOReal /*radius*/, SUMOTime duration, + bool parking, bool triggered, bool containerTriggered, std::string& errorMsg) { //if the stop exists update the duration for (std::list::iterator iter = myStops.begin(); iter != myStops.end(); iter++) { if (iter->lane == lane && fabs(iter->endPos - pos) < POSITION_EPS) { @@ -1971,25 +2446,57 @@ SUMOVehicleParameter::Stop newStop; newStop.lane = lane->getID(); newStop.busstop = MSNet::getInstance()->getBusStopID(lane, pos); + newStop.containerstop = MSNet::getInstance()->getContainerStopID(lane, pos); newStop.startPos = pos - POSITION_EPS; newStop.endPos = pos; newStop.duration = duration; newStop.until = -1; newStop.triggered = triggered; + newStop.containerTriggered = containerTriggered; newStop.parking = parking; newStop.index = STOP_INDEX_FIT; - return addStop(newStop); + const bool result = addStop(newStop, errorMsg); + if (myLane != 0) { + updateBestLanes(true); + } + return result; } bool MSVehicle::resumeFromStopping() { - Stop& stop = myStops.front(); - if (!stop.reached) { - return false; + if (isStopped()) { + if (myAmRegisteredAsWaitingForPerson) { + MSNet::getInstance()->getVehicleControl().unregisterOneWaitingForPerson(); + myAmRegisteredAsWaitingForPerson = false; + } + if (myAmRegisteredAsWaitingForContainer) { + MSNet::getInstance()->getVehicleControl().unregisterOneWaitingForContainer(); + myAmRegisteredAsWaitingForContainer = false; + } + // we have waited long enough and fulfilled any passenger-requirements + if (myStops.front().busstop != 0) { + // inform bus stop about leaving it + myStops.front().busstop->leaveFrom(this); + } + // we have waited long enough and fulfilled any container-requirements + if (myStops.front().containerstop != 0) { + // inform container stop about leaving it + myStops.front().containerstop->leaveFrom(this); + } + // the current stop is no longer valid + MSNet::getInstance()->getVehicleControl().removeWaiting(&myLane->getEdge(), this); + myStops.pop_front(); + // do not count the stopping time towards gridlock time. + // Other outputs use an independent counter and are not affected. + myWaitingTime = 0; + // maybe the next stop is on the same edge; let's rebuild best lanes + updateBestLanes(true); + // continue as wished... + MSNet::getInstance()->informVehicleStateListener(this, MSNet::VEHICLE_STATE_ENDING_STOP); + return true; } - stop.duration = 0; - return true; + return false; } @@ -2017,6 +2524,20 @@ } +int +MSVehicle::influenceChangeDecision(int state) { + if (hasInfluencer()) { + state = getInfluencer().influenceChangeDecision( + MSNet::getInstance()->getCurrentTimeStep(), + myLane->getEdge(), + getLaneIndex(), + state); + } + return state; +} +#endif + + void MSVehicle::saveState(OutputDevice& out) { MSBaseVehicle::saveState(out); @@ -2033,6 +2554,9 @@ void MSVehicle::loadState(const SUMOSAXAttributes& attrs, const SUMOTime offset) { + if (!attrs.hasAttribute(SUMO_ATTR_POSITION)) { + throw ProcessError("Error: Invalid vehicles in state (may be a meso state)!"); + } unsigned int routeOffset; std::istringstream bis(attrs.getString(SUMO_ATTR_STATE)); bis >> myDeparture; @@ -2043,9 +2567,8 @@ } myState.myPos = attrs.getFloat(SUMO_ATTR_POSITION); myState.mySpeed = attrs.getFloat(SUMO_ATTR_SPEED); + // no need to reset myCachedPosition here since state loading happens directly after creation } -#endif - /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicle.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicle.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicle.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicle.h 2015-04-17 00:20:29.000000000 +0000 @@ -10,12 +10,12 @@ /// @author Michael Behrisch /// @author Axel Wegener /// @date Mon, 12 Mar 2001 -/// @version $Id: MSVehicle.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSVehicle.h 18096 2015-03-17 09:50:59Z behrisch $ /// // Representation of a vehicle in the micro simulation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -59,13 +59,16 @@ class MSVehicleTransfer; class MSAbstractLaneChangeModel; class MSBusStop; +class MSContainerStop; class MSPerson; class MSDevice; class MSEdgeWeightsStorage; class OutputDevice; class Position; class MSDevice_Person; - +class MSDevice_Container; +class MSContainer; +class MSJunction; // =========================================================================== // class definitions @@ -138,11 +141,10 @@ * @param[in] route The vehicle's route * @param[in] type The vehicle's type * @param[in] speedFactor The factor for driven lane's speed limits - * @param[in] vehicleIndex The vehicle's running index * @exception ProcessError If a value is wrong */ MSVehicle(SUMOVehicleParameter* pars, const MSRoute* route, - const MSVehicleType* type, SUMOReal speedFactor, int vehicleIndex); + const MSVehicleType* type, const SUMOReal speedFactor); /// @brief Destructor. virtual ~MSVehicle(); @@ -180,7 +182,7 @@ * @param[in] route The new route to pass * @return Whether the new route was accepted */ - bool replaceRoute(const MSRoute* route, bool onInit = false); + bool replaceRoute(const MSRoute* route, bool onInit = false, int offset = 0); /** @brief Returns whether the vehicle wil pass the given edge @@ -294,7 +296,7 @@ } - /** @brief Returns the vehicle's acceleration + /** @brief Returns the vehicle's acceleration in m/s * @return The acceleration */ SUMOReal getAcceleration() const { @@ -307,14 +309,20 @@ /// @name Other getter methods //@{ + /** @brief Returns the slope of the road at vehicle's position + * @return The slope + */ + SUMOReal getSlope() const; + + /** @brief Return current position (x/y, cartesian) * * If the vehicle's myLane is 0, Position::INVALID. - * @param[in] offset optional offset in longitudianl direction + * @param[in] offset optional offset in longitudinal direction * @return The current position (in cartesian coordinates) * @see myLane */ - Position getPosition(SUMOReal offset = 0) const; + Position getPosition(const SUMOReal offset = 0) const; /** @brief Returns the lane the vehicle is on @@ -333,6 +341,15 @@ } + /** @brief Returns the starting point for reroutes (usually the current edge) + * + * This differs from *myCurrEdge only if the vehicle is on an internal edge or + * very close to the junction + * @return The rerouting start point + */ + const MSEdge* getRerouteOrigin() const; + + /** @brief Returns the SUMOTime waited (speed was lesser than 0.1m/s) * * The value is reset if the vehicle moves faster than 0.1m/s @@ -362,8 +379,6 @@ //@} - class Influencer; - /** Returns true if the two vehicles overlap. */ static bool overlap(const MSVehicle* veh1, const MSVehicle* veh2) { if (veh1->myState.myPos < veh2->myState.myPos) { @@ -412,6 +427,11 @@ void enterLaneAtInsertion(MSLane* enteredLane, SUMOReal pos, SUMOReal speed, MSMoveReminder::Notification notification); + /** @brief set tentative lane and position during insertion to ensure that + * all cfmodels work (some of them require veh->getLane() to return a valid lane) + * Once the vehicle is sucessfully inserted the lane is set again (see enterLaneAtInsertion) + */ + void setTentativeLaneAndPosition(MSLane* lane, const SUMOReal pos); /** @brief Update when the vehicle enters a new lane in the laneChange step. * @@ -451,6 +471,11 @@ }; /** @brief Returns the description of best lanes to use in order to continue the route + * @return The best lanes structure holding matching the current vehicle position and state ahead + */ + const std::vector& getBestLanes() const; + + /** @brief computes the best lanes to use in order to continue the route * * The information is rebuilt if the vehicle is on a different edge than * the one stored in "myLastBestLanesEdge" or "forceRebuild" is true. @@ -458,7 +483,7 @@ * Otherwise, only the density changes on the stored lanes are adapted to * the container only. * - * A rebuild must be done if the vehicle leaves a stop; then, another lane may get + * A rebuild must be done if the vehicle leaves a stop; then, another lane may become * the best one. * * If no starting lane ("startLane") is given, the vehicle's current lane ("myLane") @@ -466,9 +491,8 @@ * * @param[in] forceRebuild Whether the best lanes container shall be rebuilt even if the vehicle's edge has not changed * @param[in] startLane The lane the process shall start at ("myLane" will be used if ==0) - * @return The best lanes structure holding matching the current vehicle position and state ahead */ - virtual const std::vector& getBestLanes(bool forceRebuild = false, MSLane* startLane = 0) const; + void updateBestLanes(bool forceRebuild = false, const MSLane* startLane = 0); /** @brief Returns the subpart of best lanes that describes the vehicle's current lane and their successors @@ -483,9 +507,12 @@ */ const std::vector& getBestLanesContinuation(const MSLane* const l) const; + /// @brief returns the current offset from the best lane + int getBestLaneOffset() const; + + /// @brief update occupation from MSLaneChanger + void adaptBestLanesOccupation(int laneIndex, SUMOReal density); - /// @brief repair errors in bestLanes after changing between internal edges - bool fixContinuations(); /// @} /// @brief repair errors in vehicle position after changing between internal edges @@ -537,6 +564,8 @@ const MSLane* lane; /// @brief (Optional) bus stop if one is assigned to the stop MSBusStop* busstop; + /// @brief (Optional) container stop if one is assigned to the stop + MSContainerStop* containerstop; /// @brief The stopping position start SUMOReal startPos; /// @brief The stopping position end @@ -547,12 +576,21 @@ SUMOTime until; /// @brief whether an arriving person lets the vehicle continue bool triggered; + /// @brief whether an arriving container lets the vehicle continue + bool containerTriggered; /// @brief whether the vehicle is removed from the net while stopping bool parking; /// @brief Information whether the stop has been reached bool reached; /// @brief IDs of persons the vehicle has to wait for until departing std::set awaitedPersons; + /// @brief IDs of containers the vehicle has to wait for until departing + std::set awaitedContainers; + /// @brief The time at which the vehicle is able to board another person + SUMOTime timeToBoardNextPerson; + /// @brief The time at which the vehicle is able to load another container + SUMOTime timeToLoadNextContainer; + }; @@ -562,7 +600,7 @@ * @param[in] stop The stop to add * @return Whether the stop could be added */ - bool addStop(const SUMOVehicleParameter::Stop& stopPar, SUMOTime untilOffset = 0); + bool addStop(const SUMOVehicleParameter::Stop& stopPar, std::string& errorMsg, SUMOTime untilOffset = 0); /** @brief Returns whether the vehicle has to stop somewhere @@ -587,6 +625,10 @@ * @return whether the vehicle is on a triggered stop */ bool isStoppedTriggered() const; + + /** @brief return whether the given position is within range of the current stop + */ + bool isStoppedInRange(SUMOReal pos) const; /// @} bool knowsEdgeTest(MSEdge& edge) const; @@ -595,11 +637,11 @@ /** * Compute distance that will be covered, if the vehicle moves to a given position on its route, * starting at its current position. - * @param destPos: position on the destination edge that shall be reached + * @param destPos: position on the destination edge that shall be reached * @param destEdge: destination edge that shall be reached - * @return distance from the vehicles current position to the destination position, - * or a near infinite real value if the destination position is not contained - * within the vehicles route or the vehicle is not active + * @return distance from the vehicles current position to the destination position, + * or a near infinite real value if the destination position is not contained + * within the vehicles route or the vehicle is not active */ SUMOReal getDistanceToPosition(SUMOReal destPos, const MSEdge* destEdge); @@ -609,9 +651,27 @@ * @todo Describe more detailed * @see Stop * @see MSBusStop + * @see MSContainerStop */ SUMOReal processNextStop(SUMOReal currentVelocity); + /** @brief Returns the leader of the vehicle looking for a fixed distance. + * + * If the distance is not given it is calculated from the brake gap. + * The gap returned does not include the minGap. + * @param dist up to which distance to look for a leader + * @return The leading vehicle together with the gap; (0, -1) if no leader was found. + */ + std::pair getLeader(SUMOReal dist = 0) const; + + /** @brief Returns the time gap in seconds to the leader of the vehicle looking for a fixed distance. + * + * If the distance is too big -1 is returned. + * The gap returned takes the minGap into account. + * @return The time gap in seconds; -1 if no leader was found or speed is 0. + */ + SUMOReal getTimeGap() const; + /// @name Emission retrieval //@{ @@ -619,37 +679,37 @@ /** @brief Returns CO2 emission of the current state * @return The current CO2 emission */ - SUMOReal getHBEFA_CO2Emissions() const; + SUMOReal getCO2Emissions() const; /** @brief Returns CO emission of the current state * @return The current CO emission */ - SUMOReal getHBEFA_COEmissions() const; + SUMOReal getCOEmissions() const; /** @brief Returns HC emission of the current state * @return The current HC emission */ - SUMOReal getHBEFA_HCEmissions() const; + SUMOReal getHCEmissions() const; /** @brief Returns NOx emission of the current state * @return The current NOx emission */ - SUMOReal getHBEFA_NOxEmissions() const; + SUMOReal getNOxEmissions() const; /** @brief Returns PMx emission of the current state * @return The current PMx emission */ - SUMOReal getHBEFA_PMxEmissions() const; + SUMOReal getPMxEmissions() const; /** @brief Returns fuel consumption of the current state * @return The current fuel consumption */ - SUMOReal getHBEFA_FuelConsumption() const; + SUMOReal getFuelConsumption() const; /** @brief Returns noise emissions of the current state @@ -668,14 +728,24 @@ */ void addPerson(MSPerson* person); + /// @name Interaction with containers + //@{ + + /** @brief Adds a container + * @param[in] container The container to add + */ + void addContainer(MSContainer* container); + /** @brief Returns the number of persons * @return The number of passengers on-board */ unsigned int getPersonNumber() const; - /// @brief Returns this vehicles impatience - SUMOReal getImpatience() const; + /** @brief Returns the number of containers + * @return The number of contaiers on-board + */ + unsigned int getContainerNumber() const; /// @name Access to bool signals /// @{ @@ -717,6 +787,26 @@ }; + /** @brief modes for resolving conflicts between external control (traci) + * and vehicle control over lane changing. Each level of the lane-changing + * hierarchy (strategic, cooperative, speedGain, keepRight) can be controlled + * separately */ + enum LaneChangeMode { + LC_NEVER = 0, // lcModel shall never trigger changes at this level + LC_NOCONFLICT = 1, // lcModel may trigger changes if not in conflict with TraCI request + LC_ALWAYS = 2 // lcModel may always trigger changes of this level regardless of requests + }; + + + /// @brief modes for prioritizing traci lane change requests + enum TraciLaneChangePriority { + LCP_ALWAYS = 0, // change regardless of blockers, adapt own speed and speed of blockers + LCP_NOOVERLAP = 1, // change unless overlapping with blockers, adapt own speed and speed of blockers + LCP_URGENT = 2, // change if not blocked, adapt own speed and speed of blockers + LCP_OPPORTUNISTIC = 3 // change if not blocked + }; + + /** @brief Switches the given signal on * @param[in] signal The signal to mark as being switched on */ @@ -764,14 +854,16 @@ /** * schedule a new stop for the vehicle; each time a stop is reached, the vehicle * will wait for the given duration before continuing on its route - * @param lane lane on wich to stop - * @param pos position on the given lane at wich to stop - * @param radius the vehicle will stop if it is within the range [pos-radius, pos+radius] - * @param duration after waiting for the time period duration, the vehicle will - * @param parking a flag indicating whether the traci stop is used for parking or not + * @param lane lane on wich to stop + * @param pos position on the given lane at wich to stop + * @param radius the vehicle will stop if it is within the range [pos-radius, pos+radius] + * @param duration after waiting for the time period duration, the vehicle will + * @param parking a flag indicating whether the traci stop is used for parking or not * @param triggered a flag indicating whether the traci stop is triggered or not + * @param containerTriggered a flag indicating whether the traci stop is triggered by a container or not */ - bool addTraciStop(MSLane* lane, SUMOReal pos, SUMOReal radius, SUMOTime duration, bool parking, bool triggered); + bool addTraciStop(MSLane* lane, SUMOReal pos, SUMOReal radius, SUMOTime duration, + bool parking, bool triggered, bool containerTriggered, std::string& errorMsg); /** * returns the next imminent stop in the stop queue @@ -790,11 +882,13 @@ * @brief Changes the wished vehicle speed / lanes * * The class is used for passing velocities or velocity profiles obtained via TraCI to the vehicle. - * - * The adaptation is controlled by the stored time line of speeds/lanes. + * The speed adaptation is controlled by the stored speedTimeLine * Additionally, the variables myConsiderSafeVelocity, myConsiderMaxAcceleration, and myConsiderMaxDeceleration - * control whether the safe velocity, the maximum acceleration, and the maximum deceleration - * have to be regarded. + * control whether the safe velocity, the maximum acceleration, and the maximum deceleration + * have to be regarded. + * + * Furthermore this class is used to affect lane changing decisions according to + * LaneChangeMode and any given laneTimeLine */ class Influencer { public: @@ -831,9 +925,22 @@ */ SUMOReal influenceSpeed(SUMOTime currentTime, SUMOReal speed, SUMOReal vSafe, SUMOReal vMin, SUMOReal vMax); + /** @brief Applies stored LaneChangeMode information and laneTimeLine + * @param[in] currentTime The current simulation time + * @param[in] currentEdge The current edge the vehicle is on + * @param[in] currentLaneIndex The index of the lane the vehicle is currently on + * @param[in] state The LaneChangeAction flags as computed by the laneChangeModel + * @return The new LaneChangeAction flags to use + */ + int influenceChangeDecision(const SUMOTime currentTime, const MSEdge& currentEdge, const unsigned int currentLaneIndex, int state); - ChangeRequest checkForLaneChanges(SUMOTime currentTime, const MSEdge& currentEdge, unsigned int currentLaneIndex); + /** @brief Return the remaining number of seconds of the current + * laneTimeLine assuming one exists + * @param[in] currentTime The current simulation time + * @return The remaining seconds to change lanes + */ + SUMOReal changeRequestRemainingSeconds(const SUMOTime currentTime) const; /** @brief Sets whether the safe velocity shall be regarded * @param[in] value Whether the safe velocity shall be regarded @@ -853,27 +960,71 @@ void setConsiderMaxDeceleration(bool value); - /** @brief Returns the originally longitudianl speed to use + /** @brief Sets whether junction priority rules shall be respected + * @param[in] value Whether junction priority rules be respected + */ + void setRespectJunctionPriority(bool value); + + + /** @brief Returns whether junction priority rules shall be respected + * @return Whether junction priority rules be respected + */ + inline bool getRespectJunctionPriority() const { + return myRespectJunctionPriority; + } + + + /** @brief Sets whether red lights shall be a reason to brake + * @param[in] value Whether red lights shall be a reason to brake + */ + void setEmergencyBrakeRedLight(bool value); + + + /** @brief Returns whether red lights shall be a reason to brake + * @return Whether red lights shall be a reason to brake + */ + inline bool getEmergencyBrakeRedLight() const { + return myEmergencyBrakeRedLight; + } + + + /** @brief Sets lane changing behavior + * @param[in] value a bitset controlling the different modes + */ + void setLaneChangeMode(int value); + + + /** @brief Returns the originally longitudinal speed to use * @return The speed given before influence */ - SUMOReal getOriginalSpeed() const { + inline SUMOReal getOriginalSpeed() const { return myOriginalSpeed; } - void setVTDControlled(bool c, MSLane* l, SUMOReal pos, int edgeOffset, const MSEdgeVector& route) { + void setVTDControlled(bool c, MSLane* l, SUMOReal pos, int edgeOffset, const ConstMSEdgeVector& route, SUMOTime t) { myAmVTDControlled = c; myVTDLane = l; myVTDPos = pos; myVTDEdgeOffset = edgeOffset; myVTDRoute = route; + myLastVTDAccess = t; + } + + SUMOTime getLastAccessTimeStep() const { + return myLastVTDAccess; } void postProcessVTD(MSVehicle* v); - bool isVTDControlled() const { + inline bool isVTDControlled() const { return myAmVTDControlled; } + inline bool isVTDAffected(SUMOTime t) const { + return myAmVTDControlled && myLastVTDAccess >= t - TIME2STEPS(10); + } + + private: /// @brief The velocity time line to apply std::vector > mySpeedTimeLine; @@ -896,11 +1047,32 @@ /// @brief Whether the maximum deceleration shall be regarded bool myConsiderMaxDeceleration; + /// @brief Whether the junction priority rules are respected + bool myRespectJunctionPriority; + + /// @brief Whether red lights are a reason to brake + bool myEmergencyBrakeRedLight; + bool myAmVTDControlled; MSLane* myVTDLane; SUMOReal myVTDPos; int myVTDEdgeOffset; - MSEdgeVector myVTDRoute; + ConstMSEdgeVector myVTDRoute; + SUMOTime myLastVTDAccess; + + /// @name Flags for managing conflicts between the laneChangeModel and TraCI laneTimeLine + //@{ + /// @brief lane changing which is necessary to follow the current route + LaneChangeMode myStrategicLC; + /// @brief lane changing with the intent to help other vehicles + LaneChangeMode myCooperativeLC; + /// @brief lane changing to travel with higher speed + LaneChangeMode mySpeedGainLC; + /// @brief changing to the rightmost lane + LaneChangeMode myRightDriveLC; + //@} + ///* @brief flags for determining the priority of traci lane change requests + TraciLaneChangePriority myTraciLaneChangePriority; }; @@ -916,6 +1088,12 @@ return myInfluencer != 0; } + /// @brief allow TraCI to influence a lane change decision + int influenceChangeDecision(int state); + + /// @brief compute safe speed for following the given leader + SUMOReal getSafeFollowSpeed(const std::pair leaderInfo, + const SUMOReal seen, const MSLane* const lane, SUMOReal distToCrossing) const; #endif @@ -959,6 +1137,13 @@ void setBlinkerInformation(); + /// updates LaneQ::nextOccupation and myCurrentLaneInBestLanes + void updateOccupancyAndCurrentBestLane(const MSLane* startLane); + + /** @brief Returns the list of still pending stop edges + */ + const ConstMSEdgeVector getStopEdges() const; + /// @brief The time the vehicle waits (is not faster than 0.1m/s) in seconds SUMOTime myWaitingTime; @@ -971,9 +1156,11 @@ MSAbstractLaneChangeModel* myLaneChangeModel; - mutable const MSEdge* myLastBestLanesEdge; - mutable std::vector > myBestLanes; - mutable std::vector::iterator myCurrentLaneInBestLanes; + const MSEdge* myLastBestLanesEdge; + const MSLane* myLastBestLanesInternalLane; + + std::vector > myBestLanes; + std::vector::iterator myCurrentLaneInBestLanes; static std::vector myEmptyLaneVector; /// @brief The vehicle's list of stops @@ -982,7 +1169,10 @@ /// @brief The passengers this vehicle may have MSDevice_Person* myPersonDevice; - /// @brief The current acceleration before dawdling + /// @brief The containers this vehicle may have + MSDevice_Container* myContainerDevice; + + /// @brief The current acceleration after dawdling in m/s SUMOReal myAcceleration; /// @brief The information into which lanes the vehicle laps into @@ -997,8 +1187,13 @@ /// @brief Whether this vehicle is registered as waiting for a person (for deadlock-recognition) bool myAmRegisteredAsWaitingForPerson; + /// @brief Whether this vehicle is registered as waiting for a container (for deadlock-recognition) + bool myAmRegisteredAsWaitingForContainer; + bool myHaveToWaitOnNextLink; + mutable Position myCachedPosition; + protected: struct DriveProcessItem { MSLink* myLink; @@ -1023,7 +1218,10 @@ myArrivalTime(arrivalTime), myArrivalSpeed(arrivalSpeed), myArrivalTimeBraking(arrivalTimeBraking), myArrivalSpeedBraking(arrivalSpeedBraking), myDistance(distance), - accelV(leaveSpeed), hadVehicle(false), availableSpace(-1.) { }; + accelV(leaveSpeed), hadVehicle(false), availableSpace(-1.) { + assert(vWait >= 0); + assert(vPass >= 0); + }; /// @brief constructor if the link shall not be passed DriveProcessItem(SUMOReal vWait, SUMOReal distance) : @@ -1031,7 +1229,9 @@ myArrivalTime(0), myArrivalSpeed(0), myArrivalTimeBraking(0), myArrivalSpeedBraking(0), myDistance(distance), - accelV(-1), hadVehicle(false), availableSpace(-1.) { }; + accelV(-1), hadVehicle(false), availableSpace(-1.) { + assert(vWait >= 0); + }; inline void adaptLeaveSpeed(const SUMOReal v) { @@ -1067,6 +1267,7 @@ * @param[in] dist The distance during which accelerating takes place * @param[in] v The initial speed * @param[in] accel The acceleration + * XXX affected by ticket #860 (the formula is invalid for the current position update rule) */ inline SUMOReal estimateSpeedAfterDistance(const SUMOReal dist, const SUMOReal v, const SUMOReal accel) const { // dist=v*t + 0.5*accel*t^2, solve for t and multiply with accel, then add v @@ -1075,21 +1276,25 @@ } - /* @brief estimate speed while accelerating for the given distance + /* @brief adapt safe velocity in accordance to a moving obstacle: + * - a leader vehicle + * - a vehicle or pedestrian that crosses this vehicles path on an upcoming intersection * @param[in] leaderInfo The leading vehicle and the (virtual) distance to it * @param[in] seen the distance to the end of the current lane * @param[in] lastLink the lastLink index * @param[in] lane The current Lane the vehicle is on * @param[in,out] the safe velocity for driving * @param[in,out] the safe velocity for arriving at the next link + * @param[in] distToCrossing The distance to the crossing point with the current leader where relevant or -1 */ void adaptToLeader(const std::pair leaderInfo, const SUMOReal seen, DriveProcessItem* const lastLink, - const MSLane* const lane, SUMOReal& v, SUMOReal& vLinkPass) const; + const MSLane* const lane, SUMOReal& v, SUMOReal& vLinkPass, + SUMOReal distToCrossing = -1) const; #ifdef HAVE_INTERNAL_LANES /// @brief ids of vehicles being followed across a link (for resolving priority) - mutable std::set myLinkLeaders; + mutable std::map > myLinkLeaders; #endif private: @@ -1101,15 +1306,10 @@ MSCFModel::VehicleVariables* myCFVariables; #ifndef NO_TRACI - /// @brief An instance of a velicty/lane influencing instance; built in "getInfluencer" + /// @brief An instance of a velocity/lane influencing instance; built in "getInfluencer" Influencer* myInfluencer; #endif -#ifdef HAVE_INTERNAL_LANES - /// @brief map from the links to link leader ids - mutable std::map myLeaderForLink; -#endif - private: /// @brief invalidated default constructor MSVehicle(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleTransfer.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleTransfer.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleTransfer.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleTransfer.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sep 2003 -/// @version $Id: MSVehicleTransfer.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSVehicleTransfer.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A mover of vehicles that got stucked due to grid locks /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,7 +36,7 @@ #include "MSLane.h" #include "MSEdge.h" #include "MSVehicle.h" -#include "MSAbstractLaneChangeModel.h" +#include #include "MSVehicleControl.h" #include "MSVehicleTransfer.h" @@ -56,18 +56,22 @@ // member method definitions // =========================================================================== void -MSVehicleTransfer::addVeh(const SUMOTime t, MSVehicle* veh) { +MSVehicleTransfer::add(const SUMOTime t, MSVehicle* veh) { veh->getLaneChangeModel().endLaneChangeManeuver(); if (veh->isParking()) { + MSNet::getInstance()->informVehicleStateListener(veh, MSNet::VEHICLE_STATE_STARTING_PARKING); myParkingVehicles[veh->getLane()].insert(veh); // initialized to empty set on first use veh->onRemovalFromNet(MSMoveReminder::NOTIFICATION_PARKING); } else { - veh->onRemovalFromNet(MSMoveReminder::NOTIFICATION_TELEPORT); MSNet::getInstance()->informVehicleStateListener(veh, MSNet::VEHICLE_STATE_STARTING_TELEPORT); - if ((veh->succEdge(1) == 0) || veh->enterLaneAtMove(veh->succEdge(1)->getLanes()[0], true)) { + if (veh->succEdge(1) == 0) { + WRITE_WARNING("Vehicle '" + veh->getID() + "' teleports beyond end of route ('" + veh->getEdge()->getID() + "'), time " + time2string(t) + "."); + veh->onRemovalFromNet(MSMoveReminder::NOTIFICATION_TELEPORT_ARRIVED); MSNet::getInstance()->getVehicleControl().scheduleVehicleRemoval(veh); return; } + veh->onRemovalFromNet(MSMoveReminder::NOTIFICATION_TELEPORT); + veh->enterLaneAtMove(veh->succEdge(1)->getLanes()[0], true); } myVehicles.push_back(VehicleInformation(veh, t + TIME2STEPS(veh->getEdge()->getCurrentTravelTime(TeleportMinSpeed)), @@ -76,6 +80,17 @@ void +MSVehicleTransfer::remove(MSVehicle* veh) { + for (VehicleInfVector::iterator i = myVehicles.begin(); i != myVehicles.end(); ++i) { + if (i->myVeh == veh) { + myVehicles.erase(i); + break; + } + } +} + + +void MSVehicleTransfer::checkInsertions(SUMOTime time) { // go through vehicles for (VehicleInfVector::iterator i = myVehicles.begin(); i != myVehicles.end();) { @@ -98,36 +113,39 @@ // first select all the lanes which allow continuation onto nextEdge // then pick the one which is least occupied // @todo maybe parking vehicles should always continue on the rightmost lane? - MSLane* l = e->getFreeLane(e->allowedLanes(*nextEdge, vclass), vclass); + const MSLane* oldLane = desc.myVeh->getLane(); + MSLane* l = (nextEdge != 0 ? e->getFreeLane(e->allowedLanes(*nextEdge, vclass), vclass) : + e->getFreeLane(0, vclass)); if (desc.myParking) { // handle parking vehicles if (l->isInsertionSuccess(desc.myVeh, 0, desc.myVeh->getPositionOnLane(), false, MSMoveReminder::NOTIFICATION_PARKING)) { - myParkingVehicles[desc.myVeh->getLane()].erase(desc.myVeh); + MSNet::getInstance()->informVehicleStateListener(desc.myVeh, MSNet::VEHICLE_STATE_ENDING_PARKING); + myParkingVehicles[oldLane].erase(desc.myVeh); i = myVehicles.erase(i); } else { i++; } } else { - // handle teleporting vehicles - if (l->freeInsertion(*(desc.myVeh), MIN2(l->getSpeedLimit(), desc.myVeh->getMaxSpeed()), MSMoveReminder::NOTIFICATION_TELEPORT)) { - WRITE_WARNING("Vehicle '" + desc.myVeh->getID() + "' ends teleporting on edge '" + e->getID() + "', simulation time " + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); + // handle teleporting vehicles, lane may be 0 because permissions were modified by a closing rerouter or TraCI + if (l != 0 && l->freeInsertion(*(desc.myVeh), MIN2(l->getSpeedLimit(), desc.myVeh->getMaxSpeed()), MSMoveReminder::NOTIFICATION_TELEPORT)) { + WRITE_WARNING("Vehicle '" + desc.myVeh->getID() + "' ends teleporting on edge '" + e->getID() + "', time " + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); MSNet::getInstance()->informVehicleStateListener(desc.myVeh, MSNet::VEHICLE_STATE_ENDING_TELEPORT); i = myVehicles.erase(i); } else { // could not insert. maybe we should proceed in virtual space if (desc.myProceedTime < time) { - // active move reminders - desc.myVeh->leaveLane(MSMoveReminder::NOTIFICATION_TELEPORT); - // let the vehicle move to the next edge - const bool hasArrived = (desc.myVeh->succEdge(1) == 0 || - desc.myVeh->enterLaneAtMove(desc.myVeh->succEdge(1)->getLanes()[0], true)); - if (hasArrived) { - WRITE_WARNING("Vehicle '" + desc.myVeh->getID() + "' ends teleporting on end edge '" + e->getID() + "'."); + if (desc.myVeh->succEdge(1) == 0) { + WRITE_WARNING("Vehicle '" + desc.myVeh->getID() + "' teleports beyond end of route ('" + e->getID() + "'), time " + time2string(MSNet::getInstance()->getCurrentTimeStep()) + "."); + desc.myVeh->leaveLane(MSMoveReminder::NOTIFICATION_TELEPORT_ARRIVED); MSNet::getInstance()->getVehicleControl().scheduleVehicleRemoval(desc.myVeh); i = myVehicles.erase(i); continue; } + // let the vehicle move to the next edge + desc.myVeh->leaveLane(MSMoveReminder::NOTIFICATION_TELEPORT); + // active move reminders (i.e. rerouters) + desc.myVeh->enterLaneAtMove(desc.myVeh->succEdge(1)->getLanes()[0], true); // use current travel time to determine when to move the vehicle forward desc.myProceedTime = time + TIME2STEPS(e->getCurrentTravelTime(TeleportMinSpeed)); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleTransfer.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleTransfer.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleTransfer.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleTransfer.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,14 +2,15 @@ /// @file MSVehicleTransfer.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sep 2003 -/// @version $Id: MSVehicleTransfer.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSVehicleTransfer.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A mover of vehicles that got stucked due to grid locks // This class also serves as container for parking vehicles /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,6 +35,8 @@ #include #include +#include +#include // =========================================================================== @@ -41,6 +44,7 @@ // =========================================================================== class MSVehicle; class MSEdge; +class MSLane; // =========================================================================== @@ -53,7 +57,7 @@ * It also manages vehicles that are removed from the network because of stops * with the parking attribute. * - * The method addVeh is called by a lane if a vehicle stood to long at this + * The method add is called by a lane if a vehicle stood to long at this * lane's end. After being added to this transfer object and removed from the * lane, it is moved over the consecutive edges. On each edge, it is tried to * insert the vehicle again. The lanes are of course chosen by examining the @@ -75,7 +79,17 @@ * * @param[in] veh The vehicle to add */ - void addVeh(const SUMOTime t, MSVehicle* veh); + void add(const SUMOTime t, MSVehicle* veh); + + + /** @brief Remove a vehicle from this transfer object + * + * The vehicle is removed from the transfer if present. + * This should be necessary only in the context of TraCI removals. + * + * @param[in] veh The vehicle to remove + */ + void remove(MSVehicle* veh); /** @brief Checks "movement" of stored vehicles @@ -148,7 +162,7 @@ /// @brief The static singleton-instance static MSVehicleTransfer* myInstance; - /// @brief an empty vector for convenience + /// @brief an empty set for convenience static const std::set myEmptyVehicleSet; }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleType.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleType.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleType.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleType.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Thimor Bohn /// @author Michael Behrisch /// @date Tue, 06 Mar 2001 -/// @version $Id: MSVehicleType.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSVehicleType.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The car-following model and parameter /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,13 +36,14 @@ #include #include #include -#include +#include #include "MSNet.h" #include "cfmodels/MSCFModel_IDM.h" #include "cfmodels/MSCFModel_Kerner.h" #include "cfmodels/MSCFModel_Krauss.h" #include "cfmodels/MSCFModel_KraussOrig1.h" #include "cfmodels/MSCFModel_KraussPS.h" +#include "cfmodels/MSCFModel_KraussAccelBound.h" #include "cfmodels/MSCFModel_SmartSK.h" #include "cfmodels/MSCFModel_Daniel1.h" #include "cfmodels/MSCFModel_PWag2009.h" @@ -55,10 +56,16 @@ // =========================================================================== +// static members +// =========================================================================== +int MSVehicleType::myNextIndex = 0; + + +// =========================================================================== // method definitions // =========================================================================== MSVehicleType::MSVehicleType(const SUMOVTypeParameter& parameter) - : myParameter(parameter), myOriginalType(0) { + : myParameter(parameter), myIndex(myNextIndex++), myOriginalType(0) { assert(getLength() > 0); assert(getMaxSpeed() > 0); } @@ -70,12 +77,14 @@ SUMOReal -MSVehicleType::computeChosenSpeedDeviation(MTRand& rng) const { +MSVehicleType::computeChosenSpeedDeviation(MTRand* rng, const SUMOReal minDevFactor) const { + if (myParameter.speedDev == 0) { + return myParameter.speedFactor; + } // for speedDev = 0.1, most 95% of the vehicles will drive between 80% and 120% of speedLimit * speedFactor const SUMOReal devA = MIN2(SUMOReal(2.), RandHelper::randNorm(0, 1., rng)); // avoid voluntary speeds below 20% of the requested speedFactor - return MAX2(0.2 * myParameter.speedFactor, - (devA * myParameter.speedDev + 1.) * myParameter.speedFactor); + return MAX2(minDevFactor, SUMOReal(devA * myParameter.speedDev + 1.)) * myParameter.speedFactor; } @@ -189,97 +198,67 @@ MSVehicleType* MSVehicleType::build(SUMOVTypeParameter& from) { MSVehicleType* vtype = new MSVehicleType(from); - MSCFModel* model = 0; + const SUMOReal accel = from.get(SUMO_ATTR_ACCEL, SUMOVTypeParameter::getDefaultAccel(from.vehicleClass)); + const SUMOReal decel = from.get(SUMO_ATTR_DECEL, SUMOVTypeParameter::getDefaultDecel(from.vehicleClass)); + const SUMOReal sigma = from.get(SUMO_ATTR_SIGMA, SUMOVTypeParameter::getDefaultImperfection(from.vehicleClass)); + const SUMOReal tau = from.get(SUMO_ATTR_TAU, 1.); switch (from.cfModel) { case SUMO_TAG_CF_IDM: - model = new MSCFModel_IDM(vtype, - from.get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL), - from.get(SUMO_ATTR_DECEL, DEFAULT_VEH_DECEL), - from.get(SUMO_ATTR_TAU, DEFAULT_VEH_TAU), - from.get(SUMO_ATTR_CF_IDM_DELTA, 4.), - from.get(SUMO_ATTR_CF_IDM_STEPPING, .25)); + vtype->myCarFollowModel = new MSCFModel_IDM(vtype, accel, decel, tau, + from.get(SUMO_ATTR_CF_IDM_DELTA, 4.), + from.get(SUMO_ATTR_CF_IDM_STEPPING, .25)); break; case SUMO_TAG_CF_IDMM: - model = new MSCFModel_IDM(vtype, - from.get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL), - from.get(SUMO_ATTR_DECEL, DEFAULT_VEH_DECEL), - from.get(SUMO_ATTR_TAU, DEFAULT_VEH_TAU), - from.get(SUMO_ATTR_CF_IDMM_ADAPT_FACTOR, 1.8), - from.get(SUMO_ATTR_CF_IDMM_ADAPT_TIME, 600.), - from.get(SUMO_ATTR_CF_IDM_STEPPING, .25)); + vtype->myCarFollowModel = new MSCFModel_IDM(vtype, accel, decel, tau, + from.get(SUMO_ATTR_CF_IDMM_ADAPT_FACTOR, 1.8), + from.get(SUMO_ATTR_CF_IDMM_ADAPT_TIME, 600.), + from.get(SUMO_ATTR_CF_IDM_STEPPING, .25)); break; case SUMO_TAG_CF_BKERNER: - model = new MSCFModel_Kerner(vtype, - from.get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL), - from.get(SUMO_ATTR_DECEL, DEFAULT_VEH_DECEL), - from.get(SUMO_ATTR_TAU, DEFAULT_VEH_TAU), - from.get(SUMO_ATTR_K, .5), - from.get(SUMO_ATTR_CF_KERNER_PHI, 5.)); + vtype->myCarFollowModel = new MSCFModel_Kerner(vtype, accel, decel, tau, + from.get(SUMO_ATTR_K, .5), + from.get(SUMO_ATTR_CF_KERNER_PHI, 5.)); break; case SUMO_TAG_CF_KRAUSS_ORIG1: - model = new MSCFModel_KraussOrig1(vtype, - from.get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL), - from.get(SUMO_ATTR_DECEL, DEFAULT_VEH_DECEL), - from.get(SUMO_ATTR_SIGMA, DEFAULT_VEH_SIGMA), - from.get(SUMO_ATTR_TAU, DEFAULT_VEH_TAU)); + vtype->myCarFollowModel = new MSCFModel_KraussOrig1(vtype, accel, decel, sigma, tau); break; case SUMO_TAG_CF_KRAUSS_PLUS_SLOPE: - model = new MSCFModel_KraussPS(vtype, - from.get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL), - from.get(SUMO_ATTR_DECEL, DEFAULT_VEH_DECEL), - from.get(SUMO_ATTR_SIGMA, DEFAULT_VEH_SIGMA), - from.get(SUMO_ATTR_TAU, DEFAULT_VEH_TAU)); + vtype->myCarFollowModel = new MSCFModel_KraussPS(vtype, accel, decel, sigma, tau); + break; + case SUMO_TAG_CF_KRAUSS_ACCEL_BOUND: + vtype->myCarFollowModel = new MSCFModel_KraussAccelBound(vtype, accel, decel, sigma, tau); break; case SUMO_TAG_CF_SMART_SK: - model = new MSCFModel_SmartSK(vtype, - from.get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL), - from.get(SUMO_ATTR_DECEL, DEFAULT_VEH_DECEL), - from.get(SUMO_ATTR_SIGMA, DEFAULT_VEH_SIGMA), - from.get(SUMO_ATTR_TAU, DEFAULT_VEH_TAU), - from.get(SUMO_ATTR_TMP1, DEFAULT_VEH_TMP1), - from.get(SUMO_ATTR_TMP2, DEFAULT_VEH_TMP2), - from.get(SUMO_ATTR_TMP3, DEFAULT_VEH_TMP3), - from.get(SUMO_ATTR_TMP4, DEFAULT_VEH_TMP4), - from.get(SUMO_ATTR_TMP5, DEFAULT_VEH_TMP5)); + vtype->myCarFollowModel = new MSCFModel_SmartSK(vtype, accel, decel, sigma, tau, + from.get(SUMO_ATTR_TMP1, 1.), + from.get(SUMO_ATTR_TMP2, 1.), + from.get(SUMO_ATTR_TMP3, 1.), + from.get(SUMO_ATTR_TMP4, 1.), + from.get(SUMO_ATTR_TMP5, 1.)); break; case SUMO_TAG_CF_DANIEL1: - model = new MSCFModel_Daniel1(vtype, - from.get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL), - from.get(SUMO_ATTR_DECEL, DEFAULT_VEH_DECEL), - from.get(SUMO_ATTR_SIGMA, DEFAULT_VEH_SIGMA), - from.get(SUMO_ATTR_TAU, DEFAULT_VEH_TAU), - from.get(SUMO_ATTR_TMP1, DEFAULT_VEH_TMP1), - from.get(SUMO_ATTR_TMP2, DEFAULT_VEH_TMP2), - from.get(SUMO_ATTR_TMP3, DEFAULT_VEH_TMP3), - from.get(SUMO_ATTR_TMP4, DEFAULT_VEH_TMP4), - from.get(SUMO_ATTR_TMP5, DEFAULT_VEH_TMP5)); + vtype->myCarFollowModel = new MSCFModel_Daniel1(vtype, accel, decel, sigma, tau, + from.get(SUMO_ATTR_TMP1, 1.), + from.get(SUMO_ATTR_TMP2, 1.), + from.get(SUMO_ATTR_TMP3, 1.), + from.get(SUMO_ATTR_TMP4, 1.), + from.get(SUMO_ATTR_TMP5, 1.)); break; case SUMO_TAG_CF_PWAGNER2009: - model = new MSCFModel_PWag2009(vtype, - from.get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL), - from.get(SUMO_ATTR_DECEL, DEFAULT_VEH_DECEL), - from.get(SUMO_ATTR_SIGMA, DEFAULT_VEH_SIGMA), - from.get(SUMO_ATTR_TAU, DEFAULT_VEH_TAU), - from.get(SUMO_ATTR_CF_PWAGNER2009_TAULAST, 0.3), - from.get(SUMO_ATTR_CF_PWAGNER2009_APPROB, 0.5)); + vtype->myCarFollowModel = new MSCFModel_PWag2009(vtype, accel, decel, sigma, tau, + from.get(SUMO_ATTR_CF_PWAGNER2009_TAULAST, 0.3), + from.get(SUMO_ATTR_CF_PWAGNER2009_APPROB, 0.5)); break; case SUMO_TAG_CF_WIEDEMANN: - model = new MSCFModel_Wiedemann(vtype, - from.get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL), - from.get(SUMO_ATTR_DECEL, DEFAULT_VEH_DECEL), - from.get(SUMO_ATTR_CF_WIEDEMANN_SECURITY, 0.5), - from.get(SUMO_ATTR_CF_WIEDEMANN_ESTIMATION, 0.5)); + vtype->myCarFollowModel = new MSCFModel_Wiedemann(vtype, accel, decel, + from.get(SUMO_ATTR_CF_WIEDEMANN_SECURITY, 0.5), + from.get(SUMO_ATTR_CF_WIEDEMANN_ESTIMATION, 0.5)); break; case SUMO_TAG_CF_KRAUSS: default: - model = new MSCFModel_Krauss(vtype, - from.get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL), - from.get(SUMO_ATTR_DECEL, DEFAULT_VEH_DECEL), - from.get(SUMO_ATTR_SIGMA, DEFAULT_VEH_SIGMA), - from.get(SUMO_ATTR_TAU, DEFAULT_VEH_TAU)); + vtype->myCarFollowModel = new MSCFModel_Krauss(vtype, accel, decel, sigma, tau); break; } - vtype->myCarFollowModel = model; return vtype; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleType.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleType.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/MSVehicleType.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/MSVehicleType.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 12 Mar 2001 -/// @version $Id: MSVehicleType.h 14469 2013-08-22 09:12:33Z namdre $ +/// @version $Id: MSVehicleType.h 18096 2015-03-17 09:50:59Z behrisch $ /// // The car-following model and parameter /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include @@ -104,6 +104,14 @@ } + /** @brief Returns the running index of the vehicle type + * @return This type's numerical id + */ + int getNumericalID() const { + return myIndex; + } + + /** @brief Get vehicle's length [m] * @return The length vehicles of this type have in m */ @@ -144,6 +152,11 @@ } + inline LaneChangeModel getLaneChangeModel() const { + return myParameter.lcModel; + } + + /** @brief Get vehicle's maximum speed [m/s]. * @return The maximum speed (in m/s) of vehicles of this class */ @@ -155,7 +168,7 @@ /** @brief Computes and returns the speed deviation * @return A new, random speed deviation */ - SUMOReal computeChosenSpeedDeviation(MTRand& rng) const; + SUMOReal computeChosenSpeedDeviation(MTRand* rng, const SUMOReal minDevFactor = 0.2) const; /** @brief Get the default probability of this vehicle type @@ -258,6 +271,36 @@ return myParameter.imgFile; } + + /** @brief Get this vehicle type's person capacity + * @return The person capacity of this vehicle type + */ + unsigned int getPersonCapacity() const { + return myParameter.personCapacity; + } + + + /** @brief Get this vehicle type's container capacity + * @return The container capacity of this vehicle type + */ + unsigned int getContainerCapacity() const { + return myParameter.containerCapacity; + } + + /** @brief Get this vehicle type's boarding duration + * @return The time a person needs to board a vehicle of this type + */ + SUMOTime getBoardingDuration() const { + return myParameter.boardingDuration; + } + + /** @brief Get this vehicle type's loading duration + * @return The time a container needs to get laoded on a vehicle of this type + */ + SUMOTime getLoadingDuration() const { + return myParameter.loadingDuration; + } + /// @} @@ -279,7 +322,7 @@ * If the given value<0 then the one from the original type will * be used. * - * @param[in] offset The new minimum gap of this type + * @param[in] minGap The new minimum gap of this type */ void setMinGap(const SUMOReal& minGap); @@ -403,12 +446,18 @@ /// @brief the parameter container SUMOVTypeParameter myParameter; + /// @brief the running index + const int myIndex; + /// @brief ID of the car following model. MSCFModel* myCarFollowModel; /// @brief The original type const MSVehicleType* myOriginalType; + /// @brief next value for the running index + static int myNextIndex; + private: /// @brief Invalidated copy constructor diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -10,13 +10,15 @@ MSInductLoop.cpp MSInductLoop.h \ MSInstantInductLoop.cpp MSInstantInductLoop.h \ MSMeanData.cpp MSMeanData.h \ +MSMeanData_Emissions.cpp MSMeanData_Emissions.h \ MSMeanData_Harmonoise.cpp MSMeanData_Harmonoise.h \ -MSMeanData_HBEFA.cpp MSMeanData_HBEFA.h \ MSMeanData_Net.cpp MSMeanData_Net.h \ +MSMeanData_Amitran.cpp MSMeanData_Amitran.h \ MSRouteProbe.cpp MSRouteProbe.h \ MSVTypeProbe.cpp MSVTypeProbe.h \ MSXMLRawOut.cpp MSXMLRawOut.h \ MSFCDExport.cpp MSFCDExport.h \ +MSAmitranTrajectories.cpp MSAmitranTrajectories.h \ MSEmissionExport.cpp MSEmissionExport.h \ MSVTKExport.cpp MSVTKExport.h \ MSFullExport.cpp MSFullExport.h \ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/microsim/output -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,43 +92,104 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libmicrosimoutput_a_AR = $(AR) $(ARFLAGS) libmicrosimoutput_a_LIBADD = am_libmicrosimoutput_a_OBJECTS = MSDetectorControl.$(OBJEXT) \ MSE2Collector.$(OBJEXT) MS_E2_ZS_CollectorOverLanes.$(OBJEXT) \ MSE3Collector.$(OBJEXT) MSInductLoop.$(OBJEXT) \ MSInstantInductLoop.$(OBJEXT) MSMeanData.$(OBJEXT) \ - MSMeanData_Harmonoise.$(OBJEXT) MSMeanData_HBEFA.$(OBJEXT) \ - MSMeanData_Net.$(OBJEXT) MSRouteProbe.$(OBJEXT) \ - MSVTypeProbe.$(OBJEXT) MSXMLRawOut.$(OBJEXT) \ - MSFCDExport.$(OBJEXT) MSEmissionExport.$(OBJEXT) \ + MSMeanData_Emissions.$(OBJEXT) MSMeanData_Harmonoise.$(OBJEXT) \ + MSMeanData_Net.$(OBJEXT) MSMeanData_Amitran.$(OBJEXT) \ + MSRouteProbe.$(OBJEXT) MSVTypeProbe.$(OBJEXT) \ + MSXMLRawOut.$(OBJEXT) MSFCDExport.$(OBJEXT) \ + MSAmitranTrajectories.$(OBJEXT) MSEmissionExport.$(OBJEXT) \ MSVTKExport.$(OBJEXT) MSFullExport.$(OBJEXT) \ MSQueueExport.$(OBJEXT) libmicrosimoutput_a_OBJECTS = $(am_libmicrosimoutput_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libmicrosimoutput_a_SOURCES) DIST_SOURCES = $(libmicrosimoutput_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -92,6 +198,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -118,9 +225,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -131,10 +242,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -239,13 +346,15 @@ MSInductLoop.cpp MSInductLoop.h \ MSInstantInductLoop.cpp MSInstantInductLoop.h \ MSMeanData.cpp MSMeanData.h \ +MSMeanData_Emissions.cpp MSMeanData_Emissions.h \ MSMeanData_Harmonoise.cpp MSMeanData_Harmonoise.h \ -MSMeanData_HBEFA.cpp MSMeanData_HBEFA.h \ MSMeanData_Net.cpp MSMeanData_Net.h \ +MSMeanData_Amitran.cpp MSMeanData_Amitran.h \ MSRouteProbe.cpp MSRouteProbe.h \ MSVTypeProbe.cpp MSVTypeProbe.h \ MSXMLRawOut.cpp MSXMLRawOut.h \ MSFCDExport.cpp MSFCDExport.h \ +MSAmitranTrajectories.cpp MSAmitranTrajectories.h \ MSEmissionExport.cpp MSEmissionExport.h \ MSVTKExport.cpp MSVTKExport.h \ MSFullExport.cpp MSFullExport.h \ @@ -288,10 +397,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libmicrosimoutput.a: $(libmicrosimoutput_a_OBJECTS) $(libmicrosimoutput_a_DEPENDENCIES) - -rm -f libmicrosimoutput.a - $(libmicrosimoutput_a_AR) libmicrosimoutput.a $(libmicrosimoutput_a_OBJECTS) $(libmicrosimoutput_a_LIBADD) - $(RANLIB) libmicrosimoutput.a + +libmicrosimoutput.a: $(libmicrosimoutput_a_OBJECTS) $(libmicrosimoutput_a_DEPENDENCIES) $(EXTRA_libmicrosimoutput_a_DEPENDENCIES) + $(AM_V_at)-rm -f libmicrosimoutput.a + $(AM_V_AR)$(libmicrosimoutput_a_AR) libmicrosimoutput.a $(libmicrosimoutput_a_OBJECTS) $(libmicrosimoutput_a_LIBADD) + $(AM_V_at)$(RANLIB) libmicrosimoutput.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -299,6 +409,7 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSAmitranTrajectories.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSDetectorControl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSE2Collector.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSE3Collector.Po@am__quote@ @@ -308,7 +419,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSInductLoop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSInstantInductLoop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSMeanData.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSMeanData_HBEFA.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSMeanData_Amitran.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSMeanData_Emissions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSMeanData_Harmonoise.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSMeanData_Net.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSQueueExport.Po@am__quote@ @@ -319,25 +431,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MS_E2_ZS_CollectorOverLanes.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -345,26 +457,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -376,15 +477,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -393,6 +490,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -441,10 +553,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -529,18 +646,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSAmitranTrajectories.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSAmitranTrajectories.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSAmitranTrajectories.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSAmitranTrajectories.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,100 @@ +/****************************************************************************/ +/// @file MSAmitranTrajectories.cpp +/// @author Michael Behrisch +/// @date 13.03.2014 +/// @version $Id: MSAmitranTrajectories.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Realises dumping the complete network state +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include "MSAmitranTrajectories.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + +// =========================================================================== +// static member definitions +// =========================================================================== +std::set MSAmitranTrajectories::myWrittenTypes; +std::map MSAmitranTrajectories::myWrittenVehicles; + + +// =========================================================================== +// method definitions +// =========================================================================== +void +MSAmitranTrajectories::write(OutputDevice& of, const SUMOTime timestep) { + MSVehicleControl& vc = MSNet::getInstance()->getVehicleControl(); + for (MSVehicleControl::constVehIt v = vc.loadedVehBegin(); v != vc.loadedVehEnd(); ++v) { + writeVehicle(of, *v->second, timestep); + } +} + + +void +MSAmitranTrajectories::writeVehicle(OutputDevice& of, const SUMOVehicle& veh, const SUMOTime timestep) { + if (veh.isOnRoad()) { + const std::string& type = veh.getVehicleType().getID(); + if (myWrittenTypes.count(type) == 0) { + of.openTag(SUMO_TAG_ACTORCONFIG).writeAttr(SUMO_ATTR_ID, veh.getVehicleType().getNumericalID()); + const SUMOEmissionClass c = veh.getVehicleType().getEmissionClass(); + if (c != 0) { + of.writeAttr(SUMO_ATTR_VEHICLECLASS, PollutantsInterface::getAmitranVehicleClass(c)); + of.writeAttr("fuel", PollutantsInterface::getFuel(c)); + of.writeAttr(SUMO_ATTR_EMISSIONCLASS, "Euro" + toString(PollutantsInterface::getEuroClass(c))); + const SUMOReal weight = PollutantsInterface::getWeight(c); + if (weight > 0.) { + of.writeAttr(SUMO_ATTR_WEIGHT, int(weight / 10. + 0.5)); + } + } + of.writeAttr(SUMO_ATTR_REF, type).closeTag(); + myWrittenTypes.insert(type); + } + if (myWrittenVehicles.count(veh.getID()) == 0) { + const int index = (int)myWrittenVehicles.size(); + of.openTag(SUMO_TAG_VEHICLE).writeAttr(SUMO_ATTR_ID, index) + .writeAttr(SUMO_ATTR_ACTORCONFIG, veh.getVehicleType().getNumericalID()) + .writeAttr(SUMO_ATTR_STARTTIME, STEPS2MS(veh.getDeparture())); + of.writeAttr(SUMO_ATTR_REF, veh.getID()).closeTag(); + myWrittenVehicles[veh.getID()] = index; + } + of.openTag(SUMO_TAG_MOTIONSTATE).writeAttr(SUMO_ATTR_VEHICLE, myWrittenVehicles[veh.getID()]) + .writeAttr(SUMO_ATTR_SPEED, int(100.*veh.getSpeed() + 0.5)) + .writeAttr(SUMO_ATTR_TIME, STEPS2MS(timestep)) + .writeAttr(SUMO_ATTR_ACCELERATION, int(1000.*veh.getAcceleration() + 0.5)); + of.closeTag(); + } +} + + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSAmitranTrajectories.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSAmitranTrajectories.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSAmitranTrajectories.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSAmitranTrajectories.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,102 @@ +/****************************************************************************/ +/// @file MSAmitranTrajectories.h +/// @author Michael Behrisch +/// @date 13.03.2014 +/// @version $Id: MSAmitranTrajectories.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Realises dumping the complete network state +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSAmitranTrajectories_h +#define MSAmitranTrajectories_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class OutputDevice; +class MSVehicleControl; +class MSEdge; +class MSBaseVehicle; +class MSLane; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSAmitranTrajectories + * @brief Realises dumping the complete network state + * + * The class offers a static method, which writes the complete dump of + * the given network into the given OutputDevice. + * + * @todo consider error-handling on write (using IOError) + */ +class MSAmitranTrajectories { +public: + /** @brief Writes the complete network state into the given device + * + * Opens the current time step, goes through the vehicles and writes each using + * writeVehicle. + * + * @param[in] of The output device to use + * @param[in] timestep The current time step + * @exception IOError If an error on writing occurs (!!! not yet implemented) + */ + static void write(OutputDevice& of, const SUMOTime timestep); + + +private: + /** @brief Writes the dump of the given vehicle into the given device + * + * @param[in] of The output device to use + * @param[in] veh The vehicle to dump + * @param[in] timestep The current time step + * @exception IOError If an error on writing occurs (!!! not yet implemented) + */ + static void writeVehicle(OutputDevice& of, const SUMOVehicle& veh, const SUMOTime timestep); + + +private: + static std::set myWrittenTypes; + static std::map myWrittenVehicles; + + +private: + /// @brief Invalidated copy constructor. + MSAmitranTrajectories(const MSAmitranTrajectories&); + + /// @brief Invalidated assignment operator. + MSAmitranTrajectories& operator=(const MSAmitranTrajectories&); + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSCrossSection.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSCrossSection.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSCrossSection.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSCrossSection.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @date Tue Nov 25 15:23:28 2003 -/// @version $Id: MSCrossSection.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSCrossSection.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A simple description of a position on a lane (crossing of a lane) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSDetectorControl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSDetectorControl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSDetectorControl.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSDetectorControl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -7,12 +7,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date 2005-09-15 -/// @version $Id: MSDetectorControl.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSDetectorControl.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Detectors container; responsible for string and output generation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -77,12 +77,7 @@ void MSDetectorControl::add(SumoXMLTag type, MSDetectorFileOutput* d, const std::string& device, int splInterval, SUMOTime begin) { - if (myDetectors.find(type) == myDetectors.end()) { - myDetectors[type] = NamedObjectCont(); - } - NamedObjectCont& m = myDetectors.find(type)->second; - // insert object into dictionary - if (! m.add(d->getID(), d)) { + if (!myDetectors[type].add(d->getID(), d)) { throw ProcessError(toString(type) + " detector '" + d->getID() + "' could not be build (declared twice?)."); } addDetectorAndInterval(d, &OutputDevice::getDevice(device), splInterval, begin); @@ -92,12 +87,7 @@ void MSDetectorControl::add(SumoXMLTag type, MSDetectorFileOutput* d) { - if (myDetectors.find(type) == myDetectors.end()) { - myDetectors[type] = NamedObjectCont(); - } - NamedObjectCont& m = myDetectors.find(type)->second; - // insert object into dictionary - if (! m.add(d->getID(), d)) { + if (!myDetectors[type].add(d->getID(), d)) { throw ProcessError(toString(type) + " detector '" + d->getID() + "' could not be build (declared twice?)."); } } @@ -115,10 +105,20 @@ } +const std::vector +MSDetectorControl::getAvailableTypes() const { + std::vector result; + for (std::map >::const_iterator i = myDetectors.begin(); i != myDetectors.end(); ++i) { + result.push_back(i->first); + } + return result; +} + + const NamedObjectCont& MSDetectorControl::getTypedDetectors(SumoXMLTag type) const { if (myDetectors.find(type) == myDetectors.end()) { - return myEmptyContainer;//myDetectors[type] = NamedObjectCont(); + return myEmptyContainer; } return myDetectors.find(type)->second; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSDetectorControl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSDetectorControl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSDetectorControl.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSDetectorControl.h 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date 2005-09-15 -/// @version $Id: MSDetectorControl.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSDetectorControl.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Detectors container; responsible for string and output generation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -64,10 +64,6 @@ */ class MSDetectorControl { public: - // well, well, friends are evil; one could think about overriding MSDetectorControl and introducing GUIDetectorControl... - friend class GUINet; - - /** @brief Constructor */ MSDetectorControl(); @@ -154,6 +150,13 @@ + /** @brief Returns the list of available detector types + * + * @return The list of types + */ + const std::vector getAvailableTypes() const; + + /** @brief Returns the list of detectors of the given type * * @param[in] type The type of detectors to be retrieved @@ -162,7 +165,6 @@ const NamedObjectCont& getTypedDetectors(SumoXMLTag type) const; - /** @brief Computes detector values * * Some detectors need to be touched each time step in order to compute diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSDetectorFileOutput.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSDetectorFileOutput.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSDetectorFileOutput.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSDetectorFileOutput.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date 2004-11-23 -/// @version $Id: MSDetectorFileOutput.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSDetectorFileOutput.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Base of value-generating classes (detectors) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSE2Collector.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSE2Collector.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSE2Collector.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSE2Collector.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,13 +5,15 @@ /// @author Laura Bieker /// @author Sascha Krieg /// @author Michael Behrisch -/// @date Tue Dec 02 2003 22:13 CET -/// @version $Id: MSE2Collector.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @author Robbin Blokpoel +/// @author Jakob Erdmann +/// @date Mon Feb 03 2014 10:13 CET +/// @version $Id: MSE2Collector.cpp 17235 2014-11-03 10:53:02Z behrisch $ /// // An areal (along a single lane) detector /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -61,7 +63,8 @@ myUsage(usage), myCurrentOccupancy(0), myCurrentMeanSpeed(-1), myCurrentJamNo(0), myCurrentMaxJamLengthInMeters(0), myCurrentMaxJamLengthInVehicles(0), - myCurrentJamLengthInMeters(0), myCurrentJamLengthInVehicles(0), myCurrentStartedHalts(0) + myCurrentJamLengthInMeters(0), myCurrentJamLengthInVehicles(0), myCurrentStartedHalts(0), + myCurrentHaltingsNumber(0) { assert(myLane != 0); @@ -79,20 +82,18 @@ bool MSE2Collector::notifyMove(SUMOVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal) { - if (newPos < myStartPos) { + if (newPos <= myStartPos) { // detector not yet reached return true; } - if (newPos >= myStartPos && oldPos < myStartPos) { - if (find(myKnownVehicles.begin(), myKnownVehicles.end(), &veh) == myKnownVehicles.end()) { - myKnownVehicles.push_back(&veh); - } + if (newPos > myStartPos && oldPos <= myStartPos) { + assert(find(myKnownVehicles.begin(), myKnownVehicles.end(), &veh) == myKnownVehicles.end()); + myKnownVehicles.push_back(&veh); } if (newPos - veh.getVehicleType().getLength() > myEndPos) { std::list::iterator i = find(myKnownVehicles.begin(), myKnownVehicles.end(), &veh); - if (i != myKnownVehicles.end()) { - myKnownVehicles.erase(i); - } + assert(i != myKnownVehicles.end()); + myKnownVehicles.erase(i); return false; } return true; @@ -101,7 +102,7 @@ bool MSE2Collector::notifyLeave(SUMOVehicle& veh, SUMOReal lastPos, MSMoveReminder::Notification reason) { - if (reason != MSMoveReminder::NOTIFICATION_JUNCTION || (lastPos >= myStartPos && lastPos - veh.getVehicleType().getLength() < myEndPos)) { + if (reason != MSMoveReminder::NOTIFICATION_JUNCTION || (lastPos > myStartPos && lastPos - veh.getVehicleType().getLength() < myEndPos)) { std::list::iterator i = find(myKnownVehicles.begin(), myKnownVehicles.end(), &veh); if (i != myKnownVehicles.end()) { myKnownVehicles.erase(i); @@ -113,17 +114,21 @@ bool -MSE2Collector::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification) { - if (veh.getPositionOnLane() >= myStartPos && veh.getPositionOnLane() - veh.getVehicleType().getLength() < myEndPos) { - // vehicle is on detector - myKnownVehicles.push_back(&veh); - return true; +MSE2Collector::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason) { + if (!veh.isOnRoad()) { + // vehicle is teleporting over the edge + return false; } - if (veh.getPositionOnLane() - veh.getVehicleType().getLength() > myEndPos) { - // vehicle is beyond detector + if (veh.getPositionOnLane() - veh.getVehicleType().getLength() >= myEndPos) { + // vehicle is beyond the detector return false; } - // vehicle is in front of detector + if (reason != MSMoveReminder::NOTIFICATION_JUNCTION && veh.getPositionOnLane() > myStartPos) { + // the junction case is handled in the notifyMove + // vehicle is on the detector, being already beyond was checked before + myKnownVehicles.push_back(&veh); + } + // vehicle is in front of the detector return true; } @@ -144,7 +149,7 @@ myTimeSamples = 0; myMeanVehicleNumber = 0; myMaxVehicleNumber = 0; - for (std::map::iterator i = myIntervalHaltingVehicleDurations.begin(); i != myIntervalHaltingVehicleDurations.end(); ++i) { + for (std::map::iterator i = myIntervalHaltingVehicleDurations.begin(); i != myIntervalHaltingVehicleDurations.end(); ++i) { (*i).second = 0; } myPastStandingDurations.clear(); @@ -156,20 +161,21 @@ void MSE2Collector::detectorUpdate(const SUMOTime /* step */) { JamInfo* currentJam = 0; - std::map haltingVehicles; - std::map intervalHaltingVehicles; + std::map haltingVehicles; + std::map intervalHaltingVehicles; std::vector jams; SUMOReal lengthSum = 0; myCurrentMeanSpeed = 0; myCurrentMeanLength = 0; myCurrentStartedHalts = 0; + myCurrentHaltingsNumber = 0; // go through the (sorted) list of vehicles positioned on the detector // sum up values and prepare the list of jams myKnownVehicles.sort(by_vehicle_position_sorter(getLane())); for (std::list::const_iterator i = myKnownVehicles.begin(); i != myKnownVehicles.end(); ++i) { - MSVehicle* veh = static_cast(*i); + const MSVehicle* const veh = static_cast(*i); SUMOReal length = veh->getVehicleType().getLength(); if (veh->getLane() == getLane()) { @@ -198,6 +204,7 @@ bool isInJam = false; // first, check whether the vehicle is slow enough to be states as halting if (veh->getSpeed() < myJamHaltingSpeedThreshold) { + myCurrentHaltingsNumber++; // we have to track the time it was halting; // so let's look up whether it was halting before and compute the overall halting time bool wasHalting = myHaltingVehicleDurations.find(veh) != myHaltingVehicleDurations.end(); @@ -217,7 +224,7 @@ } } else { // is not standing anymore; keep duration information - std::map::iterator v = myHaltingVehicleDurations.find(veh); + std::map::iterator v = myHaltingVehicleDurations.find(veh); if (v != myHaltingVehicleDurations.end()) { myPastStandingDurations.push_back((*v).second); myHaltingVehicleDurations.erase(v); @@ -235,7 +242,7 @@ // it may be a new one or already an existing one if (currentJam == 0) { // the vehicle is the first vehicle in a jam - currentJam = new JamInfo; + currentJam = new JamInfo(); currentJam->firstStandingVehicle = i; } else { // ok, we have a jam already. But - maybe it is too far away @@ -292,8 +299,8 @@ } myCurrentJamNo = (unsigned) jams.size(); - unsigned noVehicles = (unsigned) myKnownVehicles.size(); - myVehicleSamples += noVehicles; + const unsigned numVehicles = (unsigned) myKnownVehicles.size(); + myVehicleSamples += numVehicles; myTimeSamples += 1; // compute occupancy values SUMOReal currentOccupancy = lengthSum / (myEndPos - myStartPos) * (SUMOReal) 100.; @@ -309,11 +316,11 @@ myHaltingVehicleDurations = haltingVehicles; myIntervalHaltingVehicleDurations = intervalHaltingVehicles; // compute information about vehicle numbers - myMeanVehicleNumber += (unsigned) myKnownVehicles.size(); - myMaxVehicleNumber = MAX2((unsigned) myKnownVehicles.size(), myMaxVehicleNumber); + myMeanVehicleNumber += numVehicles; + myMaxVehicleNumber = MAX2(numVehicles, myMaxVehicleNumber); // norm current values - myCurrentMeanSpeed = noVehicles != 0 ? myCurrentMeanSpeed / (SUMOReal) noVehicles : -1; - myCurrentMeanLength = noVehicles != 0 ? myCurrentMeanLength / (SUMOReal) noVehicles : -1; + myCurrentMeanSpeed = numVehicles != 0 ? myCurrentMeanSpeed / (SUMOReal) numVehicles : -1; + myCurrentMeanLength = numVehicles != 0 ? myCurrentMeanLength / (SUMOReal) numVehicles : -1; // clean up for (std::vector::iterator i = jams.begin(); i != jams.end(); ++i) { @@ -342,7 +349,7 @@ maxHaltingDuration = MAX2(maxHaltingDuration, (*i)); haltingNo++; } - for (std::map ::iterator i = myHaltingVehicleDurations.begin(); i != myHaltingVehicleDurations.end(); ++i) { + for (std::map ::iterator i = myHaltingVehicleDurations.begin(); i != myHaltingVehicleDurations.end(); ++i) { haltingDurationSum += (*i).second; maxHaltingDuration = MAX2(maxHaltingDuration, (*i).second); haltingNo++; @@ -357,7 +364,7 @@ intervalMaxHaltingDuration = MAX2(intervalMaxHaltingDuration, (*i)); intervalHaltingNo++; } - for (std::map ::iterator i = myIntervalHaltingVehicleDurations.begin(); i != myIntervalHaltingVehicleDurations.end(); ++i) { + for (std::map ::iterator i = myIntervalHaltingVehicleDurations.begin(); i != myIntervalHaltingVehicleDurations.end(); ++i) { intervalHaltingDurationSum += (*i).second; intervalMaxHaltingDuration = MAX2(intervalMaxHaltingDuration, (*i).second); intervalHaltingNo++; @@ -390,7 +397,7 @@ void MSE2Collector::writeXMLDetectorProlog(OutputDevice& dev) const { - dev.writeXMLHeader("detector", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/det_e2_file.xsd\""); + dev.writeXMLHeader("detector", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/det_e2_file.xsd\""); } @@ -466,5 +473,22 @@ return v1->getPositionOnLane() > v2->getPositionOnLane(); } +int +MSE2Collector::getCurrentHaltingNumber() const { + return myCurrentHaltingsNumber; +} + + +std::vector +MSE2Collector::getCurrentVehicleIDs() const { + std::vector ret; + for (std::list::const_iterator i = myKnownVehicles.begin(); i != myKnownVehicles.end(); ++i) { + MSVehicle* veh = static_cast(*i); + ret.push_back(veh->getID()); + } + std::sort(ret.begin(), ret.end()); + return ret; +} + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSE2Collector.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSE2Collector.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSE2Collector.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSE2Collector.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,15 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @author Michael Behrisch -/// @date Tue Dec 02 2003 22:13 CET -/// @version $Id: MSE2Collector.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @author Robbin Blokpoel +/// @author Jakob Erdmann +/// @date Mon Feb 03 2014 14:13 CET +/// @version $Id: MSE2Collector.h 17235 2014-11-03 10:53:02Z behrisch $ /// // An areal (along a single lane) detector /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -39,7 +41,7 @@ #include #include #include -#include +#include // =========================================================================== @@ -257,6 +259,20 @@ /** @brief Returns the length of all jams in meters */ unsigned getCurrentStartedHalts() const; + + /** @brief Returns the number of current haltings within the area + * + * If no vehicle is within the area, 0 is returned. + * + * @return The mean number of haltings within the area + */ + int getCurrentHaltingNumber() const; + + /** @brief Returns the IDs of the vehicles within the area + * + * @return The IDs of the vehicles that have passed the entry, but not yet an exit point + */ + std::vector getCurrentVehicleIDs() const; /// @} @@ -342,10 +358,10 @@ std::list myKnownVehicles; /// @brief Storage for halting durations of known vehicles (for halting vehicles) - std::map myHaltingVehicleDurations; + std::map myHaltingVehicleDurations; /// @brief Storage for halting durations of known vehicles (current interval) - std::map myIntervalHaltingVehicleDurations; + std::map myIntervalHaltingVehicleDurations; /// @brief Halting durations of ended halts [s] std::vector myPastStandingDurations; @@ -409,6 +425,8 @@ unsigned myCurrentJamLengthInVehicles; /// @brief The number of started halts in the last step unsigned myCurrentStartedHalts; + /// @brief The number of halted vehicles [#] + int myCurrentHaltingsNumber; /// @} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MS_E2_ZS_CollectorOverLanes.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MS_E2_ZS_CollectorOverLanes.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MS_E2_ZS_CollectorOverLanes.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MS_E2_ZS_CollectorOverLanes.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file MS_E2_ZS_CollectorOverLanes.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Oct 2003 -/// @version $Id: MS_E2_ZS_CollectorOverLanes.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MS_E2_ZS_CollectorOverLanes.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A detector which joins E2Collectors over consecutive lanes (backward) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -169,15 +170,15 @@ MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(MSLane* l) { std::string eid = l->getEdge().getID(); // get predecessing edges - const std::vector& predEdges = l->getEdge().getIncomingEdges(); + const MSEdgeVector& predEdges = l->getEdge().getIncomingEdges(); std::vector ret; // find predecessing lanes - std::vector::const_iterator i = predEdges.begin(); + MSEdgeVector::const_iterator i = predEdges.begin(); for (; i != predEdges.end(); ++i) { MSEdge* e = *i; assert(e != 0); typedef std::vector LaneVector; - const LaneVector* cl = e->allowedLanes(l->getEdge(), SVC_UNKNOWN); + const LaneVector* cl = e->allowedLanes(l->getEdge(), SVC_IGNORING); bool fastAbort = false; if (cl != 0) { for (LaneVector::const_iterator j = cl->begin(); !fastAbort && j != cl->end(); j++) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MS_E2_ZS_CollectorOverLanes.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MS_E2_ZS_CollectorOverLanes.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MS_E2_ZS_CollectorOverLanes.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MS_E2_ZS_CollectorOverLanes.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Oct 2003 -/// @version $Id: MS_E2_ZS_CollectorOverLanes.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MS_E2_ZS_CollectorOverLanes.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A detector which joins E2Collectors over consecutive lanes (backward) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSE3Collector.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSE3Collector.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSE3Collector.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSE3Collector.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Tue Dec 02 2003 22:17 CET -/// @version $Id: MSE3Collector.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSE3Collector.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A detector of vehicles passing an area between entry/exit points /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -57,18 +57,15 @@ bool MSE3Collector::MSE3EntryReminder::notifyMove(SUMOVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed) { - if (myCollector.myEnteredContainer.find(&veh) == myCollector.myEnteredContainer.end() && newPos >= myPosition) { + if (myCollector.myEnteredContainer.find(&veh) == myCollector.myEnteredContainer.end() && newPos > myPosition) { if (oldPos > myPosition) { // was behind the detector return false; } else { - SUMOReal entryTime = STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()); - if (newSpeed != 0) { - if (myPosition > oldPos) { - entryTime += (myPosition - oldPos) / newSpeed; - } - } - myCollector.enter(veh, entryTime); + const SUMOReal entryTime = STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()); + assert(newSpeed != 0); // how could it move across the detector otherwise + const SUMOReal fractionTimeOnDet = (newPos - myPosition) / newSpeed; + myCollector.enter(veh, entryTime - fractionTimeOnDet, fractionTimeOnDet); } } return true; @@ -77,7 +74,8 @@ bool MSE3Collector::MSE3EntryReminder::notifyLeave(SUMOVehicle& veh, SUMOReal, MSMoveReminder::Notification reason) { - if (reason == MSMoveReminder::NOTIFICATION_ARRIVED) { + if (reason >= MSMoveReminder::NOTIFICATION_ARRIVED) { + WRITE_WARNING("Vehicle '" + veh.getID() + "' arrived inside " + toString(SUMO_TAG_E3DETECTOR) + " '" + myCollector.getID() + "'."); myCollector.myEnteredContainer.erase(&veh); return false; } @@ -106,11 +104,10 @@ return false; } // crossSection left - SUMOReal leaveTime = STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()); - if (myPosition > oldPos) { - leaveTime += (myPosition - oldPos) / newSpeed; - } - myCollector.leave(veh, leaveTime); + const SUMOReal leaveTime = STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()); + assert(newSpeed != 0); // how could it move across the detector otherwise + const SUMOReal fractionTimeOnDet = (myPosition - oldPos) / newSpeed; + myCollector.leave(veh, leaveTime - TS + fractionTimeOnDet, fractionTimeOnDet); return false; } @@ -133,8 +130,7 @@ SUMOTime haltingTimeThreshold) : MSDetectorFileOutput(id), myEntries(entries), myExits(exits), myHaltingTimeThreshold(haltingTimeThreshold), myHaltingSpeedThreshold(haltingSpeedThreshold), - myCurrentMeanSpeed(0), myCurrentHaltingsNumber(0), myCurrentTouchedVehicles(0), - myLastResetTime(-1) { + myCurrentMeanSpeed(0), myCurrentHaltingsNumber(0), myLastResetTime(-1) { // Set MoveReminders to entries and exits for (CrossSectionVectorConstIt crossSec1 = entries.begin(); crossSec1 != entries.end(); ++crossSec1) { myEntryReminders.push_back(new MSE3EntryReminder(*crossSec1, *this)); @@ -164,23 +160,22 @@ void -MSE3Collector::enter(SUMOVehicle& veh, SUMOReal entryTimestep) { +MSE3Collector::enter(const SUMOVehicle& veh, const SUMOReal entryTimestep, const SUMOReal fractionTimeOnDet) { if (myEnteredContainer.find(&veh) != myEnteredContainer.end()) { WRITE_WARNING("Vehicle '" + veh.getID() + "' reentered " + toString(SUMO_TAG_E3DETECTOR) + " '" + getID() + "'."); return; } - SUMOReal entryTimestepFraction = ((SUMOReal) DELTA_T - fmod(entryTimestep * 1000., 1000.)) / (SUMOReal) DELTA_T; - SUMOReal speedFraction = (veh.getSpeed() * entryTimestepFraction); + const SUMOReal speedFraction = veh.getSpeed() * fractionTimeOnDet; E3Values v; v.entryTime = entryTimestep; v.leaveTime = 0; - v.speedSum = speedFraction / (1000. / (SUMOReal) DELTA_T); + v.speedSum = speedFraction; v.haltingBegin = veh.getSpeed() < myHaltingSpeedThreshold ? entryTimestep : -1; - v.intervalSpeedSum = speedFraction / (1000. / (SUMOReal) DELTA_T); + v.intervalSpeedSum = entryTimestep >= STEPS2TIME(myLastResetTime) ? speedFraction : 0; v.haltings = 0; v.intervalHaltings = 0; if (veh.getSpeed() < myHaltingSpeedThreshold) { - if (1. - entryTimestepFraction > myHaltingTimeThreshold) { + if (fractionTimeOnDet > myHaltingTimeThreshold) { v.haltings++; v.intervalHaltings++; } @@ -191,27 +186,15 @@ void -MSE3Collector::leave(SUMOVehicle& veh, SUMOReal leaveTimestep) { +MSE3Collector::leave(const SUMOVehicle& veh, const SUMOReal leaveTimestep, const SUMOReal fractionTimeOnDet) { if (myEnteredContainer.find(&veh) == myEnteredContainer.end()) { WRITE_WARNING("Vehicle '" + veh.getID() + "' left " + toString(SUMO_TAG_E3DETECTOR) + " '" + getID() + "' before entering it."); } else { E3Values values = myEnteredContainer[&veh]; values.leaveTime = leaveTimestep; - SUMOReal leaveTimestepFraction = leaveTimestep - (SUMOReal)((int) leaveTimestep); - leaveTimestepFraction = fmod(leaveTimestep * 1000., 1000.) / (SUMOReal) DELTA_T; - if (values.hadUpdate) { - SUMOReal speedFraction = (veh.getSpeed() * leaveTimestepFraction); - values.speedSum += speedFraction / (1000. / (SUMOReal) DELTA_T); - values.intervalSpeedSum += speedFraction / (1000. / (SUMOReal) DELTA_T); - if (veh.getSpeed() < myHaltingSpeedThreshold && values.haltingBegin != -1 && leaveTimestep - values.haltingBegin > myHaltingTimeThreshold) { - values.haltings++; - values.intervalHaltings++; - } - } else { - SUMOReal speedFraction = (veh.getSpeed() * SUMOReal(1. - leaveTimestepFraction)); - values.speedSum -= speedFraction / (1000. / (SUMOReal) DELTA_T); - values.intervalSpeedSum -= speedFraction / (1000. / (SUMOReal) DELTA_T); - } + const SUMOReal speedFraction = veh.getSpeed() * (TS - fractionTimeOnDet); + values.speedSum -= speedFraction; + values.intervalSpeedSum -= speedFraction; myEnteredContainer.erase(&veh); myLeftContainer[&veh] = values; } @@ -227,7 +210,7 @@ SUMOReal meanTravelTime = 0.; SUMOReal meanSpeed = 0.; SUMOReal meanHaltsPerVehicle = 0.; - for (std::map::iterator i = myLeftContainer.begin(); i != myLeftContainer.end(); ++i) { + for (std::map::iterator i = myLeftContainer.begin(); i != myLeftContainer.end(); ++i) { meanHaltsPerVehicle += (SUMOReal)(*i).second.haltings; SUMOReal steps = (*i).second.leaveTime - (*i).second.entryTime; meanTravelTime += steps; @@ -247,14 +230,18 @@ SUMOReal meanIntervalSpeedWithin = 0.; SUMOReal meanIntervalHaltsPerVehicleWithin = 0.; SUMOReal meanIntervalDurationWithin = 0.; - for (std::map::iterator i = myEnteredContainer.begin(); i != myEnteredContainer.end(); ++i) { + for (std::map::iterator i = myEnteredContainer.begin(); i != myEnteredContainer.end(); ++i) { meanHaltsPerVehicleWithin += (SUMOReal)(*i).second.haltings; meanIntervalHaltsPerVehicleWithin += (SUMOReal)(*i).second.intervalHaltings; - SUMOReal time = (SUMOReal)stopTime / 1000. - (*i).second.entryTime; - SUMOReal intLength = (SUMOReal)(stopTime - startTime) / 1000.; - SUMOReal timeWithin = MIN2(time, intLength); - meanSpeedWithin += ((*i).second.speedSum / time); - meanIntervalSpeedWithin += ((*i).second.intervalSpeedSum / timeWithin); + const SUMOReal end = (*i).second.leaveTime == 0 ? STEPS2TIME(stopTime) : (*i).second.leaveTime; + const SUMOReal time = end - (*i).second.entryTime; + const SUMOReal timeWithin = MIN2(time, end - STEPS2TIME(startTime)); + if (i->second.speedSum > 0.) { + meanSpeedWithin += i->second.speedSum / time; + } + if (i->second.intervalSpeedSum > 0.) { + meanIntervalSpeedWithin += i->second.intervalSpeedSum / timeWithin; + } meanDurationWithin += time; meanIntervalDurationWithin += timeWithin; // reset interval values @@ -295,25 +282,13 @@ MSE3Collector::detectorUpdate(const SUMOTime step) { myCurrentMeanSpeed = 0; myCurrentHaltingsNumber = 0; - myCurrentTouchedVehicles = 0; - for (std::map::iterator pair = myEnteredContainer.begin(); pair != myEnteredContainer.end(); ++pair) { - SUMOVehicle* veh = pair->first; + for (std::map::iterator pair = myEnteredContainer.begin(); pair != myEnteredContainer.end(); ++pair) { + const SUMOVehicle* veh = pair->first; E3Values& values = pair->second; + myCurrentMeanSpeed += veh->getSpeed(); values.hadUpdate = true; - if (values.entryTime * 1000. >= step) { - // vehicle entered at this time step - SUMOReal fraction = step + 1. - values.entryTime; - myCurrentMeanSpeed += fraction * veh->getSpeed(); - myCurrentTouchedVehicles += fraction; - if (values.haltingBegin >= 0) { - myCurrentHaltingsNumber++; - } - continue; - } values.speedSum += veh->getSpeed() * TS; values.intervalSpeedSum += veh->getSpeed() * TS; - myCurrentMeanSpeed += veh->getSpeed(); - myCurrentTouchedVehicles += 1; if (veh->getSpeed() < myHaltingSpeedThreshold) { if (values.haltingBegin == -1) { values.haltingBegin = step; @@ -326,40 +301,37 @@ } else { values.haltingBegin = -1; } - myCurrentMeanSpeed /= myCurrentTouchedVehicles; + } + if (myEnteredContainer.size() == 0) { + myCurrentMeanSpeed = -1; + } else { + myCurrentMeanSpeed /= myEnteredContainer.size(); } } SUMOReal MSE3Collector::getCurrentMeanSpeed() const { - SUMOReal ret = 0; - if (myEnteredContainer.size() == 0) { - return -1; - } - for (std::map::const_iterator pair = myEnteredContainer.begin(); pair != myEnteredContainer.end(); ++pair) { - ret += (*pair).first->getSpeed(); - } - return ret / SUMOReal(myEnteredContainer.size()); + return myCurrentMeanSpeed; } -SUMOReal +int MSE3Collector::getCurrentHaltingNumber() const { return myCurrentHaltingsNumber; } -SUMOReal +int MSE3Collector::getVehiclesWithin() const { - return (SUMOReal) myEnteredContainer.size(); + return (int) myEnteredContainer.size(); } std::vector MSE3Collector::getCurrentVehicleIDs() const { std::vector ret; - for (std::map::const_iterator pair = myEnteredContainer.begin(); pair != myEnteredContainer.end(); ++pair) { + for (std::map::const_iterator pair = myEnteredContainer.begin(); pair != myEnteredContainer.end(); ++pair) { ret.push_back((*pair).first->getID()); } std::sort(ret.begin(), ret.end()); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSE3Collector.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSE3Collector.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSE3Collector.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSE3Collector.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Christian Roessel /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Tue Dec 02 2003 22:17 CET -/// @version $Id: MSE3Collector.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSE3Collector.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A detector of vehicles passing an area between entry/exit points /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -224,9 +225,10 @@ * Inserts vehicle into internal containers. * * @param[in] veh The vehicle that entered the area - * @param[in] entryTimestep The time step the vehicle entered the area + * @param[in] entryTimestep The time in seconds the vehicle entered the area + * @param[in] fractionTimeOnDet The interpolated time in seconds the vehicle already spent on the detector */ - void enter(SUMOVehicle& veh, SUMOReal entryTimestep); + void enter(const SUMOVehicle& veh, const SUMOReal entryTimestep, const SUMOReal fractionTimeOnDet); /** @brief Called if a vehicle passes a leave-cross-section. @@ -234,9 +236,10 @@ * Removes vehicle from internal containers. * * @param[in] veh The vehicle that left the area - * @param[in] entryTimestep The time step the vehicle left the area + * @param[in] leaveTimestep The time in seconds the vehicle left the area + * @param[in] fractionTimeOnDet The interpolated time in seconds the vehicle still spent on the detector */ - void leave(SUMOVehicle& veh, SUMOReal leaveTimestep); + void leave(const SUMOVehicle& veh, const SUMOReal leaveTimestep, const SUMOReal fractionTimeOnDet); /// @name Methods returning current values @@ -257,13 +260,13 @@ * * @return The mean number of haltings within the area */ - SUMOReal getCurrentHaltingNumber() const; + int getCurrentHaltingNumber() const; /** @brief Returns the number of vehicles within the area * @return The number of vehicles that passed the entry collector */ - SUMOReal getVehiclesWithin() const; + int getVehiclesWithin() const; /** @brief Returns the number of vehicles within the area @@ -360,10 +363,10 @@ }; /// @brief Container for vehicles that have entered the area - std::map myEnteredContainer; + std::map myEnteredContainer; /// @brief Container for vehicles that have left the area - std::map myLeftContainer; + std::map myLeftContainer; /// @name Storages for current values @@ -373,14 +376,7 @@ SUMOReal myCurrentMeanSpeed; /// @brief The current number of haltings (inside) - SUMOReal myCurrentHaltingsNumber; - - /** @brief The current number of vehicles inside; - * - * Please note, that vehicles that enter the area are given as a fraction - * @see execute - */ - SUMOReal myCurrentTouchedVehicles; + int myCurrentHaltingsNumber; /// @} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSEmissionExport.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSEmissionExport.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSEmissionExport.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSEmissionExport.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,12 +1,16 @@ /****************************************************************************/ /// @file MSEmissionExport.cpp +/// @author Daniel Krajzewicz /// @author Mario Krumnow -/// @version $Id: MSEmissionExport.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date 2012-04-26 +/// @version $Id: MSEmissionExport.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Realises dumping Emission Data /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -27,19 +31,12 @@ #include #endif -#include -#include -#include -#include #include -#include "MSEmissionExport.h" +#include +#include #include #include - -#ifdef HAVE_MESOSIM -#include -#include -#endif +#include "MSEmissionExport.h" #ifdef CHECK_MEMORY_LEAKS #include @@ -51,29 +48,28 @@ // =========================================================================== void MSEmissionExport::write(OutputDevice& of, SUMOTime timestep) { - of.openTag("timestep").writeAttr("time", time2string(timestep)); - MSVehicleControl& vc = MSNet::getInstance()->getVehicleControl(); - MSVehicleControl::constVehIt it = vc.loadedVehBegin(); - MSVehicleControl::constVehIt end = vc.loadedVehEnd(); - for (; it != end; ++it) { - const MSVehicle* veh = static_cast((*it).second); - if (!veh->isOnRoad()) { - continue; + for (MSVehicleControl::constVehIt it = vc.loadedVehBegin(); it != vc.loadedVehEnd(); ++it) { + const SUMOVehicle* veh = it->second; + const MSVehicle* microVeh = dynamic_cast(veh); + if (veh->isOnRoad()) { + std::string fclass = veh->getVehicleType().getID(); + fclass = fclass.substr(0, fclass.find_first_of("@")); + PollutantsInterface::Emissions emiss = PollutantsInterface::computeAll(veh->getVehicleType().getEmissionClass(), veh->getSpeed(), veh->getAcceleration(), veh->getSlope()); + of.openTag("vehicle").writeAttr("id", veh->getID()).writeAttr("eclass", PollutantsInterface::getName(veh->getVehicleType().getEmissionClass())); + of.writeAttr("CO2", emiss.CO2).writeAttr("CO", emiss.CO).writeAttr("HC", emiss.HC).writeAttr("NOx", emiss.NOx); + of.writeAttr("PMx", emiss.PMx).writeAttr("fuel", emiss.fuel); + of.writeAttr("noise", HelpersHarmonoise::computeNoise(veh->getVehicleType().getEmissionClass(), veh->getSpeed(), veh->getAcceleration())); + of.writeAttr("route", veh->getRoute().getID()).writeAttr("type", fclass); + if (microVeh != 0) { + of.writeAttr("waiting", microVeh->getWaitingSeconds()); + of.writeAttr("lane", microVeh->getLane()->getID()); + } + of.writeAttr("pos", veh->getPositionOnLane()).writeAttr("speed", veh->getSpeed()); + of.writeAttr("angle", veh->getAngle()).writeAttr("x", veh->getPosition().x()).writeAttr("y", veh->getPosition().y()); + of.closeTag(); } - - std::string fclass = veh->getVehicleType().getID(); - fclass = fclass.substr(0, fclass.find_first_of("@")); - - Position pos = veh->getLane()->getShape().positionAtOffset(veh->getPositionOnLane()); - of.openTag("vehicle").writeAttr("id", veh->getID()).writeAttr("eclass", veh->getVehicleType().getEmissionClass()).writeAttr("co2", veh->getHBEFA_CO2Emissions()); - of.writeAttr("co", veh->getHBEFA_COEmissions()).writeAttr("hc", veh->getHBEFA_HCEmissions()).writeAttr("nox", veh->getHBEFA_NOxEmissions()); - of.writeAttr("pmx", veh->getHBEFA_PMxEmissions()).writeAttr("fuel", veh->getHBEFA_FuelConsumption()).writeAttr("noise", veh->getHarmonoise_NoiseEmissions()); - of.writeAttr("route", veh->getRoute().getID()).writeAttr("type", fclass).writeAttr("waiting", veh->getWaitingSeconds()); - of.writeAttr("lane", veh->getLane()->getID()).writeAttr("pos", veh->getPositionOnLane()).writeAttr("speed", veh->getSpeed() * 3.6); - of.writeAttr("angle", veh->getAngle()).writeAttr("x", pos.x()).writeAttr("y", pos.y()); - of.closeTag(); } of.closeTag(); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSEmissionExport.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSEmissionExport.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSEmissionExport.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSEmissionExport.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,13 @@ /****************************************************************************/ /// @file MSEmissionExport.h /// @author Mario Krumnow +/// @date 2012-04-26 +/// @version $Id: MSEmissionExport.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Realises dumping Emission Data /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSFCDExport.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSFCDExport.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSFCDExport.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSFCDExport.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,16 @@ /****************************************************************************/ /// @file MSFCDExport.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @author Mario Krumnow +/// @author Michael Behrisch +/// @date 2012-04-26 +/// @version $Id: MSFCDExport.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Realises dumping Floating Car Data (FCD) Data /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,12 +41,10 @@ #include "MSFCDExport.h" #include #include - -#ifdef HAVE_MESOSIM -#include -#include -#endif - +#include +#include +#include +#include #ifdef CHECK_MEMORY_LEAKS #include #endif // CHECK_MEMORY_LEAKS @@ -54,21 +57,18 @@ MSFCDExport::write(OutputDevice& of, SUMOTime timestep) { const bool useGeo = OptionsCont::getOptions().getBool("fcd-output.geo"); const bool signals = OptionsCont::getOptions().getBool("fcd-output.signals"); - MSVehicleControl& vc = MSNet::getInstance()->getVehicleControl(); - MSVehicleControl::constVehIt it = vc.loadedVehBegin(); - MSVehicleControl::constVehIt end = vc.loadedVehEnd(); - of.openTag("timestep").writeAttr(SUMO_ATTR_TIME, time2string(timestep)); - for (; it != end; ++it) { - const MSVehicle* veh = static_cast((*it).second); + MSVehicleControl& vc = MSNet::getInstance()->getVehicleControl(); + for (MSVehicleControl::constVehIt it = vc.loadedVehBegin(); it != vc.loadedVehEnd(); ++it) { + const SUMOVehicle* veh = it->second; + const MSVehicle* microVeh = dynamic_cast(veh); if (veh->isOnRoad()) { Position pos = veh->getPosition(); - MSLane* lane = veh->getLane(); if (useGeo) { of.setPrecision(GEO_OUTPUT_ACCURACY); GeoConvHelper::getFinal().cartesian2geo(pos); } - of.openTag("vehicle"); + of.openTag(SUMO_TAG_VEHICLE); of.writeAttr(SUMO_ATTR_ID, veh->getID()); of.writeAttr(SUMO_ATTR_X, pos.x()); of.writeAttr(SUMO_ATTR_Y, pos.y()); @@ -76,14 +76,68 @@ of.writeAttr(SUMO_ATTR_TYPE, veh->getVehicleType().getID()); of.writeAttr(SUMO_ATTR_SPEED, veh->getSpeed()); of.writeAttr(SUMO_ATTR_POSITION, veh->getPositionOnLane()); - of.writeAttr(SUMO_ATTR_LANE, lane->getID()); - of.writeAttr(SUMO_ATTR_SLOPE, lane->getShape().slopeDegreeAtOffset(veh->getPositionOnLane())); - if (signals) { - of.writeAttr("signals", toString(veh->getSignals())); + if (microVeh != 0) { + of.writeAttr(SUMO_ATTR_LANE, microVeh->getLane()->getID()); + } + of.writeAttr(SUMO_ATTR_SLOPE, veh->getSlope()); + if (microVeh != 0 && signals) { + of.writeAttr("signals", toString(microVeh->getSignals())); } of.closeTag(); } } + if (MSNet::getInstance()->getPersonControl().hasPersons()) { + // write persons + MSEdgeControl& ec = MSNet::getInstance()->getEdgeControl(); + const MSEdgeVector& edges = ec.getEdges(); + for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) { + const std::vector& persons = (*e)->getSortedPersons(timestep); + for (std::vector::const_iterator it_p = persons.begin(); it_p != persons.end(); ++it_p) { + MSPerson* p = *it_p; + Position pos = p->getPosition(); + if (useGeo) { + of.setPrecision(GEO_OUTPUT_ACCURACY); + GeoConvHelper::getFinal().cartesian2geo(pos); + } + of.openTag(SUMO_TAG_PERSON); + of.writeAttr(SUMO_ATTR_ID, p->getID()); + of.writeAttr(SUMO_ATTR_X, pos.x()); + of.writeAttr(SUMO_ATTR_Y, pos.y()); + of.writeAttr(SUMO_ATTR_ANGLE, p->getAngle()); + of.writeAttr(SUMO_ATTR_SPEED, p->getSpeed()); + of.writeAttr(SUMO_ATTR_POSITION, p->getEdgePos()); + of.writeAttr(SUMO_ATTR_EDGE, (*e)->getID()); + of.writeAttr(SUMO_ATTR_SLOPE, (*e)->getLanes()[0]->getShape().slopeDegreeAtOffset(p->getEdgePos())); + of.closeTag(); + } + } + } + if (MSNet::getInstance()->getContainerControl().hasContainers()) { + // write containers + MSEdgeControl& ec = MSNet::getInstance()->getEdgeControl(); + const std::vector& edges = ec.getEdges(); + for (std::vector::const_iterator e = edges.begin(); e != edges.end(); ++e) { + const std::vector& containers = (*e)->getSortedContainers(timestep); + for (std::vector::const_iterator it_c = containers.begin(); it_c != containers.end(); ++it_c) { + MSContainer* c = *it_c; + Position pos = c->getPosition(); + if (useGeo) { + of.setPrecision(GEO_OUTPUT_ACCURACY); + GeoConvHelper::getFinal().cartesian2geo(pos); + } + of.openTag(SUMO_TAG_CONTAINER); + of.writeAttr(SUMO_ATTR_ID, c->getID()); + of.writeAttr(SUMO_ATTR_X, pos.x()); + of.writeAttr(SUMO_ATTR_Y, pos.y()); + of.writeAttr(SUMO_ATTR_ANGLE, c->getAngle()); + of.writeAttr(SUMO_ATTR_SPEED, c->getSpeed()); + of.writeAttr(SUMO_ATTR_POSITION, c->getEdgePos()); + of.writeAttr(SUMO_ATTR_EDGE, (*e)->getID()); + of.writeAttr(SUMO_ATTR_SLOPE, (*e)->getLanes()[0]->getShape().slopeDegreeAtOffset(c->getEdgePos())); + of.closeTag(); + } + } + } of.closeTag(); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSFCDExport.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSFCDExport.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSFCDExport.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSFCDExport.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,13 @@ /****************************************************************************/ /// @file MSFCDExport.h /// @author Mario Krumnow +/// @date 2012-04-26 +/// @version $Id: MSFCDExport.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Realises dumping Floating Car Data (FCD) Data /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -79,84 +81,5 @@ #endif /****************************************************************************/ -/****************************************************************************/ -/// @file MSFCDExport.h -/// @author Mario Krumnow -/// -// Realises dumping Floating Car Data (FCD) Data -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef MSFCDExport_h -#define MSFCDExport_h -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class OutputDevice; -class MSEdgeControl; -class MSEdge; -class MSLane; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class MSFCDExport - * @brief Realises dumping FCD Data - * - * The class offers a static method, which writes Position of each vehicle of - * the network into the given OutputDevice. - * - * @todo consider error-handling on write (using IOError) - */ -class MSFCDExport { -public: - /** @brief Writes the posion and the angle of each vehcile into the given device - * - * Opens the current time step and export the values vehicle id, position and angle - * - * @param[in] of The output device to use - * @param[in] timestep The current time step - * @exception IOError If an error on writing occurs (!!! not yet implemented) - */ - static void write(OutputDevice& of, SUMOTime timestep); - - -private: - /// @brief Invalidated copy constructor. - MSFCDExport(const MSFCDExport&); - - /// @brief Invalidated assignment operator. - MSFCDExport& operator=(const MSFCDExport&); - - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSFullExport.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSFullExport.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSFullExport.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSFullExport.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,12 +1,16 @@ /****************************************************************************/ /// @file MSFullExport.cpp +/// @author Daniel Krajzewicz /// @author Mario Krumnow -/// @version $Id: MSFullExport.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date 2012-04-26 +/// @version $Id: MSFullExport.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Dumping a hugh List of Parameters available in the Simulation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -27,21 +31,15 @@ #include #endif -#include -#include -#include -#include -#include #include -#include "MSFullExport.h" +#include +#include +#include +#include #include #include #include - -#ifdef HAVE_MESOSIM -#include -#include -#endif +#include "MSFullExport.h" #ifdef CHECK_MEMORY_LEAKS #include @@ -68,20 +66,24 @@ MSFullExport::writeVehicles(OutputDevice& of) { of.openTag("vehicles"); MSVehicleControl& vc = MSNet::getInstance()->getVehicleControl(); - MSVehicleControl::constVehIt it = vc.loadedVehBegin(); - MSVehicleControl::constVehIt end = vc.loadedVehEnd(); - for (; it != end; ++it) { - const MSVehicle* veh = static_cast((*it).second); + for (MSVehicleControl::constVehIt it = vc.loadedVehBegin(); it != vc.loadedVehEnd(); ++it) { + const SUMOVehicle* veh = it->second; + const MSVehicle* microVeh = dynamic_cast(veh); if (veh->isOnRoad()) { std::string fclass = veh->getVehicleType().getID(); fclass = fclass.substr(0, fclass.find_first_of("@")); - Position pos = veh->getLane()->getShape().positionAtOffset(veh->getPositionOnLane()); - of.openTag("vehicle").writeAttr("id", veh->getID()).writeAttr("eclass", toString(veh->getVehicleType().getEmissionClass())); - of.writeAttr("co2", veh->getHBEFA_CO2Emissions()).writeAttr("co", veh->getHBEFA_COEmissions()).writeAttr("hc", veh->getHBEFA_HCEmissions()); - of.writeAttr("nox", veh->getHBEFA_NOxEmissions()).writeAttr("pmx", veh->getHBEFA_PMxEmissions()).writeAttr("noise", veh->getHarmonoise_NoiseEmissions()); - of.writeAttr("route", veh->getRoute().getID()).writeAttr("type", fclass).writeAttr("waiting", veh->getWaitingSeconds()); - of.writeAttr("lane", veh->getLane()->getID()).writeAttr("pos_lane", veh->getPositionOnLane()).writeAttr("speed", veh->getSpeed() * 3.6); - of.writeAttr("angle", veh->getAngle()).writeAttr("x", pos.x()).writeAttr("y", pos.y()); + PollutantsInterface::Emissions emiss = PollutantsInterface::computeAll(veh->getVehicleType().getEmissionClass(), veh->getSpeed(), veh->getAcceleration(), veh->getSlope()); + of.openTag("vehicle").writeAttr("id", veh->getID()).writeAttr("eclass", PollutantsInterface::getName(veh->getVehicleType().getEmissionClass())); + of.writeAttr("CO2", emiss.CO2).writeAttr("CO", emiss.CO).writeAttr("HC", emiss.HC).writeAttr("NOx", emiss.NOx); + of.writeAttr("PMx", emiss.PMx).writeAttr("fuel", emiss.fuel); + of.writeAttr("noise", HelpersHarmonoise::computeNoise(veh->getVehicleType().getEmissionClass(), veh->getSpeed(), veh->getAcceleration())); + of.writeAttr("route", veh->getRoute().getID()).writeAttr("type", fclass); + if (microVeh != 0) { + of.writeAttr("waiting", microVeh->getWaitingSeconds()); + of.writeAttr("lane", microVeh->getLane()->getID()); + } + of.writeAttr("pos", veh->getPositionOnLane()).writeAttr("speed", veh->getSpeed()); + of.writeAttr("angle", veh->getAngle()).writeAttr("x", veh->getPosition().x()).writeAttr("y", veh->getPosition().y()); of.closeTag(); } } @@ -92,8 +94,8 @@ MSFullExport::writeEdge(OutputDevice& of) { of.openTag("edges"); MSEdgeControl& ec = MSNet::getInstance()->getEdgeControl(); - const std::vector& edges = ec.getEdges(); - for (std::vector::const_iterator e = edges.begin(); e != edges.end(); ++e) { + const MSEdgeVector& edges = ec.getEdges(); + for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) { MSEdge& edge = **e; of.openTag("edge").writeAttr("id", edge.getID()).writeAttr("traveltime", edge.getCurrentTravelTime()); const std::vector& lanes = edge.getLanes(); @@ -109,10 +111,10 @@ void MSFullExport::writeLane(OutputDevice& of, const MSLane& lane) { - of.openTag("lane").writeAttr("id", lane.getID()).writeAttr("co", lane.getHBEFA_COEmissions()).writeAttr("co2", lane.getHBEFA_CO2Emissions()); - of.writeAttr("nox", lane.getHBEFA_NOxEmissions()).writeAttr("pmx", lane.getHBEFA_PMxEmissions()).writeAttr("hc", lane.getHBEFA_HCEmissions()); - of.writeAttr("noise", lane.getHarmonoise_NoiseEmissions()).writeAttr("fuel", lane.getHBEFA_FuelConsumption()).writeAttr("maxspeed", lane.getSpeedLimit() * 3.6); // @todo: use m/s for speed - of.writeAttr("meanspeed", lane.getMeanSpeed() * 3.6).writeAttr("occupancy", lane.getOccupancy()).writeAttr("vehicle_count", lane.getVehicleNumber()); + of.openTag("lane").writeAttr("id", lane.getID()).writeAttr("CO", lane.getCOEmissions()).writeAttr("CO2", lane.getCO2Emissions()); + of.writeAttr("NOx", lane.getNOxEmissions()).writeAttr("PMx", lane.getPMxEmissions()).writeAttr("HC", lane.getHCEmissions()); + of.writeAttr("noise", lane.getHarmonoise_NoiseEmissions()).writeAttr("fuel", lane.getFuelConsumption()).writeAttr("maxspeed", lane.getSpeedLimit()); + of.writeAttr("meanspeed", lane.getMeanSpeed() * 3.6).writeAttr("occupancy", lane.getNettoOccupancy()).writeAttr("vehicle_count", lane.getVehicleNumber()); of.closeTag(); } @@ -124,7 +126,7 @@ std::vector ids = vc.getAllTLIds(); for (std::vector::const_iterator id_it = ids.begin(); id_it != ids.end(); ++id_it) { MSTLLogicControl::TLSLogicVariants& vars = MSNet::getInstance()->getTLSControl().get(*id_it); - const MSTrafficLightLogic::LaneVectorVector& lanes = vars.getActive()->getLanes(); + const MSTrafficLightLogic::LaneVectorVector& lanes = vars.getActive()->getLaneVectors(); std::vector laneIDs; for (MSTrafficLightLogic::LaneVectorVector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSFullExport.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSFullExport.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSFullExport.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSFullExport.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,13 @@ /****************************************************************************/ /// @file MSFullExport.h /// @author Mario Krumnow +/// @date 2012-04-26 +/// @version $Id: MSFullExport.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Dumping a hugh List of Parameters available in the Simulation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -88,7 +90,6 @@ }; - #endif /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSInductLoop.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSInductLoop.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSInductLoop.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSInductLoop.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -7,12 +7,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date 2004-11-23 -/// @version $Id: MSInductLoop.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSInductLoop.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // An unextended detector measuring at a fixed position on a fixed lane. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -52,6 +52,7 @@ #include #endif // CHECK_MEMORY_LEAKS +#define HAS_NOT_LEFT_DETECTOR -1 // =========================================================================== // method definitions @@ -98,10 +99,14 @@ } enterDetectorByMove(veh, entryTime); } - if (newPos - veh.getVehicleType().getLength() > myPosition && oldPos - veh.getVehicleType().getLength() <= myPosition) { - // vehicle passed the detector + if (newPos - veh.getVehicleType().getLength() > myPosition) { + // vehicle passed the detector (it may have changed onto this lane + // somewhere past the detector) + assert(newSpeed > 0 || myVehiclesOnDet.find(&veh) == myVehiclesOnDet.end()); SUMOReal leaveTime = STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()); - leaveTime += (myPosition - oldPos + veh.getVehicleType().getLength()) / newSpeed; + if (newSpeed > 0) { + leaveTime += (myPosition - oldPos + veh.getVehicleType().getLength()) / newSpeed; + } leaveDetectorByMove(veh, leaveTime); return false; } @@ -111,22 +116,15 @@ bool -MSInductLoop::notifyLeave(SUMOVehicle& veh, SUMOReal /*lastPos*/, MSMoveReminder::Notification reason) { +MSInductLoop::notifyLeave(SUMOVehicle& veh, SUMOReal lastPos, MSMoveReminder::Notification reason) { if (reason != MSMoveReminder::NOTIFICATION_JUNCTION) { - // vehicle is on detector during lane change or arrival, or ... - leaveDetectorByLaneChange(veh); + leaveDetectorByLaneChange(veh, lastPos); return false; } return true; } -bool -MSInductLoop::notifyEnter(SUMOVehicle& /* veh */, MSMoveReminder::Notification) { - return true; -} - - SUMOReal MSInductLoop::getCurrentSpeed() const { std::vector d = collectVehiclesOnDet(MSNet::getInstance()->getCurrentTimeStep() - DELTA_T); @@ -153,8 +151,10 @@ return -1; } SUMOReal occupancy = 0; + SUMOReal csecond = STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()); for (std::vector< VehicleData >::const_iterator i = d.begin(); i != d.end(); ++i) { - SUMOReal timeOnDetDuringInterval = (*i).leaveTimeM - MAX2(STEPS2TIME(tbeg), (*i).entryTimeM); + const SUMOReal leaveTime = (*i).leaveTimeM == HAS_NOT_LEFT_DETECTOR ? csecond : (*i).leaveTimeM; + SUMOReal timeOnDetDuringInterval = leaveTime - MAX2(STEPS2TIME(tbeg), (*i).entryTimeM); timeOnDetDuringInterval = MIN2(timeOnDetDuringInterval, TS); occupancy += timeOnDetDuringInterval; } @@ -192,7 +192,7 @@ void MSInductLoop::writeXMLDetectorProlog(OutputDevice& dev) const { - dev.writeXMLHeader("detector", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/det_e1_file.xsd\""); + dev.writeXMLHeader("detector", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/det_e1_file.xsd\""); } @@ -292,10 +292,13 @@ void -MSInductLoop::leaveDetectorByLaneChange(SUMOVehicle& veh) { +MSInductLoop::leaveDetectorByLaneChange(SUMOVehicle& veh, SUMOReal lastPos) { // Discard entry data myVehiclesOnDet.erase(&veh); - myDismissedVehicleNumber++; + if (lastPos > myPosition) { + // vehicle is on detector during lane change or arrival, or ... + myDismissedVehicleNumber++; + } } @@ -313,10 +316,9 @@ ret.push_back(*i); } } - SUMOTime ct = MSNet::getInstance()->getCurrentTimeStep(); for (VehicleMap::const_iterator i = myVehiclesOnDet.begin(); i != myVehiclesOnDet.end(); ++i) { SUMOVehicle* v = (*i).first; - VehicleData d(v->getID(), v->getVehicleType().getLength(), (*i).second, STEPS2TIME(ct), v->getVehicleType().getID()); + VehicleData d(v->getID(), v->getVehicleType().getLength(), (*i).second, HAS_NOT_LEFT_DETECTOR, v->getVehicleType().getID()); d.speedM = v->getSpeed(); ret.push_back(d); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSInductLoop.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSInductLoop.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSInductLoop.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSInductLoop.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,14 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date 2004-11-23 -/// @version $Id: MSInductLoop.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSInductLoop.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An unextended detector measuring at a fixed position on a fixed lane. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -140,20 +141,6 @@ bool notifyLeave(SUMOVehicle& veh, SUMOReal lastPos, MSMoveReminder::Notification reason); - /** @brief Returns whether the detector may has to be concerned during the vehicle's further movement - * - * If the detector is in front of the vehicle, true is returned. If - * the vehicle's front has passed the detector, false, because - * the vehicle is no longer relevant for the detector. - * - * @param[in] veh The entering vehicle. - * @param[in] reason how the vehicle enters the lane - * @return True if vehicle is on or in front of the detector. - * @see MSMoveReminder - * @see MSMoveReminder::notifyEnter - * @see MSMoveReminder::Notification - */ - bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason); //@} @@ -265,7 +252,7 @@ VehicleData(const std::string& id, SUMOReal vehLength, SUMOReal entryTimestep, SUMOReal leaveTimestep, const std::string& typeID) : idM(id), lengthM(vehLength), entryTimeM(entryTimestep), leaveTimeM(leaveTimestep), - speedM(lengthM / ((leaveTimeM - entryTimeM))), typeIDM(typeID) {} + speedM(vehLength / MAX2(leaveTimestep - entryTimestep, NUMERICAL_EPS)), typeIDM(typeID) {} /// @brief The id of the vehicle std::string idM; @@ -314,8 +301,9 @@ /** @brief Removes a vehicle from the detector's map myVehiclesOnDet. * @param veh The leaving vehicle. + * @param lastPos The last position of the leaving vehicle. */ - virtual void leaveDetectorByLaneChange(SUMOVehicle& veh); + virtual void leaveDetectorByLaneChange(SUMOVehicle& veh, SUMOReal lastPos); /// @} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSInstantInductLoop.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSInstantInductLoop.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSInstantInductLoop.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSInstantInductLoop.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file MSInstantInductLoop.cpp /// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch /// @date 2011-09.08 -/// @version $Id: MSInstantInductLoop.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSInstantInductLoop.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // An instantaneous induction loop /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -86,24 +88,21 @@ write("enter", entryTime, veh, newSpeed); } myEntryTimes[&veh] = entryTime; - return true; } if (newPos - veh.getVehicleType().getLength() > myPosition) { - // vehicle passed the detector - SUMOReal leaveTime = STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()); - leaveTime += (myPosition - oldPos + veh.getVehicleType().getLength()) / newSpeed; std::map::iterator i = myEntryTimes.find(&veh); if (i != myEntryTimes.end()) { + // vehicle passed the detector + SUMOReal leaveTime = STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()); + leaveTime += (myPosition - oldPos + veh.getVehicleType().getLength()) / newSpeed; write("leave", leaveTime, veh, newSpeed, "occupancy", leaveTime - (*i).second); myEntryTimes.erase(i); - } else { - write("leave", leaveTime, veh, newSpeed); + myLastExitTime = leaveTime; } - myLastExitTime = leaveTime; return false; } // vehicle stays on the detector - write("stay", STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()), veh, newSpeed); + write("stay", STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep() + DELTA_T), veh, newSpeed); return true; } @@ -125,13 +124,17 @@ MSInstantInductLoop::notifyLeave(SUMOVehicle& veh, SUMOReal /*lastPos*/, MSMoveReminder::Notification reason) { std::map::iterator i = myEntryTimes.find(&veh); if (i != myEntryTimes.end()) { + write("leave", i->second, veh, veh.getSpeed()); myEntryTimes.erase(i); + return false; } - if (reason != MSMoveReminder::NOTIFICATION_JUNCTION) { - write("leave", STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()), veh, veh.getSpeed()); + if (reason == MSMoveReminder::NOTIFICATION_JUNCTION) { + // vehicle might have jumped over detector at the end of the lane. we need + // one more notifyMove to register it + return true; + } else { return false; } - return true; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSInstantInductLoop.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSInstantInductLoop.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSInstantInductLoop.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSInstantInductLoop.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file MSInstantInductLoop.h /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date 2011-09.08 -/// @version $Id: MSInstantInductLoop.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSInstantInductLoop.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An instantaneous induction loop /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Amitran.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Amitran.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Amitran.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Amitran.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,206 @@ +/****************************************************************************/ +/// @file MSMeanData_Amitran.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Mon, 10.05.2004 +/// @version $Id: MSMeanData_Amitran.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Network state mean data collector for edges/lanes +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include "MSMeanData_Amitran.h" +#include + +#ifdef HAVE_INTERNAL +#include +#include +#include +#endif + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +// --------------------------------------------------------------------------- +// MSMeanData_Amitran::MSLaneMeanDataValues - methods +// --------------------------------------------------------------------------- +MSMeanData_Amitran::MSLaneMeanDataValues::MSLaneMeanDataValues(MSLane* const lane, + const SUMOReal length, + const bool doAdd, + const std::set* const vTypes, + const MSMeanData_Amitran* /* parent */) + : MSMeanData::MeanDataValues(lane, length, doAdd, vTypes), amount(0) {} + + +MSMeanData_Amitran::MSLaneMeanDataValues::~MSLaneMeanDataValues() { +} + + +void +MSMeanData_Amitran::MSLaneMeanDataValues::reset(bool) { + amount = 0; + typedAmount.clear(); + typedSamples.clear(); + typedTravelDistance.clear(); +} + + +void +MSMeanData_Amitran::MSLaneMeanDataValues::addTo(MSMeanData::MeanDataValues& val) const { + MSLaneMeanDataValues& v = (MSLaneMeanDataValues&) val; + v.amount += amount; + v.sampleSeconds += sampleSeconds; + v.travelledDistance += travelledDistance; + for (std::map::const_iterator it = typedAmount.begin(); it != typedAmount.end(); ++it) { + v.typedAmount[it->first] += it->second; + } + for (std::map::const_iterator it = typedSamples.begin(); it != typedSamples.end(); ++it) { + v.typedSamples[it->first] += it->second; + } + for (std::map::const_iterator it = typedTravelDistance.begin(); it != typedTravelDistance.end(); ++it) { + v.typedTravelDistance[it->first] += it->second; + } +} + + +void +MSMeanData_Amitran::MSLaneMeanDataValues::notifyMoveInternal(SUMOVehicle& veh, SUMOReal timeOnLane, SUMOReal speed) { + sampleSeconds += timeOnLane; + travelledDistance += speed * timeOnLane; + typedSamples[&veh.getVehicleType()] += timeOnLane; + typedTravelDistance[&veh.getVehicleType()] += speed * timeOnLane; +} + + +bool +MSMeanData_Amitran::MSLaneMeanDataValues::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason) { + if (vehicleApplies(veh)) { + if (getLane() == 0 || getLane() == static_cast(veh).getLane()) { + if (reason == MSMoveReminder::NOTIFICATION_DEPARTED || reason == MSMoveReminder::NOTIFICATION_JUNCTION) { + ++amount; + typedAmount[&veh.getVehicleType()]++; + } + } + return true; + } + return false; +} + + +bool +MSMeanData_Amitran::MSLaneMeanDataValues::isEmpty() const { + return sampleSeconds == 0 && amount == 0; +} + + +void +MSMeanData_Amitran::MSLaneMeanDataValues::write(OutputDevice& dev, const SUMOTime /* period */, + const SUMOReal /* numLanes */, const SUMOReal defaultTravelTime, const int /* numVehicles */) const { + if (sampleSeconds > 0) { + dev.writeAttr("amount", amount).writeAttr("averageSpeed", int(100 * travelledDistance / sampleSeconds)); + } else if (defaultTravelTime >= 0.) { + dev.writeAttr("amount", amount).writeAttr("averageSpeed", int(100 * myLaneLength / defaultTravelTime)); + } else { + dev.writeAttr("amount", amount).writeAttr("averageSpeed", "-1"); + } + if (myVehicleTypes != 0 && !myVehicleTypes->empty()) { + for (std::map::const_iterator it = typedAmount.begin(); it != typedAmount.end(); ++it) { + dev.openTag("actorConfig").writeAttr(SUMO_ATTR_ID, it->first->getNumericalID()); + dev.writeAttr("amount", it->second).writeAttr("averageSpeed", int(100 * typedTravelDistance.find(it->first)->second / typedSamples.find(it->first)->second)); + dev.closeTag(); + } + } + dev.closeTag(); +} + +// --------------------------------------------------------------------------- +// MSMeanData_Amitran - methods +// --------------------------------------------------------------------------- +MSMeanData_Amitran::MSMeanData_Amitran(const std::string& id, + const SUMOTime dumpBegin, + const SUMOTime dumpEnd, const bool useLanes, + const bool withEmpty, const bool printDefaults, + const bool withInternal, + const bool trackVehicles, + const SUMOReal maxTravelTime, + const SUMOReal minSamples, + const SUMOReal haltSpeed, + const std::set vTypes) + : MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults, + withInternal, trackVehicles, maxTravelTime, minSamples, vTypes), + myHaltSpeed(haltSpeed) { +} + + +MSMeanData_Amitran::~MSMeanData_Amitran() {} + + +void +MSMeanData_Amitran::writeXMLDetectorProlog(OutputDevice& dev) const { + dev.writeXMLHeader("linkData", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/amitran/linkdata.xsd\""); +} + + +std::string +MSMeanData_Amitran::getEdgeID(const MSEdge* const edge) { + return toString(edge->getNumericalID()); +} + + +void +MSMeanData_Amitran::openInterval(OutputDevice& dev, const SUMOTime startTime, const SUMOTime stopTime) { + const int duration = int(1000 * STEPS2TIME(stopTime - startTime) + 0.5); + dev.openTag(SUMO_TAG_TIMESLICE).writeAttr(SUMO_ATTR_STARTTIME, int(1000 * STEPS2TIME(startTime) + 0.5)).writeAttr(SUMO_ATTR_DURATION, duration); +} + + +bool +MSMeanData_Amitran::writePrefix(OutputDevice& dev, const MeanDataValues& values, const SumoXMLTag /* tag */, const std::string id) const { + if (myDumpEmpty || !values.isEmpty()) { + dev.openTag("link").writeAttr(SUMO_ATTR_ID, id); + return true; + } + return false; +} + + +MSMeanData::MeanDataValues* +MSMeanData_Amitran::createValues(MSLane* const lane, const SUMOReal length, const bool doAdd) const { + return new MSLaneMeanDataValues(lane, length, doAdd, &myVehicleTypes, this); +} + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Amitran.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Amitran.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Amitran.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Amitran.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,256 @@ +/****************************************************************************/ +/// @file MSMeanData_Amitran.h +/// @author Daniel Krajzewicz +/// @author Sascha Krieg +/// @author Michael Behrisch +/// @date Mon, 10.05.2004 +/// @version $Id: MSMeanData_Amitran.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Network state mean data collector for edges/lanes +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSMeanData_Amitran_h +#define MSMeanData_Amitran_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include "MSMeanData.h" + + +// =========================================================================== +// class declarations +// =========================================================================== +class OutputDevice; +class MSEdgeControl; +class MSEdge; +class MSLane; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSMeanData_Amitran + * @brief Network state mean data collector for edges/lanes + * + * This structure does not contain the data itself, it is stored within + * MSLaneMeanDataValues-MoveReminder objects. + * This class is used to build the output, optionally, in the case + * of edge-based dump, aggregated over the edge's lanes. + * + * @todo consider error-handling on write (using IOError) + */ +class MSMeanData_Amitran : public MSMeanData { +public: + /** + * @class MSLaneMeanDataValues + * @brief Data structure for mean (aggregated) edge/lane values + * + * Structure holding values that describe the flow and other physical + * properties aggregated over some seconds. + */ + class MSLaneMeanDataValues : public MSMeanData::MeanDataValues { + public: + /** @brief Constructor + * @param[in] length The length of the object for which the data gets collected + */ + MSLaneMeanDataValues(MSLane* const lane, const SUMOReal length, const bool doAdd, + const std::set* const vTypes = 0, + const MSMeanData_Amitran* parent = 0); + + /** @brief Destructor */ + virtual ~MSLaneMeanDataValues(); + + /** @brief Resets values so they may be used for the next interval + */ + void reset(bool afterWrite = false); + + /** @brief Add the values of this to the given one and store them there + * + * @param[in] val The meandata to add to + */ + void addTo(MSMeanData::MeanDataValues& val) const; + + /// @name Methods inherited from MSMoveReminder + /// @{ + + /** @brief Computes current values and adds them to their sums + * + * The fraction of time the vehicle is on the lane is computed and + * used as a weight for the vehicle's current values. + * The "emitted" field is incremented, additionally. + * + * @param[in] veh The vehicle that enters the lane + * @param[in] veh The entering vehicle. + * @param[in] reason how the vehicle enters the lane + * @return Always true + * @see MSMoveReminder::notifyEnter + * @see MSMoveReminder::Notification + */ + bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason); + //@} + + bool isEmpty() const; + + /** @brief Writes output values into the given stream + * + * @param[in] dev The output device to write the data into + * @param[in] period Length of the period the data were gathered + * @param[in] numLanes The total number of lanes for which the data was collected + * @exception IOError If an error on writing occurs (!!! not yet implemented) + */ + void write(OutputDevice& dev, const SUMOTime period, + const SUMOReal numLanes, const SUMOReal defaultTravelTime, + const int numVehicles = -1) const; + + protected: + /** @brief Internal notification about the vehicle moves + * + * Indicator if the reminders is still active for the passed + * vehicle/parameters. If false, the vehicle will erase this reminder + * from it's reminder-container. + * + * @param[in] veh Vehicle that asks this reminder. + * @param[in] timeOnLane time the vehicle spent on the lane. + * @param[in] speed Moving speed. + */ + void notifyMoveInternal(SUMOVehicle& veh, SUMOReal timeOnLane, + SUMOReal speed); + + private: + /// @name Collected values + /// @{ + /// @brief The number of vehicles that entered this lane within the sample interval + unsigned amount; + + /// @brief The number of vehicles that entered this lane within the sample interval by type + std::map typedAmount; + + /// @brief The number of sampled vehicle movements by type (in s) + std::map typedSamples; + + /// @brief The sum of the distances the vehicles travelled by type + std::map typedTravelDistance; + //@} + + }; + + +public: + /** @brief Constructor + * + * @param[in] id The id of the detector + * @param[in] dumpBegin Begin time of dump + * @param[in] dumpEnd End time of dump + * @param[in] useLanes Information whether lane-based or edge-based dump shall be generated + * @param[in] withEmpty Information whether empty lanes/edges shall be written + * @param[in] printDefaults Information whether defaults for empty lanes/edges shall be written + * @param[in] withInternal Information whether internal lanes/edges shall be written + * @param[in] trackVehicles Information whether vehicles shall be tracked + * @param[in] maxTravelTime the maximum travel time to output + * @param[in] minSamples the minimum number of sample seconds before the values are valid + * @param[in] haltSpeed the maximum speed to consider a vehicle waiting + * @param[in] vTypes the set of vehicle types to consider + */ + MSMeanData_Amitran(const std::string& id, + const SUMOTime dumpBegin, const SUMOTime dumpEnd, + const bool useLanes, const bool withEmpty, const bool printDefaults, + const bool withInternal, const bool trackVehicles, + const SUMOReal maxTravelTime, const SUMOReal minSamples, + const SUMOReal haltSpeed, const std::set vTypes); + + + /// @brief Destructor + virtual ~MSMeanData_Amitran(); + + /// @name Methods inherited from MSDetectorFileOutput. + /// @{ + + /** @brief Opens the XML-output using "netstats" as root element + * + * @param[in] dev The output device to write the root into + * @see MSDetectorFileOutput::writeXMLDetectorProlog + * @exception IOError If an error on writing occurs (!!! not yet implemented) + */ + virtual void writeXMLDetectorProlog(OutputDevice& dev) const; + /// @} + + /** @brief Return the relevant edge id + * + * @param[in] edge The edge to retrieve the id for + */ + virtual std::string getEdgeID(const MSEdge* const edge); + + /** @brief Writes the interval opener + * + * @param[in] dev The output device to write the data into + * @param[in] startTime First time step the data were gathered + * @param[in] stopTime Last time step the data were gathered + */ + virtual void openInterval(OutputDevice& dev, const SUMOTime startTime, const SUMOTime stopTime); + + /** @brief Checks for emptiness and writes prefix into the given stream + * + * @param[in] dev The output device to write the data into + * @param[in] values The values to check for emptiness + * @param[in] tag The xml tag to write (lane / edge) + * @param[in] id The id for the lane / edge to write + * @return whether further output should be generated + * @exception IOError If an error on writing occurs (!!! not yet implemented) + */ + virtual bool writePrefix(OutputDevice& dev, const MeanDataValues& values, + const SumoXMLTag tag, const std::string id) const; + +protected: + /** @brief Create an instance of MeanDataValues + * + * @param[in] lane The lane to create for + * @param[in] doAdd whether to add the values as reminder to the lane + */ + MSMeanData::MeanDataValues* createValues(MSLane* const lane, const SUMOReal length, const bool doAdd) const; + + /** @brief Resets network value in order to allow processing of the next interval + * + * Goes through the lists of edges and starts "resetOnly" for each edge. + * @param [in] edge The last time step that is reported + */ + void resetOnly(SUMOTime stopTime); + +private: + /// @brief the minimum sample seconds + const SUMOReal myHaltSpeed; + + /// @brief Invalidated copy constructor. + MSMeanData_Amitran(const MSMeanData_Amitran&); + + /// @brief Invalidated assignment operator. + MSMeanData_Amitran& operator=(const MSMeanData_Amitran&); + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Mon, 10.05.2004 -/// @version $Id: MSMeanData.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSMeanData.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Data collector for edges/lanes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -31,6 +31,7 @@ #include #endif +#include #include #include #include @@ -39,8 +40,8 @@ #include #include #include +#include "MSMeanData_Amitran.h" #include "MSMeanData.h" -#include #ifdef HAVE_INTERNAL #include @@ -110,6 +111,11 @@ bool MSMeanData::MeanDataValues::notifyLeave(SUMOVehicle& /*veh*/, SUMOReal /*lastPos*/, MSMoveReminder::Notification reason) { +#ifdef HAVE_INTERNAL + if (MSGlobals::gUseMesoSim) { + return false; // reminder is re-added on every segment (@recheck for performance) + } +#endif return reason == MSMoveReminder::NOTIFICATION_JUNCTION; } @@ -222,9 +228,9 @@ } -size_t +int MSMeanData::MeanDataValueTracker::getNumReady() const { - size_t result = 0; + int result = 0; for (std::list::const_iterator it = myCurrentData.begin(); it != myCurrentData.end(); ++it) { if ((*it)->myNumVehicleEntered == (*it)->myNumVehicleLeft) { result++; @@ -256,10 +262,10 @@ myMinSamples(minSamples), myMaxTravelTime(maxTravelTime), myVehicleTypes(vTypes), + myDumpEmpty(withEmpty), myAmEdgeBased(!useLanes), myDumpBegin(dumpBegin), myDumpEnd(dumpEnd), - myDumpEmpty(withEmpty), myPrintDefaults(printDefaults), myDumpInternal(withInternal), myTrackVehicles(trackVehicles) { @@ -268,8 +274,8 @@ void MSMeanData::init() { - const std::vector& edges = MSNet::getInstance()->getEdgeControl().getEdges(); - for (std::vector::const_iterator e = edges.begin(); e != edges.end(); ++e) { + const MSEdgeVector& edges = MSNet::getInstance()->getEdgeControl().getEdges(); + for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) { if (myDumpInternal || (*e)->getPurpose() != MSEdge::EDGEFUNCTION_INTERNAL) { myEdges.push_back(*e); myMeasures.push_back(std::vector()); @@ -282,6 +288,7 @@ } else { data = createValues(0, lanes[0]->getLength(), false); } + data->setDescription("meandata_" + (*e)->getID()); myMeasures.back().push_back(data); MESegment* s = MSGlobals::gMesoNet->getSegmentForEdge(**e); while (s != 0) { @@ -327,7 +334,7 @@ UNUSED_PARAMETER(stopTime); #ifdef HAVE_INTERNAL if (MSGlobals::gUseMesoSim) { - std::vector::iterator edge = myEdges.begin(); + MSEdgeVector::iterator edge = myEdges.begin(); for (std::vector >::const_iterator i = myMeasures.begin(); i != myMeasures.end(); ++i, ++edge) { MESegment* s = MSGlobals::gMesoNet->getSegmentForEdge(**edge); MeanDataValues* data = i->front(); @@ -348,6 +355,12 @@ } +std::string +MSMeanData::getEdgeID(const MSEdge* const edge) { + return edge->getID(); +} + + void MSMeanData::writeEdge(OutputDevice& dev, const std::vector& edgeValues, @@ -360,7 +373,7 @@ s->prepareDetectorForWriting(*data); s = s->getNextSegment(); } - if (writePrefix(dev, *data, SUMO_TAG_EDGE, edge->getID())) { + if (writePrefix(dev, *data, SUMO_TAG_EDGE, getEdgeID(edge))) { data->write(dev, stopTime - startTime, (SUMOReal)edge->getLanes().size(), myPrintDefaults ? edge->getLength() / edge->getSpeedLimit() : -1.); @@ -407,7 +420,7 @@ meanData.addTo(*sumData); meanData.reset(); } - if (writePrefix(dev, *sumData, SUMO_TAG_EDGE, edge->getID())) { + if (writePrefix(dev, *sumData, SUMO_TAG_EDGE, getEdgeID(edge))) { sumData->write(dev, stopTime - startTime, (SUMOReal)edge->getLanes().size(), myPrintDefaults ? edge->getLength() / edge->getSpeedLimit() : -1.); } delete sumData; @@ -416,10 +429,17 @@ } +void +MSMeanData::openInterval(OutputDevice& dev, const SUMOTime startTime, const SUMOTime stopTime) { + dev.openTag(SUMO_TAG_INTERVAL).writeAttr(SUMO_ATTR_BEGIN, STEPS2TIME(startTime)).writeAttr(SUMO_ATTR_END, STEPS2TIME(stopTime)); + dev.writeAttr(SUMO_ATTR_ID, myID); +} + + bool MSMeanData::writePrefix(OutputDevice& dev, const MeanDataValues& values, const SumoXMLTag tag, const std::string id) const { if (myDumpEmpty || !values.isEmpty()) { - dev.openTag(tag).writeAttr(SUMO_ATTR_ID, id) << " sampledSeconds=\"" << values.getSamples(); + dev.openTag(tag).writeAttr(SUMO_ATTR_ID, id).writeAttr("sampledSeconds", values.getSamples()); return true; } return false; @@ -430,10 +450,10 @@ MSMeanData::writeXMLOutput(OutputDevice& dev, SUMOTime startTime, SUMOTime stopTime) { // check whether this dump shall be written for the current time - size_t numReady = myDumpBegin < stopTime && myDumpEnd - DELTA_T >= startTime; + int numReady = myDumpBegin < stopTime && myDumpEnd - DELTA_T >= startTime ? 1 : 0; if (myTrackVehicles && myDumpBegin < stopTime) { myPendingIntervals.push_back(std::make_pair(startTime, stopTime)); - numReady = myPendingIntervals.size(); + numReady = (int)myPendingIntervals.size(); for (std::vector >::const_iterator i = myMeasures.begin(); i != myMeasures.end(); ++i) { for (std::vector::const_iterator j = (*i).begin(); j != (*i).end(); ++j) { numReady = MIN2(numReady, ((MeanDataValueTracker*)*j)->getNumReady()); @@ -455,9 +475,8 @@ stopTime = myPendingIntervals.front().second; myPendingIntervals.pop_front(); } - dev.openTag(SUMO_TAG_INTERVAL).writeAttr(SUMO_ATTR_BEGIN, STEPS2TIME(startTime)).writeAttr(SUMO_ATTR_END, STEPS2TIME(stopTime)); - dev.writeAttr(SUMO_ATTR_ID, myID); - std::vector::iterator edge = myEdges.begin(); + openInterval(dev, startTime, stopTime); + MSEdgeVector::iterator edge = myEdges.begin(); for (std::vector >::const_iterator i = myMeasures.begin(); i != myMeasures.end(); ++i, ++edge) { writeEdge(dev, (*i), *edge, startTime, stopTime); } @@ -468,7 +487,7 @@ void MSMeanData::writeXMLDetectorProlog(OutputDevice& dev) const { - dev.writeXMLHeader("meandata", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/meandata_file.xsd\""); + dev.writeXMLHeader("meandata", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/meandata_file.xsd\""); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Emissions.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Emissions.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Emissions.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Emissions.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,165 @@ +/****************************************************************************/ +/// @file MSMeanData_Emissions.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Mon, 10.05.2004 +/// @version $Id: MSMeanData_Emissions.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Emission data collector for edges/lanes that +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include "MSMeanData_Emissions.h" +#include +#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +// --------------------------------------------------------------------------- +// MSMeanData_Emissions::MSLaneMeanDataValues - methods +// --------------------------------------------------------------------------- +MSMeanData_Emissions::MSLaneMeanDataValues::MSLaneMeanDataValues(MSLane* const lane, + const SUMOReal length, const bool doAdd, + const std::set* const vTypes, + const MSMeanData_Emissions* parent) + : MSMeanData::MeanDataValues(lane, length, doAdd, vTypes), + myEmissions(), myParent(parent) {} + + +MSMeanData_Emissions::MSLaneMeanDataValues::~MSLaneMeanDataValues() { +} + + +void +MSMeanData_Emissions::MSLaneMeanDataValues::reset(bool) { + sampleSeconds = 0.; + travelledDistance = 0.; + myEmissions = PollutantsInterface::Emissions(); +} + + +void +MSMeanData_Emissions::MSLaneMeanDataValues::addTo(MSMeanData::MeanDataValues& val) const { + MSLaneMeanDataValues& v = (MSLaneMeanDataValues&) val; + v.sampleSeconds += sampleSeconds; + v.travelledDistance += travelledDistance; + v.myEmissions.addScaled(myEmissions); +} + + +void +MSMeanData_Emissions::MSLaneMeanDataValues::notifyMoveInternal(SUMOVehicle& veh, SUMOReal timeOnLane, SUMOReal speed) { + sampleSeconds += timeOnLane; + travelledDistance += speed * timeOnLane; + const double a = veh.getAcceleration(); + myEmissions.addScaled(PollutantsInterface::computeAll(veh.getVehicleType().getEmissionClass(), speed, a, veh.getSlope()), timeOnLane); +} + + +void +MSMeanData_Emissions::MSLaneMeanDataValues::write(OutputDevice& dev, const SUMOTime period, + const SUMOReal /*numLanes*/, const SUMOReal defaultTravelTime, const int /*numVehicles*/) const { + const SUMOReal normFactor = SUMOReal(3600. / STEPS2TIME(period) / myLaneLength); + dev << " CO_abs=\"" << OutputDevice::realString(myEmissions.CO, 6) << + "\" CO2_abs=\"" << OutputDevice::realString(myEmissions.CO2, 6) << + "\" HC_abs=\"" << OutputDevice::realString(myEmissions.HC, 6) << + "\" PMx_abs=\"" << OutputDevice::realString(myEmissions.PMx, 6) << + "\" NOx_abs=\"" << OutputDevice::realString(myEmissions.NOx, 6) << + "\" fuel_abs=\"" << OutputDevice::realString(myEmissions.fuel, 6) << + "\"\n CO_normed=\"" << OutputDevice::realString(normFactor * myEmissions.CO, 6) << + "\" CO2_normed=\"" << OutputDevice::realString(normFactor * myEmissions.CO2, 6) << + "\" HC_normed=\"" << OutputDevice::realString(normFactor * myEmissions.HC, 6) << + "\" PMx_normed=\"" << OutputDevice::realString(normFactor * myEmissions.PMx, 6) << + "\" NOx_normed=\"" << OutputDevice::realString(normFactor * myEmissions.NOx, 6) << + "\" fuel_normed=\"" << OutputDevice::realString(normFactor * myEmissions.fuel, 6); + if (sampleSeconds > myParent->myMinSamples) { + SUMOReal vehFactor = myParent->myMaxTravelTime / sampleSeconds; + SUMOReal traveltime = myParent->myMaxTravelTime; + if (travelledDistance > 0.f) { + vehFactor = MIN2(vehFactor, myLaneLength / travelledDistance); + traveltime = MIN2(traveltime, myLaneLength * sampleSeconds / travelledDistance); + } + dev << "\"\n traveltime=\"" << OutputDevice::realString(traveltime) << + "\" CO_perVeh=\"" << OutputDevice::realString(myEmissions.CO * vehFactor, 6) << + "\" CO2_perVeh=\"" << OutputDevice::realString(myEmissions.CO2 * vehFactor, 6) << + "\" HC_perVeh=\"" << OutputDevice::realString(myEmissions.HC * vehFactor, 6) << + "\" PMx_perVeh=\"" << OutputDevice::realString(myEmissions.PMx * vehFactor, 6) << + "\" NOx_perVeh=\"" << OutputDevice::realString(myEmissions.NOx * vehFactor, 6) << + "\" fuel_perVeh=\"" << OutputDevice::realString(myEmissions.fuel * vehFactor, 6); + } else if (defaultTravelTime >= 0.) { + const MSVehicleType* t = MSNet::getInstance()->getVehicleControl().getVType(); + const SUMOReal speed = MIN2(myLaneLength / defaultTravelTime, t->getMaxSpeed()); + dev << "\"\n traveltime=\"" << OutputDevice::realString(defaultTravelTime) << + "\" CO_perVeh=\"" << OutputDevice::realString(PollutantsInterface::computeDefault(t->getEmissionClass(), PollutantsInterface::CO, speed, t->getCarFollowModel().getMaxAccel(), 0, defaultTravelTime), 6) << // @todo: give correct slope + "\" CO2_perVeh=\"" << OutputDevice::realString(PollutantsInterface::computeDefault(t->getEmissionClass(), PollutantsInterface::CO2, speed, t->getCarFollowModel().getMaxAccel(), 0, defaultTravelTime), 6) << // @todo: give correct slope + "\" HC_perVeh=\"" << OutputDevice::realString(PollutantsInterface::computeDefault(t->getEmissionClass(), PollutantsInterface::HC, speed, t->getCarFollowModel().getMaxAccel(), 0, defaultTravelTime), 6) << // @todo: give correct slope + "\" PMx_perVeh=\"" << OutputDevice::realString(PollutantsInterface::computeDefault(t->getEmissionClass(), PollutantsInterface::PM_X, speed, t->getCarFollowModel().getMaxAccel(), 0, defaultTravelTime), 6) << // @todo: give correct slope + "\" NOx_perVeh=\"" << OutputDevice::realString(PollutantsInterface::computeDefault(t->getEmissionClass(), PollutantsInterface::NO_X, speed, t->getCarFollowModel().getMaxAccel(), 0, defaultTravelTime), 6) << // @todo: give correct slope + "\" fuel_perVeh=\"" << OutputDevice::realString(PollutantsInterface::computeDefault(t->getEmissionClass(), PollutantsInterface::FUEL, speed, t->getCarFollowModel().getMaxAccel(), 0, defaultTravelTime), 6); // @todo: give correct slope + } + dev << "\""; + dev.closeTag(); +} + + + +// --------------------------------------------------------------------------- +// MSMeanData_Emissions - methods +// --------------------------------------------------------------------------- +MSMeanData_Emissions::MSMeanData_Emissions(const std::string& id, + const SUMOTime dumpBegin, + const SUMOTime dumpEnd, + const bool useLanes, const bool withEmpty, + const bool printDefaults, + const bool withInternal, + const bool trackVehicles, + const SUMOReal maxTravelTime, + const SUMOReal minSamples, + const std::set vTypes) + : MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults, + withInternal, trackVehicles, maxTravelTime, minSamples, vTypes) { +} + + +MSMeanData_Emissions::~MSMeanData_Emissions() {} + + +MSMeanData::MeanDataValues* +MSMeanData_Emissions::createValues(MSLane* const lane, const SUMOReal length, const bool doAdd) const { + return new MSLaneMeanDataValues(lane, length, doAdd, &myVehicleTypes, this); +} + + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Emissions.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Emissions.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Emissions.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Emissions.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,184 @@ +/****************************************************************************/ +/// @file MSMeanData_Emissions.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Mon, 10.05.2004 +/// @version $Id: MSMeanData_Emissions.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Emission data collector for edges/lanes +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSMeanData_Emissions_h +#define MSMeanData_Emissions_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include "MSMeanData.h" + + +// =========================================================================== +// class declarations +// =========================================================================== +class OutputDevice; +class MSLane; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSMeanData_Emissions + * @brief Emission data collector for edges/lanes + * + * This structure does not contain the data itself, it is stored within + * MSLaneMeanDataValues-MoveReminder objects. + * + * This class is used to build the output, optionally, in the case + * of edge-based dump, aggregated over the edge's lanes. + * + * @todo consider error-handling on write (using IOError) + */ +class MSMeanData_Emissions : public MSMeanData { +public: + /** + * @class MSLaneMeanDataValues + * @brief Data structure for mean (aggregated) edge/lane values + * + * Structure holding values that describe the emissions aggregated + * over some seconds. + */ + class MSLaneMeanDataValues : public MSMeanData::MeanDataValues { + public: + /** @brief Constructor */ + MSLaneMeanDataValues(MSLane* const lane, const SUMOReal length, const bool doAdd, + const std::set* const vTypes = 0, + const MSMeanData_Emissions* parent = 0); + + /** @brief Destructor */ + virtual ~MSLaneMeanDataValues(); + + + /** @brief Resets values so they may be used for the next interval + */ + void reset(bool afterWrite = false); + + + /** @brief Add the values of this to the given one and store them there + * + * @param[in] val The meandata to add to + */ + void addTo(MSMeanData::MeanDataValues& val) const; + + + /** @brief Writes output values into the given stream + * + * @param[in] dev The output device to write the data into + * @param[in] prefix The xml prefix to write (mostly the lane / edge id) + * @param[in] numLanes The total number of lanes for which the data was collected + * @param[in] length The length of the object for which the data was collected + * @exception IOError If an error on writing occurs (!!! not yet implemented) + */ + void write(OutputDevice& dev, const SUMOTime period, + const SUMOReal numLanes, const SUMOReal defaultTravelTime, + const int numVehicles = -1) const; + + + protected: + /** @brief Internal notification about the vehicle moves + * + * Indicator if the reminders is still active for the passed + * vehicle/parameters. If false, the vehicle will erase this reminder + * from it's reminder-container. + * + * @param[in] veh Vehicle that asks this reminder. + * @param[in] timeOnLane time the vehicle spent on the lane. + * @param[in] speed Moving speed. + */ + void notifyMoveInternal(SUMOVehicle& veh, SUMOReal timeOnLane, + SUMOReal speed); + + + private: + /// @brief Collected values + PollutantsInterface::Emissions myEmissions; + /// @brief The meandata parent + const MSMeanData_Emissions* myParent; + + }; + + +public: + /** @brief Constructor + * + * @param[in] id The id of the detector + * @param[in] dumpBegin Begin time of dump + * @param[in] dumpEnd End time of dump + * @param[in] useLanes Information whether lane-based or edge-based dump shall be generated + * @param[in] withEmpty Information whether empty lanes/edges shall be written + * @param[in] printDefaults Information whether defaults for empty lanes/edges shall be written + * @param[in] withInternal Information whether internal lanes/edges shall be written + * @param[in] trackVehicles Information whether vehicles shall be tracked + * @param[in] maxTravelTime the maximum travel time to use when calculating per vehicle output + * @param[in] minSamples the minimum number of sample seconds before the values are valid + * @param[in] vTypes the set of vehicle types to consider + */ + MSMeanData_Emissions(const std::string& id, + const SUMOTime dumpBegin, const SUMOTime dumpEnd, + const bool useLanes, const bool withEmpty, + const bool printDefaults, const bool withInternal, + const bool trackVehicles, + const SUMOReal minSamples, const SUMOReal maxTravelTime, + const std::set vTypes); + + + /// @brief Destructor + virtual ~MSMeanData_Emissions(); + + + +protected: + /** @brief Create an instance of MeanDataValues + * + * @param[in] lane The lane to create for + * @param[in] doAdd whether to add the values as reminder to the lane + */ + MSMeanData::MeanDataValues* createValues(MSLane* const lane, const SUMOReal length, const bool doAdd) const; + + + +private: + /// @brief Invalidated copy constructor. + MSMeanData_Emissions(const MSMeanData_Emissions&); + + /// @brief Invalidated assignment operator. + MSMeanData_Emissions& operator=(const MSMeanData_Emissions&); + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Tue, 17.11.2009 -/// @version $Id: MSMeanData.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSMeanData.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Data collector for edges/lanes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -48,6 +48,7 @@ class MSLane; class SUMOVehicle; +typedef std::vector MSEdgeVector; // =========================================================================== // class definitions @@ -180,7 +181,7 @@ SUMOReal travelledDistance; //@} - private: + protected: /// @brief The vehicle types to look for (0 or empty means all) const std::set* const myVehicleTypes; @@ -266,7 +267,7 @@ const SUMOReal numLanes, const SUMOReal defaultTravelTime, const int numVehicles = -1) const; - size_t getNumReady() const; + int getNumReady() const; void clearFirst(); @@ -357,7 +358,7 @@ * @see MSDetectorFileOutput::writeXMLDetectorProlog * @exception IOError If an error on writing occurs (!!! not yet implemented) */ - void writeXMLDetectorProlog(OutputDevice& dev) const; + virtual void writeXMLDetectorProlog(OutputDevice& dev) const; /// @} /** @brief Updates the detector @@ -376,10 +377,16 @@ /** @brief Resets network value in order to allow processing of the next interval * * Goes through the lists of edges and starts "resetOnly" for each edge. - * @param [in] edge The last time step that is reported + * @param[in] edge The last time step that is reported */ void resetOnly(SUMOTime stopTime); + /** @brief Return the relevant edge id + * + * @param[in] edge The edge to retrieve the id for + */ + virtual std::string getEdgeID(const MSEdge* const edge); + /** @brief Writes edge values into the given stream * * microsim: It is checked whether the dump shall be generated edge- @@ -397,6 +404,14 @@ void writeEdge(OutputDevice& dev, const std::vector& edgeValues, MSEdge* edge, SUMOTime startTime, SUMOTime stopTime); + /** @brief Writes the interval opener + * + * @param[in] dev The output device to write the data into + * @param[in] startTime First time step the data were gathered + * @param[in] stopTime Last time step the data were gathered + */ + virtual void openInterval(OutputDevice& dev, const SUMOTime startTime, const SUMOTime stopTime); + /** @brief Checks for emptiness and writes prefix into the given stream * * @param[in] dev The output device to write the data into @@ -406,8 +421,8 @@ * @return whether further output should be generated * @exception IOError If an error on writing occurs (!!! not yet implemented) */ - bool writePrefix(OutputDevice& dev, const MeanDataValues& values, - const SumoXMLTag tag, const std::string id) const; + virtual bool writePrefix(OutputDevice& dev, const MeanDataValues& values, + const SumoXMLTag tag, const std::string id) const; protected: /// @brief the minimum sample seconds @@ -422,6 +437,9 @@ /// @brief Value collectors; sorted by edge, then by lane std::vector > myMeasures; + /// @brief Whether empty lanes/edges shall be written + const bool myDumpEmpty; + private: /// @brief Information whether the output shall be edge-based (not lane-based) const bool myAmEdgeBased; @@ -430,10 +448,7 @@ const SUMOTime myDumpBegin, myDumpEnd; /// @brief The corresponding first edges - std::vector myEdges; - - /// @brief Whether empty lanes/edges shall be written - const bool myDumpEmpty; + MSEdgeVector myEdges; /// @brief Whether empty lanes/edges shall be written const bool myPrintDefaults; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Harmonoise.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Harmonoise.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Harmonoise.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Harmonoise.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 10.05.2004 -/// @version $Id: MSMeanData_Harmonoise.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSMeanData_Harmonoise.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Redirector for mean data output (net->edgecontrol) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,7 +36,7 @@ #include #include #include "MSMeanData_Harmonoise.h" -#include +#include #include #ifdef CHECK_MEMORY_LEAKS @@ -104,18 +104,17 @@ void MSMeanData_Harmonoise::MSLaneMeanDataValues::write(OutputDevice& dev, const SUMOTime period, const SUMOReal /*numLanes*/, const SUMOReal defaultTravelTime, const int /*numVehicles*/) const { - dev << "\" noise=\"" << (meanNTemp != 0 ? (SUMOReal)(10. * log10(meanNTemp * TS / STEPS2TIME(period))) : (SUMOReal) 0.); + dev.writeAttr("noise", (meanNTemp != 0 ? (SUMOReal)(10. * log10(meanNTemp * TS / STEPS2TIME(period))) : (SUMOReal) 0.)); if (sampleSeconds > myParent->myMinSamples) { SUMOReal traveltime = myParent->myMaxTravelTime; if (travelledDistance > 0.f) { traveltime = MIN2(traveltime, myLaneLength * sampleSeconds / travelledDistance); } - dev << "\" traveltime=\"" << traveltime; + dev.writeAttr("traveltime", traveltime); } else if (defaultTravelTime >= 0.) { // @todo default value for noise - dev << "\" traveltime=\"" << defaultTravelTime; + dev.writeAttr("traveltime", defaultTravelTime); } - dev << "\""; dev.closeTag(); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Harmonoise.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Harmonoise.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Harmonoise.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Harmonoise.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 10.05.2004 -/// @version $Id: MSMeanData_Harmonoise.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSMeanData_Harmonoise.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Noise data collector for edges/lanes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_HBEFA.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_HBEFA.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_HBEFA.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_HBEFA.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,180 +0,0 @@ -/****************************************************************************/ -/// @file MSMeanData_HBEFA.cpp -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date Mon, 10.05.2004 -/// @version $Id: MSMeanData_HBEFA.cpp 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Emission data collector for edges/lanes -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include -#include "MSMeanData_HBEFA.h" -#include -#include - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// method definitions -// =========================================================================== -// --------------------------------------------------------------------------- -// MSMeanData_HBEFA::MSLaneMeanDataValues - methods -// --------------------------------------------------------------------------- -MSMeanData_HBEFA::MSLaneMeanDataValues::MSLaneMeanDataValues(MSLane* const lane, - const SUMOReal length, const bool doAdd, - const std::set* const vTypes, - const MSMeanData_HBEFA* parent) - : MSMeanData::MeanDataValues(lane, length, doAdd, vTypes), - CO2(0), CO(0), HC(0), NOx(0), PMx(0), fuel(0), myParent(parent) {} - - -MSMeanData_HBEFA::MSLaneMeanDataValues::~MSLaneMeanDataValues() { -} - - -void -MSMeanData_HBEFA::MSLaneMeanDataValues::reset(bool) { - sampleSeconds = 0.; - travelledDistance = 0.; - CO2 = 0; - CO = 0; - HC = 0; - NOx = 0; - PMx = 0; - fuel = 0; -} - - -void -MSMeanData_HBEFA::MSLaneMeanDataValues::addTo(MSMeanData::MeanDataValues& val) const { - MSLaneMeanDataValues& v = (MSLaneMeanDataValues&) val; - v.sampleSeconds += sampleSeconds; - v.travelledDistance += travelledDistance; - v.CO2 += CO2; - v.CO += CO; - v.HC += HC; - v.NOx += NOx; - v.PMx += PMx; - v.fuel += fuel; -} - - -void -MSMeanData_HBEFA::MSLaneMeanDataValues::notifyMoveInternal(SUMOVehicle& veh, SUMOReal timeOnLane, SUMOReal speed) { - sampleSeconds += timeOnLane; - travelledDistance += speed * timeOnLane; - const double a = veh.getAcceleration(); - CO += (timeOnLane * HelpersHBEFA::computeCO(veh.getVehicleType().getEmissionClass(), (double) speed, a)); - CO2 += (timeOnLane * HelpersHBEFA::computeCO2(veh.getVehicleType().getEmissionClass(), (double) speed, a)); - HC += (timeOnLane * HelpersHBEFA::computeHC(veh.getVehicleType().getEmissionClass(), (double) speed, a)); - NOx += (timeOnLane * HelpersHBEFA::computeNOx(veh.getVehicleType().getEmissionClass(), (double) speed, a)); - PMx += (timeOnLane * HelpersHBEFA::computePMx(veh.getVehicleType().getEmissionClass(), (double) speed, a)); - fuel += (timeOnLane * HelpersHBEFA::computeFuel(veh.getVehicleType().getEmissionClass(), (double) speed, a)); -} - - -void -MSMeanData_HBEFA::MSLaneMeanDataValues::write(OutputDevice& dev, const SUMOTime period, - const SUMOReal /*numLanes*/, const SUMOReal defaultTravelTime, const int /*numVehicles*/) const { - const SUMOReal normFactor = SUMOReal(3600. / STEPS2TIME(period) / myLaneLength); - dev << "\" CO_abs=\"" << OutputDevice::realString(CO, 6) << - "\" CO2_abs=\"" << OutputDevice::realString(CO2, 6) << - "\" HC_abs=\"" << OutputDevice::realString(HC, 6) << - "\" PMx_abs=\"" << OutputDevice::realString(PMx, 6) << - "\" NOx_abs=\"" << OutputDevice::realString(NOx, 6) << - "\" fuel_abs=\"" << OutputDevice::realString(fuel, 6) << - "\"\n CO_normed=\"" << OutputDevice::realString(normFactor * CO, 6) << - "\" CO2_normed=\"" << OutputDevice::realString(normFactor * CO2, 6) << - "\" HC_normed=\"" << OutputDevice::realString(normFactor * HC, 6) << - "\" PMx_normed=\"" << OutputDevice::realString(normFactor * PMx, 6) << - "\" NOx_normed=\"" << OutputDevice::realString(normFactor * NOx, 6) << - "\" fuel_normed=\"" << OutputDevice::realString(normFactor * fuel, 6); - if (sampleSeconds > myParent->myMinSamples) { - SUMOReal vehFactor = myParent->myMaxTravelTime / sampleSeconds; - SUMOReal traveltime = myParent->myMaxTravelTime; - if (travelledDistance > 0.f) { - vehFactor = MIN2(vehFactor, myLaneLength / travelledDistance); - traveltime = MIN2(traveltime, myLaneLength * sampleSeconds / travelledDistance); - } - dev << "\"\n traveltime=\"" << OutputDevice::realString(traveltime) << - "\" CO_perVeh=\"" << OutputDevice::realString(CO * vehFactor, 6) << - "\" CO2_perVeh=\"" << OutputDevice::realString(CO2 * vehFactor, 6) << - "\" HC_perVeh=\"" << OutputDevice::realString(HC * vehFactor, 6) << - "\" PMx_perVeh=\"" << OutputDevice::realString(PMx * vehFactor, 6) << - "\" NOx_perVeh=\"" << OutputDevice::realString(NOx * vehFactor, 6) << - "\" fuel_perVeh=\"" << OutputDevice::realString(fuel * vehFactor, 6); - } else if (defaultTravelTime >= 0.) { - const MSVehicleType* t = MSNet::getInstance()->getVehicleControl().getVType(); - const SUMOReal speed = MIN2(myLaneLength / defaultTravelTime, t->getMaxSpeed()); - dev << "\"\n traveltime=\"" << OutputDevice::realString(defaultTravelTime) << - "\" CO_perVeh=\"" << OutputDevice::realString(HelpersHBEFA::computeDefaultCO(t->getEmissionClass(), speed, t->getCarFollowModel().getMaxAccel(), defaultTravelTime), 6) << - "\" CO2_perVeh=\"" << OutputDevice::realString(HelpersHBEFA::computeDefaultCO2(t->getEmissionClass(), speed, t->getCarFollowModel().getMaxAccel(), defaultTravelTime), 6) << - "\" HC_perVeh=\"" << OutputDevice::realString(HelpersHBEFA::computeDefaultHC(t->getEmissionClass(), speed, t->getCarFollowModel().getMaxAccel(), defaultTravelTime), 6) << - "\" PMx_perVeh=\"" << OutputDevice::realString(HelpersHBEFA::computeDefaultPMx(t->getEmissionClass(), speed, t->getCarFollowModel().getMaxAccel(), defaultTravelTime), 6) << - "\" NOx_perVeh=\"" << OutputDevice::realString(HelpersHBEFA::computeDefaultNOx(t->getEmissionClass(), speed, t->getCarFollowModel().getMaxAccel(), defaultTravelTime), 6) << - "\" fuel_perVeh=\"" << OutputDevice::realString(HelpersHBEFA::computeDefaultFuel(t->getEmissionClass(), speed, t->getCarFollowModel().getMaxAccel(), defaultTravelTime), 6); - } - dev << "\""; - dev.closeTag(); -} - - - -// --------------------------------------------------------------------------- -// MSMeanData_HBEFA - methods -// --------------------------------------------------------------------------- -MSMeanData_HBEFA::MSMeanData_HBEFA(const std::string& id, - const SUMOTime dumpBegin, - const SUMOTime dumpEnd, - const bool useLanes, const bool withEmpty, - const bool printDefaults, - const bool withInternal, - const bool trackVehicles, - const SUMOReal maxTravelTime, - const SUMOReal minSamples, - const std::set vTypes) - : MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults, - withInternal, trackVehicles, maxTravelTime, minSamples, vTypes) { -} - - -MSMeanData_HBEFA::~MSMeanData_HBEFA() {} - - -MSMeanData::MeanDataValues* -MSMeanData_HBEFA::createValues(MSLane* const lane, const SUMOReal length, const bool doAdd) const { - return new MSLaneMeanDataValues(lane, length, doAdd, &myVehicleTypes, this); -} - - -/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_HBEFA.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_HBEFA.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_HBEFA.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_HBEFA.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,187 +0,0 @@ -/****************************************************************************/ -/// @file MSMeanData_HBEFA.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date Mon, 10.05.2004 -/// @version $Id: MSMeanData_HBEFA.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Emission data collector for edges/lanes -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef MSMeanData_HBEFA_h -#define MSMeanData_HBEFA_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include "MSMeanData.h" -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class OutputDevice; -class MSLane; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class MSMeanData_HBEFA - * @brief Emission data collector for edges/lanes - * - * This structure does not contain the data itself, it is stored within - * MSLaneMeanDataValues-MoveReminder objects. - * This class is used to build the output, optionally, in the case - * of edge-based dump, aggregated over the edge's lanes. - * - * @todo consider error-handling on write (using IOError) - */ -class MSMeanData_HBEFA : public MSMeanData { -public: - /** - * @class MSLaneMeanDataValues - * @brief Data structure for mean (aggregated) edge/lane values - * - * Structure holding values that describe the emissions aggregated - * over some seconds. - */ - class MSLaneMeanDataValues : public MSMeanData::MeanDataValues { - public: - /** @brief Constructor */ - MSLaneMeanDataValues(MSLane* const lane, const SUMOReal length, const bool doAdd, - const std::set* const vTypes = 0, - const MSMeanData_HBEFA* parent = 0); - - /** @brief Destructor */ - virtual ~MSLaneMeanDataValues(); - - - /** @brief Resets values so they may be used for the next interval - */ - void reset(bool afterWrite = false); - - /** @brief Add the values of this to the given one and store them there - * - * @param[in] val The meandata to add to - */ - void addTo(MSMeanData::MeanDataValues& val) const; - - /** @brief Writes output values into the given stream - * - * @param[in] dev The output device to write the data into - * @param[in] prefix The xml prefix to write (mostly the lane / edge id) - * @param[in] numLanes The total number of lanes for which the data was collected - * @param[in] length The length of the object for which the data was collected - * @exception IOError If an error on writing occurs (!!! not yet implemented) - */ - void write(OutputDevice& dev, const SUMOTime period, - const SUMOReal numLanes, const SUMOReal defaultTravelTime, - const int numVehicles = -1) const; - - protected: - /** @brief Internal notification about the vehicle moves - * - * Indicator if the reminders is still active for the passed - * vehicle/parameters. If false, the vehicle will erase this reminder - * from it's reminder-container. - * - * @param[in] veh Vehicle that asks this reminder. - * @param[in] timeOnLane time the vehicle spent on the lane. - * @param[in] speed Moving speed. - */ - void notifyMoveInternal(SUMOVehicle& veh, SUMOReal timeOnLane, - SUMOReal speed); - - private: - /// @name Collected values - /// @{ - /// @brief Sum of CO2 emissions in mg - SUMOReal CO2; - /// @brief Sum of CO emissions in mg - SUMOReal CO; - /// @brief Sum of HC emissions in mg - SUMOReal HC; - /// @brief Sum of NOx emissions in mg - SUMOReal NOx; - /// @brief Sum of PMx emissions in mg - SUMOReal PMx; - /// @brief Sum of consumed fuel in ml - SUMOReal fuel; - //@} - /// @brief The meandata parent - const MSMeanData_HBEFA* myParent; - - }; - - -public: - /** @brief Constructor - * - * @param[in] id The id of the detector - * @param[in] dumpBegin Begin time of dump - * @param[in] dumpEnd End time of dump - * @param[in] useLanes Information whether lane-based or edge-based dump shall be generated - * @param[in] withEmpty Information whether empty lanes/edges shall be written - * @param[in] printDefaults Information whether defaults for empty lanes/edges shall be written - * @param[in] withInternal Information whether internal lanes/edges shall be written - * @param[in] trackVehicles Information whether vehicles shall be tracked - * @param[in] maxTravelTime the maximum travel time to use when calculating per vehicle output - * @param[in] minSamples the minimum number of sample seconds before the values are valid - * @param[in] vTypes the set of vehicle types to consider - */ - MSMeanData_HBEFA(const std::string& id, - const SUMOTime dumpBegin, const SUMOTime dumpEnd, - const bool useLanes, const bool withEmpty, - const bool printDefaults, const bool withInternal, - const bool trackVehicles, - const SUMOReal minSamples, const SUMOReal maxTravelTime, - const std::set vTypes); - - - /// @brief Destructor - virtual ~MSMeanData_HBEFA(); - -protected: - /** @brief Create an instance of MeanDataValues - * - * @param[in] lane The lane to create for - * @param[in] doAdd whether to add the values as reminder to the lane - */ - MSMeanData::MeanDataValues* createValues(MSLane* const lane, const SUMOReal length, const bool doAdd) const; - -private: - /// @brief Invalidated copy constructor. - MSMeanData_HBEFA(const MSMeanData_HBEFA&); - - /// @brief Invalidated assignment operator. - MSMeanData_HBEFA& operator=(const MSMeanData_HBEFA&); - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Net.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Net.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Net.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Net.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file MSMeanData_Net.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Mon, 10.05.2004 -/// @version $Id: MSMeanData_Net.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSMeanData_Net.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Network state mean data collector for edges/lanes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -121,7 +122,7 @@ if (vehicleApplies(veh) && (getLane() == 0 || getLane() == static_cast(veh).getLane())) { #ifdef HAVE_INTERNAL if (MSGlobals::gUseMesoSim) { - myLastVehicleUpdateValues.erase(&veh); + removeFromVehicleUpdateValues(veh); } #endif if (reason == MSMoveReminder::NOTIFICATION_ARRIVED) { @@ -174,17 +175,13 @@ const SUMOReal numLanes, const SUMOReal defaultTravelTime, const int numVehicles) const { if (myParent == 0) { if (sampleSeconds > 0) { - dev << "\" density=\"" << sampleSeconds / STEPS2TIME(period) *(SUMOReal) 1000 / myLaneLength << - "\" occupancy=\"" << vehLengthSum / STEPS2TIME(period) / myLaneLength / numLanes *(SUMOReal) 100 << - "\" waitingTime=\"" << waitSeconds << - "\" speed=\"" << travelledDistance / sampleSeconds; - } - dev << "\" departed=\"" << nVehDeparted << - "\" arrived=\"" << nVehArrived << - "\" entered=\"" << nVehEntered << - "\" left=\"" << nVehLeft << "\""; + dev.writeAttr("density", sampleSeconds / STEPS2TIME(period) * (SUMOReal) 1000 / myLaneLength) + .writeAttr("occupancy", vehLengthSum / STEPS2TIME(period) / myLaneLength / numLanes * (SUMOReal) 100) + .writeAttr("waitingTime", waitSeconds).writeAttr("speed", travelledDistance / sampleSeconds); + } + dev.writeAttr("departed", nVehDeparted).writeAttr("arrived", nVehArrived).writeAttr("entered", nVehEntered).writeAttr("left", nVehLeft); if (nVehVaporized > 0) { - dev << " vaporized=\"" << nVehVaporized << "\""; + dev.writeAttr("vaporized", nVehVaporized); } dev.closeTag(); return; @@ -195,28 +192,20 @@ traveltime = MIN2(traveltime, myLaneLength * sampleSeconds / travelledDistance); } if (numVehicles > 0) { - dev << "\" traveltime=\"" << sampleSeconds / numVehicles << - "\" waitingTime=\"" << waitSeconds << - "\" speed=\"" << travelledDistance / sampleSeconds; + dev.writeAttr("traveltime", sampleSeconds / numVehicles).writeAttr("waitingTime", waitSeconds).writeAttr("speed", travelledDistance / sampleSeconds); } else { - dev << "\" traveltime=\"" << traveltime << - "\" density=\"" << sampleSeconds / STEPS2TIME(period) *(SUMOReal) 1000 / myLaneLength << - "\" occupancy=\"" << vehLengthSum / STEPS2TIME(period) / myLaneLength / numLanes *(SUMOReal) 100 << - "\" waitingTime=\"" << waitSeconds << - "\" speed=\"" << travelledDistance / sampleSeconds; + dev.writeAttr("traveltime", traveltime) + .writeAttr("density", sampleSeconds / STEPS2TIME(period) * (SUMOReal) 1000 / myLaneLength) + .writeAttr("occupancy", vehLengthSum / STEPS2TIME(period) / myLaneLength / numLanes * (SUMOReal) 100) + .writeAttr("waitingTime", waitSeconds).writeAttr("speed", travelledDistance / sampleSeconds); } } else if (defaultTravelTime >= 0.) { - dev << "\" traveltime=\"" << defaultTravelTime << - "\" speed=\"" << myLaneLength / defaultTravelTime; + dev.writeAttr("traveltime", defaultTravelTime).writeAttr("speed", myLaneLength / defaultTravelTime); } - dev << "\" departed=\"" << nVehDeparted << - "\" arrived=\"" << nVehArrived << - "\" entered=\"" << nVehEntered << - "\" left=\"" << nVehLeft << - "\" laneChangedFrom=\"" << nVehLaneChangeFrom << - "\" laneChangedTo=\"" << nVehLaneChangeTo << "\""; + dev.writeAttr("departed", nVehDeparted).writeAttr("arrived", nVehArrived).writeAttr("entered", nVehEntered).writeAttr("left", nVehLeft) + .writeAttr("laneChangedFrom", nVehLaneChangeFrom).writeAttr("laneChangedTo", nVehLaneChangeTo); if (nVehVaporized > 0) { - dev << " vaporized=\"" << nVehVaporized << "\""; + dev.writeAttr("vaporized", nVehVaporized); } dev.closeTag(); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Net.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Net.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSMeanData_Net.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSMeanData_Net.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Mon, 10.05.2004 -/// @version $Id: MSMeanData_Net.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSMeanData_Net.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Network state mean data collector for edges/lanes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSQueueExport.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSQueueExport.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSQueueExport.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSQueueExport.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,12 +1,16 @@ /****************************************************************************/ /// @file MSQueueExport.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @author Mario Krumnow -/// @version $Id: MSQueueExport.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @author Michael Behrisch +/// @date 2012-04-26 +/// @version $Id: MSQueueExport.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Export the queueing length in front of a junction (very experimental!) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -61,8 +65,8 @@ MSQueueExport::writeEdge(OutputDevice& of) { of.openTag("lanes"); MSEdgeControl& ec = MSNet::getInstance()->getEdgeControl(); - const std::vector& edges = ec.getEdges(); - for (std::vector::const_iterator e = edges.begin(); e != edges.end(); ++e) { + const MSEdgeVector& edges = ec.getEdges(); + for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) { MSEdge& edge = **e; const std::vector& lanes = edge.getLanes(); for (std::vector::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) { @@ -75,62 +79,31 @@ void MSQueueExport::writeLane(OutputDevice& of, const MSLane& lane) { - //Fahrzeug mit der höchsten Wartezeit - //Fahrzeug am Ende des Rückstaus - double queueing_time = 0.0; - double queueing_length = 0.0; - double queueing_length2 = 0.0; - - if (lane.getVehicleNumber() != 0) { - for (std::vector::const_iterator veh = lane.myVehBuffer.begin(); veh != lane.myVehBuffer.end(); ++veh) { - const MSVehicle& veh_tmp = **veh; - if (!veh_tmp.isOnRoad()) { - continue; - } - if (veh_tmp.getWaitingSeconds() > 0) { - if (veh_tmp.getWaitingSeconds() > queueing_time) { - queueing_time = veh_tmp.getWaitingSeconds(); - } - double tmp_length = (lane.getLength() - veh_tmp.getPositionOnLane()) + veh_tmp.getVehicleType().getLengthWithGap(); - if (tmp_length > queueing_length) { - queueing_length = tmp_length; - } - } - } - - for (MSLane::VehCont::const_iterator veh = lane.myVehicles.begin(); veh != lane.myVehicles.end(); ++veh) { - const MSVehicle& veh_tmp = **veh; - if (!veh_tmp.isOnRoad()) { + // maximum of all vehicle waiting times + SUMOReal queueing_time = 0.0; + // back of last stopped vehicle (XXX does not check for continuous queue) + SUMOReal queueing_length = 0.0; + // back of last slow vehicle (XXX does not check for continuous queue) + SUMOReal queueing_length2 = 0.0; + const SUMOReal threshold_velocity = 5 / 3.6; // slow + + if (!lane.empty()) { + for (MSLane::VehCont::const_iterator it_veh = lane.myVehicles.begin(); it_veh != lane.myVehicles.end(); ++it_veh) { + const MSVehicle& veh = **it_veh; + if (!veh.isOnRoad()) { continue; } - if (veh_tmp.getWaitingSeconds() > 0) { - if (veh_tmp.getWaitingSeconds() > queueing_time) { - queueing_time = veh_tmp.getWaitingSeconds(); - } - double tmp_length = (lane.getLength() - veh_tmp.getPositionOnLane()) + veh_tmp.getVehicleType().getLengthWithGap(); - if (tmp_length > queueing_length) { - queueing_length = tmp_length; - } + if (veh.getWaitingSeconds() > 0) { + queueing_time = MAX2(veh.getWaitingSeconds(), queueing_time); + const SUMOReal veh_back_to_lane_end = (lane.getLength() - veh.getPositionOnLane()) + veh.getVehicleType().getLength(); + queueing_length = MAX2(veh_back_to_lane_end, queueing_length); } - } - - //Experimental - double tmp_length2 = 0.0; - for (MSLane::VehCont::const_iterator veh = lane.myVehicles.begin(); veh != lane.myVehicles.end(); ++veh) { - //wenn Fahrzeug langsamer als 5 km/h fährt = Rückstau - double threshold_velocity = 5 / 3.6; - const MSVehicle& veh_tmp = **veh; - if (!veh_tmp.isOnRoad()) { - continue; - } - - if (veh_tmp.getSpeed() < (threshold_velocity) && (veh_tmp.getPositionOnLane() > (veh_tmp.getLane()->getLength()) * 0.25)) { - tmp_length2 = (lane.getLength() - veh_tmp.getPositionOnLane()) + veh_tmp.getVehicleType().getLengthWithGap(); - } - if (tmp_length2 > queueing_length2) { - queueing_length2 = tmp_length2; + //Experimental + if (veh.getSpeed() < (threshold_velocity) && (veh.getPositionOnLane() > (veh.getLane()->getLength()) * 0.25)) { + const SUMOReal veh_back_to_lane_end = (lane.getLength() - veh.getPositionOnLane()) + veh.getVehicleType().getLength(); + queueing_length2 = MAX2(veh_back_to_lane_end, queueing_length2); } } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSQueueExport.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSQueueExport.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSQueueExport.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSQueueExport.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,13 @@ /****************************************************************************/ /// @file MSQueueExport.h /// @author Mario Krumnow +/// @date 2012-04-26 +/// @version $Id: MSQueueExport.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Export the queueing length in front of a junction (very experimental!) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSRouteProbe.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSRouteProbe.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSRouteProbe.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSRouteProbe.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Michael Behrisch /// @author Daniel Krajzewicz /// @author Tino Morenz +/// @author Jakob Erdmann /// @date Thu, 04.12.2008 -/// @version $Id: MSRouteProbe.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSRouteProbe.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Writes route distributions at a certain edge /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -52,16 +53,14 @@ // =========================================================================== // method definitions // =========================================================================== -MSRouteProbe::MSRouteProbe(const std::string& id, const MSEdge* edge, SUMOTime begin) : - MSDetectorFileOutput(id), - MSMoveReminder(id), - myCurrentRouteDistribution(0) { - const std::string distID = id + "_" + toString(begin); - myCurrentRouteDistribution = MSRoute::distDictionary(distID); - if (myCurrentRouteDistribution == 0) { - myCurrentRouteDistribution = new RandomDistributor(MSRoute::getMaxRouteDistSize(), &MSRoute::releaseRoute); - MSRoute::dictionary(distID, myCurrentRouteDistribution); +MSRouteProbe::MSRouteProbe(const std::string& id, const MSEdge* edge, const std::string& distID, const std::string& lastID) : + MSDetectorFileOutput(id), MSMoveReminder(id) { + myCurrentRouteDistribution = std::make_pair(distID, MSRoute::distDictionary(distID)); + if (myCurrentRouteDistribution.second == 0) { + myCurrentRouteDistribution.second = new RandomDistributor(); + MSRoute::dictionary(distID, myCurrentRouteDistribution.second, false); } + myLastRouteDistribution = std::make_pair(lastID, MSRoute::distDictionary(lastID)); #ifdef HAVE_INTERNAL if (MSGlobals::gUseMesoSim) { MESegment* seg = MSGlobals::gMesoNet->getSegmentForEdge(*edge); @@ -84,9 +83,10 @@ bool MSRouteProbe::notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason) { - if (myCurrentRouteDistribution != 0 && reason != MSMoveReminder::NOTIFICATION_SEGMENT && reason != MSMoveReminder::NOTIFICATION_LANE_CHANGE) { - veh.getRoute().addReference(); - myCurrentRouteDistribution->add(1., &veh.getRoute()); + if (reason != MSMoveReminder::NOTIFICATION_SEGMENT && reason != MSMoveReminder::NOTIFICATION_LANE_CHANGE) { + if (myCurrentRouteDistribution.second->add(1., &veh.getRoute())) { + veh.getRoute().addReference(); + } } return false; } @@ -95,10 +95,10 @@ void MSRouteProbe::writeXMLOutput(OutputDevice& dev, SUMOTime startTime, SUMOTime stopTime) { - if (myCurrentRouteDistribution->getOverallProb() > 0) { + if (myCurrentRouteDistribution.second->getOverallProb() > 0) { dev.openTag("routeDistribution") << " id=\"" << getID() + "_" + time2string(startTime) << "\""; - const std::vector& routes = myCurrentRouteDistribution->getVals(); - const std::vector& probs = myCurrentRouteDistribution->getProbs(); + const std::vector& routes = myCurrentRouteDistribution.second->getVals(); + const std::vector& probs = myCurrentRouteDistribution.second->getProbs(); for (unsigned int j = 0; j < routes.size(); ++j) { const MSRoute* r = routes[j]; dev.openTag("route") << " id=\"" << r->getID() + "_" + time2string(startTime) << "\" edges=\""; @@ -112,8 +112,13 @@ dev.closeTag(); } dev.closeTag(); - myCurrentRouteDistribution = new RandomDistributor(MSRoute::getMaxRouteDistSize(), &MSRoute::releaseRoute); - MSRoute::dictionary(getID() + "_" + toString(stopTime), myCurrentRouteDistribution); + if (myLastRouteDistribution.second != 0) { + MSRoute::checkDist(myLastRouteDistribution.first); + } + myLastRouteDistribution = myCurrentRouteDistribution; + myCurrentRouteDistribution.first = getID() + "_" + toString(stopTime); + myCurrentRouteDistribution.second = new RandomDistributor(); + MSRoute::dictionary(myCurrentRouteDistribution.first, myCurrentRouteDistribution.second, false); } } @@ -122,3 +127,15 @@ MSRouteProbe::writeXMLDetectorProlog(OutputDevice& dev) const { dev.writeXMLHeader("route-probes"); } + + +const MSRoute* +MSRouteProbe::getRoute() const { + if (myLastRouteDistribution.second == 0) { + if (myCurrentRouteDistribution.second->getOverallProb() > 0) { + return myCurrentRouteDistribution.second->get(); + } + return 0; + } + return myLastRouteDistribution.second->get(); +} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSRouteProbe.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSRouteProbe.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSRouteProbe.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSRouteProbe.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Tino Morenz /// @date Thu, 04.12.2008 -/// @version $Id: MSRouteProbe.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSRouteProbe.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Writes route distributions at a certain edge /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -71,11 +71,11 @@ * * @param[in] id The id of the route probe * @param[in] edge The edge where the distribution shall be estimated - * @param[in] begin The start of the first reporting interval + * @param[in] distID The id of the distribution to add values to + * @param[in] lastID The id of the last completed distribution to use for getRoute */ - MSRouteProbe(const std::string& id, - const MSEdge* edge, - SUMOTime begin); + MSRouteProbe(const std::string& id, const MSEdge* edge, + const std::string& distID, const std::string& lastID); /// @brief Destructor @@ -130,9 +130,14 @@ void writeXMLDetectorProlog(OutputDevice& dev) const; /// @} + const MSRoute* getRoute() const; + private: + /// @brief The previous distribution of routes (probability->route) + std::pair*> myLastRouteDistribution; + /// @brief The current distribution of routes (probability->route) - RandomDistributor* myCurrentRouteDistribution; + std::pair*> myCurrentRouteDistribution; private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSVTKExport.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSVTKExport.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSVTKExport.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSVTKExport.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,12 +1,16 @@ /****************************************************************************/ /// @file MSVTKExport.cpp /// @author Mario Krumnow -/// @version $Id: MSVTKExport.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date 2012-04-26 +/// @version $Id: MSVTKExport.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Realises VTK Export /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -55,84 +59,39 @@ void MSVTKExport::write(OutputDevice& of, SUMOTime /* timestep */) { - of.openTag("?xml") << " version=\"1.0\" encoding=\"UTF-8\" ?>\n"; - of.openTag("VTKFile") << " type=\"PolyData\" version=\"0.1\" order=\"LittleEndian\" >\n"; - of.openTag("PolyData") << ">\n"; - std::vector speed = getSpeed(); std::vector points = getPositions(); - - of.openTag("Piece") << " NumberOfPoints=\"" << speed.size() << - "\" NumberOfVerts=\"1\" NumberOfLines=\"0\" NumberOfStrips=\"0\" NumberOfPolys=\"0\">\n"; - - of.openTag("PointData") << ">\n"; - of.openTag("DataArray") << " type=\"Float64\" Name=\"speed\" format=\"ascii\" >" << List2String(getSpeed()); - of.closeTag(); - - //close PointData - of.closeTag(); - - of.openTag("CellData"); - - //close CellData - of.closeTag(); - - of.openTag("Points") << ">\n"; - of.openTag("DataArray") << " type=\"Float64\" Name=\"Points\" NumberOfComponents=\"3\" format=\"ascii\" >" << List2String(getPositions()); - of.closeTag(); - - //close Points - of.closeTag(); - - of.openTag("Verts") << ">\n"; - of.openTag("DataArray") << " type=\"Int64\" Name=\"connectivity\" format=\"ascii\" >" << getOffset((int) speed.size()); - of.closeTag(); - - of.openTag("DataArray") << " type=\"Int64\" Name=\"offsets\" format=\"ascii\" >" << speed.size(); - of.closeTag(); - - //Close Verts - of.closeTag(); - - of.openTag("Lines") << ">\n"; - of.openTag("DataArray") << " type=\"Int64\" Name=\"connectivity\" format=\"ascii\""; - of.closeTag(); - - of.openTag("DataArray") << " type=\"Int64\" Name=\"offsets\" format=\"ascii\""; - of.closeTag(); - - //Close Lines - of.closeTag(); - - of.openTag("Strips") << ">\n"; - of.openTag("DataArray") << " type=\"Int64\" Name=\"connectivity\" format=\"ascii\""; - of.closeTag(); - - of.openTag("DataArray") << " type=\"Int64\" Name=\"offsets\" format=\"ascii\""; - of.closeTag(); - - //Close Strips - of.closeTag(); - - of.openTag("Polys") << ">\n"; - of.openTag("DataArray") << " type=\"Int64\" Name=\"connectivity\" format=\"ascii\""; - of.closeTag(); - - of.openTag("DataArray") << " type=\"Int64\" Name=\"offsets\" format=\"ascii\""; - of.closeTag(); - - //close Polys - of.closeTag(); - - //close Piece - of.closeTag(); - - //close PolyData - of.closeTag(); - - //close VTKFile - of.closeTag(); + of << "\n"; + of << "\n"; + of << "\n"; + of << " \n"; + of << "\n"; + of << " " << List2String(getSpeed()) << "\n"; + of << "\n"; + of << "\n"; + of << "\n"; + of << " " << List2String(getPositions()) << "\n"; + of << "\n"; + of << "\n"; + of << " " << getOffset((int) speed.size()) << "\n"; + of << " " << speed.size() << "\n"; + of << "\n"; + of << "\n"; + of << " \n"; + of << " \n"; + of << "\n"; + of << "\n"; + of << " \n"; + of << " \n"; + of << "\n"; + of << "\n"; + of << " \n"; + of << " \n"; + of << "\n"; + of << "\n"; + of << "\n"; + of << ""; } @@ -152,7 +111,7 @@ if (veh->isOnRoad()) { Position pos = veh->getLane()->getShape().positionAtOffset(veh->getPositionOnLane()); - output.push_back(veh->getSpeed() * 3.6); + output.push_back(veh->getSpeed()); } } @@ -195,9 +154,9 @@ std::stringstream ss; //for a high precision - ss.precision(::std::numeric_limits::digits10); - ss.unsetf(::std::ios::dec); - ss.setf(::std::ios::scientific); + //ss.precision(::std::numeric_limits::digits10); + //ss.unsetf(::std::ios::dec); + //ss.setf(::std::ios::scientific); ss << input[i] << " "; output += ss.str(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSVTKExport.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSVTKExport.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSVTKExport.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSVTKExport.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,107 +1,13 @@ /****************************************************************************/ /// @file MSVTKExport.h /// @author Mario Krumnow +/// @date 2012-04-26 +/// @version $Id: MSVTKExport.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Produce a VTK output to use with Tools like ParaView /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef MSVTKExport_h -#define MSVTKExport_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class OutputDevice; -class MSEdgeControl; -class MSEdge; -class MSLane; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class MSVTKExport - * @brief Produce a VTK output to use with Tools like ParaView - * - * The class offers a static method, which writes VTK Files for each timestep - * of the simulation, where at least one vehicle is present. - * - * @todo - */ -class MSVTKExport { -public: - /** @brief Produce a VTK output to use with Tools like ParaView - * - * @param[in] of The output device to use - * @param[in] ec The EdgeControl which holds the edges to write - * @param[in] timestep The current time step - * @exception IOError If an error on writing occurs (!!! not yet implemented) - */ - static void write(OutputDevice& of, SUMOTime timestep); - -private: - /// @brief Invalidated copy constructor. - MSVTKExport(const MSVTKExport&); - - /// @brief Invalidated assignment operator. - MSVTKExport& operator=(const MSVTKExport&); - - /// @brief Deletes the whitespaces at the end of a String - static std::string trim(std::string istring); - - /// @brief Checks if there is a whitespace - static bool ctype_space(const char c); - - /// @brief Get a comma separated String from a Vector - static std::string List2String(std::vector input); - - /// @brief Get a Vector with the speed values of each vehicle in the actual timestep - static std::vector getSpeed(); - - /// @brief Get a Vector of the Positions (x,y,z) of each vehicle in the actual timestep - static std::vector getPositions(); - - /// @brief Get a String with the indexes of all vehicles (needed in the VTk File) - static std::string getOffset(int nr); - -}; - - -#endif - -/****************************************************************************/ -/****************************************************************************/ -/// @file MSVTKExport.h -/// @author Mario Krumnow -/// -// Produce a VTK output to use with Tools like ParaView -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSVTypeProbe.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSVTypeProbe.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSVTypeProbe.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSVTypeProbe.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Wed, 24.10.2007 -/// @version $Id: MSVTypeProbe.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSVTypeProbe.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Writes positions of vehicles that have a certain (named) type /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -53,7 +53,7 @@ const std::string& vType, OutputDevice& od, SUMOTime frequency) : Named(id), myVType(vType), myOutputDevice(od), myFrequency(frequency) { - MSNet::getInstance()->getEndOfTimestepEvents().addEvent(this, 0, MSEventControl::ADAPT_AFTER_EXECUTION); + MSNet::getInstance()->getEndOfTimestepEvents()->addEvent(this, 0, MSEventControl::ADAPT_AFTER_EXECUTION); myOutputDevice.writeXMLHeader("vehicle-type-probes"); } @@ -66,30 +66,28 @@ MSVTypeProbe::execute(SUMOTime currentTime) { myOutputDevice.openTag("timestep") << " time=\"" << time2string(currentTime) << "\" id=\"" << getID() << "\" vType=\"" << myVType << "\""; MSVehicleControl& vc = MSNet::getInstance()->getVehicleControl(); - MSVehicleControl::constVehIt it = vc.loadedVehBegin(); - MSVehicleControl::constVehIt end = vc.loadedVehEnd(); - for (; it != end; ++it) { - const MSVehicle* veh = static_cast((*it).second); + for (MSVehicleControl::constVehIt it = vc.loadedVehBegin(); it != vc.loadedVehEnd(); ++it) { + const SUMOVehicle* veh = it->second; + const MSVehicle* microVeh = dynamic_cast(veh); if (myVType == "" || myVType == veh->getVehicleType().getID()) { - if (!veh->isOnRoad()) { - continue; + if (veh->isOnRoad()) { + Position pos = veh->getPosition(); + myOutputDevice.openTag("vehicle").writeAttr("id", veh->getID()); + if (microVeh != 0) { + myOutputDevice.writeAttr("lane", microVeh->getLane()->getID()); + } + myOutputDevice.writeAttr("pos", veh->getPositionOnLane()); + myOutputDevice.writeAttr("x", pos.x()).writeAttr("y", pos.y()); + if (GeoConvHelper::getFinal().usingGeoProjection()) { + GeoConvHelper::getFinal().cartesian2geo(pos); + myOutputDevice.setPrecision(GEO_OUTPUT_ACCURACY); + myOutputDevice.writeAttr("lat", pos.y()).writeAttr("lon", pos.x()); + myOutputDevice.setPrecision(); + } + myOutputDevice.writeAttr("speed", veh->getSpeed()); + myOutputDevice.closeTag(); } - Position pos = veh->getLane()->getShape().positionAtOffset(veh->getPositionOnLane()); - myOutputDevice.openTag("vehicle") << " id=\"" << veh->getID() - << "\" lane=\"" << veh->getLane()->getID() - << "\" pos=\"" << veh->getPositionOnLane() - << "\" x=\"" << pos.x() - << "\" y=\"" << pos.y(); - if (GeoConvHelper::getFinal().usingGeoProjection()) { - GeoConvHelper::getFinal().cartesian2geo(pos); - myOutputDevice.setPrecision(GEO_OUTPUT_ACCURACY); - myOutputDevice << "\" lat=\"" << pos.y() << "\" lon=\"" << pos.x(); - myOutputDevice.setPrecision(); - } - myOutputDevice << "\" speed=\"" << veh->getSpeed() << "\""; - myOutputDevice.closeTag(); } - } myOutputDevice.closeTag(); return myFrequency; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSVTypeProbe.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSVTypeProbe.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSVTypeProbe.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSVTypeProbe.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 24.10.2007 -/// @version $Id: MSVTypeProbe.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSVTypeProbe.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Writes positions of vehicles that have a certain (named) type /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSXMLRawOut.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSXMLRawOut.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSXMLRawOut.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSXMLRawOut.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Bjoern Hendriks /// @author Michael Behrisch /// @date Mon, 10.05.2004 -/// @version $Id: MSXMLRawOut.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSXMLRawOut.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Realises dumping the complete network state /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -37,7 +37,9 @@ #include #include #include +#include #include +#include #include #include "MSXMLRawOut.h" @@ -56,18 +58,20 @@ // =========================================================================== void MSXMLRawOut::write(OutputDevice& of, const MSEdgeControl& ec, - SUMOTime timestep) { + SUMOTime timestep, int precision) { of.openTag("timestep") << " time=\"" << time2string(timestep) << "\""; - const std::vector& edges = ec.getEdges(); - for (std::vector::const_iterator e = edges.begin(); e != edges.end(); ++e) { - writeEdge(of, **e); + of.setPrecision(precision); + const MSEdgeVector& edges = ec.getEdges(); + for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) { + writeEdge(of, **e, timestep); } + of.setPrecision(OUTPUT_ACCURACY); of.closeTag(); } void -MSXMLRawOut::writeEdge(OutputDevice& of, const MSEdge& edge) { +MSXMLRawOut::writeEdge(OutputDevice& of, const MSEdge& edge, SUMOTime timestep) { //en bool dump = !MSGlobals::gOmitEmptyEdgesOnDump; if (!dump) { @@ -95,24 +99,46 @@ #endif } //en - if (dump) { + const std::vector& persons = edge.getSortedPersons(timestep); + const std::vector& containers = edge.getSortedContainers(timestep); + if (dump || persons.size() > 0 || containers.size() > 0) { of.openTag("edge") << " id=\"" << edge.getID() << "\""; + if (dump) { #ifdef HAVE_INTERNAL - if (MSGlobals::gUseMesoSim) { - MESegment* seg = MSGlobals::gMesoNet->getSegmentForEdge(edge); - while (seg != 0) { - seg->writeVehicles(of); - seg = seg->getNextSegment(); - } - } else { + if (MSGlobals::gUseMesoSim) { + MESegment* seg = MSGlobals::gMesoNet->getSegmentForEdge(edge); + while (seg != 0) { + seg->writeVehicles(of); + seg = seg->getNextSegment(); + } + } else { #endif - const std::vector& lanes = edge.getLanes(); - for (std::vector::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) { - writeLane(of, **lane); - } + const std::vector& lanes = edge.getLanes(); + for (std::vector::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) { + writeLane(of, **lane); + } #ifdef HAVE_INTERNAL - } + } #endif + } + // write persons + for (std::vector::const_iterator it_p = persons.begin(); it_p != persons.end(); ++it_p) { + of.openTag(SUMO_TAG_PERSON); + of.writeAttr(SUMO_ATTR_ID, (*it_p)->getID()); + of.writeAttr(SUMO_ATTR_POSITION, (*it_p)->getEdgePos()); + of.writeAttr(SUMO_ATTR_ANGLE, (*it_p)->getAngle()); + of.writeAttr("stage", (*it_p)->getCurrentStageDescription()); + of.closeTag(); + } + // write containers + for (std::vector::const_iterator it_c = containers.begin(); it_c != containers.end(); ++it_c) { + of.openTag(SUMO_TAG_CONTAINER); + of.writeAttr(SUMO_ATTR_ID, (*it_c)->getID()); + of.writeAttr(SUMO_ATTR_POSITION, (*it_c)->getEdgePos()); + of.writeAttr(SUMO_ATTR_ANGLE, (*it_c)->getAngle()); + of.writeAttr("stage", (*it_c)->getCurrentStageDescription()); + of.closeTag(); + } of.closeTag(); } } @@ -138,8 +164,21 @@ void MSXMLRawOut::writeVehicle(OutputDevice& of, const MSBaseVehicle& veh) { if (veh.isOnRoad()) { - of.openTag("vehicle") << " id=\"" << veh.getID() << "\" pos=\"" - << veh.getPositionOnLane() << "\" speed=\"" << veh.getSpeed() << "\""; + of.openTag("vehicle"); + of.writeAttr(SUMO_ATTR_ID, veh.getID()); + of.writeAttr(SUMO_ATTR_POSITION, veh.getPositionOnLane()); + of.writeAttr(SUMO_ATTR_SPEED, veh.getSpeed()); + if (!MSGlobals::gUseMesoSim) { + // microsim-specific stuff + const unsigned int personNumber = static_cast(veh).getPersonNumber(); + if (personNumber > 0) { + of.writeAttr(SUMO_ATTR_PERSON_NUMBER, personNumber); + } + const unsigned int containerNumber = static_cast(veh).getContainerNumber(); + if (containerNumber > 0) { + of.writeAttr(SUMO_ATTR_CONTAINER_NUMBER, containerNumber); + } + } of.closeTag(); } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSXMLRawOut.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSXMLRawOut.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/output/MSXMLRawOut.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/output/MSXMLRawOut.h 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Bjoern Hendriks /// @author Michael Behrisch /// @date Mon, 10.05.2004 -/// @version $Id: MSXMLRawOut.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSXMLRawOut.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Realises dumping the complete network state /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -69,10 +69,11 @@ * @param[in] of The output device to use * @param[in] ec The EdgeControl which holds the edges to write * @param[in] timestep The current time step + * @param[in] precision The output precision * @exception IOError If an error on writing occurs (!!! not yet implemented) */ static void write(OutputDevice& of, const MSEdgeControl& ec, - SUMOTime timestep); + SUMOTime timestep, int precision); /** @brief Writes the dump of the given vehicle into the given device @@ -95,7 +96,7 @@ * @todo MSGlobals::gOmitEmptyEdgesOnDump should not be used; rather the according option read in write * @exception IOError If an error on writing occurs (!!! not yet implemented) */ - static void writeEdge(OutputDevice& of, const MSEdge& edge); + static void writeEdge(OutputDevice& of, const MSEdge& edge, SUMOTime timestep); /** @brief Writes the dump of the given lane into the given device diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,6 @@ +noinst_LIBRARIES = libmicrosimpeds.a + +libmicrosimpeds_a_SOURCES = MSPerson.cpp MSPerson.h \ +MSPModel.cpp MSPModel.h \ +MSPModel_Striping.cpp MSPModel_Striping.h \ +MSPModel_NonInteracting.cpp MSPModel_NonInteracting.h diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,622 @@ +# Makefile.in generated by automake 1.13.4 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/microsim/pedestrians +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libmicrosimpeds_a_AR = $(AR) $(ARFLAGS) +libmicrosimpeds_a_LIBADD = +am_libmicrosimpeds_a_OBJECTS = MSPerson.$(OBJEXT) MSPModel.$(OBJEXT) \ + MSPModel_Striping.$(OBJEXT) MSPModel_NonInteracting.$(OBJEXT) +libmicrosimpeds_a_OBJECTS = $(am_libmicrosimpeds_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libmicrosimpeds_a_SOURCES) +DIST_SOURCES = $(libmicrosimpeds_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_CPPFLAGS = @AM_CPPFLAGS@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ +FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ +GDAL_LDFLAGS = @GDAL_LDFLAGS@ +GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_XERCES = @LIB_XERCES@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OSG_LIBS = @OSG_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJ_LDFLAGS = @PROJ_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XERCES_CFLAGS = @XERCES_CFLAGS@ +XERCES_LDFLAGS = @XERCES_LDFLAGS@ +XERCES_LIBS = @XERCES_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LIBRARIES = libmicrosimpeds.a +libmicrosimpeds_a_SOURCES = MSPerson.cpp MSPerson.h \ +MSPModel.cpp MSPModel.h \ +MSPModel_Striping.cpp MSPModel_Striping.h \ +MSPModel_NonInteracting.cpp MSPModel_NonInteracting.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/microsim/pedestrians/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/microsim/pedestrians/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +libmicrosimpeds.a: $(libmicrosimpeds_a_OBJECTS) $(libmicrosimpeds_a_DEPENDENCIES) $(EXTRA_libmicrosimpeds_a_DEPENDENCIES) + $(AM_V_at)-rm -f libmicrosimpeds.a + $(AM_V_AR)$(libmicrosimpeds_a_AR) libmicrosimpeds.a $(libmicrosimpeds_a_OBJECTS) $(libmicrosimpeds_a_LIBADD) + $(AM_V_at)$(RANLIB) libmicrosimpeds.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSPModel.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSPModel_NonInteracting.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSPModel_Striping.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSPerson.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPerson.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPerson.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPerson.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPerson.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,642 @@ +/****************************************************************************/ +/// @file MSPerson.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @author Laura Bieker +/// @date Mon, 9 Jul 2001 +/// @version $Id: MSPerson.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// The class for modelling person-movements +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include "MSPerson.h" +#include +#include +#include +#include "MSPModel.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + +/* ------------------------------------------------------------------------- + * static member definitions + * ----------------------------------------------------------------------- */ + +// =========================================================================== +// method definitions +// =========================================================================== +/* ------------------------------------------------------------------------- + * MSPerson::MSPersonStage - methods + * ----------------------------------------------------------------------- */ +MSPerson::MSPersonStage::MSPersonStage(const MSEdge& destination, StageType type) + : myDestination(destination), myDeparted(-1), myArrived(-1), myType(type) {} + + +MSPerson::MSPersonStage::~MSPersonStage() {} + + +const MSEdge& +MSPerson::MSPersonStage::getDestination() const { + return myDestination; +} + + +void +MSPerson::MSPersonStage::setDeparted(SUMOTime now) { + if (myDeparted < 0) { + myDeparted = now; + } +} + + +void +MSPerson::MSPersonStage::setArrived(SUMOTime now) { + myArrived = now; +} + + +bool +MSPerson::MSPersonStage::isWaitingFor(const std::string& /*line*/) const { + return false; +} + + +Position +MSPerson::MSPersonStage::getEdgePosition(const MSEdge* e, SUMOReal at, SUMOReal offset) const { + return getLanePosition(e->getLanes()[0], at, offset); +} + + +Position +MSPerson::MSPersonStage::getLanePosition(const MSLane* lane, SUMOReal at, SUMOReal offset) const { + return lane->getShape().positionAtOffset(lane->interpolateLanePosToGeometryPos(at), offset); +} + + +SUMOReal +MSPerson::MSPersonStage::getEdgeAngle(const MSEdge* e, SUMOReal at) const { + // @todo: well, definitely not the nicest way... Should be precomputed + PositionVector shp = e->getLanes()[0]->getShape(); + return -shp.rotationDegreeAtOffset(at); +} + + + +/* ------------------------------------------------------------------------- + * MSPerson::MSPersonStage_Walking - methods + * ----------------------------------------------------------------------- */ +MSPerson::MSPersonStage_Walking::MSPersonStage_Walking(const ConstMSEdgeVector& route, + MSBusStop* toBS, + SUMOTime walkingTime, SUMOReal speed, + SUMOReal departPos, SUMOReal arrivalPos) : + MSPersonStage(*route.back(), WALKING), myWalkingTime(walkingTime), myRoute(route), + myCurrentInternalEdge(0), + myDepartPos(departPos), myArrivalPos(arrivalPos), myDestinationBusStop(toBS), + mySpeed(speed), + myPedestrianState(0) { + myDepartPos = SUMOVehicleParameter::interpretEdgePos( + myDepartPos, myRoute.front()->getLength(), SUMO_ATTR_DEPARTPOS, "person walking from " + myRoute.front()->getID()); + myArrivalPos = SUMOVehicleParameter::interpretEdgePos( + myArrivalPos, myRoute.back()->getLength(), SUMO_ATTR_ARRIVALPOS, "person walking to " + myRoute.back()->getID()); + if (walkingTime > 0) { + mySpeed = computeAverageSpeed(); + } +} + + +MSPerson::MSPersonStage_Walking::~MSPersonStage_Walking() { +} + + +const MSEdge* +MSPerson::MSPersonStage_Walking::getEdge() const { + if (myCurrentInternalEdge != 0) { + return myCurrentInternalEdge; + } else { + return *myRouteStep; + } +} + + +const MSEdge* +MSPerson::MSPersonStage_Walking::getFromEdge() const { + return myRoute.front(); +} + + +SUMOReal +MSPerson::MSPersonStage_Walking::getEdgePos(SUMOTime now) const { + return myPedestrianState->getEdgePos(*this, now); +} + + +Position +MSPerson::MSPersonStage_Walking::getPosition(SUMOTime now) const { + return myPedestrianState->getPosition(*this, now); +} + + +SUMOReal +MSPerson::MSPersonStage_Walking::getAngle(SUMOTime now) const { + return myPedestrianState->getAngle(*this, now); +} + + +SUMOTime +MSPerson::MSPersonStage_Walking::getWaitingTime(SUMOTime now) const { + return myPedestrianState->getWaitingTime(*this, now); +} + + +SUMOReal +MSPerson::MSPersonStage_Walking::getSpeed() const { + return myPedestrianState->getSpeed(*this); +} + + +void +MSPerson::MSPersonStage_Walking::proceed(MSNet* net, MSPerson* person, SUMOTime now, + MSEdge* previousEdge, const SUMOReal at) { + previousEdge->removePerson(person); + myRouteStep = myRoute.begin(); + if (myWalkingTime == 0) { + if (!person->proceed(net, now)) { + MSNet::getInstance()->getPersonControl().erase(person); + }; + return; + } + MSNet::getInstance()->getPersonControl().setWalking(person); + if (at >= 0) { + myDepartPos = at; + if (myWalkingTime > 0) { + mySpeed = computeAverageSpeed(); + } + } + myPedestrianState = MSPModel::getModel()->add(person, this, now); + ((MSEdge*) *myRouteStep)->addPerson(person); +} + + +SUMOReal +MSPerson::MSPersonStage_Walking::computeAverageSpeed() const { + SUMOReal length = 0; + for (ConstMSEdgeVector::const_iterator i = myRoute.begin(); i != myRoute.end(); ++i) { + length += (*i)->getLength(); + } + length -= myDepartPos; + length -= myRoute.back()->getLength() - myArrivalPos; + return length / STEPS2TIME(myWalkingTime + 1); // avoid systematic rounding errors +} + + +void +MSPerson::MSPersonStage_Walking::tripInfoOutput(OutputDevice& os) const { + os.openTag("walk").writeAttr("arrival", time2string(myArrived)).closeTag(); +} + + +void +MSPerson::MSPersonStage_Walking::routeOutput(OutputDevice& os) const { + os.openTag("walk").writeAttr(SUMO_ATTR_EDGES, myRoute); + if (myWalkingTime > 0) { + os.writeAttr(SUMO_ATTR_DURATION, time2string(myWalkingTime)); + } else if (mySpeed > 0) { + os.writeAttr(SUMO_ATTR_SPEED, mySpeed); + } + os.closeTag(); +} + + +void +MSPerson::MSPersonStage_Walking::beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const { + os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "departure") + .writeAttr("agent", p.getID()).writeAttr("link", myRoute.front()->getID()).closeTag(); +} + + +void +MSPerson::MSPersonStage_Walking::endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const { + os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "arrival") + .writeAttr("agent", p.getID()).writeAttr("link", myRoute.back()->getID()).closeTag(); +} + + +bool +MSPerson::MSPersonStage_Walking::moveToNextEdge(MSPerson* person, SUMOTime currentTime, MSEdge* nextInternal) { + ((MSEdge*)getEdge())->removePerson(person); + //std::cout << SIMTIME << " moveToNextEdge person=" << person->getID() << "\n"; + if (myRouteStep == myRoute.end() - 1) { + MSNet::getInstance()->getPersonControl().unsetWalking(person); + if (myDestinationBusStop != 0) { + myDestinationBusStop->addPerson(person); + } + if (!person->proceed(MSNet::getInstance(), currentTime)) { + MSNet::getInstance()->getPersonControl().erase(person); + } + //std::cout << " end walk. myRouteStep=" << (*myRouteStep)->getID() << "\n"; + return true; + } else { + if (nextInternal == 0) { + ++myRouteStep; + myCurrentInternalEdge = 0; + } else { + myCurrentInternalEdge = nextInternal; + } + ((MSEdge*) getEdge())->addPerson(person); + return false; + } +} + + + +/* ------------------------------------------------------------------------- + * MSPerson::MSPersonStage_Driving - methods + * ----------------------------------------------------------------------- */ +MSPerson::MSPersonStage_Driving::MSPersonStage_Driving(const MSEdge& destination, + MSBusStop* toBS, const std::vector& lines) + : MSPersonStage(destination, DRIVING), myLines(lines.begin(), lines.end()), + myVehicle(0), myDestinationBusStop(toBS) {} + + +MSPerson::MSPersonStage_Driving::~MSPersonStage_Driving() {} + + +const MSEdge* +MSPerson::MSPersonStage_Driving::getEdge() const { + if (myVehicle != 0) { + return myVehicle->getEdge(); + } + return myWaitingEdge; +} + + +const MSEdge* +MSPerson::MSPersonStage_Driving::getFromEdge() const { + return myWaitingEdge; +} + + +SUMOReal +MSPerson::MSPersonStage_Driving::getEdgePos(SUMOTime /* now */) const { + if (myVehicle != 0) { + // vehicle may already have passed the lane (check whether this is correct) + return MIN2(myVehicle->getPositionOnLane(), getEdge()->getLength()); + } + return myWaitingPos; +} + + +Position +MSPerson::MSPersonStage_Driving::getPosition(SUMOTime /* now */) const { + if (myVehicle != 0) { + /// @bug this fails while vehicle is driving across a junction + return myVehicle->getEdge()->getLanes()[0]->getShape().positionAtOffset(myVehicle->getPositionOnLane()); + } + return getEdgePosition(myWaitingEdge, myWaitingPos, MSPModel::SIDEWALK_OFFSET); +} + + +SUMOReal +MSPerson::MSPersonStage_Driving::getAngle(SUMOTime /* now */) const { + if (myVehicle != 0) { + MSVehicle* veh = dynamic_cast(myVehicle); + if (veh != 0) { + return veh->getAngle(); + } else { + return 0; + } + } + return getEdgeAngle(myWaitingEdge, myWaitingPos) + 90; +} + + + +void +MSPerson::MSPersonStage_Driving::proceed(MSNet* net, MSPerson* person, SUMOTime now, + MSEdge* previousEdge, const SUMOReal at) { + myWaitingEdge = previousEdge; + myWaitingPos = at; + myWaitingSince = now; + SUMOVehicle* availableVehicle = net->getVehicleControl().getWaitingVehicle(previousEdge, myLines, myWaitingPos, person->getID()); + if (availableVehicle != 0 && availableVehicle->getParameter().departProcedure == DEPART_TRIGGERED) { + myVehicle = availableVehicle; + previousEdge->removePerson(person); + myVehicle->addPerson(person); + net->getInsertionControl().add(myVehicle); + net->getVehicleControl().removeWaiting(previousEdge, myVehicle); + net->getVehicleControl().unregisterOneWaitingForPerson(); + } else { + net->getPersonControl().addWaiting(previousEdge, person); + previousEdge->addPerson(person); + } +} + + +bool +MSPerson::MSPersonStage_Driving::isWaitingFor(const std::string& line) const { + return myLines.count(line) > 0; +} + + +bool +MSPerson::MSPersonStage_Driving::isWaiting4Vehicle() const { + return myVehicle == 0; +} + + +SUMOTime +MSPerson::MSPersonStage_Driving::getWaitingTime(SUMOTime now) const { + return isWaiting4Vehicle() ? now - myWaitingSince : 0; +} + + +SUMOReal +MSPerson::MSPersonStage_Driving::getSpeed() const { + return myVehicle == 0 ? 0 : myVehicle->getSpeed(); +} + + +std::string +MSPerson::MSPersonStage_Driving::getStageDescription() const { + return isWaiting4Vehicle() ? "waiting for " + joinToString(myLines, ",") : "driving"; +} + + +void +MSPerson::MSPersonStage_Driving::tripInfoOutput(OutputDevice& os) const { + os.openTag("ride").writeAttr("depart", time2string(myDeparted)).writeAttr("arrival", time2string(myArrived)).closeTag(); +} + + +void +MSPerson::MSPersonStage_Driving::routeOutput(OutputDevice& os) const { + os.openTag("ride").writeAttr(SUMO_ATTR_FROM, getFromEdge()->getID()).writeAttr(SUMO_ATTR_TO, getDestination().getID()); + os.writeAttr(SUMO_ATTR_LINES, myLines).closeTag(); +} + + +void +MSPerson::MSPersonStage_Driving::beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const { + os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "arrival").writeAttr("agent", p.getID()).writeAttr("link", getEdge()->getID()).closeTag(); +} + + +void +MSPerson::MSPersonStage_Driving::endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const { + os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "arrival").writeAttr("agent", p.getID()).writeAttr("link", getEdge()->getID()).closeTag(); +} + + + +/* ------------------------------------------------------------------------- + * MSPerson::MSPersonStage_Waiting - methods + * ----------------------------------------------------------------------- */ +MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(const MSEdge& destination, + SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string& actType) : + MSPersonStage(destination, WAITING), + myWaitingDuration(duration), + myWaitingUntil(until), + myActType(actType), + myStartPos(pos) { + myStartPos = SUMOVehicleParameter::interpretEdgePos( + myStartPos, myDestination.getLength(), SUMO_ATTR_DEPARTPOS, "person stopping at " + myDestination.getID()); +} + + +MSPerson::MSPersonStage_Waiting::~MSPersonStage_Waiting() {} + + +const MSEdge* +MSPerson::MSPersonStage_Waiting::getEdge() const { + return &myDestination; +} + + +const MSEdge* +MSPerson::MSPersonStage_Waiting::getFromEdge() const { + return &myDestination; +} + + +SUMOReal +MSPerson::MSPersonStage_Waiting::getEdgePos(SUMOTime /* now */) const { + return myStartPos; +} + + +SUMOTime +MSPerson::MSPersonStage_Waiting::getUntil() const { + return myWaitingUntil; +} + + +Position +MSPerson::MSPersonStage_Waiting::getPosition(SUMOTime /* now */) const { + return getEdgePosition(&myDestination, myStartPos, MSPModel::SIDEWALK_OFFSET); +} + + +SUMOReal +MSPerson::MSPersonStage_Waiting::getAngle(SUMOTime /* now */) const { + return getEdgeAngle(&myDestination, myStartPos) - 90; +} + + +void +MSPerson::MSPersonStage_Waiting::proceed(MSNet* net, MSPerson* person, SUMOTime now, + MSEdge* previousEdge, const SUMOReal /* at */) { + previousEdge->addPerson(person); + myWaitingStart = now; + const SUMOTime until = MAX3(now, now + myWaitingDuration, myWaitingUntil); + net->getPersonControl().setWaitEnd(until, person); +} + + +void +MSPerson::MSPersonStage_Waiting::tripInfoOutput(OutputDevice& os) const { + os.openTag("stop").writeAttr("arrival", time2string(myArrived)).closeTag(); +} + + +void +MSPerson::MSPersonStage_Waiting::routeOutput(OutputDevice& os) const { + os.openTag("stop").writeAttr(SUMO_ATTR_LANE, getDestination().getID()); + if (myWaitingDuration >= 0) { + os.writeAttr(SUMO_ATTR_DURATION, time2string(myWaitingDuration)); + } + if (myWaitingUntil >= 0) { + os.writeAttr(SUMO_ATTR_UNTIL, time2string(myWaitingUntil)); + } + os.closeTag(); +} + + +void +MSPerson::MSPersonStage_Waiting::beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const { + os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "actstart " + myActType) + .writeAttr("agent", p.getID()).writeAttr("link", getEdge()->getID()).closeTag(); +} + + +void +MSPerson::MSPersonStage_Waiting::endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const { + os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "actend " + myActType).writeAttr("agent", p.getID()) + .writeAttr("link", getEdge()->getID()).closeTag(); +} + + +SUMOTime +MSPerson::MSPersonStage_Waiting::getWaitingTime(SUMOTime now) const { + return now - myWaitingStart; +} + + +SUMOReal +MSPerson::MSPersonStage_Waiting::getSpeed() const { + return 0; +} + + + + +/* ------------------------------------------------------------------------- + * MSPerson - methods + * ----------------------------------------------------------------------- */ +MSPerson::MSPerson(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSPersonPlan* plan) + : myParameter(pars), myVType(vtype), myPlan(plan) { + myStep = myPlan->begin(); +} + + +MSPerson::~MSPerson() { + for (MSPersonPlan::const_iterator i = myPlan->begin(); i != myPlan->end(); ++i) { + delete *i; + } + delete myPlan; + delete myParameter; +} + + +const std::string& +MSPerson::getID() const { + return myParameter->id; +} + + +bool +MSPerson::proceed(MSNet* net, SUMOTime time) { + MSEdge* arrivedAt = (MSEdge*)(*myStep)->getEdge(); + SUMOReal atPos = (*myStep)->getEdgePos(time); + //MSPersonPlan::iterator prior = myStep; + (*myStep)->setArrived(time); + /* + if(myWriteEvents) { + (*myStep)->endEventOutput(*this, time, OutputDevice::getDeviceByOption("person-event-output")); + } + */ + myStep++; + if (myStep != myPlan->end()) { + (*myStep)->proceed(net, this, time, arrivedAt, atPos); + /* + if(myWriteEvents) { + (*myStep)->beginEventOutput(*this, time, OutputDevice::getDeviceByOption("person-event-output")); + } + */ + return true; + } else { + arrivedAt->removePerson(this); + return false; + } +} + + +SUMOTime +MSPerson::getDesiredDepart() const { + return myParameter->depart; +} + + +void +MSPerson::setDeparted(SUMOTime now) { + (*myStep)->setDeparted(now); +} + + +void +MSPerson::tripInfoOutput(OutputDevice& os) const { + for (MSPersonPlan::const_iterator i = myPlan->begin(); i != myPlan->end(); ++i) { + (*i)->tripInfoOutput(os); + } +} + + +void +MSPerson::routeOutput(OutputDevice& os) const { + MSPersonPlan::const_iterator i = myPlan->begin(); + if ((*i)->getStageType() == WAITING && getDesiredDepart() == static_cast(*i)->getUntil()) { + ++i; + } + for (; i != myPlan->end(); ++i) { + (*i)->routeOutput(os); + } +} + +SUMOReal +MSPerson::getEdgePos() const { + return (*myStep)->getEdgePos(MSNet::getInstance()->getCurrentTimeStep()); +} + +Position +MSPerson::getPosition() const { + return (*myStep)->getPosition(MSNet::getInstance()->getCurrentTimeStep()); +} + + +SUMOReal +MSPerson::getAngle() const { + return (*myStep)->getAngle(MSNet::getInstance()->getCurrentTimeStep()); +} + +SUMOReal +MSPerson::getWaitingSeconds() const { + return STEPS2TIME((*myStep)->getWaitingTime(MSNet::getInstance()->getCurrentTimeStep())); +} + +SUMOReal +MSPerson::getSpeed() const { + return (*myStep)->getSpeed(); +} + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPerson.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPerson.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPerson.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPerson.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,644 @@ +/****************************************************************************/ +/// @file MSPerson.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Sascha Krieg +/// @author Michael Behrisch +/// @date Mon, 9 Jul 2001 +/// @version $Id: MSPerson.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// The class for modelling person-movements +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSPerson_h +#define MSPerson_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class MSNet; +class MSEdge; +class MSLane; +class OutputDevice; +class SUMOVehicleParameter; +class MSBusStop; +class SUMOVehicle; +class MSVehicleType; +class MSPModel; +class PedestrianState; + +typedef std::vector ConstMSEdgeVector; + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSPerson + * + * The class holds a simulated person together with her movement stages + */ +class MSPerson { +public: + enum StageType { + WALKING = 0, + DRIVING = 1, + WAITING = 2 + }; + + + /** + * The "abstract" class for a single stage of a persons movement + * Contains the destination of the current movement step + */ + class MSPersonStage { + public: + /// constructor + MSPersonStage(const MSEdge& destination, StageType type); + + /// destructor + virtual ~MSPersonStage(); + + /// returns the destination edge + const MSEdge& getDestination() const; + + /// Returns the current edge + virtual const MSEdge* getEdge() const = 0; + virtual const MSEdge* getFromEdge() const = 0; + virtual SUMOReal getEdgePos(SUMOTime now) const = 0; + + /// + virtual Position getPosition(SUMOTime now) const = 0; + virtual SUMOReal getAngle(SUMOTime now) const = 0; + + /// + StageType getStageType() const { + return myType; + } + + /// @brief return string representation of the current stage + virtual std::string getStageDescription() const = 0; + + /// proceeds to the next step + virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at) = 0; + + /// logs end of the step + void setDeparted(SUMOTime now); + + /// logs end of the step + void setArrived(SUMOTime now); + + /// Whether the person waits for a vehicle of the line specified. + virtual bool isWaitingFor(const std::string& line) const; + + /// @brief Whether the person waits for a vehicle + virtual bool isWaiting4Vehicle() const { + return false; + } + + /// @brief the time this person spent waiting + virtual SUMOTime getWaitingTime(SUMOTime now) const = 0; + + /// @brief the time this person spent waiting + virtual SUMOReal getSpeed() const = 0; + + /// @brief get position on edge e at length at with orthogonal offset + Position getEdgePosition(const MSEdge* e, SUMOReal at, SUMOReal offset) const; + + /// @brief get position on lane at length at with orthogonal offset + Position getLanePosition(const MSLane* lane, SUMOReal at, SUMOReal offset) const; + + SUMOReal getEdgeAngle(const MSEdge* e, SUMOReal at) const; + + /** @brief Called on writing tripinfo output + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void tripInfoOutput(OutputDevice& os) const = 0; + + /** @brief Called on writing vehroute output + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void routeOutput(OutputDevice& os) const = 0; + + /** @brief Called for writing the events output (begin of an action) + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const = 0; + + /** @brief Called for writing the events output (end of an action) + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const = 0; + + + protected: + /// the next edge to reach (either by walking or driving) + const MSEdge& myDestination; + + /// the time at which this stage started + SUMOTime myDeparted; + + /// the time at which this stage ended + SUMOTime myArrived; + + /// The type of this stage + StageType myType; + + private: + /// @brief Invalidated copy constructor. + MSPersonStage(const MSPersonStage&); + + /// @brief Invalidated assignment operator. + MSPersonStage& operator=(const MSPersonStage&); + + }; + + /** + * A "real" stage performing the walking to an edge + * The walking does not need any route as it is not simulated. + * Only the duration is needed + */ + class MSPersonStage_Walking : public MSPersonStage { + friend class MSPModel; + friend class GUIPerson; // debugging + + public: + /// constructor + MSPersonStage_Walking(const ConstMSEdgeVector& route, MSBusStop* toBS, SUMOTime walkingTime, SUMOReal speed, SUMOReal departPos, SUMOReal arrivalPos); + + /// destructor + ~MSPersonStage_Walking(); + + /// proceeds to the next step + virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at); + + /// Returns the current edge + const MSEdge* getEdge() const; + const MSEdge* getFromEdge() const; + SUMOReal getEdgePos(SUMOTime now) const; + + /// + Position getPosition(SUMOTime now) const; + + SUMOReal getAngle(SUMOTime now) const; + + SUMOTime getWaitingTime(SUMOTime now) const; + + SUMOReal getSpeed() const; + + std::string getStageDescription() const { + return "walking"; + } + + /** @brief Called on writing tripinfo output + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void tripInfoOutput(OutputDevice& os) const; + + /** @brief Called on writing vehroute output + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void routeOutput(OutputDevice& os) const; + + /** @brief Called for writing the events output + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const; + + /** @brief Called for writing the events output (end of an action) + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const; + + /// @brief move forward and return whether the person arrived + bool moveToNextEdge(MSPerson* person, SUMOTime currentTime, MSEdge* nextInternal = 0); + + + /// @brief accessors to be used by MSPModel + //@{ + inline SUMOReal getMaxSpeed() const { + return mySpeed; + } + inline SUMOReal getDepartPos() const { + return myDepartPos; + } + inline SUMOReal getArrivalPos() const { + return myArrivalPos; + } + + inline const MSEdge* getRouteEdge() const { + return *myRouteStep; + } + inline const MSEdge* getNextRouteEdge() const { + return myRouteStep == myRoute.end() - 1 ? 0 : *(myRouteStep + 1); + } + inline const ConstMSEdgeVector& getRoute() const { + return myRoute; + } + + PedestrianState* getPedestrianState() const { + return myPedestrianState; + } + //@} + + + private: + + /* @brief compute average speed if the total walking duration is given + * @note Must be callled when the previous stage changes myDepartPos from the default*/ + SUMOReal computeAverageSpeed() const; + + + private: + /// the time the person is walking + SUMOTime myWalkingTime; + + /// @brief The route of the person + ConstMSEdgeVector myRoute; + + + ConstMSEdgeVector::iterator myRouteStep; + + /// @brief The current internal edge this person is on or 0 + MSEdge* myCurrentInternalEdge; + + /// @brief A vector of computed times an edge is reached + //std::vector myArrivalTimes; + + SUMOReal myDepartPos; + SUMOReal myArrivalPos; + MSBusStop* myDestinationBusStop; + SUMOReal mySpeed; + + /// @brief state that is to be manipulated by MSPModel + PedestrianState* myPedestrianState; + + class arrival_finder { + public: + /// constructor + explicit arrival_finder(SUMOTime time) : myTime(time) {} + + /// comparison operator + bool operator()(SUMOReal t) const { + return myTime > t; + } + + private: + /// the searched arrival time + SUMOTime myTime; + }; + + private: + /// @brief Invalidated copy constructor. + MSPersonStage_Walking(const MSPersonStage_Walking&); + + /// @brief Invalidated assignment operator. + MSPersonStage_Walking& operator=(const MSPersonStage_Walking&); + + }; + + /** + * A "real" stage performing the travelling by a transport system + * The given route will be chosen. The travel time is computed by the simulation + */ + class MSPersonStage_Driving : public MSPersonStage { + public: + /// constructor + MSPersonStage_Driving(const MSEdge& destination, MSBusStop* toBS, + const std::vector& lines); + + /// destructor + ~MSPersonStage_Driving(); + + /// proceeds to the next step + virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at); + + /// Returns the current edge + const MSEdge* getEdge() const; + const MSEdge* getFromEdge() const; + SUMOReal getEdgePos(SUMOTime now) const; + + /// + Position getPosition(SUMOTime now) const; + + SUMOReal getAngle(SUMOTime now) const; + + std::string getStageDescription() const; + + /// Whether the person waits for a vehicle of the line specified. + bool isWaitingFor(const std::string& line) const; + + /// @brief Whether the person waits for a vehicle + bool isWaiting4Vehicle() const; + + /// @brief time spent waiting for a ride + SUMOTime getWaitingTime(SUMOTime now) const; + + SUMOReal getSpeed() const; + + void setVehicle(SUMOVehicle* v) { + myVehicle = v; + } + + /** @brief Called on writing tripinfo output + * + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void tripInfoOutput(OutputDevice& os) const; + + /** @brief Called on writing vehroute output + * + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void routeOutput(OutputDevice& os) const; + + /** @brief Called for writing the events output + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const; + + /** @brief Called for writing the events output (end of an action) + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const; + + private: + /// the lines to choose from + const std::set myLines; + + /// @brief The taken vehicle + SUMOVehicle* myVehicle; + + MSBusStop* myDestinationBusStop; + SUMOReal myWaitingPos; + /// @brief The time since which this person is waiting for a ride + SUMOTime myWaitingSince; + const MSEdge* myWaitingEdge; + + private: + /// @brief Invalidated copy constructor. + MSPersonStage_Driving(const MSPersonStage_Driving&); + + /// @brief Invalidated assignment operator. + MSPersonStage_Driving& operator=(const MSPersonStage_Driving&); + + }; + + /** + * A "real" stage performing a waiting over the specified time + */ + class MSPersonStage_Waiting : public MSPersonStage { + public: + /// constructor + MSPersonStage_Waiting(const MSEdge& destination, + SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string& actType); + + /// destructor + ~MSPersonStage_Waiting(); + + /// Returns the current edge + const MSEdge* getEdge() const; + const MSEdge* getFromEdge() const; + SUMOReal getEdgePos(SUMOTime now) const; + SUMOTime getUntil() const; + + /// + Position getPosition(SUMOTime now) const; + + SUMOReal getAngle(SUMOTime now) const; + + SUMOTime getWaitingTime(SUMOTime now) const; + + SUMOReal getSpeed() const; + + std::string getStageDescription() const { + return "waiting (" + myActType + ")"; + } + + /// proceeds to the next step + virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at); + + /** @brief Called on writing tripinfo output + * + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void tripInfoOutput(OutputDevice& os) const; + + /** @brief Called on writing vehroute output + * + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void routeOutput(OutputDevice& os) const; + + /** @brief Called for writing the events output + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const; + + /** @brief Called for writing the events output (end of an action) + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const; + + private: + /// the time the person is waiting + SUMOTime myWaitingDuration; + + /// the time until the person is waiting + SUMOTime myWaitingUntil; + + /// the time the person is waiting + SUMOTime myWaitingStart; + + /// @brief The type of activity + std::string myActType; + + SUMOReal myStartPos; + + + private: + /// @brief Invalidated copy constructor. + MSPersonStage_Waiting(const MSPersonStage_Waiting&); + + /// @brief Invalidated assignment operator. + MSPersonStage_Waiting& operator=(const MSPersonStage_Waiting&); + + }; + +public: + /// the structure holding the plan of a person + typedef std::vector MSPersonPlan; + +public: + /// constructor + MSPerson(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSPersonPlan* plan); + + /// destructor + virtual ~MSPerson(); + + /// returns the person id + const std::string& getID() const; + + /* @brief proceeds to the next step of the route, + * @return Whether the persons plan continues */ + bool proceed(MSNet* net, SUMOTime time); + + /// Returns the desired departure time. + SUMOTime getDesiredDepart() const; + + /// logs end of the step + void setDeparted(SUMOTime now); + + /// Returns the current destination. + const MSEdge& getDestination() const { + return (*myStep)->getDestination(); + } + + /// @brief Returns the current edge + const MSEdge* getEdge() const { + return (*myStep)->getEdge(); + } + + /// @brief Returns the departure edge + const MSEdge* getFromEdge() const { + return (*myStep)->getFromEdge(); + } + + /// @brief return the offset from the start of the current edge + virtual SUMOReal getEdgePos() const; + + /// @brief return the Network coordinate of the person + virtual Position getPosition() const; + + /// @brief return the current angle of the person + virtual SUMOReal getAngle() const; + + /// @brief the time this person spent waiting in seconds + virtual SUMOReal getWaitingSeconds() const; + + /// @brief the current speed of the person + virtual SUMOReal getSpeed() const; + + /// + StageType getCurrentStageType() const { + return (*myStep)->getStageType(); + } + + + std::string getCurrentStageDescription() const { + return (*myStep)->getStageDescription(); + } + + MSPersonStage* getCurrentStage() const { + return *myStep; + } + + /** @brief Called on writing tripinfo output + * + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + void tripInfoOutput(OutputDevice& os) const; + + /** @brief Called on writing vehroute output + * + * @param[in] os The stream to write the information into + * @exception IOError not yet implemented + */ + void routeOutput(OutputDevice& os) const; + + /// Whether the person waits for a vehicle of the line specified. + bool isWaitingFor(const std::string& line) const { + return (*myStep)->isWaitingFor(line); + } + + /// Whether the person waits for a vehicle + bool isWaiting4Vehicle() const { + return (*myStep)->isWaiting4Vehicle(); + } + + + const SUMOVehicleParameter& getParameter() const { + return *myParameter; + } + + + inline const MSVehicleType& getVehicleType() const { + return *myVType; + } + + +protected: + /// the plan of the person + const SUMOVehicleParameter* myParameter; + + /// @brief This Persons's type. (mainly used for drawing related information + const MSVehicleType* myVType; + + /// the plan of the person + MSPersonPlan* myPlan; + + /// the iterator over the route + MSPersonPlan::iterator myStep; + + /// @brief Whether events shall be written + bool myWriteEvents; + + +private: + /// @brief Invalidated copy constructor. + MSPerson(const MSPerson&); + + /// @brief Invalidated assignment operator. + MSPerson& operator=(const MSPerson&); + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPModel.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPModel.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPModel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPModel.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,128 @@ +/****************************************************************************/ +/// @file MSPModel.h +/// @author Jakob Erdmann +/// @date Mon, 13 Jan 2014 +/// @version $Id: MSPModel.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// The pedestrian following model (prototype) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include "MSPModel_Striping.h" +#include "MSPModel_NonInteracting.h" +#include "MSPModel.h" + + + + +// =========================================================================== +// static members +// =========================================================================== +MSPModel* MSPModel::myModel(0); + +// named constants +const int MSPModel::FORWARD(1); +const int MSPModel::BACKWARD(-1); +const int MSPModel::UNDEFINED_DIRECTION(0); + +// parameters shared by all models +const SUMOReal MSPModel::SAFETY_GAP(1.0); + +const SUMOReal MSPModel::SIDEWALK_OFFSET(3); + +// =========================================================================== +// MSPModel method definitions +// =========================================================================== + + +MSPModel* +MSPModel::getModel() { + if (myModel == 0) { + const OptionsCont& oc = OptionsCont::getOptions(); + MSNet* net = MSNet::getInstance(); + const std::string model = oc.getString("pedestrian.model"); + if (model == "striping") { + myModel = new MSPModel_Striping(oc, net); + } else if (model == "nonInteracting") { + myModel = new MSPModel_NonInteracting(oc, net); + } else { + throw ProcessError("Unknown pedestrian model '" + model + "'"); + } + } + return myModel; +} + + +void +MSPModel::cleanup() { + if (myModel != 0) { + myModel->cleanupHelper(); + delete myModel; + myModel = 0; + } +} + + +MSLane* +MSPModel::getSidewalk(const MSEdge* edge) { + if (edge == 0) { + return 0; + } + assert(edge->getLanes().size() > 0); + const std::vector& lanes = edge->getLanes(); + for (std::vector::const_iterator it = lanes.begin(); it != lanes.end(); ++it) { + if ((*it)->allowsVehicleClass(SVC_PEDESTRIAN)) { + return *it; + } + } + return lanes.front(); +} + + +bool +MSPModel::canTraverse(int dir, const ConstMSEdgeVector& route) { + const MSJunction* junction = 0; + for (ConstMSEdgeVector::const_iterator it = route.begin(); it != route.end(); ++it) { + const MSEdge* edge = *it; + if (junction != 0) { + //std::cout << " junction=" << junction->getID() << " edge=" << edge->getID() << "\n"; + if (junction == edge->getFromJunction()) { + dir = FORWARD; + } else if (junction == edge->getToJunction()) { + dir = BACKWARD; + } else { + return false; + } + } + junction = dir == FORWARD ? edge->getToJunction() : edge->getFromJunction(); + } + return true; +} + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPModel.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPModel.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPModel.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPModel.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,119 @@ +/****************************************************************************/ +/// @file MSPModel.h +/// @author Jakob Erdmann +/// @date Mon, 13 Jan 2014 +/// @version $Id: MSPModel.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// The pedestrian following model (prototype) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSPModel_h +#define MSPModel_h + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include + +// =========================================================================== +// class declarations +// =========================================================================== +class MSNet; +class MSLane; +class MSJunction; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSPModel + * @brief The pedestrian following model + * + */ +class MSPModel { +public: + + static MSPModel* getModel(); + + /// @brief remove state at simulation end + static void cleanup(); + + /// @brief return the appropriate lane to walk on + static MSLane* getSidewalk(const MSEdge* edge); + + virtual ~MSPModel() {}; + + /// @brief register the given person as a pedestrian + virtual PedestrianState* add(MSPerson* person, MSPerson::MSPersonStage_Walking* stage, SUMOTime now) = 0; + + /// @brief whether a pedestrian is blocking the crossing of lane at offset distToCrossing + virtual bool blockedAtDist(const MSLane* lane, SUMOReal distToCrossing, std::vector* collectBlockers) = 0; + + virtual void cleanupHelper() {}; + + // @brief walking directions + static const int FORWARD; + static const int BACKWARD; + static const int UNDEFINED_DIRECTION; + + // @brief the safety gap to keep between the car and the pedestrian in all directions + static const SUMOReal SAFETY_GAP; + + /// @brief the offset for computing person positions when walking on edges without a sidewalk + static const SUMOReal SIDEWALK_OFFSET; + + /// @brief return whether the route may traversed with the given starting direction + static bool canTraverse(int dir, const ConstMSEdgeVector& route); + +private: + static MSPModel* myModel; + +}; + + +/// @brief abstract base class for managing callbacks to retrieve various state information from the model +class PedestrianState { +public: + virtual ~PedestrianState() {}; + + /// @brief return the offset from the start of the current edge measured in its natural direction + virtual SUMOReal getEdgePos(const MSPerson::MSPersonStage_Walking& stage, SUMOTime now) const = 0; + + /// @brief return the network coordinate of the person + virtual Position getPosition(const MSPerson::MSPersonStage_Walking& stage, SUMOTime now) const = 0; + + /// @brief return the direction in which the person faces in degrees + virtual SUMOReal getAngle(const MSPerson::MSPersonStage_Walking& stage, SUMOTime now) const = 0; + + /// @brief return the time the person spent standing + virtual SUMOTime getWaitingTime(const MSPerson::MSPersonStage_Walking& stage, SUMOTime now) const = 0; + + /// @brief return the current speed of the person + virtual SUMOReal getSpeed(const MSPerson::MSPersonStage_Walking& stage) const = 0; +}; + + + +#endif /* MSPModel_h */ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_NonInteracting.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_NonInteracting.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_NonInteracting.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_NonInteracting.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,175 @@ +/****************************************************************************/ +/// @file MSPModel_NonInteracting.h +/// @author Jakob Erdmann +/// @date Mon, 13 Jan 2014 +/// @version $Id: MSPModel_NonInteracting.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// The pedestrian following model (prototype) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include "MSPModel_NonInteracting.h" + + +// =========================================================================== +// DEBUGGING HELPERS +// =========================================================================== +// +#define DEBUG1 "disabled" +#define DEBUG2 "disabled" +#define DEBUGCOND(PEDID) (PEDID == DEBUG1 || PEDID == DEBUG2) + +// =========================================================================== +// named (internal) constants +// =========================================================================== + + +// =========================================================================== +// static members +// =========================================================================== + + +// =========================================================================== +// MSPModel_NonInteracting method definitions +// =========================================================================== + +MSPModel_NonInteracting::MSPModel_NonInteracting(const OptionsCont& oc, MSNet* net) : + myNet(net) { + assert(myNet != 0); + UNUSED_PARAMETER(oc); +} + + +MSPModel_NonInteracting::~MSPModel_NonInteracting() { +} + + +PedestrianState* +MSPModel_NonInteracting::add(MSPerson* person, MSPerson::MSPersonStage_Walking* stage, SUMOTime now) { + PState* state = new PState(); + const SUMOTime firstEdgeDuration = state->computeWalkingTime(0, *stage, now); + myNet->getBeginOfTimestepEvents()->addEvent(new MoveToNextEdge(person, *stage), + now + firstEdgeDuration, MSEventControl::ADAPT_AFTER_EXECUTION); + + //if DEBUGCOND(person->getID()) std::cout << SIMTIME << " " << person->getID() << " inserted on " << stage->getEdge()->getID() << "\n"; + return state; +} + + +bool +MSPModel_NonInteracting::blockedAtDist(const MSLane*, SUMOReal, std::vector*) { + return false; +} + + +SUMOTime +MSPModel_NonInteracting::MoveToNextEdge::execute(SUMOTime currentTime) { + PState* state = dynamic_cast(myParent.getPedestrianState()); + const MSEdge* old = myParent.getEdge(); + const bool arrived = myParent.moveToNextEdge(myPerson, currentTime); + if (arrived) { + // walk finished. clean up state + delete state; + //if DEBUGCOND(myPerson->getID()) std::cout << SIMTIME << " " << myPerson->getID() << " arrived on " << old->getID() << "\n"; + return 0; + } else { + //if DEBUGCOND(myPerson->getID()) std::cout << SIMTIME << " " << myPerson->getID() << " moves to " << myParent.getEdge()->getID() << "\n"; + return state->computeWalkingTime(old, myParent, currentTime); + } +} + + +SUMOTime +MSPModel_NonInteracting::PState::computeWalkingTime(const MSEdge* prev, const MSPerson::MSPersonStage_Walking& stage, SUMOTime currentTime) { + myLastEntryTime = currentTime; + const MSEdge* edge = stage.getEdge(); + const MSEdge* next = stage.getNextRouteEdge(); + int dir = UNDEFINED_DIRECTION; + if (prev == 0) { + myCurrentBeginPos = stage.getDepartPos(); + } else { + // default to FORWARD if not connected + dir = (edge->getToJunction() == prev->getToJunction() || edge->getToJunction() == prev->getFromJunction()) ? BACKWARD : FORWARD; + myCurrentBeginPos = dir == FORWARD ? 0 : edge->getLength(); + } + if (next == 0) { + myCurrentEndPos = stage.getArrivalPos(); + } else { + if (dir == UNDEFINED_DIRECTION) { + // default to FORWARD if not connected + dir = (edge->getFromJunction() == next->getFromJunction() || edge->getFromJunction() == next->getToJunction()) ? BACKWARD : FORWARD; + } + myCurrentEndPos = dir == FORWARD ? edge->getLength() : 0; + } + // ensure that a result > 0 is returned even if the walk ends immediately + myCurrentDuration = MAX2((SUMOTime)1, TIME2STEPS(fabs(myCurrentEndPos - myCurrentBeginPos) / stage.getMaxSpeed())); + //std::cout << SIMTIME << " dir=" << dir << " curBeg=" << myCurrentBeginPos << " curEnd=" << myCurrentEndPos << " speed=" << stage.getMaxSpeed() << " dur=" << myCurrentDuration << "\n"; + return myCurrentDuration; +} + + +SUMOReal +MSPModel_NonInteracting::PState::getEdgePos(const MSPerson::MSPersonStage_Walking&, SUMOTime now) const { + //std::cout << SIMTIME << " pos=" << (myCurrentBeginPos + (myCurrentEndPos - myCurrentBeginPos) / myCurrentDuration * (now - myLastEntryTime)) << "\n"; + return myCurrentBeginPos + (myCurrentEndPos - myCurrentBeginPos) / myCurrentDuration * (now - myLastEntryTime); +} + + +Position +MSPModel_NonInteracting::PState::getPosition(const MSPerson::MSPersonStage_Walking& stage, SUMOTime now) const { + const MSLane* lane = getSidewalk(stage.getEdge()); + const SUMOReal lateral_offset = lane->allowsVehicleClass(SVC_PEDESTRIAN) ? 0 : SIDEWALK_OFFSET; + return stage.getLanePosition(lane, getEdgePos(stage, now), lateral_offset); +} + + +SUMOReal +MSPModel_NonInteracting::PState::getAngle(const MSPerson::MSPersonStage_Walking& stage, SUMOTime now) const { + //std::cout << SIMTIME << " rawAngle=" << stage.getEdgeAngle(stage.getEdge(), getEdgePos(stage, now)) << " angle=" << stage.getEdgeAngle(stage.getEdge(), getEdgePos(stage, now)) + (myCurrentEndPos < myCurrentBeginPos ? 180 : 0) << "\n"; + SUMOReal angle = stage.getEdgeAngle(stage.getEdge(), getEdgePos(stage, now)) + (myCurrentEndPos < myCurrentBeginPos ? 180 : 0); + if (angle > 180) { + angle -= 360; + } + return angle; +} + + +SUMOTime +MSPModel_NonInteracting::PState::getWaitingTime(const MSPerson::MSPersonStage_Walking&, SUMOTime) const { + return 0; +} + + +SUMOReal +MSPModel_NonInteracting::PState::getSpeed(const MSPerson::MSPersonStage_Walking& stage) const { + return stage.getMaxSpeed(); +} + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_NonInteracting.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_NonInteracting.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_NonInteracting.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_NonInteracting.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,119 @@ +/****************************************************************************/ +/// @file MSPModel_NonInteracting.h +/// @author Jakob Erdmann +/// @date Mon, 13 Jan 2014 +/// @version $Id: MSPModel_NonInteracting.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// The pedestrian following model (prototype) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSPModel_NonInteracting_h +#define MSPModel_NonInteracting_h + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include "MSPerson.h" +#include "MSPModel.h" + +// =========================================================================== +// class declarations +// =========================================================================== +class MSNet; +class MSLink; +class MSLane; +class MSJunction; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSPModel_NonInteracting + * @brief The pedestrian following model + * + */ +class MSPModel_NonInteracting : public MSPModel { +public: + + /// @brief Constructor (it should not be necessary to construct more than one instance) + MSPModel_NonInteracting(const OptionsCont& oc, MSNet* net); + + ~MSPModel_NonInteracting(); + + /// @brief register the given person as a pedestrian + PedestrianState* add(MSPerson* person, MSPerson::MSPersonStage_Walking* stage, SUMOTime now); + + /// @brief whether a pedestrian is blocking the crossing of lane at offset distToCrossing + bool blockedAtDist(const MSLane* lane, SUMOReal distToCrossing, std::vector* collectBlockers); + +private: + class MoveToNextEdge : public Command { + public: + MoveToNextEdge(MSPerson* person, MSPerson::MSPersonStage_Walking& walk) : myParent(walk), myPerson(person) {} + ~MoveToNextEdge() {} + SUMOTime execute(SUMOTime currentTime); + + private: + MSPerson::MSPersonStage_Walking& myParent; + MSPerson* myPerson; + private: + /// @brief Invalidated assignment operator. + MoveToNextEdge& operator=(const MoveToNextEdge&); + }; + + /// @brief abstract base class for managing callbacks to retrieve various state information from the model + class PState : public PedestrianState { + public: + PState() {}; + + /// @brief abstract methods inherited from PedestrianState + /// @{ + SUMOReal getEdgePos(const MSPerson::MSPersonStage_Walking& stage, SUMOTime now) const; + Position getPosition(const MSPerson::MSPersonStage_Walking& stage, SUMOTime now) const; + SUMOReal getAngle(const MSPerson::MSPersonStage_Walking& stage, SUMOTime now) const; + SUMOTime getWaitingTime(const MSPerson::MSPersonStage_Walking& stage, SUMOTime now) const; + SUMOReal getSpeed(const MSPerson::MSPersonStage_Walking& stage) const; + /// @} + + /// @brief compute walking time on edge and update state members + SUMOTime computeWalkingTime(const MSEdge* prev, const MSPerson::MSPersonStage_Walking& stage, SUMOTime currentTime); + + + private: + SUMOTime myLastEntryTime; + SUMOTime myCurrentDuration; + SUMOReal myCurrentBeginPos; + SUMOReal myCurrentEndPos; + + }; + +private: + /// @brief the net to which to issue moveToNextEdge commands + MSNet* myNet; + +}; + + +#endif /* MSPModel_NonInteracting_h */ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_Striping.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_Striping.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_Striping.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_Striping.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,1200 @@ +/****************************************************************************/ +/// @file MSPModel_Striping.h +/// @author Jakob Erdmann +/// @date Mon, 13 Jan 2014 +/// @version $Id: MSPModel_Striping.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// The pedestrian following model (prototype) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include "MSPModel_Striping.h" + + +// =========================================================================== +// DEBUGGING HELPERS +// =========================================================================== +// +#define DEBUG1 "disabled" +#define DEBUG2 "disabled" +#define DEBUGCOND(PEDID) (PEDID == DEBUG1 || PEDID == DEBUG2) +//#define LOG_ALL 1 + +void MSPModel_Striping::DEBUG_PRINT(const Obstacles& obs) { + for (int i = 0; i < (int)obs.size(); ++i) { + std::cout + << "(" << obs[i].description + << " x=" << obs[i].x + << " s=" << obs[i].speed + << ") "; + } + std::cout << "\n"; +} + +// =========================================================================== +// named (internal) constants +// =========================================================================== + + +// need to be able to subtract without underflow +#define BLOCKED_STRIPE -10000 +#define FAR_AWAY 10000 +#define ONCOMING_CONFLICT -1000 + +// =========================================================================== +// static members +// =========================================================================== + +MSPModel_Striping::WalkingAreaPaths MSPModel_Striping::myWalkingAreaPaths; +MSPModel_Striping::Pedestrians MSPModel_Striping::noPedestrians; + + +// model parameters (static to simplify access from class PState +SUMOReal MSPModel_Striping::stripeWidth; +SUMOReal MSPModel_Striping::dawdling; +SUMOTime MSPModel_Striping::jamTime; +const SUMOReal MSPModel_Striping::LOOKAHEAD_SAMEDIR(4.0); // seconds +const SUMOReal MSPModel_Striping::LOOKAHEAD_ONCOMING(10.0); // seconds +const SUMOReal MSPModel_Striping::LATERAL_PENALTY(-1); +const SUMOReal MSPModel_Striping::SQUEEZE(0.7); +const SUMOReal MSPModel_Striping::BLOCKER_LOOKAHEAD(10.0); +const SUMOReal MSPModel_Striping::RESERVE_FOR_ONCOMING_FACTOR(0.0); +const SUMOReal MSPModel_Striping::MAX_WAIT_TOLERANCE(120.); // seconds +const SUMOReal MSPModel_Striping::LATERAL_SPEED_FACTOR(0.4); +const SUMOReal MSPModel_Striping::MIN_STARTUP_SPEED(0.3); + + +// =========================================================================== +// MSPModel_Striping method definitions +// =========================================================================== + +MSPModel_Striping::MSPModel_Striping(const OptionsCont& oc, MSNet* net) : + myNumActivePedestrians(0) { + myCommand = new MovePedestrians(this); + net->getBeginOfTimestepEvents()->addEvent(myCommand, net->getCurrentTimeStep() + DELTA_T, MSEventControl::ADAPT_AFTER_EXECUTION); + initWalkingAreaPaths(net); + // configurable parameters + stripeWidth = oc.getFloat("pedestrian.striping.stripe-width"); + dawdling = oc.getFloat("pedestrian.striping.dawdling"); + + jamTime = string2time(oc.getString("pedestrian.striping.jamtime")); + if (jamTime <= 0) { + jamTime = SUMOTime_MAX; + } +} + + +MSPModel_Striping::~MSPModel_Striping() { +} + + +PedestrianState* +MSPModel_Striping::add(MSPerson* person, MSPerson::MSPersonStage_Walking* stage, SUMOTime) { + assert(person->getCurrentStageType() == MSPerson::WALKING); + const MSLane* lane = getSidewalk(person->getEdge()); + PState* ped = new PState(person, stage, lane); + myActiveLanes[lane].push_back(ped); + myNumActivePedestrians++; + return ped; +} + + +bool +MSPModel_Striping::blockedAtDist(const MSLane* lane, SUMOReal distToCrossing, std::vector* collectBlockers) { + const Pedestrians& pedestrians = getPedestrians(lane); + for (Pedestrians::const_iterator it_ped = pedestrians.begin(); it_ped != pedestrians.end(); ++it_ped) { + const PState& ped = **it_ped; + const SUMOReal halfVehicleWidth = 1.0; // @note could get the actual value from the vehicle + const SUMOReal leaderBackDist = (ped.myDir == FORWARD + ? distToCrossing - (ped.myRelX - ped.getLength() - MSPModel::SAFETY_GAP - halfVehicleWidth) + : (ped.myRelX + ped.getLength() + MSPModel::SAFETY_GAP + halfVehicleWidth) - distToCrossing); + //std::cout << SIMTIME << " foe=" << foeLane->getID() << " dir=" << p.myDir << " pX=" << ped.myRelX << " pL=" << ped.getLength() << " fDTC=" << distToCrossing << " lBD=" << leaderBackDist << "\n"; + if (leaderBackDist >= 0 && leaderBackDist <= BLOCKER_LOOKAHEAD) { + // found one pedestrian that is not completely past the crossing point + //std::cout << SIMTIME << " blocking pedestrian foeLane=" << lane->getID() << " ped=" << ped.myPerson->getID() << " dir=" << ped.myDir << " pX=" << ped.myRelX << " pL=" << ped.getLength() << " fDTC=" << distToCrossing << " lBD=" << leaderBackDist << "\n"; + if (collectBlockers == 0) { + return true; + } else { + collectBlockers->push_back(ped.myPerson); + } + } + } + if (collectBlockers == 0) { + return false; + } else { + return collectBlockers->size() > 0; + } +} + + +MSPModel_Striping::Pedestrians& +MSPModel_Striping::getPedestrians(const MSLane* lane) { + ActiveLanes::iterator it = myActiveLanes.find(lane); + if (it != myActiveLanes.end()) { + //std::cout << " found lane=" << lane->getID() << " n=" << it->second.size() << "\n"; + return (it->second); + } else { + return noPedestrians; + } +} + + +void +MSPModel_Striping::cleanupHelper() { + myActiveLanes.clear(); + myNumActivePedestrians = 0; + myWalkingAreaPaths.clear(); // need to recompute when lane pointers change +} + + +int +MSPModel_Striping::numStripes(const MSLane* lane) { + return (int)floor(lane->getWidth() / stripeWidth); +} + +int +MSPModel_Striping::connectedDirection(const MSLane* from, const MSLane* to) { + if (from == 0 || to == 0) { + return UNDEFINED_DIRECTION; + } else if (MSLinkContHelper::getConnectingLink(*from, *to)) { + return FORWARD; + } else if (MSLinkContHelper::getConnectingLink(*to, *from)) { + return BACKWARD; + } else { + return UNDEFINED_DIRECTION; + } +} + + +void +MSPModel_Striping::initWalkingAreaPaths(const MSNet*) { + if (myWalkingAreaPaths.size() > 0) { + return; + } + for (size_t i = 0; i < MSEdge::dictSize(); ++i) { + const MSEdge* edge = MSEdge::dictionary(i); + if (edge->isWalkingArea()) { + const MSLane* walkingArea = getSidewalk(edge); + // build all possible paths across this walkingArea + // gather all incident lanes + std::vector lanes; + const MSEdgeVector& incoming = edge->getIncomingEdges(); + for (int j = 0; j < (int)incoming.size(); ++j) { + lanes.push_back(getSidewalk(incoming[j])); + } + const MSEdgeVector& outgoing = edge->getSuccessors(); + for (int j = 0; j < (int)outgoing.size(); ++j) { + lanes.push_back(getSidewalk(outgoing[j])); + } + // build all combinations + for (int j = 0; j < (int)lanes.size(); ++j) { + for (int k = 0; k < (int)lanes.size(); ++k) { + if (j != k) { + // build the walkingArea + const MSLane* from = lanes[j]; + const MSLane* to = lanes[k]; + const int fromDir = MSLinkContHelper::getConnectingLink(*from, *walkingArea) != 0 ? FORWARD : BACKWARD; + const int toDir = MSLinkContHelper::getConnectingLink(*walkingArea, *to) != 0 ? FORWARD : BACKWARD; + PositionVector shape; + Position fromPos = from->getShape()[fromDir == FORWARD ? -1 : 0]; + Position toPos = to->getShape()[toDir == FORWARD ? 0 : -1]; + const SUMOReal maxExtent = fromPos.distanceTo2D(toPos) / 4; // prevent sharp corners + const SUMOReal extrapolateBy = MIN2(maxExtent, walkingArea->getWidth() / 2); + // assemble shape + shape.push_back(fromPos); + if (extrapolateBy > POSITION_EPS) { + PositionVector fromShp = from->getShape(); + fromShp.extrapolate(extrapolateBy); + shape.push_back_noDoublePos(fromDir == FORWARD ? fromShp.back() : fromShp.front()); + PositionVector nextShp = to->getShape(); + nextShp.extrapolate(extrapolateBy); + shape.push_back_noDoublePos(toDir == FORWARD ? nextShp.front() : nextShp.back()); + } + shape.push_back_noDoublePos(toPos); + if (shape.size() < 2) { + PositionVector fromShp = from->getShape(); + fromShp.extrapolate(1.5 * POSITION_EPS); // noDoublePos requires a difference of POSITION_EPS in at least one coordinate + shape.push_back_noDoublePos(fromDir == FORWARD ? fromShp.back() : fromShp.front()); + assert(shape.size() == 2); + } + if (fromDir == BACKWARD) { + // will be walking backward on walkingArea + shape = shape.reverse(); + } + myWalkingAreaPaths[std::make_pair(from, to)] = WalkingAreaPath(from, walkingArea, to, shape); + } + } + } + } + } +} + + +MSPModel_Striping::NextLaneInfo +MSPModel_Striping::getNextLane(const PState& ped, const MSLane* currentLane, const MSLane* prevLane) { + const MSEdge* currentEdge = ¤tLane->getEdge(); + const MSJunction* junction = ped.myDir == FORWARD ? currentEdge->getToJunction() : currentEdge->getFromJunction(); + const MSEdge* nextRouteEdge = ped.myStage->getNextRouteEdge(); + const MSLane* nextRouteLane = getSidewalk(nextRouteEdge); + // result values + const MSLane* nextLane = nextRouteLane; + MSLink* link = 0; + int nextDir = UNDEFINED_DIRECTION; + + if (nextRouteLane != 0) { + if (currentEdge->isInternal()) { + assert(junction == currentEdge->getFromJunction()); + nextDir = junction == nextRouteEdge->getFromJunction() ? FORWARD : BACKWARD; + if DEBUGCOND(ped.myPerson->getID()) { + std::cout << " internal\n"; + } + } else if (currentEdge->isCrossing()) { + nextDir = ped.myDir; + if (ped.myDir == FORWARD) { + nextLane = currentLane->getLinkCont()[0]->getLane(); + } else { + nextLane = currentLane->getLogicalPredecessorLane(); + } + if DEBUGCOND(ped.myPerson->getID()) { + std::cout << " crossing\n"; + } + } else if (currentEdge->isWalkingArea()) { + ConstMSEdgeVector crossingRoute; + // departPos can be 0 because the direction of the walkingArea does not matter + // for the arrivalPos, we need to make sure that the route does not deviate across other junctions + const int nextRouteEdgeDir = nextRouteEdge->getFromJunction() == junction ? FORWARD : BACKWARD; + const SUMOReal arrivalPos = (nextRouteEdge == ped.myStage->getRoute().back() + ? ped.myStage->getArrivalPos() + : (nextRouteEdgeDir == FORWARD ? 0 : nextRouteEdge->getLength())); + MSEdgeVector prohibited; + prohibited.push_back(&prevLane->getEdge()); + MSNet::getInstance()->getPedestrianRouter(prohibited).compute(currentEdge, nextRouteEdge, 0, arrivalPos, ped.myStage->getMaxSpeed(), 0, junction, crossingRoute, true); + if DEBUGCOND(ped.myPerson->getID()) { + std::cout + << " nre=" << nextRouteEdge->getID() + << " nreDir=" << nextRouteEdgeDir + << " aPos=" << arrivalPos + << " crossingRoute=" << toString(crossingRoute) + << "\n"; + } + if (crossingRoute.size() > 1) { + const MSEdge* nextEdge = crossingRoute[1]; + nextLane = getSidewalk(crossingRoute[1]); + assert((nextEdge->getFromJunction() == junction || nextEdge->getToJunction() == junction)); + assert(nextLane != prevLane); + nextDir = connectedDirection(currentLane, nextLane); + if DEBUGCOND(ped.myPerson->getID()) { + std::cout << " nextDir=" << nextDir << "\n"; + } + assert(nextDir != UNDEFINED_DIRECTION); + if (nextDir == FORWARD) { + link = MSLinkContHelper::getConnectingLink(*currentLane, *nextLane); + } else if (nextEdge->isCrossing()) { + const MSLane* oppositeWalkingArea = nextLane->getLogicalPredecessorLane(); + link = MSLinkContHelper::getConnectingLink(*oppositeWalkingArea, *nextLane); + } else { + link = MSLinkContHelper::getConnectingLink(*nextLane, *currentLane); + } + assert(link != 0); + } else { + if DEBUGCOND(ped.myPerson->getID()) { + std::cout << SIMTIME + << " no route from '" << (currentEdge == 0 ? "NULL" : currentEdge->getID()) + << "' to '" << (nextRouteEdge == 0 ? "NULL" : nextRouteEdge->getID()) + << "\n"; + } + // error indicated by nextDir == UNDEFINED_DIRECTION + } + } else if (currentEdge == nextRouteEdge) { + // strange loop in this route. No need to use walkingArea + nextDir = -ped.myDir; + } else { + // normal edge. by default use next / previous walking area + nextDir = ped.myDir; + nextLane = getNextWalkingArea(currentLane, ped.myDir, link); + if (nextLane != 0) { + // walking area found + if DEBUGCOND(ped.myPerson->getID()) { + std::cout << " next walkingArea " << (nextDir == FORWARD ? "forward" : "backward") << "\n"; + } + } else { + nextDir = junction == nextRouteEdge->getFromJunction() ? FORWARD : BACKWARD; + // try to use a direct link as fallback + // direct links only exist if built explicitly. They are used to model tl-controlled links if there are no crossings + if (ped.myDir == FORWARD) { + link = MSLinkContHelper::getConnectingLink(*currentLane, *nextRouteLane); +#ifdef HAVE_INTERNAL_LANES + if (link != 0) { + if DEBUGCOND(ped.myPerson->getID()) { + std::cout << " direct forward\n"; + } + nextLane = MSLinkContHelper::getInternalFollowingLane(currentLane, nextRouteLane); + } +#endif + } else { + link = MSLinkContHelper::getConnectingLink(*nextRouteLane, *currentLane); +#ifdef HAVE_INTERNAL_LANES + if (link != 0) { + if DEBUGCOND(ped.myPerson->getID()) { + std::cout << " direct backward\n"; + } + nextLane = MSLinkContHelper::getInternalFollowingLane(nextRouteLane, currentLane); + } +#endif + } + } + if (nextLane == 0) { + // no internal lane found + nextLane = nextRouteLane; + if DEBUGCOND(ped.myPerson->getID()) { + std::cout << SIMTIME << " no next lane found for " << currentLane->getID() << " dir=" << ped.myDir << "\n"; + } + } else if (nextLane->getLength() <= POSITION_EPS) { + // internal lane too short + nextLane = nextRouteLane; + } + } + } + if DEBUGCOND(ped.myPerson->getID()) { + std::cout << SIMTIME + << " p=" << ped.myPerson->getID() + << " l=" << currentLane->getID() + << " nl=" << (nextLane == 0 ? "NULL" : nextLane->getID()) + << " nrl=" << (nextRouteLane == 0 ? "NULL" : nextRouteLane->getID()) + << " d=" << nextDir + << " link=" << (link == 0 ? "NULL" : link->getViaLaneOrLane()->getID()) + << " pedDir=" << ped.myDir + << "\n"; + } + return NextLaneInfo(nextLane, link, nextDir); +} + + +const MSLane* +MSPModel_Striping::getNextWalkingArea(const MSLane* currentLane, const int dir, MSLink*& link) { + if (dir == FORWARD) { + const MSLinkCont& links = currentLane->getLinkCont(); + for (MSLinkCont::const_iterator it = links.begin(); it != links.end(); ++it) { + if ((*it)->getLane()->getEdge().isWalkingArea()) { + link = *it; + return (*it)->getLane(); + } + } + } else { + const std::vector& laneInfos = currentLane->getIncomingLanes(); + for (std::vector::const_iterator it = laneInfos.begin(); it != laneInfos.end(); ++it) { + if ((*it).lane->getEdge().isWalkingArea()) { + link = (*it).viaLink; + return (*it).lane; + } + } + } + return 0; +} + + +MSPModel_Striping::Obstacles +MSPModel_Striping::mergeObstacles(const Obstacles& obs1, const Obstacles& obs2, int dir) { + Obstacles result(obs1.begin(), obs1.end()); + for (int i = 0; i < (int)obs1.size(); ++i) { + if ((obs2[i].x - obs1[i].x) * dir < 0) { + result[i] = obs2[i]; + } + } + return result; +} + + +MSPModel_Striping::Obstacles +MSPModel_Striping::getNeighboringObstacles(const Pedestrians& pedestrians, int egoIndex, int stripes) { + const PState& ego = *pedestrians[egoIndex]; + const SUMOReal egoBack = ego.myRelX - ego.myDir * ego.getLength(); + int index = egoIndex + 1; + Obstacles obs(stripes, Obstacle(ego.myDir)); + while (index < (int)pedestrians.size() && ego.myDir * (pedestrians[index]->myRelX - egoBack) > 0) { + const PState& p = *pedestrians[index]; + if (!p.myWaitingToEnter) { + Obstacle o(p, ego.myDir); + obs[p.stripe()] = o; + obs[p.otherStripe()] = o; + } + index++; + } + if DEBUGCOND(ego.myPerson->getID()) { + std::cout << SIMTIME << " ped=" << ego.myPerson->getID() << " neighObs="; + DEBUG_PRINT(obs); + } + return obs; +} + + +const MSPModel_Striping::Obstacles& +MSPModel_Striping::getNextLaneObstacles(NextLanesObstacles& nextLanesObs, const + MSLane* lane, const MSLane* nextLane, int stripes, SUMOReal nextLength, int nextDir, + SUMOReal currentLength, int currentDir) { + if (nextLanesObs.count(nextLane) == 0) { + //std::cout << SIMTIME << " getNextLaneObstacles" + // << " nextLane=" << nextLane->getID() + // << " nextLength=" << nextLength + // << " nextDir=" << nextDir + // << " currentLength=" << currentLength + // << " currentDir=" << currentDir + // << "\n"; + + // figure out the which pedestrians are ahead on the next lane + const int nextStripes = numStripes(nextLane); + const int offset = (stripes - nextStripes) / 2; + Obstacles obs(stripes, Obstacle(nextDir)); + if (nextStripes < stripes) { + // some stripes do not continue + for (int ii = 0; ii < stripes; ++ii) { + if (ii < offset || ii >= nextStripes + offset) { + obs[ii] = Obstacle(nextDir == FORWARD ? 0 : nextLength, 0, "stripeEnd"); + } + } + } + Pedestrians& pedestrians = getPedestrians(nextLane); + if (nextLane->getEdge().isWalkingArea()) { + const SUMOReal maxY = stripeWidth * (stripes - 0.5) - NUMERICAL_EPS; + // complex transformation into the coordinate system of the current lane + // (pedestrians on next lane may walk at arbitrary angles relative to the current lane) + const SUMOReal lateral_offset = (lane->getWidth() - stripeWidth) * 0.5; + nextDir = currentDir; + // transform pedestrians into the current coordinate system + for (int ii = 0; ii < (int)pedestrians.size(); ++ii) { + PState& p = *pedestrians[ii]; + Position relPos = lane->getShape().transformToVectorCoordinates(p.getPosition(*p.myStage, -1), true); + const SUMOReal newY = relPos.y() + lateral_offset; + if (newY >= 0 && newY <= maxY) { + addCloserObstacle(obs, relPos.x(), p.stripe(newY), p.myPerson->getID(), stripes, currentDir); + addCloserObstacle(obs, relPos.x(), p.otherStripe(newY), p.myPerson->getID(), stripes, currentDir); + } + } + } else { + // simple transformation into the coordinate system of the current lane + // (only need to worry about currentDir and nextDir) + // XXX consider waitingToEnter on nextLane + sort(pedestrians.begin(), pedestrians.end(), by_xpos_sorter(nextDir)); + for (int ii = 0; ii < (int)pedestrians.size(); ++ii) { + const PState& p = *pedestrians[ii]; + if (p.myWaitingToEnter) { + continue; + } + addMappedObstacle(obs, p, p.stripe(), currentDir, nextDir, offset, stripes, nextStripes); + addMappedObstacle(obs, p, p.otherStripe(), currentDir, nextDir, offset, stripes, nextStripes); + } + for (int ii = 0; ii < stripes; ++ii) { + Obstacle& o = obs[ii]; + if (nextDir == BACKWARD) { + o.x = nextLength - o.x; + } + if (currentDir == FORWARD) { + o.x += currentLength; + } else { + o.x *= -1; + } + } + } + nextLanesObs[nextLane] = obs; + } + return nextLanesObs[nextLane]; +} + + +void +MSPModel_Striping::addMappedObstacle(Obstacles& obs, const PState& p, int stripe, int currentDir, int nextDir, int offset, int stripes, int nextStripes) { + const int mappedStripe = (nextDir == currentDir + ? stripe + offset + : nextStripes - 1 - stripe + offset); + if (mappedStripe >= 0 && mappedStripe < stripes) { + obs[mappedStripe] = Obstacle(p, nextDir); + } +} + + +void +MSPModel_Striping::addCloserObstacle(Obstacles& obs, SUMOReal x, int stripe, const std::string& id, int stripes, int dir) { + if (stripe < stripes && obs[stripe].x * dir > x * dir) { + obs[stripe] = Obstacle(x, 0, id); + } +} + +void +MSPModel_Striping::moveInDirection(SUMOTime currentTime, std::set& changedLane, int dir) { + for (ActiveLanes::iterator it_lane = myActiveLanes.begin(); it_lane != myActiveLanes.end(); ++it_lane) { + const MSLane* lane = it_lane->first; + Pedestrians& pedestrians = it_lane->second; + //std::cout << SIMTIME << ">>> lane=" << lane->getID() << " numPeds=" << pedestrians.size() << "\n"; + if (lane->getEdge().isWalkingArea()) { + const SUMOReal lateral_offset = (lane->getWidth() - stripeWidth) * 0.5; + const WalkingAreaPath* debugPath = 0; + // need to handle each walkingAreaPath seperately and transform + // coordinates beforehand + std::set paths; + for (Pedestrians::iterator it = pedestrians.begin(); it != pedestrians.end(); ++it) { + const PState* p = *it; + assert(p->myWalkingAreaPath != 0); + if (p->myDir == dir) { + paths.insert(p->myWalkingAreaPath); + if DEBUGCOND(p->myPerson->getID()) { + debugPath = p->myWalkingAreaPath; + std::cout << SIMTIME << " debugging WalkingAreaPath from=" << debugPath->from->getID() << " to=" << debugPath->to->getID() << "\n"; + } + } + } + for (std::set::iterator it = paths.begin(); it != paths.end(); ++it) { + const WalkingAreaPath* path = *it; + Pedestrians toDelete; + Pedestrians transformedPeds; + transformedPeds.reserve(pedestrians.size()); + for (Pedestrians::iterator it_p = pedestrians.begin(); it_p != pedestrians.end(); ++it_p) { + PState* p = *it_p; + if (p->myWalkingAreaPath == path + // opposite direction is already in the correct coordinate system + || (p->myWalkingAreaPath->from == path->to && p->myWalkingAreaPath->to == path->from)) { + transformedPeds.push_back(p); + if (path == debugPath) std::cout << " ped=" << p->myPerson->getID() << " relX=" << p->myRelX << " relY=" << p->myRelY << " (untransformed), vecCoord=" + << path->shape.transformToVectorCoordinates(p->getPosition(*p->myStage, -1)) << "\n"; + } else { + const Position relPos = path->shape.transformToVectorCoordinates(p->getPosition(*p->myStage, -1)); + const SUMOReal newY = relPos.y() + lateral_offset; + if (relPos != Position::INVALID && + newY >= 0 && newY <= lane->getWidth()) { + PState* tp = new PState(*p); + tp->myRelX = relPos.x(); + tp->myRelY = newY; + // only an obstacle, speed may be orthogonal to dir + tp->myDir = !dir; + tp->mySpeed = 0; + toDelete.push_back(tp); + transformedPeds.push_back(tp); + if (path == debugPath) { + std::cout << " ped=" << p->myPerson->getID() << " relX=" << relPos.x() << " relY=" << newY << " (transformed), vecCoord=" << relPos << "\n"; + } + } else { + if (path == debugPath) { + std::cout << " ped=" << p->myPerson->getID() << " relX=" << relPos.x() << " relY=" << newY << " (invalid), vecCoord=" << relPos << "\n"; + } + } + } + } + moveInDirectionOnLane(transformedPeds, lane, currentTime, changedLane, dir); + // clean up + for (Pedestrians::iterator it_p = toDelete.begin(); it_p != toDelete.end(); ++it_p) { + delete *it_p; + } + }; + + } else { + moveInDirectionOnLane(pedestrians, lane, currentTime, changedLane, dir); + } + // advance to the next lane / arrive at destination + sort(pedestrians.begin(), pedestrians.end(), by_xpos_sorter(dir)); + for (Pedestrians::iterator it = pedestrians.begin(); it != pedestrians.end();) { + PState* p = *it; + if (p->myDir != dir) { + ++it; + } else if (p->moveToNextLane(currentTime)) { + it = pedestrians.erase(it); + if (p->myLane != 0) { + changedLane.insert(p->myPerson); + myActiveLanes[p->myLane].push_back(p); + } else { + delete p; + myNumActivePedestrians--; + } + } else { + ++it; + } + } + } +} + + +void +MSPModel_Striping::moveInDirectionOnLane(Pedestrians& pedestrians, const MSLane* lane, SUMOTime currentTime, std::set& changedLane, int dir) { + const int stripes = numStripes(lane); + Obstacles obs(stripes, Obstacle(dir)); // continously updated + NextLanesObstacles nextLanesObs; // continously updated + sort(pedestrians.begin(), pedestrians.end(), by_xpos_sorter(dir)); + for (int ii = 0; ii < (int)pedestrians.size(); ++ii) { + PState& p = *pedestrians[ii]; + //std::cout << SIMTIME << "CHECKING" << p.myPerson->getID() << "\n"; + Obstacles currentObs = obs; + if (p.myDir != dir || changedLane.count(p.myPerson) != 0) { + if (!p.myWaitingToEnter) { + Obstacle o(p, dir); + obs[p.stripe()] = o; + obs[p.otherStripe()] = o; + } + continue; + } + if DEBUGCOND(p.myPerson->getID()) { + std::cout << SIMTIME << " ped=" << p.myPerson->getID() << " currentObs="; + DEBUG_PRINT(currentObs); + } + const MSLane* nextLane = p.myNLI.lane; + const MSLink* link = p.myNLI.link; + const SUMOReal dist = p.distToLaneEnd(); + const SUMOReal speed = p.myStage->getMaxSpeed(); + if (nextLane != 0 && dist <= LOOKAHEAD_ONCOMING) { + const SUMOReal currentLength = (p.myWalkingAreaPath == 0 ? lane->getLength() : p.myWalkingAreaPath->length); + const SUMOReal nextLength = nextLane->getLength(); // XXX what to do if nextLane is a walkingArea? + const Obstacles& nextObs = getNextLaneObstacles( + nextLanesObs, lane, nextLane, stripes, + nextLength, p.myNLI.dir, + currentLength, dir); + + if DEBUGCOND(p.myPerson->getID()) { + std::cout << SIMTIME << " ped=" << p.myPerson->getID() << " nextObs="; + DEBUG_PRINT(nextObs); + } + currentObs = mergeObstacles(currentObs, nextObs, dir); + } + if DEBUGCOND(p.myPerson->getID()) { + std::cout << SIMTIME << " ped=" << p.myPerson->getID() << " obsWithNext="; + DEBUG_PRINT(currentObs); + } + currentObs = mergeObstacles(currentObs, getNeighboringObstacles(pedestrians, ii, stripes), dir); + if DEBUGCOND(p.myPerson->getID()) { + std::cout << SIMTIME << " ped=" << p.myPerson->getID() << " obsWithNeigh="; + DEBUG_PRINT(currentObs); + } + // check link state + if (link != 0 + && dist < speed // only check close before junction + && (!link->opened(currentTime, speed, speed, p.getLength(), p.getImpatience(currentTime), speed, 0) + // XXX check for presence of vehicles blocking the path + )) { + // prevent movement passed a closed link + Obstacles closedLink(stripes, Obstacle(p.myRelX + dir * dist - POSITION_EPS, 0, "closedLink")); + currentObs = mergeObstacles(currentObs, closedLink, dir); + if DEBUGCOND(p.myPerson->getID()) { + std::cout << SIMTIME << " ped=" << p.myPerson->getID() << " obsWitTLS="; + DEBUG_PRINT(currentObs); + } + // consider rerouting over another crossing + if (p.myWalkingAreaPath != 0) { + // XXX actually another path would be needed starting at the current position + p.myNLI = getNextLane(p, p.myLane, p.myWalkingAreaPath->from); + } + } + p.walk(currentObs, currentTime); + if (!p.myWaitingToEnter) { + Obstacle o(p, dir); + obs[p.stripe()] = o; + obs[p.otherStripe()] = o; + } + //std::cout << SIMTIME << p.myPerson->getID() << " lane=" << lane->getID() << " x=" << p.myRelX << "\n"; + } +} + + +// =========================================================================== +// MSPModel_Striping::Obstacle method definitions +// =========================================================================== +MSPModel_Striping::Obstacle::Obstacle(int dir) : + x(dir* FAR_AWAY), // far away when seen in dir + speed(0), + description("") +{} + + +MSPModel_Striping::Obstacle::Obstacle(const PState& ped, int dir) : + description(ped.myPerson->getID()) { + assert(!ped.myWaitingToEnter); + if (dir == ped.myDir) { + speed = ped.mySpeed; + x = ped.myRelX - dir * ped.getLength(); + } else { + speed = -ped.mySpeed; + x = ped.myRelX; + } +} + + +// =========================================================================== +// MSPModel_Striping::PState method definitions +// =========================================================================== + + +MSPModel_Striping::PState::PState(MSPerson* person, MSPerson::MSPersonStage_Walking* stage, const MSLane* lane): + myPerson(person), + myStage(stage), + myLane(lane), + myRelX(stage->getDepartPos()), + myRelY(0), + myDir(FORWARD), + mySpeed(0), + myWaitingToEnter(true), + myWaitingTime(0), + myWalkingAreaPath(0), + myAmJammed(false) { + const MSEdge* currentEdge = &lane->getEdge(); + assert(!currentEdge->isWalkingArea()); + const ConstMSEdgeVector& route = myStage->getRoute(); + if (route.size() == 1) { + // only a single edge, move towards end pos + myDir = (myRelX <= myStage->getArrivalPos()) ? FORWARD : BACKWARD; + } else { + const bool mayStartForward = canTraverse(FORWARD, route); + const bool mayStartBackward = canTraverse(BACKWARD, route); + if DEBUGCOND(myPerson->getID()) { + std::cout << " initialize dir for " << myPerson->getID() << " forward=" << mayStartForward << " backward=" << mayStartBackward << "\n"; + } + if (mayStartForward && mayStartBackward) { + // figure out the best direction via routing + ConstMSEdgeVector crossingRoute; + MSNet::getInstance()->getPedestrianRouter().compute(currentEdge, route.back(), myRelX, myStage->getArrivalPos(), myStage->getMaxSpeed(), 0, 0, crossingRoute, true); + if (crossingRoute.size() > 1) { + // route found + const MSEdge* nextEdge = crossingRoute[1]; + if (nextEdge->getFromJunction() == currentEdge->getFromJunction() || nextEdge->getToJunction() == currentEdge->getFromJunction()) { + myDir = BACKWARD; + } + } + if DEBUGCOND(myPerson->getID()) { + std::cout << " crossingRoute=" << toString(crossingRoute) << "\n"; + } + } else { + myDir = !mayStartBackward ? FORWARD : BACKWARD; + } + } + if (myDir == FORWARD) { + // start at the right side of the sidewalk + myRelY = stripeWidth * (numStripes(lane) - 1); + } + if DEBUGCOND(myPerson->getID()) { + std::cout << " added new pedestrian " << myPerson->getID() << " on " << lane->getID() << " myRelX=" << myRelX << " myRelY=" << myRelY << " dir=" << myDir << " route=" << toString(myStage->getRoute()) << "\n"; + } + + myNLI = getNextLane(*this, lane, 0); +} + + +SUMOReal +MSPModel_Striping::PState::getLength() const { + return myPerson->getVehicleType().getLength(); +} + + +int +MSPModel_Striping::PState::stripe(SUMOReal relY) const { + const int max = numStripes(myLane) - 1; + return MIN2(MAX2(0, (int)floor((relY + 0.5 * stripeWidth) / stripeWidth)), max); +} + + +int +MSPModel_Striping::PState::otherStripe(SUMOReal relY) const { + const int max = numStripes(myLane) - 1; + const int s = stripe(); + const SUMOReal offset = relY - s * stripeWidth; + const SUMOReal threshold = MAX2(NUMERICAL_EPS, stripeWidth - SQUEEZE * myPerson->getVehicleType().getWidth()); + int result; + if (offset > threshold) { + result = s + 1; + } else if (offset < -threshold) { + result = s - 1; + } else { + result = s; + } + std::cout.setf(std::ios::fixed , std::ios::floatfield); + std::cout << std::setprecision(5); + //if DEBUGCOND(myPerson->getID()) std::cout << " otherStripe " << myPerson->getID() << " offset=" << offset << " threshold=" << threshold << " rawResult=" << result << "\n"; + return MIN2(MAX2(0, result), max); +} + +int +MSPModel_Striping::PState::stripe() const { + return stripe(myRelY); +} + + +int +MSPModel_Striping::PState::otherStripe() const { + return otherStripe(myRelY); +} + + +SUMOReal +MSPModel_Striping::PState::distToLaneEnd() const { + if (myStage->getNextRouteEdge() == 0) { + return myDir * (myStage->getArrivalPos() - myRelX); + } else { + const SUMOReal length = myWalkingAreaPath == 0 ? myLane->getLength() : myWalkingAreaPath->length; + return myDir == FORWARD ? length - myRelX : myRelX; + } +} + + +bool +MSPModel_Striping::PState::moveToNextLane(SUMOTime currentTime) { + const SUMOReal dist = distToLaneEnd(); + if (myPerson->getID() == DEBUG1) { + std::cout << SIMTIME << " myRelX=" << myRelX << " dist=" << dist << "\n"; + } + if (dist <= 0) { + //if (ped.myPerson->getID() == DEBUG1) { + // std::cout << SIMTIME << " addToLane x=" << ped.myRelX << " newDir=" << newDir << " newLane=" << newLane->getID() << " walkingAreaShape=" << walkingAreaShape << "\n"; + //} + //std::cout << " changing to " << newLane->getID() << " myRelY=" << ped.myRelY << " oldStripes=" << oldStripes << " newStripes=" << numStripes(newLane); + //std::cout << " newY=" << ped.myRelY << " myDir=" << ped.myDir << " newDir=" << newDir; + const int oldStripes = numStripes(myLane); + const int oldDir = myDir; + const MSLane* oldLane = myLane; + myLane = myNLI.lane; + myDir = myNLI.dir; + const bool normalLane = (myLane == 0 || myLane->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_NORMAL); + if DEBUGCOND(myPerson->getID()) { + std::cout << SIMTIME + << " ped=" << myPerson->getID() + << " moveToNextLane old=" << oldLane->getID() + << " new=" << (myLane == 0 ? "NULL" : myLane->getID()) + << " oldDir=" << oldDir + << " newDir=" << myDir + << "\n"; + } + myStage->moveToNextEdge(myPerson, currentTime, normalLane ? 0 : &myLane->getEdge()); + if (myLane != 0) { + assert(myDir != UNDEFINED_DIRECTION); + myNLI = getNextLane(*this, myLane, oldLane); + assert(myNLI.lane != oldLane); // do not turn around + if DEBUGCOND(myPerson->getID()) { + std::cout << " nextLane=" << (myNLI.lane == 0 ? "NULL" : myNLI.lane->getID()) << "\n"; + } + if (myLane->getEdge().isWalkingArea()) { + if (myNLI.dir != UNDEFINED_DIRECTION) { + myWalkingAreaPath = &myWalkingAreaPaths[std::make_pair(oldLane, myNLI.lane)]; + assert(myWalkingAreaPath->from != 0); + assert(myWalkingAreaPath->to != 0); + assert(myWalkingAreaPath->shape.size() >= 2); + if DEBUGCOND(myPerson->getID()) { + std::cout << " mWAPath shape=" << myWalkingAreaPath->shape << " length=" << myWalkingAreaPath->length << "\n"; + } + } else { + // disconnnected route. move to the next edge (arbitrariliy, maintaining current direction) + if (OptionsCont::getOptions().getBool("ignore-route-errors")) { + myStage->moveToNextEdge(myPerson, currentTime, 0); + myLane = myNLI.lane; + assert(myLane != 0); + assert(myLane->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_NORMAL); + myNLI = getNextLane(*this, myLane, oldLane); + myWalkingAreaPath = 0; + } else { + throw ProcessError("Disconnected walk for person '" + myPerson->getID() + "'."); + } + } + } else { + myWalkingAreaPath = 0; + } + // adapt x to fit onto the new lane + if (myDir == BACKWARD) { + const SUMOReal newLength = (myWalkingAreaPath == 0 ? myLane->getLength() : myWalkingAreaPath->length); + myRelX = newLength + dist; + } else { + myRelX = -dist; + } + // adjust to change in direction + if (myDir != oldDir) { + myRelY = (numStripes(oldLane) - 1) * stripeWidth - myRelY; + } + // adjust to differences in sidewalk width + myRelY += 0.5 * stripeWidth * (numStripes(myLane) - oldStripes); + } + return true; + } else { + return false; + } +} + + +void +MSPModel_Striping::PState::walk(const Obstacles& obs, SUMOTime currentTime) { + const int stripes = (int)obs.size(); + const int sMax = stripes - 1; + assert(stripes == numStripes(myLane)); + const SUMOReal vMax = myStage->getMaxSpeed(); + // ultimate goal is to chose the prefered stripe (chosen) + const int current = stripe(); + const int other = otherStripe(); + int chosen = current; + // compute utility for all stripes + std::vector utility(stripes, 0); + + // penalize lateral movement (may increase jamming) + for (int i = 0; i < stripes; ++i) { + utility[i] += abs(i - current) * LATERAL_PENALTY; + } + // compute distances + std::vector distance(stripes); + for (int i = 0; i < stripes; ++i) { + distance[i] += myDir * (obs[i].x - myRelX); + } + // forbid stripes which are blocked and also all stripes behind them + for (int i = 0; i < stripes; ++i) { + if (distance[i] <= 0) { + if (i < current) { + for (int j = 0; j <= i; ++j) { + utility[j] = 2 * BLOCKED_STRIPE; + } + } else { + for (int j = i; j < stripes; ++j) { + utility[j] = 2 * BLOCKED_STRIPE; + } + } + } + } + // forbid a portion of the leftmost stripes (in walking direction). + // lanes with stripes less than 1 / RESERVE_FOR_ONCOMING_FACTOR + // may still deadlock in heavy pedestrian traffic + const int reserved = (int)floor(stripes * RESERVE_FOR_ONCOMING_FACTOR); + if (myDir == FORWARD) { + for (int i = 0; i < reserved; ++i) { + utility[i] = BLOCKED_STRIPE; + } + } else { + for (int i = sMax; i > sMax - reserved; --i) { + utility[i] = BLOCKED_STRIPE; + } + } + // adapt utility based on obstacles + for (int i = 0; i < stripes; ++i) { + if (obs[i].speed < 0) { + // penalize evasion to the left + if (myDir == FORWARD && i > 0) { + utility[i - 1] -= 0.5; + } else if (myDir == BACKWARD && i < sMax) { + utility[i + 1] -= 0.5; + } + } + // compute expected distance achievable by staying on this stripe for a time horizon + const SUMOReal lookAhead = obs[i].speed >= 0 ? LOOKAHEAD_SAMEDIR : LOOKAHEAD_ONCOMING; + const SUMOReal expectedDist = MIN2(vMax * LOOKAHEAD_SAMEDIR, distance[i] + obs[i].speed * lookAhead); + if (DEBUGCOND(myPerson->getID())) { + std::cout << " util=" << utility[i] << " exp=" << expectedDist << "\n"; + } + if (expectedDist >= 0) { + utility[i] += expectedDist; + } else { + // let only the distance count + utility[i] += ONCOMING_CONFLICT + distance[i]; + } + } + // bonus to remain on the rightmost lane (in walking direction) if there + // are oncoming + if (((myDir == FORWARD && current == sMax) + || (myDir == BACKWARD && current == 0)) + && obs[current].speed < 0) { + utility[current] -= ONCOMING_CONFLICT; + } + // bonus to leave the leftmost lane (in walking direction) if there + // are oncoming + if (((myDir == BACKWARD && current == sMax) + || (myDir == FORWARD && current == 0)) + && obs[current].speed < 0) { + utility[current] += ONCOMING_CONFLICT; + } + + // select best stripe + for (int i = 0; i < stripes; ++i) { + if (utility[chosen] < utility[i]) { + chosen = i; + } + } + // compute speed components along both axes + const int next = (chosen == current ? current : (chosen < current ? current - 1 : current + 1)); + const SUMOReal xDist = MIN3(distance[current], distance[other], distance[next]); + // XXX preferred gap differs between approaching a standing obstacle or a moving obstacle + const SUMOReal preferredGap = myPerson->getVehicleType().getMinGap() + xDist * 0.5; + SUMOReal xSpeed = MIN2(vMax, MAX2((SUMOReal)0, xDist - preferredGap)); + if (DEBUGCOND(myPerson->getID())) { + std::cout << " xSpeedPotential=" << xSpeed << "\n"; + } + // avoid tiny steps + // XXX pressure from behind? + if (mySpeed == 0 && xSpeed < MIN_STARTUP_SPEED * vMax) { + xSpeed = 0; + } + if (xSpeed == 0) { + if (myWaitingTime > jamTime || myAmJammed) { + // squeeze slowly through the crowd ignoring others + myAmJammed = true; + xSpeed = vMax / 4; + } else { + myAmJammed = false; + } + } + // dawdling + const SUMOReal dawdle = MIN2(xSpeed, RandHelper::rand() * vMax * dawdling); + xSpeed -= dawdle; + + // XXX ensure that diagonal speed <= vMax + // avoid deadlocks on narrow sidewalks + //if (oncoming && xSpeed == 0 && myStage->getWaitingTime(currentTime) > TIME2STEPS(ONCOMIN_PATIENCE)) { + // if DEBUGCOND(myPerson->getID()) std::cout << " stepping asside to resolve oncoming deadlock\n"; + // xSpeed = POSITION_EPS; // reset myWaitingTime + // if (myDir == FORWARD && chosen < sMax) { + // chosen += 1; + // } else if (myDir == BACKWARD && chosen > 0) { + // chosen -= 1; + // } + //} + const SUMOReal maxYSpeed = MAX2(vMax * LATERAL_SPEED_FACTOR, vMax - xSpeed); + SUMOReal ySpeed = 0; + const SUMOReal yDist = (chosen * stripeWidth) - myRelY; + if (fabs(yDist) > NUMERICAL_EPS) { + ySpeed = (yDist > 0 ? + MIN2(maxYSpeed, yDist) : + MAX2(-maxYSpeed, yDist)); + } + // DEBUG + if DEBUGCOND(myPerson->getID()) { + std::cout << SIMTIME + << " ped=" << myPerson->getID() + << " edge=" << myStage->getEdge()->getID() + << " x=" << myRelX + << " y=" << myRelY + << " d=" << myDir + << " pvx=" << mySpeed + << " cur=" << current + << " cho=" << chosen + << " oth=" << other + << " nxt=" << next + << " vx=" << xSpeed + << " dawdle=" << dawdle + << " vy=" << ySpeed + << " xd=" << xDist + << " yd=" << yDist + << " vMax=" << myStage->getMaxSpeed() + << " wTime=" << myStage->getWaitingTime(currentTime) + << " jammed=" << myAmJammed + << "\n distance=" << toString(distance) + << " utility=" << toString(utility) + << "\n"; + DEBUG_PRINT(obs); + } + myRelX += SPEED2DIST(xSpeed * myDir); + myRelY += SPEED2DIST(ySpeed); + mySpeed = xSpeed; + if (xSpeed > 0) { + myWaitingToEnter = false; + myWaitingTime = 0; + } else { + myWaitingTime += DELTA_T; + } +} + + +SUMOReal +MSPModel_Striping::PState::getImpatience(SUMOTime now) const { + return MAX2((SUMOReal)0, MIN2(SUMOReal(1), + myPerson->getVehicleType().getImpatience() + + STEPS2TIME(myStage->getWaitingTime(now)) / MAX_WAIT_TOLERANCE)); +} + + +SUMOReal +MSPModel_Striping::PState::getEdgePos(const MSPerson::MSPersonStage_Walking&, SUMOTime) const { + return myRelX; +} + + +Position +MSPModel_Striping::PState::getPosition(const MSPerson::MSPersonStage_Walking& stage, SUMOTime) const { + if (myLane == 0) { + // pedestrian has already finished + return Position::INVALID; + } + const SUMOReal lateral_offset = myRelY + (stripeWidth - myLane->getWidth()) * 0.5; + if (myWalkingAreaPath == 0) { + return stage.getLanePosition(myLane, myRelX, lateral_offset); + } else { + return myWalkingAreaPath->shape.positionAtOffset(myRelX, lateral_offset); + } +} + + +SUMOReal +MSPModel_Striping::PState::getAngle(const MSPerson::MSPersonStage_Walking&, SUMOTime) const { + if (myLane == 0) { + // pedestrian has already finished + return 0; + } + const PositionVector& shp = myWalkingAreaPath == 0 ? myLane->getShape() : myWalkingAreaPath->shape; + SUMOReal angle = -shp.rotationDegreeAtOffset(myRelX) + (myDir == MSPModel::BACKWARD ? 180 : 0); + if (angle > 180) { + angle -= 360; + } + return angle; +} + + +SUMOTime +MSPModel_Striping::PState::getWaitingTime(const MSPerson::MSPersonStage_Walking&, SUMOTime) const { + return myWaitingTime; +} + + +SUMOReal +MSPModel_Striping::PState::getSpeed(const MSPerson::MSPersonStage_Walking&) const { + return mySpeed; +} + +// =========================================================================== +// MSPModel_Striping::MovePedestrians method definitions +// =========================================================================== +// + +SUMOTime +MSPModel_Striping::MovePedestrians::execute(SUMOTime currentTime) { + std::set changedLane; + myModel->moveInDirection(currentTime, changedLane, FORWARD); + myModel->moveInDirection(currentTime, changedLane, BACKWARD); + // DEBUG +#ifdef LOG_ALL + for (ActiveLanes::const_iterator it_lane = myModel->getActiveLanes().begin(); it_lane != myModel->getActiveLanes().end(); ++it_lane) { + const MSLane* lane = it_lane->first; + Pedestrians pedestrians = it_lane->second; + if (pedestrians.size() == 0) { + continue; + } + sort(pedestrians.begin(), pedestrians.end(), by_xpos_sorter(FORWARD)); + std::cout << SIMTIME << " lane=" << lane->getID(); + for (int ii = 0; ii < (int)pedestrians.size(); ++ii) { + const PState& p = *pedestrians[ii]; + std::cout << " (" << p.myPerson->getID() << " " << p.myRelX << "," << p.myRelY << " " << p.myDir << ")"; + } + std::cout << "\n"; + } +#endif + return DELTA_T; +} + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_Striping.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_Striping.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_Striping.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/pedestrians/MSPModel_Striping.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,374 @@ +/****************************************************************************/ +/// @file MSPModel_Striping.h +/// @author Jakob Erdmann +/// @date Mon, 13 Jan 2014 +/// @version $Id: MSPModel_Striping.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// The pedestrian following model (prototype) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSPModel_Striping_h +#define MSPModel_Striping_h + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include "MSPerson.h" +#include "MSPModel.h" + +// =========================================================================== +// class declarations +// =========================================================================== +class MSNet; +class MSLink; +class MSJunction; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSPModel_Striping + * @brief The pedestrian following model + * + */ +class MSPModel_Striping : public MSPModel { + + friend class GUIPerson; // for debugging + +public: + + /// @brief Constructor (it should not be necessary to construct more than one instance) + MSPModel_Striping(const OptionsCont& oc, MSNet* net); + + ~MSPModel_Striping(); + + /// @brief register the given person as a pedestrian + PedestrianState* add(MSPerson* person, MSPerson::MSPersonStage_Walking* stage, SUMOTime now); + + /// @brief whether a pedestrian is blocking the crossing of lane at offset distToCrossing + bool blockedAtDist(const MSLane* lane, SUMOReal distToCrossing, std::vector* collectBlockers); + + /// @brief remove state at simulation end + void cleanupHelper(); + + /// @brief model parameters + ///@{ + + // @brief the width of a pedstrian stripe + static SUMOReal stripeWidth; + + // @brief the factor for random slow-down + static SUMOReal dawdling; + + // @brief the time threshold before becoming jammed + static SUMOTime jamTime; + + // @brief the distance to look ahead for changing stripes + static const SUMOReal LOOKAHEAD_SAMEDIR; + // @brief the distance to look ahead for changing stripes (regarding oncoming pedestrians) + static const SUMOReal LOOKAHEAD_ONCOMING; + + // @brief the speed penalty for moving sideways + static const SUMOReal LATERAL_PENALTY; + + // @brief the factor by which pedestrian width is reduced when sqeezing past each other + static const SUMOReal SQUEEZE; + + // @brief the maximum distance at which oncoming pedestrians block right turning traffic + static const SUMOReal BLOCKER_LOOKAHEAD; + + // @brief fraction of the leftmost lanes to reserve for oncoming traffic + static const SUMOReal RESERVE_FOR_ONCOMING_FACTOR; + + // @brief the time pedestrians take to reach maximum impatience + static const SUMOReal MAX_WAIT_TOLERANCE; + + // @brief the fraction of forward speed to be used for lateral movemenk + static const SUMOReal LATERAL_SPEED_FACTOR; + + // @brief the minimum fraction of maxSpeed in order to start walking after stopped + static const SUMOReal MIN_STARTUP_SPEED; + + ///@} + + +protected: + class lane_by_numid_sorter { + public: + /// comparing operation + bool operator()(const MSLane* l1, const MSLane* l2) const { + return l1->getNumericalID() < l2->getNumericalID(); + } + }; + + struct Obstacle; + struct WalkingAreaPath; + class PState; + typedef std::vector Pedestrians; + typedef std::map ActiveLanes; + typedef std::vector Obstacles; + typedef std::map NextLanesObstacles; + typedef std::map, WalkingAreaPath> WalkingAreaPaths; + + struct NextLaneInfo { + NextLaneInfo(const MSLane* _lane, const MSLink* _link, int _dir) : + lane(_lane), + link(_link), + dir(_dir) + { } + + NextLaneInfo() : + lane(0), + link(0), + dir(UNDEFINED_DIRECTION) + { } + + // @brief the next lane to be used + const MSLane* lane; + // @brief the link from the current lane to the next lane + const MSLink* link; + // @brief the direction on the next lane + int dir; + }; + + /// @brief information regarding surround Pedestrians (and potentially other things) + struct Obstacle { + /// @brief create No-Obstacle + Obstacle(int dir); + /// @brief create an obstacle from ped for ego moving in dir + Obstacle(const PState& ped, int dir); + /// @brief create an obstacle from explict values + Obstacle(SUMOReal _x, SUMOReal _speed, const std::string& _description) : x(_x), speed(_speed), description(_description) {}; + + /// @brief position on the current lane + SUMOReal x; + /// @brief speed relative to ego direction (positive means in the same direction) + SUMOReal speed; + /// @brief the id / description of the obstacle + std::string description; + }; + + struct WalkingAreaPath { + WalkingAreaPath(const MSLane* _from, const MSLane* _walkingArea, const MSLane* _to, const PositionVector& _shape) : + from(_from), + to(_to), + lane(_walkingArea), + shape(_shape), + length(_shape.length()) + {} + + WalkingAreaPath(): from(0), to(0), lane(0) {}; + + const MSLane* from; + const MSLane* to; + const MSLane* lane; // the walkingArea; + PositionVector shape; // actually const but needs to be copyable by some stl code + SUMOReal length; + + }; + + class walkingarea_path_sorter { + public: + /// comparing operation + bool operator()(const WalkingAreaPath* p1, const WalkingAreaPath* p2) const { + if (p1->from->getNumericalID() < p2->from->getNumericalID()) { + return true; + } + return p1->to->getNumericalID() < p2->to->getNumericalID(); + } + }; + + + /** + * @class PState + * @brief Container for pedestrian state and individual position update function + */ + class PState : public PedestrianState { + public: + + /// @brief abstract methods inherited from PedestrianState + /// @{ + SUMOReal getEdgePos(const MSPerson::MSPersonStage_Walking& stage, SUMOTime now) const; + Position getPosition(const MSPerson::MSPersonStage_Walking& stage, SUMOTime now) const; + SUMOReal getAngle(const MSPerson::MSPersonStage_Walking& stage, SUMOTime now) const; + SUMOTime getWaitingTime(const MSPerson::MSPersonStage_Walking& stage, SUMOTime now) const; + SUMOReal getSpeed(const MSPerson::MSPersonStage_Walking& stage) const; + /// @} + + PState(MSPerson* person, MSPerson::MSPersonStage_Walking* stage, const MSLane* lane); + + ~PState() {}; + MSPerson* myPerson; + MSPerson::MSPersonStage_Walking* myStage; + /// @brief the current lane of this pedestrian + const MSLane* myLane; + /// @brief the advancement along the current lane + SUMOReal myRelX; + /// @brief the orthogonal shift on the current lane + SUMOReal myRelY; + /// @brief the walking direction on the current lane (1 forward, -1 backward) + int myDir; + /// @brief the current walking speed + SUMOReal mySpeed; + /// @brief whether the pedestrian is waiting to start its walk + bool myWaitingToEnter; + /// @brief the consecutive time spent at speed 0 + SUMOTime myWaitingTime; + /// @brief information about the upcoming lane + NextLaneInfo myNLI; + /// @brief the current walkingAreaPath or 0 + WalkingAreaPath* myWalkingAreaPath; + /// @brief whether the person is jammed + bool myAmJammed; + + /// @brief return the length of the pedestrian + SUMOReal getLength() const; + + /// @brief the absolute distance to the end of the lane in walking direction (or to the arrivalPos) + SUMOReal distToLaneEnd() const; + + /// @brief return whether this pedestrian has passed the end of the current lane and update myRelX if so + bool moveToNextLane(SUMOTime currentTime); + + /// @brief perform position update + void walk(const Obstacles& obs, SUMOTime currentTime); + + /// @brief returns the impatience + SUMOReal getImpatience(SUMOTime now) const; + + /// @brief return the speed-dependent minGap of the pedestrian + SUMOReal getMingap() const; + + int stripe() const; + int otherStripe() const; + + int stripe(SUMOReal relY) const; + int otherStripe(SUMOReal relY) const; + + }; + + class MovePedestrians : public Command { + public: + MovePedestrians(MSPModel_Striping* model) : myModel(model) {}; + ~MovePedestrians() {}; + SUMOTime execute(SUMOTime currentTime); + private: + MSPModel_Striping* const myModel; + private: + /// @brief Invalidated assignment operator. + MovePedestrians& operator=(const MovePedestrians&); + }; + + class by_xpos_sorter { + public: + /// constructor + by_xpos_sorter(int dir): myDir(dir) {} + + public: + /// comparing operation + bool operator()(const PState* p1, const PState* p2) const { + if (p1->myRelX != p2->myRelX) { + return myDir * p1->myRelX > myDir * p2->myRelX; + } + return p1->myPerson->getID() < p2->myPerson->getID(); + } + + private: + const int myDir; + + private: + /// @brief Invalidated assignment operator. + by_xpos_sorter& operator=(const by_xpos_sorter&); + }; + + + /// @brief move all pedestrians forward and advance to the next lane if applicable + void moveInDirection(SUMOTime currentTime, std::set& changedLane, int dir); + + /// @brief move pedestrians forward on one lane + void moveInDirectionOnLane(Pedestrians& pedestrians, const MSLane* lane, SUMOTime currentTime, std::set& changedLane, int dir); + + const ActiveLanes& getActiveLanes() { + return myActiveLanes; + } + +private: + static void DEBUG_PRINT(const Obstacles& obs); + + /// @brief returns the direction in which these lanes are connectioned or 0 if they are not + static int connectedDirection(const MSLane* from, const MSLane* to); + + /** @brief computes the successor lane for the given pedestrian and sets the + * link as well as the direction to use on the succesor lane + * @param[in] currentLane The lane the pedestrian is currently on + * @param[in] ped The pedestrian for which to compute the next lane + */ + static NextLaneInfo getNextLane(const PState& ped, const MSLane* currentLane, const MSLane* prevLane); + + /// @brief return the next walkingArea in the given direction + static const MSLane* getNextWalkingArea(const MSLane* currentLane, const int dir, MSLink*& link); + + static void initWalkingAreaPaths(const MSNet* net); + + /// @brief return the maximum number of pedestrians walking side by side + static int numStripes(const MSLane* lane); + + static Obstacles mergeObstacles(const Obstacles& obs1, const Obstacles& obs2, int dir); + + static Obstacles getNeighboringObstacles(const Pedestrians& pedestrians, int egoIndex, int stripes); + + const Obstacles& getNextLaneObstacles(NextLanesObstacles& nextLanesObs, const MSLane* lane, const MSLane* nextLane, int stripes, + SUMOReal nextLength, int nextDir, SUMOReal currentLength, int currentDir); + + static void addMappedObstacle(Obstacles& obs, const PState& p, int stripe, int currentDir, int nextDir, int offset, int stripes, int nextStripes); + + static void addCloserObstacle(Obstacles& obs, SUMOReal x, int stripe, const std::string& id, int stripes, int dir); + + /// @brief retrieves the pedestian vector for the given lane (may be empty) + Pedestrians& getPedestrians(const MSLane* lane); + + +private: + /// @brief the MovePedestrians command that is registered + MovePedestrians* myCommand; + + /// @brief the total number of active pedestrians + int myNumActivePedestrians; + + /// @brief store of all lanes which have pedestrians on them + ActiveLanes myActiveLanes; + + /// @brief store for walkinArea elements + static WalkingAreaPaths myWalkingAreaPaths; + + /// @brief empty pedestrian vector + static Pedestrians noPedestrians; + +}; + + +#endif /* MSPModel_Striping_h */ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -2,9 +2,10 @@ libmicrosimtls_a_SOURCES = \ MSActuatedTrafficLightLogic.cpp \ -MSActuatedTrafficLightLogic.h MSAgentbasedTrafficLightLogic.cpp \ -MSAgentbasedTrafficLightLogic.h MSPhaseDefinition.h \ +MSActuatedTrafficLightLogic.h \ +MSPhaseDefinition.h \ MSOffTrafficLightLogic.cpp MSOffTrafficLightLogic.h \ +MSRailSignal.cpp MSRailSignal.h \ MSSimpleTrafficLightLogic.cpp MSSimpleTrafficLightLogic.h \ MSTLLogicControl.cpp MSTLLogicControl.h \ MSTrafficLightLogic.cpp MSTrafficLightLogic.h diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/microsim/traffic_lights -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,38 +92,97 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libmicrosimtls_a_AR = $(AR) $(ARFLAGS) libmicrosimtls_a_LIBADD = am_libmicrosimtls_a_OBJECTS = MSActuatedTrafficLightLogic.$(OBJEXT) \ - MSAgentbasedTrafficLightLogic.$(OBJEXT) \ - MSOffTrafficLightLogic.$(OBJEXT) \ + MSOffTrafficLightLogic.$(OBJEXT) MSRailSignal.$(OBJEXT) \ MSSimpleTrafficLightLogic.$(OBJEXT) MSTLLogicControl.$(OBJEXT) \ MSTrafficLightLogic.$(OBJEXT) libmicrosimtls_a_OBJECTS = $(am_libmicrosimtls_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libmicrosimtls_a_SOURCES) DIST_SOURCES = $(libmicrosimtls_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -87,6 +191,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -113,9 +218,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -126,10 +235,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -226,9 +331,10 @@ noinst_LIBRARIES = libmicrosimtls.a libmicrosimtls_a_SOURCES = \ MSActuatedTrafficLightLogic.cpp \ -MSActuatedTrafficLightLogic.h MSAgentbasedTrafficLightLogic.cpp \ -MSAgentbasedTrafficLightLogic.h MSPhaseDefinition.h \ +MSActuatedTrafficLightLogic.h \ +MSPhaseDefinition.h \ MSOffTrafficLightLogic.cpp MSOffTrafficLightLogic.h \ +MSRailSignal.cpp MSRailSignal.h \ MSSimpleTrafficLightLogic.cpp MSSimpleTrafficLightLogic.h \ MSTLLogicControl.cpp MSTLLogicControl.h \ MSTrafficLightLogic.cpp MSTrafficLightLogic.h @@ -270,10 +376,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libmicrosimtls.a: $(libmicrosimtls_a_OBJECTS) $(libmicrosimtls_a_DEPENDENCIES) - -rm -f libmicrosimtls.a - $(libmicrosimtls_a_AR) libmicrosimtls.a $(libmicrosimtls_a_OBJECTS) $(libmicrosimtls_a_LIBADD) - $(RANLIB) libmicrosimtls.a + +libmicrosimtls.a: $(libmicrosimtls_a_OBJECTS) $(libmicrosimtls_a_DEPENDENCIES) $(EXTRA_libmicrosimtls_a_DEPENDENCIES) + $(AM_V_at)-rm -f libmicrosimtls.a + $(AM_V_AR)$(libmicrosimtls_a_AR) libmicrosimtls.a $(libmicrosimtls_a_OBJECTS) $(libmicrosimtls_a_LIBADD) + $(AM_V_at)$(RANLIB) libmicrosimtls.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -282,32 +389,32 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSActuatedTrafficLightLogic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSAgentbasedTrafficLightLogic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSOffTrafficLightLogic.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSRailSignal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSSimpleTrafficLightLogic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSTLLogicControl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSTrafficLightLogic.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -315,26 +422,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -346,15 +442,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -363,6 +455,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -411,10 +518,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -499,18 +611,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Sept 2002 -/// @version $Id: MSActuatedTrafficLightLogic.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSActuatedTrafficLightLogic.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // An actuated (adaptive) traffic light logic /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include "MSTrafficLightLogic.h" @@ -66,17 +67,18 @@ const Phases& phases, unsigned int step, SUMOTime delay, const std::map& parameter) : - MSSimpleTrafficLightLogic(tlcontrol, id, programID, phases, step, delay, parameter), - myContinue(false) { + MSSimpleTrafficLightLogic(tlcontrol, id, programID, phases, step, delay, parameter) { myMaxGap = TplConvert::_2SUMOReal(getParameter("max-gap", DEFAULT_MAX_GAP).c_str()); myPassingTime = TplConvert::_2SUMOReal(getParameter("passing-time", DEFAULT_PASSING_TIME).c_str()); myDetectorGap = TplConvert::_2SUMOReal(getParameter("detector-gap", DEFAULT_DETECTOR_GAP).c_str()); + myShowDetectors = TplConvert::_2bool(getParameter("show-detectors", "false").c_str()); } void MSActuatedTrafficLightLogic::init(NLDetectorBuilder& nb) { + MSTrafficLightLogic::init(nb); assert(myLanes.size() > 0); // change values for setting the loops and lanestate-detectors, here //SUMOTime inductLoopInterval = 1; // @@ -100,6 +102,9 @@ if (myInductLoops.find(lane) == myInductLoops.end()) { myInductLoops[lane] = dynamic_cast(nb.createInductLoop(id, lane, ilpos, false)); assert(myInductLoops[lane] != 0); + if (myShowDetectors) { + MSNet::getInstance()->getDetectorControl().add(SUMO_TAG_INDUCTION_LOOP, myInductLoops[lane], "NULL", TIME2STEPS(300)); + } } } } @@ -107,19 +112,24 @@ MSActuatedTrafficLightLogic::~MSActuatedTrafficLightLogic() { - for (InductLoopMap::iterator i = myInductLoops.begin(); i != myInductLoops.end(); ++i) { - delete(*i).second; + if (!myShowDetectors) { + for (InductLoopMap::iterator i = myInductLoops.begin(); i != myInductLoops.end(); ++i) { + delete(*i).second; + } } } // ------------ Switching and setting current rows SUMOTime -MSActuatedTrafficLightLogic::trySwitch(bool) { +MSActuatedTrafficLightLogic::trySwitch() { // checks if the actual phase should be continued - gapControl(); - if (myContinue) { - return duration(); + // @note any vehicles which arrived during the previous phases which are now waiting between the detector and the stop line are not + // considere here. RiLSA recommends to set minDuration in a way that lets all vehicles pass the detector + // @todo: it would be nice to warn users if (inductLoopPosition / defaultLengthWithGap * myPassingTime > minDuration) + const SUMOReal detectionGap = gapControl(); + if (detectionGap < std::numeric_limits::max()) { + return duration(detectionGap); } // increment the index to the current phase myStep++; @@ -136,52 +146,38 @@ // ------------ "actuated" algorithm methods SUMOTime -MSActuatedTrafficLightLogic::duration() const { - assert(myContinue); +MSActuatedTrafficLightLogic::duration(const SUMOReal detectionGap) const { assert(getCurrentPhaseDef().isGreenPhase()); assert(myPhases.size() > myStep); - // define the duration depending from the number of waiting vehicles of the actual phase - int newduration = (int) getCurrentPhaseDef().minDuration; - const std::string& state = getCurrentPhaseDef().getState(); - for (unsigned int i = 0; i < (unsigned int) state.size(); i++) { - if (state[i] == LINKSTATE_TL_GREEN_MAJOR || state[i] == LINKSTATE_TL_GREEN_MINOR) { - const std::vector& lanes = getLanesAt(i); - if (lanes.empty()) { - break; - } - for (LaneVector::const_iterator j = lanes.begin(); j != lanes.end(); j++) { - InductLoopMap::const_iterator k = myInductLoops.find(*j); - assert(k != myInductLoops.end()); - SUMOReal waiting = (SUMOReal)(*k).second->getCurrentPassedNumber(); - SUMOReal tmpdur = myPassingTime * waiting; - if (tmpdur > newduration) { - // here we cut the decimal places, because we have to return an integer - newduration = (int) tmpdur; - } - if (newduration > (int) getCurrentPhaseDef().maxDuration) { - return getCurrentPhaseDef().maxDuration; - } - } - } - } - return newduration; + const SUMOTime actDuration = MSNet::getInstance()->getCurrentTimeStep() - myPhases[myStep]->myLastSwitch; + // ensure that minimum duration is kept + SUMOTime newDuration = getCurrentPhaseDef().minDuration - actDuration; + // try to let the last detected vehicle pass the intersection (duration must be positive) + newDuration = MAX3(newDuration, TIME2STEPS(myDetectorGap - detectionGap), 1); + // cut the decimal places to ensure that phases always have integer duration + if (newDuration % 1000 != 0) { + const SUMOTime totalDur = newDuration + actDuration; + newDuration = (totalDur / 1000 + 1) * 1000 - actDuration; + } + // ensure that the maximum duration is not exceeded + newDuration = MIN2(newDuration, getCurrentPhaseDef().maxDuration - actDuration); + return newDuration; } -void +SUMOReal MSActuatedTrafficLightLogic::gapControl() { //intergreen times should not be lenghtend assert(myPhases.size() > myStep); + SUMOReal result = std::numeric_limits::max(); if (!getCurrentPhaseDef().isGreenPhase()) { - myContinue = false; - return; + return result; // end current phase } // Checks, if the maxDuration is kept. No phase should longer send than maxDuration. SUMOTime actDuration = MSNet::getInstance()->getCurrentTimeStep() - myPhases[myStep]->myLastSwitch; if (actDuration >= getCurrentPhaseDef().maxDuration) { - myContinue = false; - return; + return result; // end current phase } // now the gapcontrol starts @@ -189,9 +185,6 @@ for (unsigned int i = 0; i < (unsigned int) state.size(); i++) { if (state[i] == LINKSTATE_TL_GREEN_MAJOR || state[i] == LINKSTATE_TL_GREEN_MINOR) { const std::vector& lanes = getLanesAt(i); - if (lanes.empty()) { - break; - } for (LaneVector::const_iterator j = lanes.begin(); j != lanes.end(); j++) { if (myInductLoops.find(*j) == myInductLoops.end()) { continue; @@ -199,13 +192,12 @@ SUMOReal actualGap = myInductLoops.find(*j)->second->getTimestepsSinceLastDetection(); if (actualGap < myMaxGap) { - myContinue = true; - return; + result = MIN2(result, actualGap); } } } } - myContinue = false; + return result; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSActuatedTrafficLightLogic.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file MSActuatedTrafficLightLogic.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: MSActuatedTrafficLightLogic.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSActuatedTrafficLightLogic.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An actuated (adaptive) traffic light logic /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -92,11 +93,10 @@ /// @{ /** @brief Switches to the next phase - * @param[in] isActive Whether this program is the currently used one * @return The time of the next switch * @see MSTrafficLightLogic::trySwitch */ - SUMOTime trySwitch(bool isActive); + SUMOTime trySwitch(); /// @} @@ -104,15 +104,16 @@ /// @name "actuated" algorithm methods /// @{ - /** @brief Returns the duration of the given step - * @return The wanted duration of the current step + /** @brief Returns the minimum duration of the current phase + * @param[in] detectionGap The minimum detection gap for the current phase + * @return The minimum duration of the current phase */ - SUMOTime duration() const; + SUMOTime duration(const SUMOReal detectionGap) const; - /** @brief Decides, whether a phase should be continued by checking the gaps of vehicles having green + /** @brief Return the minimum detection gap of all detectors if the current phase should be extended and SUMOReal::max otherwise */ - void gapControl(); + SUMOReal gapControl(); /// @} @@ -120,18 +121,18 @@ /// A map from lanes to induct loops lying on them InductLoopMap myInductLoops; - /// information whether the current phase should be lenghtend - bool myContinue; - - /// The maximum gap to check + /// The maximum gap to check in seconds SUMOReal myMaxGap; - /// The passing time used + /// The passing time used in seconds SUMOReal myPassingTime; - /// The detector distance + /// The detector distance in seconds SUMOReal myDetectorGap; + /// Whether the detectors shall be shown in the GUI + bool myShowDetectors; + }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSAgentbasedTrafficLightLogic.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSAgentbasedTrafficLightLogic.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSAgentbasedTrafficLightLogic.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSAgentbasedTrafficLightLogic.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,397 +0,0 @@ -/****************************************************************************/ -/// @file MSAgentbasedTrafficLightLogic.cpp -/// @author Julia Ringel -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @author Laura Bieker -/// @date Wed, 01. Oct 2003 -/// @version $Id: MSAgentbasedTrafficLightLogic.cpp 14425 2013-08-16 20:11:47Z behrisch $ -/// -// An agentbased traffic light logic -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include -#include "MSTrafficLightLogic.h" -#include "MSAgentbasedTrafficLightLogic.h" -#include -#include - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// parameter defaults definitions -// =========================================================================== -#define DEFAULT_T_DECIDE "1" -#define DEFAULT_LEARN_HORIZON "3" -#define DEFAULT_CYCLE_TIME "90" -#define DEFAULT_MIN_DIFF "1" -#define DEFAULT_DETECTOR_OFFSET "0" - - -// =========================================================================== -// member method definitions -// =========================================================================== -MSAgentbasedTrafficLightLogic::MSAgentbasedTrafficLightLogic( - MSTLLogicControl& tlcontrol, - const std::string& id, const std::string& programID, - const Phases& phases, unsigned int step, SUMOTime delay, - const std::map& parameter) : - MSSimpleTrafficLightLogic(tlcontrol, id, programID, phases, step, delay, parameter), - tSinceLastDecision(0), stepOfLastDecision(0) { - - tDecide = TplConvert::_2int(getParameter("decision-horizon", DEFAULT_T_DECIDE).c_str()); - numberOfValues = TplConvert::_2int(getParameter("learn-horizon", DEFAULT_LEARN_HORIZON).c_str()); - tCycle = TplConvert::_2int(getParameter("tcycle", DEFAULT_CYCLE_TIME).c_str()); - deltaLimit = TplConvert::_2SUMOReal(getParameter("min-diff", DEFAULT_MIN_DIFF).c_str()); -} - - -void -MSAgentbasedTrafficLightLogic::init(NLDetectorBuilder& nb) { - SUMOReal det_offset = TplConvert::_2SUMOReal(getParameter("detector_offset", DEFAULT_DETECTOR_OFFSET).c_str()); - LaneVectorVector::const_iterator i2; - LaneVector::const_iterator i; - // build the detectors - for (i2 = myLanes.begin(); i2 != myLanes.end(); ++i2) { - const LaneVector& lanes = *i2; - for (i = lanes.begin(); i != lanes.end(); i++) { - MSLane* lane = (*i); - // Build the lane state detetcor and set it into the container - std::string id = "TL_" + myID + "_" + myProgramID + "_E2OverLanesDetectorStartingAt_" + lane->getID(); - - if (myE2Detectors.find(lane) == myE2Detectors.end()) { - MSDetectorFileOutput* det = - nb.buildMultiLaneE2Det(id, - DU_TL_CONTROL, lane, 0, det_offset, - /*haltingTimeThreshold!!!*/ 1, - /*haltingSpeedThreshold!!!*/(SUMOReal)(5.0 / 3.6), - /*jamDistThreshold!!!*/ 10); - myE2Detectors[lane] = static_cast(det); - } - } - } - - - // initialise the duration - unsigned int tCycleIst = 0; // the actual cycletime - unsigned int tCycleMin = 0; // the minimum cycle time - unsigned int tDeltaGreen = 0; // the difference between the actual cycle time and the required cycle time - - /// Calculation of starting values - for (unsigned int actStep = 0; actStep != myPhases.size(); actStep++) { - unsigned int dur = (unsigned int) myPhases[actStep]->duration; - tCycleIst = tCycleIst + dur; - if (myPhases[actStep]->isGreenPhase()) { - unsigned int mindur = (unsigned int) myPhases[actStep]->minDuration; - tCycleMin = tCycleMin + mindur; - } else { - tCycleMin = tCycleMin + dur; - } - } - if (tCycle < tCycleMin) { - tCycle = tCycleMin; - } - if (tCycleIst < tCycle) { - tDeltaGreen = tCycle - tCycleIst; - lengthenCycleTime(tDeltaGreen); - } - if (tCycleIst > tCycle) { - tDeltaGreen = tCycleIst - tCycle; - cutCycleTime(tDeltaGreen); - } -} - - -MSAgentbasedTrafficLightLogic::~MSAgentbasedTrafficLightLogic() {} - - -// ------------ Switching and setting current rows -SUMOTime -MSAgentbasedTrafficLightLogic::trySwitch(bool) { - assert(getCurrentPhaseDef().minDuration >= 0); - assert(getCurrentPhaseDef().minDuration <= getCurrentPhaseDef().duration); - if (myPhases[myStep]->isGreenPhase()) { - // collects the data for the signal control - collectData(); - // decides wheter greentime shall distributed between phases - if (tDecide <= tSinceLastDecision) { - calculateDuration(); - } - } - // increment the index to the current phase - nextStep(); - // set the next event - while (getCurrentPhaseDef().duration == 0) { - nextStep(); - } - assert(myPhases.size() > myStep); - return getCurrentPhaseDef().duration; -} - - -// ------------ "agentbased" algorithm methods -unsigned int -MSAgentbasedTrafficLightLogic::nextStep() { - // increment the index to the current phase - myStep++; - assert(myStep <= myPhases.size()); - if (myStep == myPhases.size()) { - myStep = 0; - } - // increment the number of cycles since last decision - if (myStep == stepOfLastDecision) { - tSinceLastDecision = tSinceLastDecision + 1; - } - return myStep; -} - - -void -MSAgentbasedTrafficLightLogic::collectData() { - const std::string& state = getCurrentPhaseDef().getState(); - // finds the maximum QUEUE_LENGTH_AHEAD_OF_TRAFFIC_LIGHTS_IN_VEHICLES of one phase - SUMOReal maxPerPhase = 0; - for (unsigned int i = 0; i < (unsigned int) state.size(); i++) { - // finds the maximum QUEUE_LENGTH_AHEAD_OF_TRAFFIC_LIGHTS_IN_VEHICLES of all lanes that have green - if (state[i] == LINKSTATE_TL_GREEN_MAJOR || state[i] == LINKSTATE_TL_GREEN_MINOR) { - const std::vector& lanes = getLanesAt(i); - if (lanes.empty()) { - break; - } - SUMOReal maxPerBit = 0; - for (LaneVector::const_iterator j = lanes.begin(); j != lanes.end(); j++) { - if ((*j)->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { - continue; - } - /*!!! - SUMOReal tmp = currentForLane(E2::QUEUE_LENGTH_AHEAD_OF_TRAFFIC_LIGHTS_IN_VEHICLES, *j); - if (maxPerBit < tmp) { - maxPerBit = tmp; - } - E2DetectorMap::const_iterator it=myE2Detectors.find(*j); - (*it).second->resetQueueLengthAheadOfTrafficLights(); - */ - } - if (maxPerPhase < maxPerBit) { - maxPerPhase = maxPerBit; - } - } - } - // if still no entry for the phase exists a new entry with an empty value is created - if (myRawDetectorData.find(myStep) == myRawDetectorData.end()) { - ValueType firstData; - myRawDetectorData[myStep] = firstData; - } - /* checks whether the number of values that are already in the dataqueue is - the same number of values taht shall be consideres in the traffic control - if both numbers are the same, the oldest value is deleted */ - if (myRawDetectorData[myStep].size() == numberOfValues) { - myRawDetectorData[myStep].pop_back(); - } - // adds the detectorvalue of the considered phase - myRawDetectorData[myStep].push_front(maxPerPhase); -} - - -void -MSAgentbasedTrafficLightLogic::aggregateRawData() { - for (PhaseValueMap::const_iterator i = myRawDetectorData.begin(); i != myRawDetectorData.end(); i++) { - SUMOReal sum = 0; - for (ValueType:: const_iterator it = myRawDetectorData[(*i).first].begin(); it != myRawDetectorData[(*i).first].end(); it ++) { - sum = sum + *it; - } - SUMOReal meanvalue = sum / myRawDetectorData[(*i).first].size(); - myMeanDetectorData[(*i).first] = meanvalue; - } -} - - -void -MSAgentbasedTrafficLightLogic::calculateDuration() { - aggregateRawData(); - unsigned int stepOfMaxValue = findStepOfMaxValue(); - if (stepOfMaxValue == myPhases.size()) { - return; - } - unsigned int stepOfMinValue = findStepOfMinValue(); - if (stepOfMinValue == myPhases.size()) { - return; - } - if (stepOfMinValue == stepOfMaxValue) { - return; - } - SUMOReal deltaIst = (myMeanDetectorData[stepOfMaxValue] - myMeanDetectorData[stepOfMinValue]) - / myMeanDetectorData[stepOfMaxValue]; - if (deltaIst > deltaLimit) { - myPhases[stepOfMaxValue]->duration = myPhases[stepOfMaxValue]->duration + 1; - myPhases[stepOfMinValue]->duration = myPhases[stepOfMinValue]->duration - 1; - tSinceLastDecision = 0; - stepOfLastDecision = myStep; - } -} - - -void -MSAgentbasedTrafficLightLogic::lengthenCycleTime(unsigned int toLengthen) { - typedef std::pair contentType; - typedef std::vector< std::pair > GreenPhasesVector; - GreenPhasesVector tmp_phases(myPhases.size()); - tmp_phases.clear(); - unsigned int maxLengthen = 0; // the sum of all times, that is possible to lengthen - - /* fills the vector tmp_phases with the difference between - duration and maxduration and the myStep of the phases. - only phases with duration < maxDuration are written in the vector. - sorts the vector after the difference. */ - for (unsigned int i_Step = 0; i_Step != myPhases.size(); i_Step++) { - if (myPhases[i_Step]->isGreenPhase()) { - unsigned int dur = (unsigned int) myPhases[i_Step]->duration; - unsigned int maxdur = (unsigned int) myPhases[i_Step]->maxDuration; - if (dur < maxdur) { - contentType tmp; - tmp.second = i_Step; - tmp.first = maxdur - dur; - tmp_phases.push_back(tmp); - maxLengthen = maxLengthen + tmp.first; - } - } - } - sort(tmp_phases.begin(), tmp_phases.end()); - //lengthens the phases acording to the difference between duration and maxDuration - for (GreenPhasesVector::iterator i = tmp_phases.begin(); i != tmp_phases.end(); i++) { - SUMOTime toLengthenPerPhase = 0; - SUMOReal tmpdb = ((*i).first * toLengthen / SUMOReal(maxLengthen)) + (SUMOReal) 0.5; - toLengthenPerPhase = static_cast(tmpdb); - toLengthen = toLengthen - (unsigned int) toLengthenPerPhase; - maxLengthen = maxLengthen - (*i).first; - SUMOTime newDur = myPhases[(*i).second]->duration + toLengthenPerPhase; - myPhases[(*i).second]->duration = newDur; - } -} - - -void -MSAgentbasedTrafficLightLogic::cutCycleTime(unsigned int toCut) { - typedef std::pair contentType; - typedef std::vector< std::pair > GreenPhasesVector; - GreenPhasesVector tmp_phases(myPhases.size()); - tmp_phases.clear(); - unsigned maxCut = 0; // the sum of all times, that is possible to cut - - /* fills the vector tmp_phases with the difference between - duration and minduration and the myStep of the phases. - only phases with duration > minDuration are written in the vector. - sorts the vector after the difference. */ - for (unsigned i_Step = 0; i_Step != myPhases.size(); i_Step++) { - if (myPhases[i_Step]->isGreenPhase()) { - unsigned int dur = (unsigned int) myPhases[i_Step]->duration; - unsigned int mindur = (unsigned int) myPhases[i_Step]->minDuration; - if (dur > mindur) { - contentType tmp; - tmp.second = i_Step; - tmp.first = dur - mindur; - tmp_phases.push_back(tmp); - maxCut = maxCut + tmp.first; - } - } - } - std::sort(tmp_phases.begin(), tmp_phases.end()); - //cuts the phases acording to the difference between duration and minDuration - for (GreenPhasesVector::iterator i = tmp_phases.begin(); i != tmp_phases.end(); i++) { - SUMOTime toCutPerPhase = 0; - SUMOReal tmpdb = ((*i).first * toCut / SUMOReal(maxCut)) + (SUMOReal) 0.5; - toCutPerPhase = static_cast(tmpdb); - toCut = toCut - (unsigned int) toCutPerPhase; - maxCut = maxCut - (*i).first; - SUMOTime newDur = myPhases[(*i).second]->duration - toCutPerPhase; - myPhases[(*i).second]->duration = newDur; - } -} - - -unsigned int -MSAgentbasedTrafficLightLogic::findStepOfMaxValue() const { - unsigned int StepOfMaxValue = (unsigned int) myPhases.size(); - SUMOReal MaxValue = -1; - for (MeanDataMap::const_iterator it = myMeanDetectorData.begin(); it != myMeanDetectorData.end(); it++) { - // checks whether the actual duruation is shorter than maxduration - // otherwise the phase can't be lenghten - unsigned int maxDur = (unsigned int) myPhases[(*it).first]->maxDuration; - unsigned int actDur = (unsigned int) myPhases[(*it).first]->duration; - if (actDur >= maxDur) { - continue; - } - if ((*it).second > MaxValue) { - MaxValue = (*it).second; - StepOfMaxValue = (*it).first; - } - } - return StepOfMaxValue; -} - - -unsigned int -MSAgentbasedTrafficLightLogic::findStepOfMinValue() const { - unsigned int StepOfMinValue = (unsigned int) myPhases.size(); - SUMOReal MinValue = 9999; - for (MeanDataMap::const_iterator it = myMeanDetectorData.begin(); it != myMeanDetectorData.end(); it++) { - // checks whether the actual duruation is longer than minduration - // otherwise the phase can't be cut - unsigned int minDur = (unsigned int) myPhases[(*it).first]->minDuration; - unsigned int actDur = (unsigned int) myPhases[(*it).first]->duration; - if (actDur <= minDur) { - continue; - } - if ((*it).second < MinValue) { - MinValue = (*it).second; - StepOfMinValue = (*it).first; - } - } - return StepOfMinValue; -} - - -/* -SUMOReal -MSAgentbasedTrafficLightLogic::currentForLane(E2::DetType what, - MSLane *lane) const -{ - - E2DetectorMap::const_iterator i=myE2Detectors.find(lane); - return (*i).second->getCurrent(what); -} -*/ - - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSAgentbasedTrafficLightLogic.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSAgentbasedTrafficLightLogic.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSAgentbasedTrafficLightLogic.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSAgentbasedTrafficLightLogic.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,211 +0,0 @@ -/****************************************************************************/ -/// @file MSAgentbasedTrafficLightLogic.h -/// @author Julia Ringel -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date Wed, 01. Oct 2003 -/// @version $Id: MSAgentbasedTrafficLightLogic.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// An agentbased traffic light logic -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef MSAgentbasedTrafficLightLogic_h -#define MSAgentbasedTrafficLightLogic_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include "MSTrafficLightLogic.h" -#include "MSSimpleTrafficLightLogic.h" -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class MSLane; -class MSAgentbasedPhaseDefinition; -class NLDetectorBuilder; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class MSAgentbasedTrafficLightLogic - * @brief An agentbased traffic light logic - */ -class MSAgentbasedTrafficLightLogic : - public MSSimpleTrafficLightLogic { -public: - /// @brief Definition of a map from lanes to lane state detectors lying on them - typedef std::map E2DetectorMap; - - /// @brief Definition of a map which stores the detector values of one single phase - typedef std::deque ValueType; - - /// @brief Definition of a map which stores the step of the greenphases and their detector values - typedef std::map PhaseValueMap; - - /// @brief Definition of a map which stores the mean data of several (numberOfValues) cycles - typedef std::map MeanDataMap; - -public: - /** @brief Constructor - * @param[in] tlcontrol The tls control responsible for this tls - * @param[in] id This tls' id - * @param[in] programID This tls' sub-id (program id) - * @param[in] phases Definitions of the phases - * @param[in] step The initial phase index - * @param[in] delay The time to wait before the first switch - * @param[in] parameter The parameter to use for tls set-up - */ - MSAgentbasedTrafficLightLogic(MSTLLogicControl& tlcontrol, - const std::string& id, const std::string& programID, - const MSSimpleTrafficLightLogic::Phases& phases, - unsigned int step, SUMOTime delay, - const std::map& parameter); - - - /** @brief Initialises the tls with information about incoming lanes - * @param[in] nb The detector builder - * @param[in] edgeContinuations Information about edge predecessors/successors - * @exception ProcessError If something fails on initialisation - */ - void init(NLDetectorBuilder& nb); - - - /// @brief Destructor - ~MSAgentbasedTrafficLightLogic(); - - - - /// @name Switching and setting current rows - /// @{ - - /** @brief Switches to the next phase - * @param[in] isActive Whether this program is the currently used one - * @return The time of the next switch - * @see MSTrafficLightLogic::trySwitch - */ - SUMOTime trySwitch(bool isActive); - /// @} - - -protected: - /// @name "agentbased" algorithm methods - /// @{ - - /** @brief Returns the index of the phase next to the given phase - * - * Stores the duration of the phase, which was just sent - * or stores the activation-time in myLastphase of the phase next - * @return The index of the next step - */ - unsigned int nextStep(); - - - /** @brief Collects the traffic data - */ - void collectData(); - - - /** @brief Aggregates the data of one phase, collected during different cycles - */ - void aggregateRawData(); - - - /** @brief Calculates the duration for all real phases except intergreen phases - */ - void calculateDuration(); - - - /** @brief lenghtens the actual cycle by an given value - * @param[in] toLenghten The time increase - */ - void lengthenCycleTime(unsigned int toLenghten); - - - /** @brief cuts the actual cycle by an given value - * @param[in] toCut The time decrease - */ - void cutCycleTime(unsigned int toCut); - - - /** @brief Returns the step of the phase with the longest Queue_Lengt_Ahead_Of_Traffic_Lights - * @return Which step has the longest queue - */ - unsigned int findStepOfMaxValue() const; - - - /** @brief Returns the step of the phase with the shortest Queue_Lengt_Ahead_Of_Traffic_Lights - * @return Which step has the shortest queue - */ - unsigned int findStepOfMinValue() const; - /// @} - - -protected: - /// @brief A map from lanes to E2 detectors lying on them - E2DetectorMap myE2Detectors; - - /// @brief A map of the step of the greenphases and their detectorvalues for several (mumberofValues) cycles - PhaseValueMap myRawDetectorData; - - /// @brief A map of the step of the greenphases and their aggregated detectordata - MeanDataMap myMeanDetectorData; - - /** @brief the interval in which the traffic light can make a decision - * - * The interval is given in integer numbers of cycles */ - unsigned int tDecide; - - /// @brief The number of cycles, before the last decision was made - unsigned int tSinceLastDecision; - - /// @brief Stores the step of the phase, when the last decision was made - unsigned int stepOfLastDecision; - - /** @brief The number of detector values whivh is considered to make a decision - * - * it's only possible to get one value per cycle per greenphase */ - unsigned int numberOfValues; - - /// @brief The cycletime of the trafficlight - unsigned int tCycle; - - /* @brief The minimum difference between the shortest and the longest que - * - * Queue_Lengt_Ahead_Of_Traffic_Lights of a phase before greentime is given - * from the phase with the shortest Queue_Lengt_Ahead_Of_Traffic_Lights to the phase with - * the longest Queue_Lengt_Ahead_Of_Traffic_Lights */ - SUMOReal deltaLimit; - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSOffTrafficLightLogic.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSOffTrafficLightLogic.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSOffTrafficLightLogic.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSOffTrafficLightLogic.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date 08.05.2007 -/// @version $Id: MSOffTrafficLightLogic.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSOffTrafficLightLogic.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A traffic lights logic which represents a tls in an off-mode /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSOffTrafficLightLogic.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSOffTrafficLightLogic.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSOffTrafficLightLogic.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSOffTrafficLightLogic.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date 08.05.2007 -/// @version $Id: MSOffTrafficLightLogic.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSOffTrafficLightLogic.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A traffic lights logic which represents a tls in an off-mode /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -88,12 +88,10 @@ /// @{ /** @brief Switches to the next phase - * @param[in] isActive Whether this program is the currently used one * @return The time of the next switch (always 120) * @see MSTrafficLightLogic::trySwitch */ - SUMOTime trySwitch(bool isActive) { - UNUSED_PARAMETER(isActive); + SUMOTime trySwitch() { return 120 * DELTA_T; } @@ -123,6 +121,13 @@ * @see MSTrafficLightLogic::getPhase */ const MSPhaseDefinition& getPhase(unsigned int givenstep) const; + + /** @brief Returns the type of the logic as a string + * @return The type of the logic + */ + const std::string getLogicType() const { + return "offTrafficLightLogic"; + } /// @} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSPhaseDefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSPhaseDefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSPhaseDefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSPhaseDefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Jan 2004 -/// @version $Id: MSPhaseDefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSPhaseDefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The definition of a single phase of a tls logic /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSRailSignal.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSRailSignal.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSRailSignal.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSRailSignal.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,279 @@ +/****************************************************************************/ +/// @file MSRailSignal.cpp +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Jan 2015 +/// @version $Id: MSRailSignal.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// A rail signal logic +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include "MSTrafficLightLogic.h" +#include "MSRailSignal.h" +#include +#include "MSPhaseDefinition.h" +#include "MSTLLogicControl.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + + +// =========================================================================== +// method definitions +// =========================================================================== +MSRailSignal::MSRailSignal(MSTLLogicControl& tlcontrol, + const std::string& id, const std::string& subid, + const std::map& parameters) : + MSTrafficLightLogic(tlcontrol, id, subid, DELTA_T, parameters), + myCurrentPhase(DELTA_T, "") { + myDefaultCycleTime = DELTA_T; +} + +void +MSRailSignal::init(NLDetectorBuilder&) { + assert(myLanes.size() > 0); + LinkVectorVector::iterator i2; //iterator of the link indices of this junction (most likely there is just one link per index) + // find all outgoing lanes from the junction and its succeeding lanes leading to the next rail signal + // and find for every link at the junction all lanes leading from a previous signal to this link + for (i2 = myLinks.begin(); i2 != myLinks.end(); ++i2) { //for every link index + const LinkVector& links = *i2; + LinkVector::const_iterator i; //iterator of the links that belong to the same link index + for (i = links.begin(); i != links.end(); i++) { //for every link that belongs to the current index + MSLink* link = (*i); + MSLane* toLane = link->getLane(); //the lane this link is leading to + myLinksToLane[toLane].push_back(link); + myLinkIndices[link] = (unsigned int)std::distance(myLinks.begin(), i2); //assign the index of link to link + + //find all lanes leading from a previous signal to link (we presume that there exists only one path from a previous signal to link) + std::vector afferentBlock; //the vector of lanes leading from a previous signal to link + bool noRailSignal = true; //true if the considered lane is not outgoing from a rail signal + //get the approaching lane of the link + MSLane* approachingLane = link->getApproachingLane(); //the lane this link is coming from + afferentBlock.push_back(approachingLane); + const MSLane* currentLane = approachingLane; + //look recursively for all lanes that lie before approachingLane and add them to afferentBlock until a rail signal is found + while (noRailSignal) { + std::vector incomingLanes = currentLane->getIncomingLanes(); + MSLane* precedentLane; + if (!incomingLanes.empty()) { + precedentLane = incomingLanes.front().lane; + } else { + precedentLane = 0; + } + if (precedentLane == 0) { //if there is no preceeding lane + noRailSignal = false; + } else { + const MSJunction* junction = MSLinkContHelper::getConnectingLink(*precedentLane, *currentLane)->getJunction(); //the junction between precentLane and currentLane + if ((junction != 0) && (junction->getType() == NODETYPE_RAIL_SIGNAL)) { //if this junction exists and if it has a rail signal + noRailSignal = false; + } else { + afferentBlock.push_back(precedentLane); + currentLane = precedentLane; + } + } + } + myAfferentBlocks[link] = afferentBlock; + + //find all lanes leading from toLane to the next signal if it was not already done + if (std::find(myOutgoingLanes.begin(), myOutgoingLanes.end(), toLane) == myOutgoingLanes.end()) { //if toLane was not already contained in myOutgoingLanes + myOutgoingLanes.push_back(toLane); + std::vector succeedingBlock; //the vector of lanes leading to the next rail signal + succeedingBlock.push_back(toLane); + currentLane = toLane; + bool noRailSignal = true; //true if the considered lane is not ending at a rail signal + while (noRailSignal) { + //check first if the current lane is ending at a rail signal + std::vector outGoingLinks = currentLane->getLinkCont(); + std::vector::const_iterator j; + for (j = outGoingLinks.begin(); j != outGoingLinks.end(); j++) { + const MSJunction* junction = currentLane->getEdge().getToJunction(); + if ((junction != 0) && (junction->getType() == NODETYPE_RAIL_SIGNAL)) { //if this junctions exists and if it has a rail signal + noRailSignal = false; + break; + } + } + if (noRailSignal) { //if currentLane is not ending at a railSignal + //get the next lane + std::vector outGoingLanes = currentLane->getOutgoingLanes(); + if (outGoingLanes.size() == 0) { //if the current lane has no outgoing lanes (deadend) + noRailSignal = false; + } else { + if (outGoingLanes.size() > 1) { + WRITE_WARNING("Rail lane " + currentLane->getID() + " has more than one outgoing lane but does not have a rail signal at its end"); + } + const MSLane* nextLane = outGoingLanes.front(); + succeedingBlock.push_back(nextLane); + currentLane = nextLane; + } + } + } + mySucceedingBlocks[toLane] = succeedingBlock; + } + } + } + updateCurrentPhase(); //check if this is necessary or if will be done already at another stage + setTrafficLightSignals(MSNet::getInstance()->getCurrentTimeStep()); +} + + +MSRailSignal::~MSRailSignal() {} + + +// ----------- Handling of controlled links +void +MSRailSignal::adaptLinkInformationFrom(const MSTrafficLightLogic& logic) { + MSTrafficLightLogic::adaptLinkInformationFrom(logic); + updateCurrentPhase(); +} + + +// ------------ Switching and setting current rows +SUMOTime +MSRailSignal::trySwitch() { + updateCurrentPhase(); + setTrafficLightSignals(MSNet::getInstance()->getCurrentTimeStep()); + return DELTA_T; +} + +std::string +MSRailSignal::getAppropriateState() { + std::string state(myLinks.size(), 'G'); //the state of the phase definition (all signal are green) + std::vector::const_iterator i; //the iterator of outgoing lanes of this junction + for (i = myOutgoingLanes.begin(); i != myOutgoingLanes.end(); i++) { //for every outgoing lane + MSLane* lane = (*i); + + //check if the succeeding block is used by a train + bool succeedingBlockOccupied = false; + std::vector::const_iterator j; + for (j = mySucceedingBlocks.at(lane).begin(); j != mySucceedingBlocks.at(lane).end(); j++) { //for every lane in the block between the current signal and the next signal + if (!(*j)->isEmpty()) { //if this lane is not empty + succeedingBlockOccupied = true; + break; + } + } + + /*-if the succeeding block is occupied the signals for all links leading to lane will be set to red. + -if the succeeding block is not occupied and all blocks leading to lane are not occupied all signal + will keep green. + -if the succeeding block is not occupied and there is only one block leading to lane its signal will + keep green (no matter if this block is occupied or not). + -if the succeeding block is not occupied and there is more than one block leading to lane and some + of them are occupied the signals for all links leading to lane, except one whose corresponding block + is occupied, will be set to red. the signal for the remaining block will keep green*/ + if (succeedingBlockOccupied) { //if the succeeding block is used by a train + std::vector::const_iterator k; + for (k = myLinksToLane[lane].begin(); k != myLinksToLane[lane].end(); k++) { //for every link leading to this lane + state.replace(myLinkIndices[*k], 1, "r"); //set the signal of the link (*k) to red + } + } else { + if (myLinksToLane[lane].size() > 1) { //if there is more than one link leading to lane + bool hasOccupiedBlock = false; + std::vector::const_iterator k; + for (k = myLinksToLane[lane].begin(); k != myLinksToLane[lane].end(); k++) { //for every link leading to lane + std::vector::const_iterator l; + for (l = myAfferentBlocks[(*k)].begin(); l != myAfferentBlocks[(*k)].end(); l++) { //for every lane of the block leading from a previous signal to the link (*k) + if (!(*l)->isEmpty()) { //if this lane is not empty + hasOccupiedBlock = true; + //set the signals for all links leading to lane, except for (*k), to red; the signal for (*k) will remain green + std::vector::const_iterator m; + for (m = myLinksToLane[lane].begin(); m != myLinksToLane[lane].end(); m++) { //for every link leading to lane + if (*m != *k) { //if this link is not the one corresponding to occupiedBlock + state.replace(myLinkIndices[*m], 1, "r"); //set the signal of this link to red + } + } + break; // we don't have to check the other lanes of this block anymore + } + } + if (hasOccupiedBlock) { //we don't have to check the other blocks anymore + break; + } + } + } + } + } + return state; +} + + +void +MSRailSignal::updateCurrentPhase() { + myCurrentPhase = MSPhaseDefinition(DELTA_T, getAppropriateState()); +} + + +// ------------ Static Information Retrieval +unsigned int +MSRailSignal::getPhaseNumber() const { + return 0; +} + +const MSTrafficLightLogic::Phases& +MSRailSignal::getPhases() const { + return myPhases; +} + +const MSPhaseDefinition& +MSRailSignal::getPhase(unsigned int) const { + return myCurrentPhase; +} + +// ------------ Dynamic Information Retrieval +unsigned int +MSRailSignal::getCurrentPhaseIndex() const { + return 0; +} + +const MSPhaseDefinition& +MSRailSignal::getCurrentPhaseDef() const { + return myCurrentPhase; +} + +// ------------ Conversion between time and phase +SUMOTime +MSRailSignal::getPhaseIndexAtTime(SUMOTime) const { + return 0; +} + +SUMOTime +MSRailSignal::getOffsetFromIndex(unsigned int) const { + return 0; +} + +unsigned int +MSRailSignal::getIndexFromOffset(SUMOTime) const { + return 0; +} + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSRailSignal.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSRailSignal.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSRailSignal.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSRailSignal.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,245 @@ +/****************************************************************************/ +/// @file MSRailSignal.h +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Jan 2015 +/// @version $Id: MSRailSignal.h 18096 2015-03-17 09:50:59Z behrisch $ +/// +// A rail signal logic +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSRailSignal_h +#define MSRailSignal_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +//#include +//#include +//#include +//#include +//#include +#include +//#include "MSSimpleTrafficLightLogic.h" +#include "MSPhaseDefinition.h" +#include "MSTLLogicControl.h" +//#include + + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSRailSignal + * @brief A signal for rails + */ +class MSRailSignal : public MSTrafficLightLogic { +public: + /** @brief Constructor + * @param[in] tlcontrol The tls control responsible for this tls + * @param[in] id This tls' id + * @param[in] subid This tls' sub-id (program id) + * @param[in] parameters This tls' parameters + */ + MSRailSignal(MSTLLogicControl& tlcontrol, + const std::string& id, const std::string& subid, + const std::map& parameters); + + + /** @brief Initialises the rail signal with information about adjacent rail signals + * @param[in] nb The detector builder + * @exception ProcessError If something fails on initialisation + */ + void init(NLDetectorBuilder& nb); + + + /// @brief Destructor + ~MSRailSignal(); + + /// @name Handling of controlled links + /// @{ + + /** @brief Applies information about controlled links and lanes from the given logic + * @param[in] logic The logic to use the information about controlled links/lanes from + * @see MSTrafficLightLogic::adaptLinkInformationFrom + */ + void adaptLinkInformationFrom(const MSTrafficLightLogic& logic); + /// @} + + + /// @name Switching and setting current rows + /// @{ + + + /** @brief returns the state of the signal that actually required + * + * Returns the state of the rail signal that is actually required based on the + * occupation of the adjoining blocks. + * + * @return The state actually required for this signal. + */ + std::string getAppropriateState(); + + /// @brief updates the current phase of the signal + void updateCurrentPhase(); + + /** @brief Switches to the next phase + * @return The time of the next switch (always the next step) + * @see MSTrafficLightLogic::trySwitch + */ + SUMOTime trySwitch(); + + /// @} + + + /// @name Static Information Retrieval + /// @{ + + /** @brief Returns the number of phases + * @return The number of this tls program's phases (always zero) + * @see MSTrafficLightLogic::getPhaseNumber + */ + unsigned int getPhaseNumber() const; + + + /** @brief Returns the phases of this tls program + * @return The phases of this tls program + * @see MSTrafficLightLogic::getPhases + */ + const Phases& getPhases() const; + + /** @brief Returns the definition of the phase from the given position within the plan + * + * Returns the current phase as there does not exist a plan of the phases. + * + * @param[in] givenstep The index of the phase within the plan + * @return The definition of the phase at the given position + * @see MSTrafficLightLogic::getPhase + */ + const MSPhaseDefinition& getPhase(unsigned int givenstep) const; + + /** @brief Returns the type of the logic as a string + * @return The type of the logic + */ + const std::string getLogicType() const { + return "railSignal"; + } + /// @} + + + /// @name Dynamic Information Retrieval + /// @{ + + /** @brief Returns the current index within the program + * @return The index of the current phase within the tls (here, always zero will be returned) + * @see MSTrafficLightLogic::getCurrentPhaseIndex + */ + unsigned int getCurrentPhaseIndex() const; + + + /** @brief Returns the definition of the current phase + * @return The current phase + */ + const MSPhaseDefinition& getCurrentPhaseDef() const; + /// @} + + + /// @name Conversion between time and phase + /// @{ + + /** @brief Returns the index of the logic at the given simulation step + * @return The (estimated) index of the tls at the given simulation time step (here, always zero will be returned) + * @see MSTrafficLightLogic::getPhaseIndexAtTime + */ + SUMOTime getPhaseIndexAtTime(SUMOTime simStep) const; + + + /** @brief Returns the position (start of a phase during a cycle) from of a given step + * @param[in] index The index of the phase to return the begin of + * @return The begin time of the phase (here, always zero will be returned) + * @see MSTrafficLightLogic::getOffsetFromIndex + */ + SUMOTime getOffsetFromIndex(unsigned int index) const; + + + /** @brief Returns the step (the phasenumber) of a given position of the cycle + * @param[in] offset The offset (time) for which the according phase shall be returned + * @return The according phase (here, always zero will be returned) + * @see MSTrafficLightLogic::getIndexFromOffset + */ + unsigned int getIndexFromOffset(SUMOTime offset) const; + /// @} + + + /// @name Changing phases and phase durations + /// @{ + + /** @brief Changes the current phase and her duration + * @param[in] tlcontrol The responsible traffic lights control + * @param[in] simStep The current simulation step + * @param[in] step Index of the phase to use + * @param[in] stepDuration The left duration of the phase + * @see MSTrafficLightLogic::changeStepAndDuration + */ + void changeStepAndDuration(MSTLLogicControl& tlcontrol, SUMOTime simStep, unsigned int step, SUMOTime stepDuration) { + UNUSED_PARAMETER(tlcontrol); + UNUSED_PARAMETER(simStep); + UNUSED_PARAMETER(step); + UNUSED_PARAMETER(stepDuration); + } + /// @} + +protected: + + /// The set of lanes going out from the junction + std::vector myOutgoingLanes; + + /// A map that maps a link to its link index + std::map myLinkIndices; + + /// A map that maps an outgoing lane from the junction to its set of links that lead to this lane + std::map > myLinksToLane; + + /// A map that maps a link from the junction to its vector of lanes leading from a previous signal to this link + std::map > myAfferentBlocks; + + /// A map that maps an outgoing lane from the junction to its vector of lanes leading to the next signal + std::map > mySucceedingBlocks; + + +protected: + + /** @brief The list of phases this logic uses + * + * This vector is always empty and only constructed because the superclass MSTrafficLightLogic requires it. + */ + Phases myPhases; + + /// @brief The current phase + MSPhaseDefinition myCurrentPhase; + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Friedemann Wesner /// @date Sept 2002 -/// @version $Id: MSSimpleTrafficLightLogic.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSSimpleTrafficLightLogic.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A fixed traffic light logic /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -70,7 +70,7 @@ // ------------ Switching and setting current rows SUMOTime -MSSimpleTrafficLightLogic::trySwitch(bool) { +MSSimpleTrafficLightLogic::trySwitch() { // check whether the current duration shall be increased if (myCurrentDurationIncrement > 0) { SUMOTime delay = myCurrentDurationIncrement; @@ -142,7 +142,7 @@ SUMOTime MSSimpleTrafficLightLogic::getPhaseIndexAtTime(SUMOTime simStep) const { SUMOTime position = 0; - if (myStep > 0) { + if (myStep > 0) { for (unsigned int i = 0; i < myStep; i++) { position = position + getPhase(i).duration; } @@ -161,7 +161,7 @@ return 0; } unsigned int pos = 0; - for (unsigned int i = 0; i < index; i++) { + for (unsigned int i = 0; i < index; i++) { pos += getPhase(i).duration; } return pos; @@ -170,12 +170,12 @@ unsigned int MSSimpleTrafficLightLogic::getIndexFromOffset(SUMOTime offset) const { - assert(offset <= myDefaultCycleTime); + offset = offset % myDefaultCycleTime; if (offset == myDefaultCycleTime) { return 0; } SUMOTime testPos = 0; - for (unsigned int i = 0; i < myPhases.size(); i++) { + for (unsigned int i = 0; i < myPhases.size(); i++) { testPos = testPos + getPhase(i).duration; if (testPos > offset) { return i; @@ -200,7 +200,7 @@ setTrafficLightSignals(simStep); tlcontrol.get(getID()).executeOnSwitchActions(); } - MSNet::getInstance()->getBeginOfTimestepEvents().addEvent( + MSNet::getInstance()->getBeginOfTimestepEvents()->addEvent( mySwitchCommand, stepDuration + simStep, MSEventControl::ADAPT_AFTER_EXECUTION); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSSimpleTrafficLightLogic.h 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Friedemann Wesner /// @date Sept 2002 -/// @version $Id: MSSimpleTrafficLightLogic.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSSimpleTrafficLightLogic.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A fixed traffic light logic /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -81,11 +81,10 @@ /// @{ /** @brief Switches to the next phase - * @param[in] isActive Whether this program is the currently used one * @return The time of the next switch * @see MSTrafficLightLogic::trySwitch */ - SUMOTime trySwitch(bool isActive); + SUMOTime trySwitch(); /// @} @@ -120,6 +119,13 @@ * @see MSTrafficLightLogic::getPhase */ const MSPhaseDefinition& getPhase(unsigned int givenstep) const; + + /** @brief Returns the type of the logic as a string + * @return The type of the logic + */ + const std::string getLogicType() const { + return "simpleTrafficLightLogic"; + } /// @} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSTLLogicControl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSTLLogicControl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSTLLogicControl.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSTLLogicControl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -8,12 +8,12 @@ /// @author Michael Behrisch /// @author Sascha Krieg /// @date Sept 2002 -/// @version $Id: MSTLLogicControl.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSTLLogicControl.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A class that stores and controls tls and switching of their programs /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -160,6 +160,27 @@ void +MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(MSTLLogicControl& tlc, + const std::string& state) { + // build only once... + MSTrafficLightLogic* logic = getLogic("online"); + if (logic == 0) { + MSPhaseDefinition* phase = new MSPhaseDefinition(DELTA_T, state); + std::vector phases; + phases.push_back(phase); + logic = new MSSimpleTrafficLightLogic(tlc, myCurrentProgram->getID(), "online", phases, 0, + MSNet::getInstance()->getCurrentTimeStep() + DELTA_T, + std::map()); + addLogic("online", logic, true, true); + } else { + MSPhaseDefinition nphase(DELTA_T, state); + *(dynamic_cast(logic)->getPhases()[0]) = nphase; + switchTo(tlc, "online"); + } +} + + +void MSTLLogicControl::TLSLogicVariants::addSwitchCommand(OnSwitchAction* c) { mySwitchActions.push_back(c); } @@ -192,6 +213,8 @@ MSTLLogicControl::TLSLogicVariants::switchTo(MSTLLogicControl& tlc, const std::string& programID) { // set the found wished sub-program as this tls' current one myCurrentProgram = getLogicInstantiatingOff(tlc, programID); + myCurrentProgram->setTrafficLightSignals(MSNet::getInstance()->getCurrentTimeStep()); + executeOnSwitchActions(); } @@ -404,7 +427,7 @@ SUMOTime begin = TIME2STEPS(def.begin); unsigned int end = TIME2STEPS(def.end); size_t stepOfBegin = myTo->getIndexFromOffset(begin); - if (stepOfBegin == actStep) { + if (stepOfBegin == actStep) { if (begin < startPos) { toCut = end - startPos; } else { @@ -748,7 +771,7 @@ // activate the first one if (first != w->switches.end()) { std::vector::const_iterator mbegin = w->switches.begin(); - MSNet::getInstance()->getBeginOfTimestepEvents().addEvent( + MSNet::getInstance()->getBeginOfTimestepEvents()->addEvent( new SwitchInitCommand(*this, wautid, (unsigned int)distance(mbegin, first)), (*first).when, MSEventControl::NO_CHANGE); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSTLLogicControl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSTLLogicControl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSTLLogicControl.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSTLLogicControl.h 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Friedemann Wesner /// @date Sept 2002 -/// @version $Id: MSTLLogicControl.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSTLLogicControl.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A class that stores and controls tls and switching of their programs /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -121,8 +121,18 @@ bool isActive(const MSTrafficLightLogic* tl) const; MSTrafficLightLogic* getActive() const; void switchTo(MSTLLogicControl& tlc, const std::string& programID); + + /* @brief get logic by programID. For the special case "off" + * instantiate an MSOffTrafficLightLogic */ MSTrafficLightLogic* getLogicInstantiatingOff(MSTLLogicControl& tlc, const std::string& programID); + + /* @brief sets the state to the given string get for the special program "online" + * this program is instantiated only once */ + void setStateInstantiatingOnline(MSTLLogicControl& tlc, + const std::string& state); + + void executeOnSwitchActions() const; void addLink(MSLink* link, MSLane* lane, unsigned int pos); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSTrafficLightLogic.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSTrafficLightLogic.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSTrafficLightLogic.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSTrafficLightLogic.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: MSTrafficLightLogic.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSTrafficLightLogic.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // The parent class for traffic light logics /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,6 +45,10 @@ #include #endif // CHECK_MEMORY_LEAKS +// =========================================================================== +// static value definitions +// =========================================================================== +const MSTrafficLightLogic::LaneVector MSTrafficLightLogic::myEmptyLaneVector; // =========================================================================== // member method definitions @@ -69,9 +73,9 @@ return 0; } // - bool isActive = myTLControl.isActive(myTLLogic); + const bool isActive = myTLControl.isActive(myTLLogic); size_t step1 = myTLLogic->getCurrentPhaseIndex(); - SUMOTime next = myTLLogic->trySwitch(isActive); + SUMOTime next = myTLLogic->trySwitch(); size_t step2 = myTLLogic->getCurrentPhaseIndex(); if (step1 != step2) { if (isActive) { @@ -107,13 +111,44 @@ myCurrentDurationIncrement(-1), myDefaultCycleTime(0) { mySwitchCommand = new SwitchCommand(tlcontrol, this, delay); - MSNet::getInstance()->getBeginOfTimestepEvents().addEvent( + MSNet::getInstance()->getBeginOfTimestepEvents()->addEvent( mySwitchCommand, delay, MSEventControl::NO_CHANGE); } void MSTrafficLightLogic::init(NLDetectorBuilder&) { + const Phases& phases = getPhases(); + if (phases.size() > 1) { + bool haveWarnedAboutUnusedStates = false; + // warn about transistions from green to red without intermediate yellow + for (int i = 0; i < (int)phases.size(); ++i) { + const int iNext = (i + 1) % phases.size(); + const std::string& state1 = phases[i]->getState(); + const std::string& state2 = phases[iNext]->getState(); + assert(state1.size() == state2.size()); + if (!haveWarnedAboutUnusedStates && state1.size() > myLanes.size()) { + WRITE_WARNING("Unused states in tlLogic '" + getID() + + "', program '" + getProgramID() + "' in phase " + toString(i) + + " after tl-index " + toString((int)myLanes.size() - 1)); + haveWarnedAboutUnusedStates = true; + } + for (int j = 0; j < (int)MIN3(state1.size(), state2.size(), myLanes.size()); ++j) { + if ((LinkState)state2[j] == LINKSTATE_TL_RED + && ((LinkState)state1[j] == LINKSTATE_TL_GREEN_MAJOR + || (LinkState)state1[j] == LINKSTATE_TL_GREEN_MINOR)) { + for (LaneVector::const_iterator it = myLanes[j].begin(); it != myLanes[j].end(); ++it) { + if ((*it)->getPermissions() != SVC_PEDESTRIAN) { + WRITE_WARNING("Missing yellow phase in tlLogic '" + getID() + + "', program '" + getProgramID() + "' for tl-index " + toString(j) + + " when switching to phase " + toString(iNext)); + return; // one warning per program is enough + } + } + } + } + } + } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSTrafficLightLogic.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSTrafficLightLogic.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/traffic_lights/MSTrafficLightLogic.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/traffic_lights/MSTrafficLightLogic.h 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Friedemann Wesner /// @date Sept 2002 -/// @version $Id: MSTrafficLightLogic.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSTrafficLightLogic.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The parent class for traffic light logics /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -151,7 +151,7 @@ * @param[in] isActive Whether this program is the currently used one * @return The time of the next switch */ - virtual SUMOTime trySwitch(bool isActive) = 0; + virtual SUMOTime trySwitch() = 0; /** @brief Applies the current signal states to controlled links @@ -179,7 +179,7 @@ /** @brief Returns the list of lists of all lanes controlled by this tls * @return All lanes controlled by this tls, sorted by the signal index */ - const LaneVectorVector& getLanes() const { + const LaneVectorVector& getLaneVectors() const { return myLanes; } @@ -189,7 +189,11 @@ * @return The lanes controlled by the signal at the given index */ const LaneVector& getLanesAt(unsigned int i) const { - return myLanes[i]; + if ((size_t)i < myLanes.size()) { + return myLanes[i]; + } else { + return myEmptyLaneVector; + } } @@ -234,6 +238,11 @@ * @return The definition of the phase at the given position */ virtual const MSPhaseDefinition& getPhase(unsigned int givenstep) const = 0; + + /** @brief Returns the type of the logic as a string + * @return The type of the logic + */ + virtual const std::string getLogicType() const = 0; /// @} @@ -389,10 +398,10 @@ /// @brief The id of the logic std::string myProgramID; - /// @brief The list of links which do participate in this traffic light + /// @brief The list of LinkVectors; each vector contains the links that belong to the same link index LinkVectorVector myLinks; - /// @brief The list of links which do participate in this traffic light + /// @brief The list of LaneVectors; each vector contains the incoming lanes that belong to the same link index LaneVectorVector myLanes; /// @brief A list of duration overrides @@ -407,6 +416,9 @@ /// @brief The cycle time (without changes) SUMOTime myDefaultCycleTime; + /// @brief An empty lane vector + static const LaneVector myEmptyLaneVector; + private: /// @brief invalidated copy constructor diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -2,7 +2,8 @@ libmicrosimtrigger_a_SOURCES = MSBusStop.cpp MSBusStop.h \ MSCalibrator.cpp MSCalibrator.h \ +MSContainerStop.cpp MSContainerStop.h \ +MSContainerTerminal.cpp MSContainerTerminal.h \ MSLaneSpeedTrigger.cpp MSLaneSpeedTrigger.h \ MSTrigger.h MSTrigger.cpp \ -MSTriggeredReader.cpp MSTriggeredReader.h \ MSTriggeredRerouter.cpp MSTriggeredRerouter.h diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/microsim/trigger -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,37 +92,97 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libmicrosimtrigger_a_AR = $(AR) $(ARFLAGS) libmicrosimtrigger_a_LIBADD = am_libmicrosimtrigger_a_OBJECTS = MSBusStop.$(OBJEXT) \ - MSCalibrator.$(OBJEXT) MSLaneSpeedTrigger.$(OBJEXT) \ - MSTrigger.$(OBJEXT) MSTriggeredReader.$(OBJEXT) \ - MSTriggeredRerouter.$(OBJEXT) + MSCalibrator.$(OBJEXT) MSContainerStop.$(OBJEXT) \ + MSContainerTerminal.$(OBJEXT) MSLaneSpeedTrigger.$(OBJEXT) \ + MSTrigger.$(OBJEXT) MSTriggeredRerouter.$(OBJEXT) libmicrosimtrigger_a_OBJECTS = $(am_libmicrosimtrigger_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libmicrosimtrigger_a_SOURCES) DIST_SOURCES = $(libmicrosimtrigger_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -86,6 +191,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -112,9 +218,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -125,10 +235,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -225,9 +331,10 @@ noinst_LIBRARIES = libmicrosimtrigger.a libmicrosimtrigger_a_SOURCES = MSBusStop.cpp MSBusStop.h \ MSCalibrator.cpp MSCalibrator.h \ +MSContainerStop.cpp MSContainerStop.h \ +MSContainerTerminal.cpp MSContainerTerminal.h \ MSLaneSpeedTrigger.cpp MSLaneSpeedTrigger.h \ MSTrigger.h MSTrigger.cpp \ -MSTriggeredReader.cpp MSTriggeredReader.h \ MSTriggeredRerouter.cpp MSTriggeredRerouter.h all: all-am @@ -267,10 +374,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libmicrosimtrigger.a: $(libmicrosimtrigger_a_OBJECTS) $(libmicrosimtrigger_a_DEPENDENCIES) - -rm -f libmicrosimtrigger.a - $(libmicrosimtrigger_a_AR) libmicrosimtrigger.a $(libmicrosimtrigger_a_OBJECTS) $(libmicrosimtrigger_a_LIBADD) - $(RANLIB) libmicrosimtrigger.a + +libmicrosimtrigger.a: $(libmicrosimtrigger_a_OBJECTS) $(libmicrosimtrigger_a_DEPENDENCIES) $(EXTRA_libmicrosimtrigger_a_DEPENDENCIES) + $(AM_V_at)-rm -f libmicrosimtrigger.a + $(AM_V_AR)$(libmicrosimtrigger_a_AR) libmicrosimtrigger.a $(libmicrosimtrigger_a_OBJECTS) $(libmicrosimtrigger_a_LIBADD) + $(AM_V_at)$(RANLIB) libmicrosimtrigger.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -280,31 +388,32 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSBusStop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSCalibrator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSContainerStop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSContainerTerminal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSLaneSpeedTrigger.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSTrigger.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSTriggeredReader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MSTriggeredRerouter.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -312,26 +421,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -343,15 +441,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -360,6 +454,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -408,10 +517,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -496,18 +610,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSBusStop.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSBusStop.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSBusStop.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSBusStop.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file MSBusStop.cpp /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date Mon, 13.12.2005 -/// @version $Id: MSBusStop.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSBusStop.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A lane area vehicles can halt at /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -31,7 +32,7 @@ #include #include "MSTrigger.h" #include "MSBusStop.h" -#include +#include #include #ifdef CHECK_MEMORY_LEAKS diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSBusStop.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSBusStop.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSBusStop.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSBusStop.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file MSBusStop.h /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date Mon, 13.12.2005 -/// @version $Id: MSBusStop.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSBusStop.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A lane area vehicles can halt at /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -140,10 +141,12 @@ return static_cast(myWaitingPersons.size()); } + /// @brief adds a person to this stop void addPerson(MSPerson* p) { myWaitingPersons.push_back(p); } + /// @brief Removes a person from this stop void removePerson(MSPerson* p) { std::vector::iterator i = std::find(myWaitingPersons.begin(), myWaitingPersons.end(), p); if (i != myWaitingPersons.end()) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSCalibrator.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSCalibrator.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSCalibrator.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSCalibrator.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,18 +2,20 @@ /// @file MSCalibrator.cpp /// @author Daniel Krajzewicz /// @author Jakob Erdmann +/// @author Michael Behrisch /// @date Tue, May 2005 -/// @version $Id: MSCalibrator.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSCalibrator.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Calibrates the flow on an edge by removing an inserting vehicles /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2011 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // -// This program is free software; you can redistribute it and/or modify +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or +// the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // /****************************************************************************/ @@ -35,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -44,7 +47,7 @@ #include #include #include -#include +#include #include "MSCalibrator.h" #ifdef CHECK_MEMORY_LEAKS @@ -63,14 +66,16 @@ // method definitions // =========================================================================== MSCalibrator::MSCalibrator(const std::string& id, - MSEdge* edge, SUMOReal pos, + const MSEdge* const edge, const SUMOReal pos, const std::string& aXMLFilename, const std::string& outputFilename, - const SUMOTime freq) : + const SUMOTime freq, const SUMOReal length, + const MSRouteProbe* probe, + const bool addLaneMeanData) : MSTrigger(id), MSRouteHandler(aXMLFilename, false), - myEdge(edge), myPos(pos), - myEdgeMeanData(0, myEdge->getLength(), false), + myEdge(edge), myPos(pos), myProbe(probe), + myEdgeMeanData(0, length, false), myOutput(0), myFrequency(freq), myRemoved(0), myInserted(0), myClearedInJam(0), mySpeedIsDefault(true), myDidSpeedAdaption(false), myDidInit(false), @@ -87,6 +92,18 @@ init(); } } + if (addLaneMeanData) { + for (size_t i = 0; i < myEdge->getLanes().size(); ++i) { + MSLane* lane = myEdge->getLanes()[i]; + MSMeanData_Net::MSLaneMeanDataValues* laneData = new MSMeanData_Net::MSLaneMeanDataValues(lane, myEdge->getLength(), true); + laneData->setDescription("meandata_calibrator_" + lane->getID()); + LeftoverReminders.push_back(laneData); + myLaneMeanData.push_back(laneData); + VehicleRemover* remover = new VehicleRemover(lane, (int)i, this); + LeftoverReminders.push_back(remover); + myVehicleRemovers.push_back(remover); + } + } } @@ -98,18 +115,9 @@ } myCurrentStateInterval = myIntervals.begin(); // calibration should happen after regular insertions have taken place - MSNet::getInstance()->getEndOfTimestepEvents().addEvent(this, + MSNet::getInstance()->getEndOfTimestepEvents()->addEvent(this, MSNet::getInstance()->getCurrentTimeStep(), MSEventControl::ADAPT_AFTER_EXECUTION); - for (size_t i = 0; i < myEdge->getLanes().size(); ++i) { - MSLane* lane = myEdge->getLanes()[i]; - MSMeanData_Net::MSLaneMeanDataValues* laneData = new MSMeanData_Net::MSLaneMeanDataValues(lane, myEdge->getLength(), true); - LeftoverReminders.push_back(laneData); - myLaneMeanData.push_back(laneData); - VehicleRemover* remover = new VehicleRemover(lane, (int)i, this); - LeftoverReminders.push_back(remover); - myVehicleRemovers.push_back(remover); - } } else { WRITE_WARNING("No flow intervals in calibrator '" + myID + "'."); } @@ -121,7 +129,6 @@ if (myCurrentStateInterval != myIntervals.end()) { writeXMLOutput(); } - //mySegment->removeDetector(&myMeanData); for (std::vector::iterator it = myVehicleRemovers.begin(); it != myVehicleRemovers.end(); ++it) { (*it)->disable(); } @@ -159,7 +166,8 @@ if (state.vehicleParameter->departLaneProcedure == DEPART_LANE_DEFAULT) { state.vehicleParameter->departLaneProcedure = DEPART_LANE_ALLOWED_FREE; } - if (MSNet::getInstance()->getVehicleControl().getVType(state.vehicleParameter->vtypeid) == 0) { + if (state.vehicleParameter->vtypeid != DEFAULT_VTYPE_ID && + MSNet::getInstance()->getVehicleControl().getVType(state.vehicleParameter->vtypeid) == 0) { WRITE_ERROR("Unknown vehicle type '" + state.vehicleParameter->vtypeid + "' in calibrator '" + myID + "'."); } } catch (EmptyData) { @@ -246,11 +254,35 @@ } +bool +MSCalibrator::removePending() { + if (myToRemove.size() > 0) { + MSVehicleControl& vc = MSNet::getInstance()->getVehicleControl(); + // it is not save to remove the vehicles inside + // VehicleRemover::notifyEnter so we do it here + for (std::set::iterator it = myToRemove.begin(); it != myToRemove.end(); ++it) { + MSVehicle* vehicle = dynamic_cast(vc.getVehicle(*it)); + if (vehicle != 0) { + vehicle->onRemovalFromNet(MSMoveReminder::NOTIFICATION_VAPORIZED); + vehicle->getLane()->removeVehicle(vehicle, MSMoveReminder::NOTIFICATION_VAPORIZED); + vc.scheduleVehicleRemoval(vehicle); + } else { + WRITE_WARNING("Calibrator '" + getID() + "' could not remove vehicle '" + *it); + } + } + myToRemove.clear(); + return true; + } + return false; +} + + SUMOTime MSCalibrator::execute(SUMOTime currentTime) { // get current simulation values (valid for the last simulation second) // XXX could we miss vehicle movements if this is called less often than every DELTA_T (default) ? updateMeanData(); + const bool hadRemovals = removePending(); // check whether an adaptation value exists if (isCurrentStateActive(currentTime)) { myAmActive = true; @@ -288,7 +320,7 @@ << " q=" << myCurrentStateInterval->q << " totalWished=" << totalWishedNum << " adapted=" << adaptedNum - << " jam=" << invalidJam() + << " jam=" << invalidJam(-1) << " entered=" << myEdgeMeanData.nVehEntered << " departed=" << myEdgeMeanData.nVehDeparted << " arrived=" << myEdgeMeanData.nVehArrived @@ -297,17 +329,7 @@ << " vaporized=" << myEdgeMeanData.nVehVaporized << "\n"; #endif - if (myToRemove.size() > 0) { - // it is not save to remove the vehicles inside - // VehicleRemover::notifyEnter so we do it here - for (std::set::iterator it = myToRemove.begin(); it != myToRemove.end(); ++it) { - MSVehicle* vehicle = *it; - vehicle->onRemovalFromNet(MSMoveReminder::NOTIFICATION_VAPORIZED); - vehicle->getLane()->removeVehicle(vehicle, MSMoveReminder::NOTIFICATION_VAPORIZED); - MSNet::getInstance()->getVehicleControl().scheduleVehicleRemoval(vehicle); - } - myToRemove.clear(); - } else if (calibrateFlow && adaptedNum < totalWishedNum) { + if (calibrateFlow && adaptedNum < totalWishedNum && !hadRemovals) { // we need to insert some vehicles const SUMOReal hourFraction = STEPS2TIME(currentTime - myCurrentStateInterval->begin + DELTA_T) / (SUMOReal) 3600.; const int wishedNum = (int)std::floor(myCurrentStateInterval->q * hourFraction + 0.5); // round to closest int @@ -326,10 +348,9 @@ #endif while (wishedNum > adaptedNum + insertionSlack) { SUMOVehicleParameter* pars = myCurrentStateInterval->vehicleParameter; - const MSRoute* route = 0; - StringTokenizer st(pars->routeid); - while (route == 0 && st.hasNext()) { - route = MSRoute::dictionary(st.next()); + const MSRoute* route = myProbe != 0 ? myProbe->getRoute() : 0; + if (route == 0) { + route = MSRoute::dictionary(pars->routeid); } if (route == 0) { WRITE_WARNING("No valid routes in calibrator '" + myID + "'."); @@ -349,7 +370,7 @@ newPars->depart = currentTime; newPars->routeid = route->getID(); MSVehicle* vehicle = dynamic_cast(MSNet::getInstance()->getVehicleControl().buildVehicle( - newPars, route, vtype)); + newPars, route, vtype, true, false)); #ifdef MSCalibrator_DEBUG std::cout << " resetting route pos: " << routeIndex << "\n"; #endif @@ -464,31 +485,33 @@ if (myParent == 0) { return false; } - myParent->updateMeanData(); - const bool calibrateFlow = myParent->myCurrentStateInterval->q >= 0; - const int totalWishedNum = myParent->totalWished(); - int adaptedNum = myParent->passed() + myParent->myClearedInJam; - MSVehicle* vehicle = dynamic_cast(&veh); - if (calibrateFlow && adaptedNum > totalWishedNum) { + if (myParent->isActive()) { + myParent->updateMeanData(); + const bool calibrateFlow = myParent->myCurrentStateInterval->q >= 0; + const int totalWishedNum = myParent->totalWished(); + int adaptedNum = myParent->passed() + myParent->myClearedInJam; + MSVehicle* vehicle = dynamic_cast(&veh); + if (calibrateFlow && adaptedNum > totalWishedNum) { #ifdef MSCalibrator_DEBUG - std::cout << time2string(MSNet::getInstance()->getCurrentTimeStep()) << " " << myParent->getID() - << " vaporizing " << vehicle->getID() << " to reduce flow\n"; + std::cout << time2string(MSNet::getInstance()->getCurrentTimeStep()) << " " << myParent->getID() + << " vaporizing " << vehicle->getID() << " to reduce flow\n"; #endif - if (myParent->scheduleRemoval(vehicle)) { - myParent->myRemoved++; - } - } else if (myParent->invalidJam(myLaneIndex)) { + if (myParent->scheduleRemoval(vehicle)) { + myParent->myRemoved++; + } + } else if (myParent->invalidJam(myLaneIndex)) { #ifdef MSCalibrator_DEBUG - std::cout << time2string(MSNet::getInstance()->getCurrentTimeStep()) << " " << myParent->getID() - << " vaporizing " << vehicle->getID() << " to clear jam\n"; + std::cout << time2string(MSNet::getInstance()->getCurrentTimeStep()) << " " << myParent->getID() + << " vaporizing " << vehicle->getID() << " to clear jam\n"; #endif - if (!myParent->myHaveWarnedAboutClearingJam) { - WRITE_WARNING("Clearing jam at calibrator '" + myParent->myID + "' at time " - + time2string(MSNet::getInstance()->getCurrentTimeStep())); - myParent->myHaveWarnedAboutClearingJam = true; - } - if (myParent->scheduleRemoval(vehicle)) { - myParent->myClearedInJam++; + if (!myParent->myHaveWarnedAboutClearingJam) { + WRITE_WARNING("Clearing jam at calibrator '" + myParent->myID + "' at time " + + time2string(MSNet::getInstance()->getCurrentTimeStep())); + myParent->myHaveWarnedAboutClearingJam = true; + } + if (myParent->scheduleRemoval(vehicle)) { + myParent->myClearedInJam++; + } } } return true; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSCalibrator.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSCalibrator.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSCalibrator.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSCalibrator.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,18 +2,20 @@ /// @file MSCalibrator.h /// @author Daniel Krajzewicz /// @author Jakob Erdmann +/// @author Michael Behrisch /// @date Tue, May 2005 -/// @version $Id: MSCalibrator.h 14466 2013-08-22 08:18:10Z namdre $ +/// @version $Id: MSCalibrator.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Calibrates the flow on an edge by removing an inserting vehicles /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2011 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // -// This program is free software; you can redistribute it and/or modify +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or +// the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // /****************************************************************************/ @@ -32,7 +34,6 @@ #include #include -#include #include #include #include @@ -40,6 +41,13 @@ // =========================================================================== +// class declarations +// =========================================================================== +class OutputDevice; +class MSRouteProbe; + + +// =========================================================================== // class definitions // =========================================================================== /** @@ -50,10 +58,11 @@ public: /** constructor */ MSCalibrator(const std::string& id, - MSEdge* edge, SUMOReal pos, + const MSEdge* const edge, const SUMOReal pos, const std::string& aXMLFilename, const std::string& outputFilename, - const SUMOTime freq); + const SUMOTime freq, const SUMOReal length, + const MSRouteProbe* probe, const bool addLaneMeanData = true); /** destructor */ virtual ~MSCalibrator(); @@ -61,7 +70,7 @@ /** the implementation of the MSTrigger / Command interface. Calibrating takes place here. */ - SUMOTime execute(SUMOTime currentTime); + virtual SUMOTime execute(SUMOTime currentTime); /// @brief cleanup remaining data structures static void cleanup(); @@ -147,7 +156,7 @@ void init(); - inline int passed() const { + inline virtual int passed() const { // calibrator measures at start of segment // vehicles drive to the end of an edge by default so they count as passed // but vaporized vehicles do not count @@ -162,7 +171,7 @@ /* @brief returns whether the lane is jammed although it should not be * @param[in] lane The lane to check or all for negative values */ - bool invalidJam(int laneIndex = -1) const; + bool invalidJam(int laneIndex) const; inline int inserted() const { return myInserted; @@ -178,25 +187,32 @@ * fit on the given lane * @param[in] lane The lane to check (return the maximum of all lanes for negative values) */ - int remainingVehicleCapacity(int laneIndex = -1) const; + int remainingVehicleCapacity(int laneIndex) const; /// @brief reset collected vehicle data - void reset(); + virtual void reset(); /// @brief aggregate lane values - void updateMeanData(); + virtual void updateMeanData(); /** @brief try to schedule the givne vehicle for removal. return true if it * isn't already scheduled */ bool scheduleRemoval(MSVehicle* veh) { - return myToRemove.insert(veh).second; + return myToRemove.insert(veh->getID()).second; }; + + /** @brief remove any vehicles which are scheduled for removal. + * return true if removals took place */ + bool removePending(); + protected: /// @brief the edge on which this calibrator lies - MSEdge* const myEdge; + const MSEdge* const myEdge; /// @brief the position on the edge where this calibrator lies const SUMOReal myPos; + /// @brief the route probe to retrieve routes from + const MSRouteProbe* const myProbe; /// @brief data collector for the calibrator std::vector myLaneMeanData; /// @brief accumlated data for the whole edge @@ -208,7 +224,11 @@ std::vector myVehicleRemovers; - std::set myToRemove; + /** @brief set of vehicle ids to remove + * @note: we avoid keeping vehicle points because someone else might + * invalidate it before look at it again (i.e. another calibrator) + */ + std::set myToRemove; /// @brief The device for xml statistics OutputDevice* myOutput; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSContainerStop.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSContainerStop.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSContainerStop.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSContainerStop.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,115 @@ +/****************************************************************************/ +/// @file MSContainerStop.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Mon, 13.12.2005 +/// @version $Id: MSContainerStop.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// A lane area vehicles can halt at +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +//#include "MSTrigger.h" +#include "MSContainerStop.h" +#include +#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +MSContainerStop::MSContainerStop(const std::string& id, + const std::vector& lines, + MSLane& lane, + SUMOReal begPos, SUMOReal endPos) + : Named(id), myLines(lines), myLane(lane), + myBegPos(begPos), myEndPos(endPos), myLastFreePos(endPos) { + computeLastFreePos(); +} + + +MSContainerStop::~MSContainerStop() {} + + +const MSLane& +MSContainerStop::getLane() const { + return myLane; +} + + +SUMOReal +MSContainerStop::getBeginLanePosition() const { + return myBegPos; +} + + +SUMOReal +MSContainerStop::getEndLanePosition() const { + return myEndPos; +} + + +void +MSContainerStop::enter(SUMOVehicle* what, SUMOReal beg, SUMOReal end) { + myEndPositions[what] = std::pair(beg, end); + computeLastFreePos(); +} + + +SUMOReal +MSContainerStop::getLastFreePos(const SUMOVehicle& forVehicle) const { + if (myLastFreePos != myEndPos) { + return myLastFreePos - forVehicle.getVehicleType().getMinGap(); + } + return myLastFreePos; +} + + +void +MSContainerStop::leaveFrom(SUMOVehicle* what) { + assert(myEndPositions.find(what) != myEndPositions.end()); + myEndPositions.erase(myEndPositions.find(what)); + computeLastFreePos(); +} + + +void +MSContainerStop::computeLastFreePos() { + myLastFreePos = myEndPos; + std::map >::iterator i; + for (i = myEndPositions.begin(); i != myEndPositions.end(); i++) { + if (myLastFreePos > (*i).second.second) { + myLastFreePos = (*i).second.second; + } + } +} + + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSContainerStop.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSContainerStop.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSContainerStop.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSContainerStop.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,205 @@ +/****************************************************************************/ +/// @file MSContainerStop.h +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Mon, 13.12.2005 +/// @version $Id: MSContainerStop.h 18096 2015-03-17 09:50:59Z behrisch $ +/// +// A lane area vehicles can halt at and load and unload containers +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSContainerStop_h +#define MSContainerStop_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class MSLane; +class SUMOVehicle; +class MSContainer; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSContainerStop + * @brief A lane area vehicles can halt at and load and unload containers + * + * A container stop tracks the last free space a vehicle may halt at by being + * informed about a vehicle's entering and depart. It keeps the information + * about entered vehicles' begin and end position within an internal + * container ("myEndPositions") and is so able to compute the last free space. + * + * Please note that using the last free space disallows vehicles to enter a + * free space in between other vehicles. + */ +class MSContainerStop : public Named { +public: + /** @brief Constructor + * + * @param[in] id The id of the container stop + * @param[in] net The net the container stop belongs to + * @param[in] lines Names of the vehicle lines that halt on this container stop + * @param[in] lane The lane the container stop is placed on + * @param[in] begPos Begin position of the container stop on the lane + * @param[in] endPos End position of the container stop on the lane + */ + MSContainerStop(const std::string& id, + const std::vector& lines, MSLane& lane, + SUMOReal begPos, SUMOReal endPos); + + + /// @brief Destructor + virtual ~MSContainerStop(); + + + /** @brief Returns the lane this container stop is located at + * + * @return Reference to the lane the container stop is located at + */ + const MSLane& getLane() const; + + + /** @brief Returns the begin position of this container stop + * + * @return The position the container stop begins at + */ + SUMOReal getBeginLanePosition() const; + + + /** @brief Returns the end position of this container stop + * + * @return The position the container stop ends at + */ + SUMOReal getEndLanePosition() const; + + + /** @brief Called if a vehicle enters this stop + * + * Stores the position of the entering vehicle in myEndPositions. + * + * Recomputes the free space using "computeLastFreePos" then. + * + * @param[in] what The vehicle that enters the container stop + * @param[in] beg The begin halting position of the vehicle + * @param[in] what The end halting position of the vehicle + * @see computeLastFreePos + */ + void enter(SUMOVehicle* what, SUMOReal beg, SUMOReal end); + + + /** @brief Called if a vehicle leaves this stop + * + * Removes the position of the vehicle from myEndPositions. + * + * Recomputes the free space using "computeLastFreePos" then. + * + * @param[in] what The vehicle that leaves the container stop + * @see computeLastFreePos + */ + void leaveFrom(SUMOVehicle* what); + + + /** @brief Returns the last free position on this stop + * + * @return The last free position of this container stop + */ + SUMOReal getLastFreePos(const SUMOVehicle& forVehicle) const; + + + /** @brief Returns the number of containers waiting on this stop + */ + unsigned int getContainerNumber() const { + return static_cast(myWaitingContainers.size()); + } + + /// @brief Adds a container to this stop + void addContainer(MSContainer* container) { + myWaitingContainers.push_back(container); + } + + /// @brief Removes a container from this stop + void removeContainer(MSContainer* container) { + std::vector::iterator i = std::find(myWaitingContainers.begin(), myWaitingContainers.end(), container); + if (i != myWaitingContainers.end()) { + myWaitingContainers.erase(i); + } + } + +protected: + /** @brief Computes the last free position on this stop + * + * The last free position is the one, the last vehicle ends at. + * It is stored in myLastFreePos. If no vehicle halts, the last free + * position gets the value of myEndPos. + */ + void computeLastFreePos(); + + +protected: + /// @brief The list of lines that are assigned to this stop + std::vector myLines; + + /// @brief A map from objects (vehicles) to the areas they acquire after entering the stop + std::map > myEndPositions; + + /// @brief The lane this stop is located at + MSLane& myLane; + + /// @brief The begin position this stop is located at + SUMOReal myBegPos; + + /// @brief The end position this stop is located at + SUMOReal myEndPos; + + /// @brief The last free position at this stop (variable) + SUMOReal myLastFreePos; + + /// @brief Containers waiting at this stop + std::vector myWaitingContainers; + + +private: + /// @brief Invalidated copy constructor. + MSContainerStop(const MSContainerStop&); + + /// @brief Invalidated assignment operator. + MSContainerStop& operator=(const MSContainerStop&); + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSContainerTerminal.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSContainerTerminal.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSContainerTerminal.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSContainerTerminal.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,111 @@ +/****************************************************************************/ +/// @file MSContainerTerminal.cpp +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Mon, 13.12.2005 +/// @version $Id: MSContainerTerminal.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// A collection of stops for container where containers can be transhiped +// from one stop to another within the terminal. +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +//#include +//#include "MSTrigger.h" +#include "MSContainerTerminal.h" +//#include +//#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +MSContainerTerminal::MSContainerTerminal(const std::string& id, + const std::set stops) + : Named(id), myStops(stops) {} + + +MSContainerTerminal::~MSContainerTerminal() {} + +// +//const MSLane& +//MSContainerTerminal::getLane() const { +// return myLane; +//} +// +// +//SUMOReal +//MSContainerTerminal::getBeginLanePosition() const { +// return myBegPos; +//} +// +// +//SUMOReal +//MSContainerTerminal::getEndLanePosition() const { +// return myEndPos; +//} +// +// +//void +//MSContainerTerminal::enter(SUMOVehicle* what, SUMOReal beg, SUMOReal end) { +// myEndPositions[what] = std::pair(beg, end); +// computeLastFreePos(); +//} +// +// +//SUMOReal +//MSContainerTerminal::getLastFreePos(const SUMOVehicle& forVehicle) const { +// if (myLastFreePos != myEndPos) { +// return myLastFreePos - forVehicle.getVehicleType().getMinGap(); +// } +// return myLastFreePos; +//} +// +// +//void +//MSContainerTerminal::leaveFrom(SUMOVehicle* what) { +// assert(myEndPositions.find(what) != myEndPositions.end()); +// myEndPositions.erase(myEndPositions.find(what)); +// computeLastFreePos(); +//} +// +// +//void +//MSContainerTerminal::computeLastFreePos() { +// myLastFreePos = myEndPos; +// std::map >::iterator i; +// for (i = myEndPositions.begin(); i != myEndPositions.end(); i++) { +// if (myLastFreePos > (*i).second.second) { +// myLastFreePos = (*i).second.second; +// } +// } +//} + + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSContainerTerminal.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSContainerTerminal.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSContainerTerminal.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSContainerTerminal.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,179 @@ +/****************************************************************************/ +/// @file MSContainerTerminal.h +/// @author Melanie Weber +/// @author Andreas Kendziorra +/// @date Mon, 13.12.2005 +/// @version $Id: MSContainerTerminal.h 18096 2015-03-17 09:50:59Z behrisch $ +/// +// A collection of stops for container where containers can be transhiped +// from one stop to another within the terminal. +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef MSContainerTerminal_h +#define MSContainerTerminal_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +//#include +////#include +//#include +//#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +//class MSLane; +//class SUMOVehicle; +class MSContainerStop; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class MSContainerTerminal + * @brief A collection of stops for containers where containers can be + * transhiped from one stop to another within the terminal. + * + * A container terminal consists of several container stops. See MSContainerStop. + * + * Once a container arrives at the terminal (either by insertion or by arriving + * via a vehicle at a certain stop of the terminal), the container teleports + * immediately to the stop it has to depart from. + * + */ +class MSContainerTerminal : public Named { +public: + /** @brief Constructor + * + * @param[in] id The id of the container terminal + * @param[in] myStops The set of stops that belong to the container terminal + */ + MSContainerTerminal(const std::string& id, + const std::set stops); + + + /// @brief Destructor + virtual ~MSContainerTerminal(); +// +// +// /** @brief Returns the lane this bus stop is located at +// * +// * @return Reference to the lane the bus stop is located at +// */ +// const MSLane& getLane() const; +// +// +// /** @brief Returns the begin position of this bus stop +// * +// * @return The position the bus stop begins at +// */ +// SUMOReal getBeginLanePosition() const; +// +// +// /** @brief Returns the end position of this bus stop +// * +// * @return The position the bus stop ends at +// */ +// SUMOReal getEndLanePosition() const; +// +// +// /** @brief Called if a vehicle enters this stop +// * +// * Stores the position of the entering vehicle in myEndPositions. +// * +// * Recomputes the free space using "computeLastFreePos" then. +// * +// * @param[in] what The vehicle that enters the bus stop +// * @param[in] beg The begin halting position of the vehicle +// * @param[in] what The end halting position of the vehicle +// * @see computeLastFreePos +// */ +// void enter(SUMOVehicle* what, SUMOReal beg, SUMOReal end); +// +// +// /** @brief Called if a vehicle leaves this stop +// * +// * Removes the position of the vehicle from myEndPositions. +// * +// * Recomputes the free space using "computeLastFreePos" then. +// * +// * @param[in] what The vehicle that leaves the bus stop +// * @see computeLastFreePos +// */ +// void leaveFrom(SUMOVehicle* what); +// +// +// /** @brief Returns the last free position on this stop +// * +// * @return The last free position of this bus stop +// */ +// SUMOReal getLastFreePos(const SUMOVehicle& forVehicle) const; +// +// +// /** @brief Returns the number of persons waiting on this stop +// */ +// unsigned int getPersonNumber() const { +// return static_cast(myWaitingPersons.size()); +// } +// +// void addPerson(MSPerson* p) { +// myWaitingPersons.push_back(p); +// } +// +// void removePerson(MSPerson* p) { +// std::vector::iterator i = std::find(myWaitingPersons.begin(), myWaitingPersons.end(), p); +// if (i != myWaitingPersons.end()) { +// myWaitingPersons.erase(i); +// } +// } +// +//protected: +// /** @brief Computes the last free position on this stop +// * +// * The last free position is the one, the last vehicle ends at. +// * It is stored in myLastFreePos. If no vehicle halts, the last free +// * position gets the value of myEndPos. +// */ +// void computeLastFreePos(); +// +// +protected: + /// @brief The set of stops of this terminal + std::set myStops; + +private: + /// @brief Invalidated copy constructor. + MSContainerTerminal(const MSContainerTerminal&); + + /// @brief Invalidated assignment operator. + MSContainerTerminal& operator=(const MSContainerTerminal&); + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSLaneSpeedTrigger.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSLaneSpeedTrigger.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSLaneSpeedTrigger.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSLaneSpeedTrigger.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Sept 2002 -/// @version $Id: MSLaneSpeedTrigger.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSLaneSpeedTrigger.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Changes the speed allowed on a set of lanes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -96,7 +96,7 @@ } // add the processing to the event handler - MSNet::getInstance()->getBeginOfTimestepEvents().addEvent( + MSNet::getInstance()->getBeginOfTimestepEvents()->addEvent( new WrappingCommand(this, &MSLaneSpeedTrigger::execute), (*myCurrentEntry).first, MSEventControl::NO_CHANGE); myDidInit = true; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSLaneSpeedTrigger.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSLaneSpeedTrigger.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSLaneSpeedTrigger.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSLaneSpeedTrigger.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: MSLaneSpeedTrigger.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSLaneSpeedTrigger.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Changes the speed allowed on a set of lanes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSTrigger.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSTrigger.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSTrigger.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSTrigger.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file MSTrigger.cpp +/// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @date Sept 2012 -/// @version $Id: MSTrigger.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSTrigger.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // An abstract device that changes the state of the micro simulation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSTriggeredReader.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSTriggeredReader.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSTriggeredReader.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSTriggeredReader.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ -/****************************************************************************/ -/// @file MSTriggeredReader.cpp -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date Sept 2002 -/// @version $Id: MSTriggeredReader.cpp 14425 2013-08-16 20:11:47Z behrisch $ -/// -// The basic class for classes that read triggers -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include "MSTriggeredReader.h" - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// method definitions -// =========================================================================== -MSTriggeredReader::MSTriggeredReader(MSNet&) - : myOffset(0), myWasInitialised(false) {} - - -MSTriggeredReader::~MSTriggeredReader() {} - - -void -MSTriggeredReader::init() { - myInit(); - myWasInitialised = true; -} - - -bool -MSTriggeredReader::isInitialised() const { - return myWasInitialised; -} - - -SUMOTime -MSTriggeredReader::wrappedExecute(SUMOTime current) { - if (!isInitialised()) { - init(); - } - SUMOTime next = current; - // loop until the next action lies in the future - while (current == next) { - // run the next action - // if it could be accomplished... - if (processNextEntryReaderTriggered()) { - // read the next one - if (readNextTriggered()) { - // set the time for comparison if a next one exists - next = myOffset; - } else { - // leave if no further exists - return 0; - } - } else { - // action could not be accomplished; try next time step - return DELTA_T; - } - } - // come back if the next action shall be executed - if (myOffset - current <= 0) { - // current is delayed; - return DELTA_T; - } - return myOffset - current; -} - - - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSTriggeredReader.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSTriggeredReader.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSTriggeredReader.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSTriggeredReader.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ -/****************************************************************************/ -/// @file MSTriggeredReader.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date Sept 2002 -/// @version $Id: MSTriggeredReader.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// The basic class for classes that read triggers -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef MSTriggeredReader_h -#define MSTriggeredReader_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class MSTriggeredReader - * Superclass for structures that read from a file where the times the next - * reading is performed are triggered by events, - */ -class MSTriggeredReader { -public: - /// Destructor - virtual ~MSTriggeredReader(); - - void init(); - bool isInitialised() const; - SUMOTime wrappedExecute(SUMOTime current); - -protected: - /// Constructor (for an abstract class) - MSTriggeredReader(MSNet& net); - - /** @brief Processes the next event - Returns true if the next element shall be read (a new timestemp is then available also) - Returns false if the action could not be accomplished; this method is then called in the next step again */ - virtual bool processNextEntryReaderTriggered() = 0; - - /// Reads from the file - virtual bool readNextTriggered() = 0; - - virtual void myInit() = 0; - - virtual void inputEndReached() = 0; - - -protected: - /// The offset to the next event - SUMOTime myOffset; - bool myWasInitialised; - -private: - /// @brief Invalidated copy constructor. - MSTriggeredReader(const MSTriggeredReader&); - - /// @brief Invalidated assignment operator. - MSTriggeredReader& operator=(const MSTriggeredReader&); - - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSTriggeredRerouter.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSTriggeredRerouter.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSTriggeredRerouter.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSTriggeredRerouter.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 25 July 2005 -/// @version $Id: MSTriggeredRerouter.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MSTriggeredRerouter.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Reroutes vehicles passing an edge /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -37,11 +37,11 @@ #include #include #include -#include #include #include -#include +#include #include +#include #include #include #include @@ -64,25 +64,21 @@ // =========================================================================== // static member defintion // =========================================================================== -MSEdge MSTriggeredRerouter::mySpecialDest_keepDestination("MSTriggeredRerouter_keepDestination", -1, MSEdge::EDGEFUNCTION_UNKNOWN); -MSEdge MSTriggeredRerouter::mySpecialDest_terminateRoute("MSTriggeredRerouter_terminateRoute", -1, MSEdge::EDGEFUNCTION_UNKNOWN); +MSEdge MSTriggeredRerouter::mySpecialDest_keepDestination("MSTriggeredRerouter_keepDestination", -1, MSEdge::EDGEFUNCTION_UNKNOWN, "", "", -1); +MSEdge MSTriggeredRerouter::mySpecialDest_terminateRoute("MSTriggeredRerouter_terminateRoute", -1, MSEdge::EDGEFUNCTION_UNKNOWN, "", "", -1); // =========================================================================== // method definitions // =========================================================================== MSTriggeredRerouter::MSTriggeredRerouter(const std::string& id, - const std::vector& edges, + const MSEdgeVector& edges, SUMOReal prob, const std::string& file, bool off) : MSTrigger(id), MSMoveReminder(id), SUMOSAXHandler(file), myProbability(prob), myUserProbability(prob), myAmInUserMode(false) { - // read in the trigger description - if (file != "" && !XMLSubSys::runParser(*this, file)) { - throw ProcessError(); - } // build actors - for (std::vector::const_iterator j = edges.begin(); j != edges.end(); ++j) { + for (MSEdgeVector::const_iterator j = edges.begin(); j != edges.end(); ++j) { #ifdef HAVE_INTERNAL if (MSGlobals::gUseMesoSim) { MESegment* s = MSGlobals::gMesoNet->getSegmentForEdge(**j); @@ -147,14 +143,15 @@ if (element == SUMO_TAG_CLOSING_REROUTE) { // by closing std::string closed_id = attrs.getStringSecure(SUMO_ATTR_ID, ""); - if (closed_id == "") { - throw ProcessError("MSTriggeredRerouter " + getID() + ": closed edge id given."); - } MSEdge* closed = MSEdge::dictionary(closed_id); if (closed == 0) { throw ProcessError("MSTriggeredRerouter " + getID() + ": Edge '" + closed_id + "' to close is not known."); } myCurrentClosed.push_back(closed); + bool ok; + const std::string allow = attrs.getOpt(SUMO_ATTR_ALLOW, getID().c_str(), ok, "", false); + const std::string disallow = attrs.getOpt(SUMO_ATTR_DISALLOW, getID().c_str(), ok, ""); + myCurrentPermissions = parseVehicleClasses(allow, disallow); } if (element == SUMO_TAG_ROUTE_PROB_REROUTE) { @@ -193,10 +190,16 @@ ri.closed = myCurrentClosed; ri.edgeProbs = myCurrentEdgeProb; ri.routeProbs = myCurrentRouteProb; + ri.permissions = myCurrentPermissions; myCurrentClosed.clear(); myCurrentEdgeProb.clear(); myCurrentRouteProb.clear(); myIntervals.push_back(ri); + if (!ri.closed.empty() && ri.permissions != SVCAll) { + MSNet::getInstance()->getBeginOfTimestepEvents()->addEvent( + new WrappingCommand(this, &MSTriggeredRerouter::setPermissions), ri.begin, + MSEventControl::ADAPT_AFTER_EXECUTION); + } } } @@ -204,67 +207,62 @@ // ------------ loading end -bool -MSTriggeredRerouter::hasCurrentReroute(SUMOTime time, SUMOVehicle& veh) const { - std::vector::const_iterator i = myIntervals.begin(); - const MSRoute& route = veh.getRoute(); - while (i != myIntervals.end()) { - if ((*i).begin <= time && (*i).end >= time) { - if ( - // affected by closingReroute, possibly combined with destProbReroute (route prob makes no sense) - route.containsAnyOf((*i).closed) || - // no closingReroute but destProbReroute or routeProbReroute - ((*i).closed.size() == 0 && (*i).edgeProbs.getOverallProb() + (*i).routeProbs.getOverallProb() > 0)) { - return true; +SUMOTime +MSTriggeredRerouter::setPermissions(const SUMOTime currentTime) { + for (std::vector::iterator i = myIntervals.begin(); i != myIntervals.end(); ++i) { + if (i->begin == currentTime && !i->closed.empty() && i->permissions != SVCAll) { + for (MSEdgeVector::iterator e = i->closed.begin(); e != i->closed.end(); ++e) { + for (std::vector::const_iterator l = (*e)->getLanes().begin(); l != (*e)->getLanes().end(); ++l) { + i->prevPermissions.push_back((*l)->getPermissions()); + (*l)->setPermissions(i->permissions); + } + (*e)->rebuildAllowedLanes(); } - } - i++; - } - return false; -} - - -bool -MSTriggeredRerouter::hasCurrentReroute(SUMOTime time) const { - std::vector::const_iterator i = myIntervals.begin(); - while (i != myIntervals.end()) { - if ((*i).begin <= time && (*i).end >= time) { - if ((*i).edgeProbs.getOverallProb() != 0 || (*i).routeProbs.getOverallProb() != 0 || (*i).closed.size() != 0) { - return true; + MSNet::getInstance()->getBeginOfTimestepEvents()->addEvent( + new WrappingCommand(this, &MSTriggeredRerouter::setPermissions), i->end, + MSEventControl::ADAPT_AFTER_EXECUTION); + } + if (i->end == currentTime && !i->closed.empty() && i->permissions != SVCAll) { + for (MSEdgeVector::iterator e = i->closed.begin(); e != i->closed.end(); ++e) { + std::vector::const_iterator p = i->prevPermissions.begin(); + for (std::vector::const_iterator l = (*e)->getLanes().begin(); l != (*e)->getLanes().end(); ++l, ++p) { + (*l)->setPermissions(*p); + } + (*e)->rebuildAllowedLanes(); } } - i++; } - return false; + return 0; } -const MSTriggeredRerouter::RerouteInterval& +const MSTriggeredRerouter::RerouteInterval* MSTriggeredRerouter::getCurrentReroute(SUMOTime time, SUMOVehicle& veh) const { - std::vector::const_iterator i = myIntervals.begin(); - const MSRoute& route = veh.getRoute(); - while (i != myIntervals.end()) { - if ((*i).begin <= time && (*i).end >= time) { - if ((*i).edgeProbs.getOverallProb() != 0 || (*i).routeProbs.getOverallProb() != 0 || route.containsAnyOf((*i).closed)) { - return *i; + for (std::vector::const_iterator i = myIntervals.begin(); i != myIntervals.end(); ++i) { + if (i->begin <= time && i->end > time) { + if ( + // affected by closingReroute, possibly combined with destProbReroute (route prob makes no sense) + veh.getRoute().containsAnyOf(i->closed) || + // no closingReroute but destProbReroute or routeProbReroute + i->edgeProbs.getOverallProb() > 0 || i->routeProbs.getOverallProb() > 0) { + return &*i; } } - i++; } - throw 1; + return 0; } -const MSTriggeredRerouter::RerouteInterval& -MSTriggeredRerouter::getCurrentReroute(SUMOTime) const { - std::vector::const_iterator i = myIntervals.begin(); - while (i != myIntervals.end()) { - if ((*i).edgeProbs.getOverallProb() != 0 || (*i).routeProbs.getOverallProb() != 0 || (*i).closed.size() != 0) { - return *i; +const MSTriggeredRerouter::RerouteInterval* +MSTriggeredRerouter::getCurrentReroute(SUMOTime time) const { + for (std::vector::const_iterator i = myIntervals.begin(); i != myIntervals.end(); ++i) { + if (i->begin <= time && i->end > time) { + if (i->edgeProbs.getOverallProb() != 0 || i->routeProbs.getOverallProb() != 0 || !i->closed.empty()) { + return &*i; + } } - i++; } - throw 1; + return 0; } @@ -275,8 +273,9 @@ return false; } // check whether the vehicle shall be rerouted - SUMOTime time = MSNet::getInstance()->getCurrentTimeStep(); - if (!hasCurrentReroute(time, veh)) { + const SUMOTime time = MSNet::getInstance()->getCurrentTimeStep(); + const MSTriggeredRerouter::RerouteInterval* rerouteDef = getCurrentReroute(time, veh); + if (rerouteDef == 0) { return false; } @@ -289,8 +288,7 @@ const MSRoute& route = veh.getRoute(); const MSEdge* lastEdge = route.getLastEdge(); // get rerouting params - const MSTriggeredRerouter::RerouteInterval& rerouteDef = getCurrentReroute(time, veh); - const MSRoute* newRoute = rerouteDef.routeProbs.getOverallProb() > 0 ? rerouteDef.routeProbs.get() : 0; + const MSRoute* newRoute = rerouteDef->routeProbs.getOverallProb() > 0 ? rerouteDef->routeProbs.get() : 0; // we will use the route if given rather than calling our own dijsktra... if (newRoute != 0) { veh.replaceRoute(newRoute); @@ -298,10 +296,10 @@ } const MSEdge* newEdge = lastEdge; // ok, try using a new destination - const bool destUnreachable = std::find(rerouteDef.closed.begin(), rerouteDef.closed.end(), lastEdge) != rerouteDef.closed.end(); + const bool destUnreachable = std::find(rerouteDef->closed.begin(), rerouteDef->closed.end(), lastEdge) != rerouteDef->closed.end(); // if we have a closingReroute, only assign new destinations to vehicles which cannot reach their original destination - if (rerouteDef.closed.size() == 0 || destUnreachable) { - newEdge = rerouteDef.edgeProbs.getOverallProb() > 0 ? rerouteDef.edgeProbs.get() : route.getLastEdge(); + if (rerouteDef->closed.size() == 0 || destUnreachable) { + newEdge = rerouteDef->edgeProbs.getOverallProb() > 0 ? rerouteDef->edgeProbs.get() : route.getLastEdge(); if (newEdge == &mySpecialDest_terminateRoute) { newEdge = veh.getEdge(); } else if (newEdge == &mySpecialDest_keepDestination || newEdge == lastEdge) { @@ -317,8 +315,8 @@ } } // we have a new destination, let's replace the vehicle route - std::vector edges; - MSNet::getInstance()->getRouterTT(rerouteDef.closed).compute( + ConstMSEdgeVector edges; + MSNet::getInstance()->getRouterTT(rerouteDef->closed).compute( veh.getEdge(), newEdge, &veh, MSNet::getInstance()->getCurrentTimeStep(), edges); veh.replaceRouteEdges(edges); return false; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSTriggeredRerouter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSTriggeredRerouter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSTriggeredRerouter.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSTriggeredRerouter.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 25 July 2005 -/// @version $Id: MSTriggeredRerouter.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSTriggeredRerouter.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Reroutes vehicles passing an edge /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -76,7 +76,7 @@ * @param[in] file The file to read the reroute definitions from */ MSTriggeredRerouter(const std::string& id, - const std::vector& edges, + const MSEdgeVector& edges, SUMOReal prob, const std::string& file, bool off); @@ -94,11 +94,15 @@ /// The end time these definitions are valid SUMOTime end; /// The list of closed edges - std::vector closed; + MSEdgeVector closed; /// The distributions of new destinations to use RandomDistributor edgeProbs; /// The distributions of new routes to use RandomDistributor routeProbs; + /// The permissions to use + SVCPermissions permissions; + /// The old permissions for all lanes + std::vector prevPermissions; }; /** @brief Tries to reroute the vehicle @@ -117,17 +121,14 @@ */ bool notifyEnter(SUMOVehicle& veh, MSMoveReminder::Notification reason); - /// Returns whether a rerouting definition is valid for the given time and vehicle - bool hasCurrentReroute(SUMOTime time, SUMOVehicle& veh) const; + /// Returns the rerouting definition valid for the given time and vehicle, 0 if none + const RerouteInterval* getCurrentReroute(SUMOTime time, SUMOVehicle& veh) const; - /// Returns the rerouting definition valid for the given time and vehicle - const RerouteInterval& getCurrentReroute(SUMOTime time, SUMOVehicle& veh) const; + /// Sets the edge permission if there are any defined in the closingEdge + SUMOTime setPermissions(const SUMOTime currentTime); - /// Returns whether a rerouting definition is valid for the given time - bool hasCurrentReroute(SUMOTime time) const; - - /// Returns the rerouting definition valid for the given time and vehicle - const RerouteInterval& getCurrentReroute(SUMOTime time) const; + /// Returns the rerouting definition valid for the given time, 0 if none + const RerouteInterval* getCurrentReroute(SUMOTime time) const; /// Sets whether the process is currently steered by the user void setUserMode(bool val); @@ -165,7 +166,7 @@ * @exception ProcessError If something fails * @see GenericSAXHandler::myEndElement */ - void myEndElement(int element); + virtual void myEndElement(int element); //@} protected: @@ -184,7 +185,9 @@ /// The first and the last time steps of the interval SUMOTime myCurrentIntervalBegin, myCurrentIntervalEnd; /// List of closed edges - std::vector myCurrentClosed; + MSEdgeVector myCurrentClosed; + /// List of permissions for closed edges + SVCPermissions myCurrentPermissions; /// new destinations with probabilities RandomDistributor myCurrentEdgeProb; /// new routes with probabilities diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSTrigger.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSTrigger.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/microsim/trigger/MSTrigger.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/microsim/trigger/MSTrigger.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: MSTrigger.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MSTrigger.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An abstract device that changes the state of the micro simulation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -7,6 +7,7 @@ NBDistribution.cpp NBDistribution.h NBDistrict.cpp NBDistrict.h \ NBDistrictCont.cpp NBDistrictCont.h NBEdge.cpp NBEdge.h \ NBEdgeCont.cpp NBEdgeCont.h NBFrame.cpp NBFrame.h \ +NBHeightMapper.cpp NBHeightMapper.h \ NBHelpers.cpp NBHelpers.h \ NBLinkPossibilityMatrix.h NBNode.cpp NBNode.h \ NBNodeCont.cpp NBNodeCont.h \ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/netbuild -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,46 +92,106 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libnetbuild_a_AR = $(AR) $(ARFLAGS) libnetbuild_a_LIBADD = am_libnetbuild_a_OBJECTS = NBAlgorithms.$(OBJEXT) \ NBAlgorithms_Ramps.$(OBJEXT) NBConnection.$(OBJEXT) \ NBContHelper.$(OBJEXT) NBDistribution.$(OBJEXT) \ NBDistrict.$(OBJEXT) NBDistrictCont.$(OBJEXT) NBEdge.$(OBJEXT) \ - NBEdgeCont.$(OBJEXT) NBFrame.$(OBJEXT) NBHelpers.$(OBJEXT) \ - NBNode.$(OBJEXT) NBNodeCont.$(OBJEXT) \ - NBNodeShapeComputer.$(OBJEXT) NBRequest.$(OBJEXT) \ - NBTrafficLightDefinition.$(OBJEXT) \ + NBEdgeCont.$(OBJEXT) NBFrame.$(OBJEXT) \ + NBHeightMapper.$(OBJEXT) NBHelpers.$(OBJEXT) NBNode.$(OBJEXT) \ + NBNodeCont.$(OBJEXT) NBNodeShapeComputer.$(OBJEXT) \ + NBRequest.$(OBJEXT) NBTrafficLightDefinition.$(OBJEXT) \ NBTrafficLightLogic.$(OBJEXT) \ NBTrafficLightLogicCont.$(OBJEXT) NBTypeCont.$(OBJEXT) \ NBSign.$(OBJEXT) NBOwnTLDef.$(OBJEXT) NBLoadedTLDef.$(OBJEXT) \ NBLoadedSUMOTLDef.$(OBJEXT) NBNetBuilder.$(OBJEXT) \ NBJoinedEdgesMap.$(OBJEXT) libnetbuild_a_OBJECTS = $(am_libnetbuild_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libnetbuild_a_SOURCES) DIST_SOURCES = $(libnetbuild_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -95,6 +200,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -121,9 +227,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -134,10 +244,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -239,6 +345,7 @@ NBDistribution.cpp NBDistribution.h NBDistrict.cpp NBDistrict.h \ NBDistrictCont.cpp NBDistrictCont.h NBEdge.cpp NBEdge.h \ NBEdgeCont.cpp NBEdgeCont.h NBFrame.cpp NBFrame.h \ +NBHeightMapper.cpp NBHeightMapper.h \ NBHelpers.cpp NBHelpers.h \ NBLinkPossibilityMatrix.h NBNode.cpp NBNode.h \ NBNodeCont.cpp NBNodeCont.h \ @@ -292,10 +399,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libnetbuild.a: $(libnetbuild_a_OBJECTS) $(libnetbuild_a_DEPENDENCIES) - -rm -f libnetbuild.a - $(libnetbuild_a_AR) libnetbuild.a $(libnetbuild_a_OBJECTS) $(libnetbuild_a_LIBADD) - $(RANLIB) libnetbuild.a + +libnetbuild.a: $(libnetbuild_a_OBJECTS) $(libnetbuild_a_DEPENDENCIES) $(EXTRA_libnetbuild_a_DEPENDENCIES) + $(AM_V_at)-rm -f libnetbuild.a + $(AM_V_AR)$(libnetbuild_a_AR) libnetbuild.a $(libnetbuild_a_OBJECTS) $(libnetbuild_a_LIBADD) + $(AM_V_at)$(RANLIB) libnetbuild.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -313,6 +421,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBEdge.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBEdgeCont.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBFrame.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBHeightMapper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBHelpers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBJoinedEdgesMap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBLoadedSUMOTLDef.Po@am__quote@ @@ -330,25 +439,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NBTypeCont.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -356,26 +465,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -387,15 +485,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -404,6 +498,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -452,10 +561,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -540,18 +654,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBAlgorithms.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBAlgorithms.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBAlgorithms.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBAlgorithms.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NBAlgorithms.cpp /// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @date 02. March 2012 -/// @version $Id: NBAlgorithms.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBAlgorithms.cpp 18120 2015-03-20 13:44:18Z namdre $ /// // Algorithms for network computation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,6 +34,7 @@ #include #include #include +#include #include "NBEdge.h" #include "NBNodeCont.h" #include "NBTypeCont.h" @@ -66,22 +68,16 @@ NBEdge* outedge = *j; for (std::vector::const_iterator k = incoming.begin(); k != incoming.end(); ++k) { NBEdge* e = *k; - if (e->getConnections().size() != 0 && !e->isConnectedTo(outedge)) { - // has connections, but not to outedge; outedge will not be the turn direction - // - // @todo: this seems to be needed due to legacy issues; actually, we could regard - // such pairs, too, and it probably would increase the accuracy. But there is - // no mechanism implemented, yet, which would avoid adding them as turnarounds though - // no connection is specified. - continue; - } - // @todo: check whether NBHelpers::relAngle is properly defined and whether it should really be used, here - SUMOReal angle = fabs(NBHelpers::relAngle(e->getAngleAtNode(node), outedge->getAngleAtNode(node))); - if (angle < 160) { + const SUMOReal signedAngle = NBHelpers::normRelAngle(e->getAngleAtNode(node), outedge->getAngleAtNode(node)); + if (signedAngle > 0 && signedAngle < 177 && e->getGeometry().back().distanceTo2D(outedge->getGeometry().front()) < POSITION_EPS) { + // backwards curving edges can only be turnaround when there are + // non-default endpoints continue; } - if (e->getFromNode() == outedge->getToNode()) { + SUMOReal angle = fabs(signedAngle); + // std::cout << "incoming=" << e->getID() << " outgoing=" << outedge->getID() << " relAngle=" << NBHelpers::relAngle(e->getAngleAtNode(node), outedge->getAngleAtNode(node)) << "\n"; + if (e->getFromNode() == outedge->getToNode() && angle > 120) { // they connect the same nodes; should be the turnaround direction // we'll assign a maximum number // @@ -94,6 +90,9 @@ // be realistic in any means; we will warn, here. angle += 360; } + if (angle < 160) { + continue; + } Combination c; c.from = e; c.to = outedge; @@ -118,7 +117,9 @@ seen.insert((*j).from); seen.insert((*j).to); // set turnaround information - (*j).from->setTurningDestination((*j).to); + bool onlyPossible = (*j).from->getConnections().size() != 0 && !(*j).from->isConnectedTo((*j).to); + //std::cout << " setTurningDestination from=" << (*j).from->getID() << " to=" << (*j).to->getID() << " onlyPossible=" << onlyPossible << "\n"; + (*j).from->setTurningDestination((*j).to, onlyPossible); } } @@ -127,26 +128,60 @@ // NBNodesEdgesSorter // --------------------------------------------------------------------------- void -NBNodesEdgesSorter::sortNodesEdges(NBNodeCont& nc, bool leftHand) { +NBNodesEdgesSorter::sortNodesEdges(NBNodeCont& nc, bool leftHand, bool useNodeShape) { for (std::map::const_iterator i = nc.begin(); i != nc.end(); ++i) { NBNode* n = (*i).second; if (n->myAllEdges.size() == 0) { continue; } - std::vector& allEdges = (*i).second->myAllEdges; - std::vector& incoming = (*i).second->myIncomingEdges; - std::vector& outgoing = (*i).second->myOutgoingEdges; - // sort the edges - std::sort(allEdges.begin(), allEdges.end(), edge_by_junction_angle_sorter(n)); - std::sort(incoming.begin(), incoming.end(), edge_by_junction_angle_sorter(n)); - std::sort(outgoing.begin(), outgoing.end(), edge_by_junction_angle_sorter(n)); - std::vector::iterator j; - for (j = allEdges.begin(); j != allEdges.end() - 1 && j != allEdges.end(); ++j) { - swapWhenReversed(n, leftHand, j, j + 1); - } - if (allEdges.size() > 1 && j != allEdges.end()) { - swapWhenReversed(n, leftHand, allEdges.end() - 1, allEdges.begin()); + EdgeVector& allEdges = (*i).second->myAllEdges; + EdgeVector& incoming = (*i).second->myIncomingEdges; + EdgeVector& outgoing = (*i).second->myOutgoingEdges; + std::vector& crossings = (*i).second->myCrossings; + + if (!useNodeShape || n->getShape().area() < 1) { + // if the area is to small (i.e. for simple-continuation nodes) we better not use it + // sort by the angle of the adjoining line segment of the edge geometry + // sort the edges + std::sort(allEdges.begin(), allEdges.end(), edge_by_junction_angle_sorter(n)); + std::sort(incoming.begin(), incoming.end(), edge_by_junction_angle_sorter(n)); + std::sort(outgoing.begin(), outgoing.end(), edge_by_junction_angle_sorter(n)); + std::vector::iterator j; + for (j = allEdges.begin(); j != allEdges.end() - 1 && j != allEdges.end(); ++j) { + swapWhenReversed(n, leftHand, j, j + 1); + } + if (allEdges.size() > 1 && j != allEdges.end()) { + swapWhenReversed(n, leftHand, allEdges.end() - 1, allEdges.begin()); + } + } else { + NBEdge* firstOfAll = allEdges.front(); + NBEdge* firstOfIncoming = incoming.size() > 0 ? incoming.front() : 0; + NBEdge* firstOfOutgoing = outgoing.size() > 0 ? outgoing.front() : 0; + // sort by the angle between the node shape center and the point where the edge meeds the node shape + sort(allEdges.begin(), allEdges.end(), NBContHelper::edge_by_angle_to_nodeShapeCentroid_sorter(n)); + sort(incoming.begin(), incoming.end(), NBContHelper::edge_by_angle_to_nodeShapeCentroid_sorter(n)); + sort(outgoing.begin(), outgoing.end(), NBContHelper::edge_by_angle_to_nodeShapeCentroid_sorter(n)); + // let the first edge remain the first + rotate(allEdges.begin(), std::find(allEdges.begin(), allEdges.end(), firstOfAll), allEdges.end()); + if (firstOfIncoming != 0) { + rotate(incoming.begin(), std::find(incoming.begin(), incoming.end(), firstOfIncoming), incoming.end()); + } + if (firstOfOutgoing != 0) { + rotate(outgoing.begin(), std::find(outgoing.begin(), outgoing.end(), firstOfOutgoing), outgoing.end()); + } } + + // sort the crossings + std::sort(crossings.begin(), crossings.end(), crossing_by_junction_angle_sorter(n, allEdges)); + // DEBUG + //if (n->getID() == "cluster_492462300_671564296") { + // if (crossings.size() > 0) { + // std::cout << " crossings at " << n->getID() << "\n"; + // for (std::vector::iterator it = crossings.begin(); it != crossings.end(); ++it) { + // std::cout << " " << toString((*it).edges) << "\n"; + // } + // } + //} } } @@ -165,7 +200,7 @@ // is not nice. Maybe we could get rid of it if we would always mark edges // as turnarounds, even if they do not have to be added, as mentioned in // notes on NBTurningDirectionsComputer::computeTurnDirectionsForNode - if (e2->getToNode() == n && e2->isTurningDirectionAt(n, e1)) { + if (e2->getToNode() == n && e2->isTurningDirectionAt(e1)) { std::swap(*i1, *i2); } } @@ -267,6 +302,13 @@ bestOutgoing.push_back(*outgoing.begin()); outgoing.erase(outgoing.begin()); } + // special case: user input makes mainDirection unambiguous + const bool mainDirectionExplicit = ( + bestIncoming.size() == 1 && n.myIncomingEdges.size() <= 2 + && (incoming.size() == 0 || bestIncoming[0]->getPriority() > incoming[0]->getPriority()) + && bestOutgoing.size() == 1 && n.myOutgoingEdges.size() <= 2 + && (outgoing.size() == 0 || bestOutgoing[0]->getPriority() > outgoing[0]->getPriority()) + && !bestIncoming[0]->isTurningDirectionAt(bestOutgoing[0])); // now, let's compute for each of the best incoming edges // the incoming which is most opposite // the outgoing which is most opposite @@ -286,7 +328,7 @@ if (bestIncoming.size() == 1) { // let's mark this road as the best NBEdge* best1 = extractAndMarkFirst(n, bestIncoming); - if (counterIncomingEdges.find(best1) != counterIncomingEdges.end()) { + if (!mainDirectionExplicit && counterIncomingEdges.find(best1) != counterIncomingEdges.end()) { // ok, look, what we want is the opposit of the straight continuation edge // but, what if such an edge does not exist? By now, we'll determine it // geometrically @@ -295,15 +337,15 @@ s->setJunctionPriority(&n, 1); } } - if (bestOutgoing.size() != 0) { - // mark the best outgoing as the continuation - sort(bestOutgoing.begin(), bestOutgoing.end(), NBContHelper::edge_similar_direction_sorter(best1)); - best1 = extractAndMarkFirst(n, bestOutgoing); - if (counterOutgoingEdges.find(best1) != counterOutgoingEdges.end()) { - NBEdge* s = counterOutgoingEdges.find(best1)->second; - if (GeomHelper::getMinAngleDiff(best1->getAngleAtNode(&n), s->getAngleAtNode(&n)) > 180 - 45) { - s->setJunctionPriority(&n, 1); - } + assert(bestOutgoing.size() != 0); + // mark the best outgoing as the continuation + sort(bestOutgoing.begin(), bestOutgoing.end(), NBContHelper::edge_similar_direction_sorter(best1)); + // assign extra priority if the priorities are unambiguous (regardless of geometry) + best1 = extractAndMarkFirst(n, bestOutgoing); + if (!mainDirectionExplicit && counterOutgoingEdges.find(best1) != counterOutgoingEdges.end()) { + NBEdge* s = counterOutgoingEdges.find(best1)->second; + if (GeomHelper::getMinAngleDiff(best1->getAngleAtNode(&n), s->getAngleAtNode(&n)) > 180 - 45) { + s->setJunctionPriority(&n, 1); } } return; @@ -320,13 +362,13 @@ for (i = bestIncoming.begin(); i != bestIncoming.end(); ++i) { EdgeVector::iterator j; NBEdge* t1 = *i; - SUMOReal angle1 = t1->getTotalAngle() + 180; + SUMOReal angle1 = t1->getAngleAtNode(&n) + 180; if (angle1 >= 360) { angle1 -= 360; } for (j = i + 1; j != bestIncoming.end(); ++j) { NBEdge* t2 = *j; - SUMOReal angle2 = t2->getTotalAngle() + 180; + SUMOReal angle2 = t2->getAngleAtNode(&n) + 180; if (angle2 >= 360) { angle2 -= 360; } @@ -353,13 +395,13 @@ NBEdge* -NBEdgePriorityComputer::extractAndMarkFirst(NBNode& n, std::vector& s) { +NBEdgePriorityComputer::extractAndMarkFirst(NBNode& n, std::vector& s, int prio) { if (s.size() == 0) { return 0; } NBEdge* ret = s.front(); s.erase(s.begin()); - ret->setJunctionPriority(&n, 1); + ret->setJunctionPriority(&n, prio); return ret; } @@ -379,5 +421,14 @@ } +NBNodesEdgesSorter::crossing_by_junction_angle_sorter::crossing_by_junction_angle_sorter(const NBNode* node, const EdgeVector& ordering) { + // reorder based on getAngleAtNodeToCenter + myOrdering = ordering; + sort(myOrdering.begin(), myOrdering.end(), NBContHelper::edge_by_angle_to_nodeShapeCentroid_sorter(node)); + // let the first edge remain the first + rotate(myOrdering.begin(), std::find(myOrdering.begin(), myOrdering.end(), ordering.front()), myOrdering.end()); +} + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBAlgorithms.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBAlgorithms.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBAlgorithms.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBAlgorithms.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NBAlgorithms.h /// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @date 02. March 2012 -/// @version $Id: NBAlgorithms.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBAlgorithms.h 18096 2015-03-17 09:50:59Z behrisch $ /// // Algorithms for network computation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -107,9 +108,41 @@ /** @brief Sorts a node's edges clockwise regarding driving direction * @param[in] nc The container of nodes to loop along * @param[in] leftHand Whether the network is left-handed + * @param[in] useNodeShape Whether to sort based on the node shape (instead of only the edge angle) */ - static void sortNodesEdges(NBNodeCont& nc, bool leftHand); + static void sortNodesEdges(NBNodeCont& nc, bool leftHand, bool useNodeShape = false); + /** @class crossing_by_junction_angle_sorter + * @brief Sorts crossings by minimum clockwise clockwise edge angle. Use the + * ordering found in myAllEdges of the given node + */ + class crossing_by_junction_angle_sorter { + public: + explicit crossing_by_junction_angle_sorter(const NBNode* node, const EdgeVector& ordering); + + int operator()(const NBNode::Crossing& c1, const NBNode::Crossing& c2) const { + return (int)(getMinRank(c1.edges) < getMinRank(c2.edges)); + } + + private: + /// @brief retrieves the minimum index in myAllEdges + size_t getMinRank(const EdgeVector& e) const { + size_t result = myOrdering.size(); + for (EdgeVector::const_iterator it = e.begin(); it != e.end(); ++it) { + size_t rank = std::distance(myOrdering.begin(), std::find(myOrdering.begin(), myOrdering.end(), *it)); + result = MIN2(result, rank); + } + return result; + } + + private: + EdgeVector myOrdering; + + private: + /// @brief invalidated assignment operator + crossing_by_junction_angle_sorter& operator=(const crossing_by_junction_angle_sorter& s); + + }; private: /** @brief Assures correct order for same-angle opposite-direction edges * @param[in] n The currently processed node @@ -132,7 +165,7 @@ return getConvAngle(e1) < getConvAngle(e2); } - private: + protected: /// @brief Converts the angle of the edge if it is an incoming edge SUMOReal getConvAngle(NBEdge* e) const { SUMOReal angle = e->getAngleAtNode(myNode); @@ -158,6 +191,7 @@ NBNode* myNode; }; + }; @@ -201,9 +235,10 @@ /** @brief Sets the priorites in case of a priority junction * @param[in] n The node to set edges' priorities * @param[in] s The vector of edges to get and mark the first from + * @param[in] prio The priority to assign * @return The vector's first edge */ - static NBEdge* extractAndMarkFirst(NBNode& n, std::vector& s); + static NBEdge* extractAndMarkFirst(NBNode& n, std::vector& s, int prio = 1); /** @brief Returns whether both edges have the same priority * @param[in] e1 The first edge diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBAlgorithms_Ramps.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBAlgorithms_Ramps.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBAlgorithms_Ramps.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBAlgorithms_Ramps.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file NBAlgorithms_Ramps.cpp /// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch /// @date 29. March 2012 -/// @version $Id: NBAlgorithms_Ramps.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBAlgorithms_Ramps.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Algorithms for highway on-/off-ramps computation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -143,8 +145,8 @@ NBEdge* potHighway, *potRamp, *cont; getOnRampEdges(cur, &potHighway, &potRamp, &cont); // compute the number of lanes to append - const unsigned int firstLaneNumber = potHighway->getNumLanes(); - int toAdd = (potRamp->getNumLanes() + firstLaneNumber) - cont->getNumLanes(); + const unsigned int firstLaneNumber = cont->getNumLanes(); + int toAdd = (potRamp->getNumLanes() + potHighway->getNumLanes()) - firstLaneNumber; NBEdge* first = cont; NBEdge* last = cont; NBEdge* curr = cont; @@ -165,6 +167,12 @@ if (curr->getNumLanes() != firstLaneNumber) { // the number of lanes changes along the computation; we'll stop... curr = 0; + } else if (curr->isTurningDirectionAt(last)) { + // turnarounds certainly should not be included in a ramp + curr = 0; + } else if (curr == potHighway || curr == potRamp) { + // circular connectivity. do not split! + curr = 0; } } else { // ambigous; and, in fact, what should it be? ...stop @@ -187,7 +195,6 @@ } //ec.retrieve(name)->invalidateConnections(); curr = ec.retrieve(name + ADDED_ON_RAMP_EDGE); - curr->invalidateConnections(true); incremented.insert(curr); last = curr; moveRampRight(curr, toAdd); @@ -212,14 +219,6 @@ p.pop_back(); p.push_back(first->getLaneShape(0)[0]); potRamp->setGeometry(p); - // set connections from added ramp to following highway - NBNode* nextN = last->getToNode(); - if (nextN->getOutgoingEdges().size() == 1) { - NBEdge* next = nextN->getOutgoingEdges()[0];//const EdgeVector& o1 = cont->getToNode()->getOutgoingEdges(); - if (next->getNumLanes() < last->getNumLanes()) { - last->addLane2LaneConnections(last->getNumLanes() - next->getNumLanes(), next, 0, next->getNumLanes(), NBEdge::L2L_VALIDATED); - } - } } @@ -228,8 +227,8 @@ NBEdge* potHighway, *potRamp, *prev; getOffRampEdges(cur, &potHighway, &potRamp, &prev); // compute the number of lanes to append - const unsigned int firstLaneNumber = potHighway->getNumLanes(); - int toAdd = (potRamp->getNumLanes() + firstLaneNumber) - prev->getNumLanes(); + const unsigned int firstLaneNumber = prev->getNumLanes(); + int toAdd = (potRamp->getNumLanes() + potHighway->getNumLanes()) - firstLaneNumber; NBEdge* first = prev; NBEdge* last = prev; NBEdge* curr = prev; @@ -250,6 +249,12 @@ if (curr->getNumLanes() != firstLaneNumber) { // the number of lanes changes along the computation; we'll stop... curr = 0; + } else if (last->isTurningDirectionAt(curr)) { + // turnarounds certainly should not be included in a ramp + curr = 0; + } else if (curr == potHighway || curr == potRamp) { + // circular connectivity. do not split! + curr = 0; } } else { // ambigous; and, in fact, what should it be? ...stop @@ -272,7 +277,6 @@ return; } curr = ec.retrieve(name + "-AddedOffRampEdge"); - curr->invalidateConnections(true); incremented.insert(curr); last = curr; moveRampRight(curr, toAdd); @@ -297,14 +301,6 @@ p.pop_front(); p.push_front(first->getLaneShape(0)[-1]); potRamp->setGeometry(p); - // set connections from previous highway to added ramp - NBNode* prevN = last->getFromNode(); - if (prevN->getIncomingEdges().size() == 1) { - NBEdge* prev = prevN->getIncomingEdges()[0];//const EdgeVector& o1 = cont->getToNode()->getOutgoingEdges(); - if (prev->getNumLanes() < last->getNumLanes()) { - last->addLane2LaneConnections(last->getNumLanes() - prev->getNumLanes(), last, 0, prev->getNumLanes(), NBEdge::L2L_VALIDATED); - } - } } @@ -315,8 +311,9 @@ } try { PositionVector g = ramp->getGeometry(); - SUMOReal factor = SUMO_const_laneWidthAndOffset * (SUMOReal)(addedLanes - 1) + SUMO_const_halfLaneAndOffset * (SUMOReal)(addedLanes % 2); - g.move2side(factor); + const SUMOReal offset = (0.5 * addedLanes * + (ramp->getLaneWidth() == NBEdge::UNSPECIFIED_WIDTH ? SUMO_const_laneWidth : ramp->getLaneWidth())); + g.move2side(offset); ramp->setGeometry(g); } catch (InvalidArgument&) { WRITE_WARNING("For edge '" + ramp->getID() + "': could not compute shape."); @@ -417,12 +414,25 @@ if (potHighway->getNumLanes() + potRamp->getNumLanes() <= other->getNumLanes()) { return false; } - // check conditions // is it really a highway? SUMOReal maxSpeed = MAX3(potHighway->getSpeed(), other->getSpeed(), potRamp->getSpeed()); if (maxSpeed < minHighwaySpeed) { return false; } + // is any of the connections a turnaround? + if (other->getToNode() == potHighway->getFromNode()) { + // off ramp + if (other->isTurningDirectionAt(potHighway) || + other->isTurningDirectionAt(potRamp)) { + return false; + } + } else { + // on ramp + if (other->isTurningDirectionAt(potHighway) || + other->isTurningDirectionAt(potRamp)) { + return false; + } + } /* if (potHighway->getSpeed() < minHighwaySpeed || other->getSpeed() < minHighwaySpeed) { return false; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBAlgorithms_Ramps.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBAlgorithms_Ramps.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBAlgorithms_Ramps.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBAlgorithms_Ramps.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NBAlgorithms_Ramps.h /// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @date 29. March 2012 -/// @version $Id: NBAlgorithms_Ramps.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBAlgorithms_Ramps.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Algorithms for highway on-/off-ramps computation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBCapacity2Lanes.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBCapacity2Lanes.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBCapacity2Lanes.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBCapacity2Lanes.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @date Fri, 19 Jul 2002 -/// @version $Id: NBCapacity2Lanes.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBCapacity2Lanes.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A helper class which computes the lane number from given capacity /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBConnection.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBConnection.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBConnection.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBConnection.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NBConnection.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBConnection.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The class holds a description of a connection between two edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -229,6 +229,14 @@ } +void +NBConnection::shiftLaneIndex(NBEdge* edge, int offset) { + if (myFrom == edge) { + myFromLane += offset; + } else if (myTo == edge) { + myToLane += offset; + } +} /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBConnectionDefs.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBConnectionDefs.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBConnectionDefs.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBConnectionDefs.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NBConnectionDefs.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NBConnectionDefs.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBConnectionDefs.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Some container for connections /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBConnection.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBConnection.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBConnection.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBConnection.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Sascha Krieg /// @date Sept 2002 -/// @version $Id: NBConnection.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBConnection.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The class holds a description of a connection between two edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -84,6 +84,9 @@ /// replaces the to-edge by the one given bool replaceTo(NBEdge* which, int whichLane, NBEdge* by, int byLane); + /// @brief patches lane indices refering to the given edge + void shiftLaneIndex(NBEdge* edge, int offset); + /// checks whether the edges are still valid bool check(const NBEdgeCont& ec); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBCont.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBCont.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBCont.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBCont.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @date Mon, 17 Dec 2001 -/// @version $Id: NBCont.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBCont.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Some list definitions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -25,6 +25,9 @@ // =========================================================================== // included modules // =========================================================================== +#include +#include + #ifdef _MSC_VER #include #else @@ -44,6 +47,9 @@ /** container for (sorted) edges */ typedef std::vector EdgeVector; +/** container for unique edges */ +typedef std::set EdgeSet; + /** container for (sorted) lanes. The lanes are sorted from rightmost (id=0) to leftmost (id=nolanes-1) */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBContHelper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBContHelper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBContHelper.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBContHelper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NBContHelper.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NBContHelper.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Some methods for traversing lists of edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -254,6 +254,32 @@ } +int +NBContHelper::edge_by_angle_to_nodeShapeCentroid_sorter::operator()(const NBEdge* e1, const NBEdge* e2) const { + assert(e1->getFromNode() == myNode || e1->getToNode() == myNode); + assert(e2->getFromNode() == myNode || e2->getToNode() == myNode); + const SUMOReal angle1 = e1->getAngleAtNodeToCenter(myNode); + const SUMOReal angle2 = e2->getAngleAtNodeToCenter(myNode); + const SUMOReal absDiff = abs(angle1 - angle2); + + // cannot trust the angle difference hence a heuristic: + if (absDiff < 2 || absDiff > (360 - 2)) { + const bool sameDir = ((e1->getFromNode() == myNode && e2->getFromNode() == myNode) + || (e1->getToNode() == myNode && e2->getToNode() == myNode)); + if (sameDir) { + // put edges that allow pedestrians on the 'outside' + if (e1->getToNode() == myNode) { + return (e1->getPermissions() & SVC_PEDESTRIAN) != 0; + } else { + return (e1->getPermissions() & SVC_PEDESTRIAN) == 0; + } + } else { + // sort incoming before outgoing + return e1->getToNode() == myNode; + } + } + return angle1 < angle2; +} /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBContHelper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBContHelper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBContHelper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBContHelper.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 17 Dec 2001 -/// @version $Id: NBContHelper.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NBContHelper.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Some methods for traversing lists of edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -353,20 +353,36 @@ class opposite_finder { public: /// constructor - opposite_finder(NBEdge* edge, const NBNode* n) - : myReferenceEdge(edge), myAtNode(n) { } + opposite_finder(NBEdge* edge) + : myReferenceEdge(edge) { } bool operator()(NBEdge* e) const { - return e->isTurningDirectionAt(myAtNode, myReferenceEdge) || - myReferenceEdge->isTurningDirectionAt(myAtNode, e); + return e->isTurningDirectionAt(myReferenceEdge) || + myReferenceEdge->isTurningDirectionAt(e); } private: NBEdge* myReferenceEdge; - const NBNode* myAtNode; }; + /** + * edge_by_angle_to_nodeShapeCentroid_sorter + * Class to sort edges by their angle in relation to the node shape + * */ + class edge_by_angle_to_nodeShapeCentroid_sorter { + public: + /// constructor + explicit edge_by_angle_to_nodeShapeCentroid_sorter(const NBNode* n) : myNode(n) {} + + public: + /// comparing operation + int operator()(const NBEdge* e1, const NBEdge* e2) const; + + private: + /// the edge to compute the relative angle of + const NBNode* myNode; + }; }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBDistribution.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBDistribution.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBDistribution.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBDistribution.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NBDistribution.cpp /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NBDistribution.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBDistribution.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The base class for statistical distribution descriptions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBDistribution.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBDistribution.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBDistribution.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBDistribution.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @date Sept 2002 -/// @version $Id: NBDistribution.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBDistribution.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The base class for statistical distribution descriptions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBDistrictCont.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBDistrictCont.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBDistrictCont.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBDistrictCont.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NBDistrictCont.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBDistrictCont.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A container for districts /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBDistrictCont.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBDistrictCont.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBDistrictCont.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBDistrictCont.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NBDistrictCont.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBDistrictCont.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A container for districts /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBDistrict.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBDistrict.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBDistrict.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBDistrict.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NBDistrict.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBDistrict.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A class representing a single district /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBDistrict.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBDistrict.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBDistrict.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBDistrict.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NBDistrict.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBDistrict.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A class representing a single district /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBEdgeCont.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBEdgeCont.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBEdgeCont.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBEdgeCont.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NBEdgeCont.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NBEdgeCont.cpp 18172 2015-03-27 17:02:39Z behrisch $ /// // Storage for edges, including some functionality operating on multiple edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -67,10 +67,11 @@ // method definitions // =========================================================================== NBEdgeCont::NBEdgeCont(NBTypeCont& tc) : + myTypeCont(tc), myEdgesSplit(0), myVehicleClasses2Keep(0), myVehicleClasses2Remove(0), - myTypeCont(tc) + myNeedGeoTransformedPrunningBoundary(false) {} @@ -85,6 +86,18 @@ // set edges dismiss/accept options myEdgesMinSpeed = oc.isSet("keep-edges.min-speed") ? oc.getFloat("keep-edges.min-speed") : -1; myRemoveEdgesAfterJoining = oc.exists("keep-edges.postload") && oc.getBool("keep-edges.postload"); + // we possibly have to load the edges to keep + if (oc.isSet("keep-edges.input-file")) { + std::ifstream strm(oc.getString("keep-edges.input-file").c_str()); + if (!strm.good()) { + throw ProcessError("Could not load names of edges too keep from '" + oc.getString("keep-edges.input-file") + "'."); + } + while (strm.good()) { + std::string name; + strm >> name; + myEdges2Keep.insert(name); + } + } if (oc.isSet("keep-edges.explicit")) { const std::vector edges = oc.getStringVector("keep-edges.explicit"); myEdges2Keep.insert(edges.begin(), edges.end()); @@ -94,16 +107,10 @@ myEdges2Remove.insert(edges.begin(), edges.end()); } if (oc.exists("keep-edges.by-vclass") && oc.isSet("keep-edges.by-vclass")) { - const std::vector classes = oc.getStringVector("keep-edges.by-vclass"); - for (std::vector::const_iterator i = classes.begin(); i != classes.end(); ++i) { - myVehicleClasses2Keep |= getVehicleClassID(*i); - } + myVehicleClasses2Keep = parseVehicleClasses(oc.getStringVector("keep-edges.by-vclass")); } if (oc.exists("remove-edges.by-vclass") && oc.isSet("remove-edges.by-vclass")) { - const std::vector classes = oc.getStringVector("remove-edges.by-vclass"); - for (std::vector::const_iterator i = classes.begin(); i != classes.end(); ++i) { - myVehicleClasses2Remove |= getVehicleClassID(*i); - } + myVehicleClasses2Remove = parseVehicleClasses(oc.getStringVector("remove-edges.by-vclass")); } if (oc.exists("keep-edges.by-type") && oc.isSet("keep-edges.by-type")) { const std::vector types = oc.getStringVector("keep-edges.by-type"); @@ -139,9 +146,7 @@ myPrunningBoundary.push_back(Position(x, y)); } } - if (oc.isSet("keep-edges.in-geo-boundary")) { - NBNetBuilder::transformCoordinates(myPrunningBoundary, false); - } + myNeedGeoTransformedPrunningBoundary = oc.isSet("keep-edges.in-geo-boundary"); } } @@ -225,6 +230,19 @@ } // check whether the edge is within the prunning boundary if (myPrunningBoundary.size() != 0) { + if (myNeedGeoTransformedPrunningBoundary) { + if (GeoConvHelper::getProcessing().usingGeoProjection()) { + NBNetBuilder::transformCoordinates(myPrunningBoundary, false); + } else if (GeoConvHelper::getLoaded().usingGeoProjection()) { + // XXX what if input file with different projections are loaded? + for (int i = 0; i < (int) myPrunningBoundary.size(); i++) { + GeoConvHelper::getLoaded().x2cartesian_const(myPrunningBoundary[i]); + } + } else { + WRITE_ERROR("Cannot prune edges using a geo-boundary because no projection has been loaded"); + } + myNeedGeoTransformedPrunningBoundary = false; + } if (!(edge->getGeometry().getBoxBoundary().grow((SUMOReal) POSITION_EPS).overlapsWith(myPrunningBoundary))) { return true; } @@ -254,6 +272,25 @@ NBEdge* +NBEdgeCont::retrievePossiblySplit(const std::string& id, bool downstream) const { + NBEdge* edge = retrieve(id); + if (edge == 0) { + return 0; + } + const EdgeVector* candidates = downstream ? &edge->getToNode()->getOutgoingEdges() : &edge->getFromNode()->getIncomingEdges(); + while (candidates->size() == 1) { + const std::string& nextID = candidates->front()->getID(); + if (nextID.find(id) != 0 || nextID.size() <= id.size() + 1 || (nextID[id.size()] != '.' && nextID[id.size()] != '-')) { + break; + } + edge = candidates->front(); + candidates = downstream ? &edge->getToNode()->getOutgoingEdges() : &edge->getFromNode()->getIncomingEdges(); + } + return edge; +} + + +NBEdge* NBEdgeCont::retrievePossiblySplit(const std::string& id, const std::string& hint, bool incoming) const { // try to retrieve using the given name (iterative) NBEdge* edge = retrieve(id); @@ -374,7 +411,9 @@ NBEdgeCont::splitAt(NBDistrictCont& dc, NBEdge* edge, NBNode* node, const std::string& firstEdgeName, const std::string& secondEdgeName, - unsigned int noLanesFirstEdge, unsigned int noLanesSecondEdge) { + unsigned int noLanesFirstEdge, unsigned int noLanesSecondEdge, + const SUMOReal speed, + const int changedLeft) { SUMOReal pos; pos = edge->getGeometry().nearest_offset_to_point2D(node->getPosition()); if (pos <= 0) { @@ -386,7 +425,7 @@ return false; } return splitAt(dc, edge, pos, node, firstEdgeName, secondEdgeName, - noLanesFirstEdge, noLanesSecondEdge); + noLanesFirstEdge, noLanesSecondEdge, speed, changedLeft); } @@ -395,7 +434,14 @@ NBEdge* edge, SUMOReal pos, NBNode* node, const std::string& firstEdgeName, const std::string& secondEdgeName, - unsigned int noLanesFirstEdge, unsigned int noLanesSecondEdge) { + unsigned int noLanesFirstEdge, unsigned int noLanesSecondEdge, + const SUMOReal speed, + const int changedLeft + ) { + // there must be at least some overlap between first and second edge + assert(changedLeft > -((int)noLanesFirstEdge)); + assert(changedLeft < (int)noLanesSecondEdge); + // build the new edges' geometries std::pair geoms = edge->getGeometry().splitAt(pos); @@ -409,21 +455,12 @@ geoms.second.push_front(node->getPosition()); } // build and insert the edges - NBEdge* one = new NBEdge(firstEdgeName, - edge->myFrom, node, edge->myType, edge->mySpeed, noLanesFirstEdge, - edge->getPriority(), edge->myLaneWidth, 0, geoms.first, - edge->getStreetName(), edge->myLaneSpreadFunction, true); - for (unsigned int i = 0; i < noLanesFirstEdge && i < edge->getNumLanes(); i++) { - one->setSpeed(i, edge->getLaneSpeed(i)); - } - NBEdge* two = new NBEdge(secondEdgeName, - node, edge->myTo, edge->myType, edge->mySpeed, noLanesSecondEdge, - edge->getPriority(), edge->myLaneWidth, edge->myOffset, geoms.second, - edge->getStreetName(), edge->myLaneSpreadFunction, true); - for (unsigned int i = 0; i < noLanesSecondEdge && i < edge->getNumLanes(); i++) { - two->setSpeed(i, edge->getLaneSpeed(i)); - } + NBEdge* one = new NBEdge(firstEdgeName, edge->myFrom, node, edge, geoms.first, noLanesFirstEdge); + NBEdge* two = new NBEdge(secondEdgeName, node, edge->myTo, edge, geoms.second, noLanesSecondEdge); two->copyConnectionsFrom(edge); + if (speed != -1.) { + two->setSpeed(-1, speed); + } // replace information about this edge within the nodes edge->myFrom->replaceOutgoing(edge, one, 0); edge->myTo->replaceIncoming(edge, two, 0); @@ -432,20 +469,14 @@ edge->myFrom->removeDoubleEdges(); edge->myTo->removeDoubleEdges(); // add connections from the first to the second edge - // check special case: - // one in, one out, the outgoing has one lane more - if (noLanesFirstEdge == noLanesSecondEdge - 1) { - for (unsigned int i = 0; i < one->getNumLanes(); i++) { - if (!one->addLane2LaneConnection(i, two, i + 1, NBEdge::L2L_COMPUTED)) { // !!! Bresenham, here!!! - throw ProcessError("Could not set connection!"); - } - } - one->addLane2LaneConnection(0, two, 0, NBEdge::L2L_COMPUTED); - } else { - for (unsigned int i = 0; i < one->getNumLanes() && i < two->getNumLanes(); i++) { - if (!one->addLane2LaneConnection(i, two, i, NBEdge::L2L_COMPUTED)) {// !!! Bresenham, here!!! - throw ProcessError("Could not set connection!"); - } + // there will be as many connections as there are lanes on the second edge + // by default lanes will be added / discontinued on the right side + // (appropriate for highway on-/off-ramps) + const int offset = (int)one->getNumLanes() - (int)two->getNumLanes() + changedLeft; + for (int i2 = 0; i2 < (int)two->getNumLanes(); i2++) { + const int i1 = MIN2(MAX2((int)0, i2 + offset), (int)one->getNumLanes()); + if (!one->addLane2LaneConnection(i1, two, i2, NBEdge::L2L_COMPUTED)) { + throw ProcessError("Could not set connection!"); } } if (myRemoveEdgesAfterJoining) { @@ -552,17 +583,17 @@ void -NBEdgeCont::computeLanes2Edges() { +NBEdgeCont::computeLanes2Edges(const bool buildCrossingsAndWalkingAreas) { for (EdgeCont::iterator i = myEdges.begin(); i != myEdges.end(); i++) { - (*i).second->computeLanes2Edges(); + (*i).second->computeLanes2Edges(buildCrossingsAndWalkingAreas); } } void -NBEdgeCont::recheckLanes() { +NBEdgeCont::recheckLanes(const bool buildCrossingsAndWalkingAreas) { for (EdgeCont::iterator i = myEdges.begin(); i != myEdges.end(); i++) { - (*i).second->recheckLanes(); + (*i).second->recheckLanes(buildCrossingsAndWalkingAreas); } } @@ -637,11 +668,20 @@ } speed /= edges.size(); // build the new edge - // @bug new edge does not know about allowed vclass of old edges - // @bug both the width and the offset are not regarded NBEdge* newEdge = new NBEdge(id, from, to, "", speed, nolanes, priority, NBEdge::UNSPECIFIED_WIDTH, NBEdge::UNSPECIFIED_OFFSET, tpledge->getStreetName(), tpledge->myLaneSpreadFunction); + // copy lane attributes + int laneIndex = 0; + for (i = edges.begin(); i != edges.end(); ++i) { + const std::vector& lanes = (*i)->getLanes(); + for (int j = 0; j < (int)lanes.size(); ++j) { + newEdge->setPermissions(lanes[j].permissions, laneIndex); + newEdge->setLaneWidth(laneIndex, lanes[j].width); + newEdge->setEndOffset(laneIndex, lanes[j].endOffset); + laneIndex++; + } + } insert(newEdge, true); // replace old edge by current within the nodes // and delete the old @@ -707,8 +747,8 @@ void NBEdgeCont::recheckPostProcessConnections() { for (std::vector::const_iterator i = myConnections.begin(); i != myConnections.end(); ++i) { - NBEdge* from = retrieve((*i).from); - NBEdge* to = retrieve((*i).to); + NBEdge* from = retrievePossiblySplit((*i).from, true); + NBEdge* to = retrievePossiblySplit((*i).to, false); if (from != 0 && to != 0) { if (!from->addLane2LaneConnection((*i).fromLane, to, (*i).toLane, NBEdge::L2L_USER, false, (*i).mayDefinitelyPass)) { WRITE_WARNING("Could not insert connection between '" + (*i).from + "' and '" + (*i).to + "' after build."); @@ -777,13 +817,19 @@ void -NBEdgeCont::guessRoundabouts(std::vector& marked) { - // step 1: keep only those edges which have no turnarounds +NBEdgeCont::guessRoundabouts() { + myGuessedRoundabouts.clear(); + std::set loadedRoundaboutEdges; + for (std::set::const_iterator it = myRoundabouts.begin(); it != myRoundabouts.end(); ++it) { + loadedRoundaboutEdges.insert(it->begin(), it->end()); + } + // step 1: keep only those edges which have no turnarounds and which are not + // part of a loaded roundabout std::set candidates; for (EdgeCont::const_iterator i = myEdges.begin(); i != myEdges.end(); ++i) { NBEdge* e = (*i).second; NBNode* const to = e->getToNode(); - if (e->getTurnDestination() == 0 && to->getConnectionTo(e->getFromNode()) == 0) { + if (e->getTurnDestination() == 0 && to->getConnectionTo(e->getFromNode()) == 0 && loadedRoundaboutEdges.count(e) == 0) { candidates.insert(e); } } @@ -854,32 +900,58 @@ e = left; } } while (doLoop); - // mark collected edges in the case a loop (roundabout) was found if (doLoop) { - std::set loopEdgesSet(loopEdges.begin(), loopEdges.end()); - for (std::set::const_iterator j = loopEdgesSet.begin(); j != loopEdgesSet.end(); ++j) { - // disable turnarounds on incoming edges - NBNode* node = (*j)->getToNode(); - const EdgeVector& incoming = node->getIncomingEdges(); - for (EdgeVector::const_iterator k = incoming.begin(); k != incoming.end(); ++k) { - NBEdge* inEdge = *k; - if (loopEdgesSet.count(inEdge) > 0) { - continue; - } - if ((inEdge)->getStep() >= NBEdge::LANES2LANES_USER) { - continue; - } - inEdge->removeFromConnections(inEdge->getTurnDestination(), -1); + // collected edges are marked in markRoundabouts + myGuessedRoundabouts.insert(EdgeSet(loopEdges.begin(), loopEdges.end())); + } + } +} + + +const std::set +NBEdgeCont::getRoundabouts() const { + std::set result = myRoundabouts; + result.insert(myGuessedRoundabouts.begin(), myGuessedRoundabouts.end()); + return result; +} + + +void +NBEdgeCont::addRoundabout(const EdgeSet& roundabout) { + if (find(myRoundabouts.begin(), myRoundabouts.end(), roundabout) != myRoundabouts.end()) { + WRITE_WARNING("Ignoring duplicate roundabout: " + toString(roundabout)); + } else { + myRoundabouts.insert(roundabout); + } +} + + +void +NBEdgeCont::markRoundabouts() { + const std::set roundabouts = getRoundabouts(); + for (std::set::const_iterator it = roundabouts.begin(); it != roundabouts.end(); ++it) { + const EdgeSet roundaboutSet = *it; + for (std::set::const_iterator j = roundaboutSet.begin(); j != roundaboutSet.end(); ++j) { + // disable turnarounds on incoming edges + NBNode* node = (*j)->getToNode(); + const EdgeVector& incoming = node->getIncomingEdges(); + for (EdgeVector::const_iterator k = incoming.begin(); k != incoming.end(); ++k) { + NBEdge* inEdge = *k; + if (roundaboutSet.count(inEdge) > 0) { + continue; } - // let the connections to succeeding roundabout edge have a higher priority - (*j)->setJunctionPriority(node, 1000); + if ((inEdge)->getStep() >= NBEdge::LANES2LANES_USER) { + continue; + } + inEdge->removeFromConnections(inEdge->getTurnDestination(), -1); } - marked.push_back(loopEdges); + // let the connections to succeeding roundabout edge have a higher priority + (*j)->setJunctionPriority(node, 1000); + node->setRoundabout(); } } } - void NBEdgeCont::generateStreetSigns() { for (EdgeCont::iterator i = myEdges.begin(); i != myEdges.end(); ++i) { @@ -917,4 +989,25 @@ } } + +int +NBEdgeCont::guessSidewalks(SUMOReal width, SUMOReal minSpeed, SUMOReal maxSpeed, bool fromPermissions) { + int sidewalksCreated = 0; + for (EdgeCont::iterator it = myEdges.begin(); it != myEdges.end(); it++) { + NBEdge* edge = it->second; + if (( + // guess.from-permissions + (fromPermissions && (edge->getPermissions() & SVC_PEDESTRIAN) != 0) + // guess from speed + || (!fromPermissions && edge->getSpeed() > minSpeed && edge->getSpeed() <= maxSpeed)) + // does not yet have a sidewalk + && edge->getPermissions(0) != SVC_PEDESTRIAN) { + edge->addSidewalk(width); + sidewalksCreated += 1; + } + } + return sidewalksCreated; +} + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBEdgeCont.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBEdgeCont.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBEdgeCont.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBEdgeCont.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NBEdgeCont.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBEdgeCont.h 18096 2015-03-17 09:50:59Z behrisch $ /// // Storage for edges, including some functionality operating on multiple edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -124,6 +124,19 @@ /** @brief Tries to retrieve an edge, even if it is splitted * + * The edge given with the id should exist and is followed downstream or upstream, + * depending on the parameter to the last edge still starting with the id. + * + * @param[in] id The id of the edge to retrieve + * @param[in] downstream search direction + * @return The searched edge + * @todo Recheck usage + */ + NBEdge* retrievePossiblySplit(const std::string& id, bool downstream) const; + + + /** @brief Tries to retrieve an edge, even if it is splitted + * * To describe which part of the edge shall be returned, the * id of a second edge, participating at the node and the information * whether to return the outgoing or the incoming is needed. @@ -224,13 +237,17 @@ * @param[in] secondEdgeName The id the second part of the split edge shall have * @param[in] noLanesFirstEdge The number of lanes the second part of the split edge shall have * @param[in] noLanesSecondEdge The number of lanes the second part of the split edge shall have + * @param[in] speed The speed for the edge after the split + * @param[in] changedLeft The number of lanes that is added or removed on the left side of the edge + * (By default all added/removed lanes are assumed to be on the right when computing connections) * @return Whether the edge could be split * @exception ProcessError If connections between the edges can not be built * @see NBEdge::splitAt(NBDistrictCont &, NBEdge *, SUMOReal, NBNode *, const std::string &, const std::string &, unsigned int , unsigned int) */ bool splitAt(NBDistrictCont& dc, NBEdge* edge, NBNode* node, const std::string& firstEdgeName, const std::string& secondEdgeName, - unsigned int noLanesFirstEdge, unsigned int noLanesSecondEdge); + unsigned int noLanesFirstEdge, unsigned int noLanesSecondEdge, + const SUMOReal speed = -1., const int changedLeft = 0); /** @brief Splits the edge at the position nearest to the given node using the given modifications @@ -242,12 +259,16 @@ * @param[in] secondEdgeName The id the second part of the split edge shall have * @param[in] noLanesFirstEdge The number of lanes the second part of the split edge shall have * @param[in] noLanesSecondEdge The number of lanes the second part of the split edge shall have + * @param[in] speed The speed for the edge after the split + * @param[in] changedLeft The number of lanes that is added or removed on the left side of the edge + * (By default all added/removed lanes are assumed to be on the right when computing connections) * @return Whether the edge could be split * @exception ProcessError If connections between the edges can not be built */ bool splitAt(NBDistrictCont& dc, NBEdge* edge, SUMOReal edgepos, NBNode* node, const std::string& firstEdgeName, const std::string& secondEdgeName, - unsigned int noLanesFirstEdge, unsigned int noLanesSecondEdge); + unsigned int noLanesFirstEdge, unsigned int noLanesSecondEdge, + const SUMOReal speed = -1., const int changedLeft = 0); /// @} @@ -350,7 +371,7 @@ * @todo Recheck whether a visitor-pattern should be used herefor * @see NBEdge::computeLanes2Edges */ - void computeLanes2Edges(); + void computeLanes2Edges(const bool buildCrossingsAndWalkingAreas); /** @brief Rechecks whether all lanes have a successor for each of the stored edges @@ -360,7 +381,7 @@ * @todo Recheck whether a visitor-pattern should be used herefor * @see NBEdge::recheckLanes */ - void recheckLanes(); + void recheckLanes(const bool buildCrossingsAndWalkingAreas); /** @brief Appends turnarounds to all edges stored in the container @@ -433,7 +454,7 @@ /** @brief Determines which edges belong to roundabouts and increases their priority * @param[out] marked Edges which belong to a roundabout are stored here */ - void guessRoundabouts(std::vector& marked); + void guessRoundabouts(); /** @brief Returns whether the built edges are left-handed @@ -485,6 +506,21 @@ /// @brief assigns street signs to edges based on toNode types void generateStreetSigns(); + /// @brief add sidwalks to edges within the given limits or permissions and return the number of edges affected + int guessSidewalks(SUMOReal width, SUMOReal minSpeed, SUMOReal maxSpeed, bool fromPermissions); + + + /** @brief Returns the determined roundabouts + * @return The list of roundabout edges + */ + const std::set getRoundabouts() const; + + /// @brief add user specified roundabout + void addRoundabout(const EdgeSet& roundabout); + + /// @brief mark edge priorities and prohibit turn-arounds for all roundabout edges + void markRoundabouts(); + private: /** @brief Returns the edges which have been built by splitting the edge of the given id * @@ -498,8 +534,10 @@ /// @brief Returns true if this edge matches one of the removal criteria bool ignoreFilterMatch(NBEdge* edge); - private: + /// @brief The network builder; used to obtain type information + NBTypeCont& myTypeCont; + /** @struct PostProcessConnection * @brief A structure representing a connection between two lanes */ @@ -579,11 +617,15 @@ /// @brief Boundary within which an edge must be located in order to be kept PositionVector myPrunningBoundary; - /// @} + /// @brief whether a geo transform has been applied to the pruning boundary + bool myNeedGeoTransformedPrunningBoundary; + /// @} - /// @brief The network builder; used to obtain type information - NBTypeCont& myTypeCont; + /// @brief Edges marked as belonging to a roundabout by the user (each EdgeVector is a roundabout) + std::set myRoundabouts; + /// @brief Edges marked as belonging to a roundabout after guessing + std::set myGuessedRoundabouts; private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBEdge.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBEdge.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBEdge.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBEdge.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Tue, 20 Nov 2001 -/// @version $Id: NBEdge.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NBEdge.cpp 18122 2015-03-20 16:03:12Z namdre $ /// // Methods for the representation of a single edge /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -62,13 +62,21 @@ // static members // =========================================================================== const SUMOReal NBEdge::UNSPECIFIED_WIDTH = -1; -const SUMOReal NBEdge::UNSPECIFIED_LOADED_LENGTH = -1; const SUMOReal NBEdge::UNSPECIFIED_OFFSET = 0; +const SUMOReal NBEdge::UNSPECIFIED_SPEED = -1; + +const SUMOReal NBEdge::UNSPECIFIED_SIGNAL_OFFSET = -1; +const SUMOReal NBEdge::UNSPECIFIED_LOADED_LENGTH = -1; const SUMOReal NBEdge::ANGLE_LOOKAHEAD = 10.0; // =========================================================================== // method definitions // =========================================================================== +std::string +NBEdge::Connection:: getInternalLaneID() const { + return id + "_" + toString(internalLaneIndex); +} + /* ------------------------------------------------------------------------- * NBEdge::ToEdgeConnectionsAdder-methods * ----------------------------------------------------------------------- */ @@ -183,11 +191,13 @@ myStartAngle(0), myEndAngle(0), myTotalAngle(0), myPriority(priority), mySpeed(speed), myTurnDestination(0), + myPossibleTurnDestination(0), myFromJunctionPriority(-1), myToJunctionPriority(-1), - myLaneSpreadFunction(spread), myOffset(offset), myLaneWidth(laneWidth), + myLaneSpreadFunction(spread), myEndOffset(offset), myLaneWidth(laneWidth), myLoadedLength(UNSPECIFIED_LOADED_LENGTH), myAmLeftHand(false), myAmInnerEdge(false), myAmMacroscopicConnector(false), - myStreetName(streetName) { + myStreetName(streetName), + mySignalOffset(UNSPECIFIED_SIGNAL_OFFSET) { init(nolanes, false); } @@ -205,16 +215,18 @@ myStartAngle(0), myEndAngle(0), myTotalAngle(0), myPriority(priority), mySpeed(speed), myTurnDestination(0), + myPossibleTurnDestination(0), myFromJunctionPriority(-1), myToJunctionPriority(-1), - myGeom(geom), myLaneSpreadFunction(spread), myOffset(offset), myLaneWidth(laneWidth), + myGeom(geom), myLaneSpreadFunction(spread), myEndOffset(offset), myLaneWidth(laneWidth), myLoadedLength(UNSPECIFIED_LOADED_LENGTH), myAmLeftHand(false), myAmInnerEdge(false), myAmMacroscopicConnector(false), - myStreetName(streetName) { + myStreetName(streetName), + mySignalOffset(UNSPECIFIED_SIGNAL_OFFSET) { init(nolanes, tryIgnoreNodePositions); } -NBEdge::NBEdge(const std::string& id, NBNode* from, NBNode* to, NBEdge* tpl) : +NBEdge::NBEdge(const std::string& id, NBNode* from, NBNode* to, NBEdge* tpl, const PositionVector& geom, int numLanes) : Named(StringUtils::convertUmlaute(id)), myStep(INIT), myType(tpl->getTypeID()), @@ -222,17 +234,27 @@ myStartAngle(0), myEndAngle(0), myTotalAngle(0), myPriority(tpl->getPriority()), mySpeed(tpl->getSpeed()), myTurnDestination(0), + myPossibleTurnDestination(0), myFromJunctionPriority(-1), myToJunctionPriority(-1), + myGeom(geom), myLaneSpreadFunction(tpl->getLaneSpreadFunction()), - myOffset(tpl->getOffset()), + myEndOffset(tpl->getEndOffset()), myLaneWidth(tpl->getLaneWidth()), - myLoadedLength(UNSPECIFIED_LOADED_LENGTH), myAmLeftHand(false), - myAmInnerEdge(false), myAmMacroscopicConnector(false), - myStreetName(tpl->getStreetName()) { - init(tpl->getNumLanes(), false); + myLoadedLength(UNSPECIFIED_LOADED_LENGTH), + myAmLeftHand(false), + myAmInnerEdge(false), + myAmMacroscopicConnector(false), + myStreetName(tpl->getStreetName()), + mySignalOffset(to == tpl->myTo ? tpl->mySignalOffset : UNSPECIFIED_SIGNAL_OFFSET) { + init(numLanes > 0 ? numLanes : tpl->getNumLanes(), myGeom.size() > 0); for (unsigned int i = 0; i < getNumLanes(); i++) { - setSpeed(i, tpl->getLaneSpeed(i)); - setPermissions(tpl->getPermissions(i), i); + const unsigned int tplIndex = MIN2(i, tpl->getNumLanes() - 1); + setSpeed(i, tpl->getLaneSpeed(tplIndex)); + setPermissions(tpl->getPermissions(tplIndex), i); + setLaneWidth(i, tpl->myLanes[tplIndex].width); + if (to == tpl->myTo) { + setEndOffset(i, tpl->myLanes[tplIndex].endOffset); + } } } @@ -254,18 +276,34 @@ myFrom = from; myTo = to; myPriority = priority; - mySpeed = speed; //?myTurnDestination(0), //?myFromJunctionPriority(-1), myToJunctionPriority(-1), myGeom = geom; myLaneSpreadFunction = spread; - myOffset = offset; - myLaneWidth = laneWidth; myLoadedLength = UNSPECIFIED_LOADED_LENGTH; myStreetName = streetName; //?, myAmTurningWithAngle(0), myAmTurningOf(0), //?myAmInnerEdge(false), myAmMacroscopicConnector(false) + + // preserve lane-specific settings (geometry must be recomputed) + // if new lanes are added they copy the values from the leftmost lane (if specified) + const std::vector oldLanes = myLanes; init(nolanes, tryIgnoreNodePositions); + for (int i = 0; i < (int)nolanes; ++i) { + PositionVector newShape = myLanes[i].shape; + myLanes[i] = oldLanes[MIN2(i, (int)oldLanes.size() - 1)]; + myLanes[i].shape = newShape; + } + // however, if the new edge defaults are explicityly given, they override the old settings + if (offset != UNSPECIFIED_OFFSET) { + setEndOffset(-1, offset); + } + if (laneWidth != UNSPECIFIED_WIDTH) { + setLaneWidth(-1, laneWidth); + } + if (speed != UNSPECIFIED_SPEED) { + setSpeed(-1, speed); + } } @@ -285,6 +323,7 @@ myTo = to; myTo->addIncomingEdge(this); } + computeAngle(); } @@ -343,6 +382,7 @@ for (unsigned int i = 0; i < myLanes.size(); i++) { myLanes[i].shape.reshiftRotate(xoff, yoff, 0); } + computeAngle(); // update angles because they are numerically sensitive (especially where based on centroids) } @@ -421,6 +461,7 @@ avgLength += myLanes[i].shape.length(); } myLength = avgLength / (SUMOReal) myLanes.size(); + computeAngle(); // update angles using the finalized node and lane shapes } @@ -715,8 +756,8 @@ bool -NBEdge::hasConnectionTo(NBEdge* destEdge, unsigned int destLane) const { - return destEdge != 0 && find_if(myConnections.begin(), myConnections.end(), connections_toedgelane_finder(destEdge, destLane)) != myConnections.end(); +NBEdge::hasConnectionTo(NBEdge* destEdge, unsigned int destLane, int fromLane) const { + return destEdge != 0 && find_if(myConnections.begin(), myConnections.end(), connections_toedgelane_finder(destEdge, destLane, fromLane)) != myConnections.end(); } @@ -746,6 +787,15 @@ } } } + for (std::vector::iterator it = myConnectionsToDelete.begin(); it != myConnectionsToDelete.end(); ++it) { + if (it->fromLane < 0 && it->toLane < 0) { + // found an edge that shall not be connected + EdgeVector::iterator forbidden = find(outgoing.begin(), outgoing.end(), it->toEdge); + if (forbidden != outgoing.end()) { + outgoing.erase(forbidden); + } + } + } // allocate the sorted container unsigned int size = (unsigned int) outgoing.size(); EdgeVector* edges = new EdgeVector(); @@ -833,6 +883,9 @@ if (myTurnDestination == toEdge && fromLane < 0) { myTurnDestination = 0; } + if (myPossibleTurnDestination == toEdge && fromLane < 0) { + myPossibleTurnDestination = 0; + } if (tryLater) { myConnectionsToDelete.push_back(Connection(fromLane, toEdge, toLane)); } @@ -927,18 +980,29 @@ } +bool +NBEdge::canMoveConnection(const Connection& con, unsigned int newFromLane, const bool buildCrossingsAndWalkingAreas) const { + // only allow using newFromLane if at least 1 vClass is permitted to use + // this connection. If the connection shall be moved to a sidewalk, only create the connection if there is no walking area + const SVCPermissions common = (getPermissions(newFromLane) & con.toEdge->getPermissions(con.toLane)); + return (common > 0 && (!buildCrossingsAndWalkingAreas || common != SVC_PEDESTRIAN)); +} + + void -NBEdge::moveConnectionToLeft(unsigned int lane) { +NBEdge::moveConnectionToLeft(unsigned int lane, const bool buildCrossingsAndWalkingAreas) { unsigned int index = 0; if (myAmLeftHand) { for (int i = (int) myConnections.size() - 1; i >= 0; --i) { - if (myConnections[i].fromLane == static_cast(lane) && getTurnDestination() != myConnections[i].toEdge) { + if (myConnections[i].fromLane == (int)lane + && getTurnDestination() != myConnections[i].toEdge + && canMoveConnection(myConnections[i], lane + 1, buildCrossingsAndWalkingAreas)) { index = i; } } } else { for (unsigned int i = 0; i < myConnections.size(); ++i) { - if (myConnections[i].fromLane == static_cast(lane)) { + if (myConnections[i].fromLane == (int)(lane) && canMoveConnection(myConnections[i], lane + 1, buildCrossingsAndWalkingAreas)) { index = i; } } @@ -951,10 +1015,10 @@ void -NBEdge::moveConnectionToRight(unsigned int lane) { +NBEdge::moveConnectionToRight(unsigned int lane, const bool buildCrossingsAndWalkingAreas) { if (myAmLeftHand) { for (int i = (int) myConnections.size() - 1; i >= 0; --i) { - if (myConnections[i].fromLane == static_cast(lane) && getTurnDestination() != myConnections[i].toEdge) { + if (myConnections[i].fromLane == (int)lane && getTurnDestination() != myConnections[i].toEdge && canMoveConnection(myConnections[i], lane - 1, buildCrossingsAndWalkingAreas)) { Connection c = myConnections[i]; myConnections.erase(myConnections.begin() + i); setConnection(lane - 1, c.toEdge, c.toLane, L2L_VALIDATED, false); @@ -963,7 +1027,7 @@ } } else { for (std::vector::iterator i = myConnections.begin(); i != myConnections.end(); ++i) { - if ((*i).fromLane == static_cast(lane)) { + if ((*i).fromLane == (int)lane && canMoveConnection(*i, lane - 1, buildCrossingsAndWalkingAreas)) { Connection c = *i; i = myConnections.erase(i); setConnection(lane - 1, c.toEdge, c.toLane, L2L_VALIDATED, false); @@ -974,31 +1038,41 @@ } - - - - - - - - void -NBEdge::buildInnerEdges(const NBNode& n, unsigned int noInternalNoSplits, unsigned int& lno, unsigned int& splitNo) { +NBEdge::buildInnerEdges(const NBNode& n, unsigned int noInternalNoSplits, unsigned int& linkIndex, unsigned int& splitIndex) { std::string innerID = ":" + n.getID(); + NBEdge* toEdge = 0; + unsigned int edgeIndex = linkIndex; + unsigned int internalLaneIndex = 0; for (std::vector::iterator i = myConnections.begin(); i != myConnections.end(); ++i) { Connection& con = *i; con.haveVia = false; // reset first since this may be called multiple times if (con.toEdge == 0) { continue; } - - PositionVector shape = n.computeInternalLaneShape(this, con.fromLane, con.toEdge, con.toLane); + if (con.toEdge != toEdge) { + // skip indices to keep some correspondence between edge ids and link indices: + // internalEdgeIndex + internalLaneIndex = linkIndex + edgeIndex = linkIndex; + toEdge = (*i).toEdge; + internalLaneIndex = 0; + } + PositionVector shape = n.computeInternalLaneShape(this, con); + std::vector foeInternalLinks; LinkDirection dir = n.getDirection(this, con.toEdge); + const bool isRightTurn = (dir == LINKDIR_RIGHT || dir == LINKDIR_PARTRIGHT); + const bool isTurn = (isRightTurn || dir == LINKDIR_LEFT || dir == LINKDIR_PARTLEFT); + if (dir != LINKDIR_STRAIGHT && shape.length() < POSITION_EPS) { + WRITE_WARNING("Connection '" + getID() + "_" + toString(con.fromLane) + "->" + con.toEdge->getID() + "_" + toString(con.toLane) + "' is only " + toString(shape.length()) + " short."); + } + + // crossingPosition, list of foe link indices std::pair > crossingPositions(-1, std::vector()); - std::string foeInternalLanes; std::set tmpFoeIncomingLanes; switch (dir) { + case LINKDIR_RIGHT: + case LINKDIR_PARTRIGHT: case LINKDIR_LEFT: case LINKDIR_PARTLEFT: case LINKDIR_TURN: { @@ -1010,40 +1084,70 @@ if ((*k2).toEdge == 0) { continue; } - bool needsCont = n.needsCont(this, con.toEdge, *i2, (*k2).toEdge, *k2); + bool needsCont = n.needsCont(this, *i2, con, *k2); // compute the crossing point if (needsCont) { crossingPositions.second.push_back(index); - const PositionVector otherShape = n.computeInternalLaneShape(*i2, (*k2).fromLane, (*k2).toEdge, (*k2).toLane); - const std::vector dv = shape.intersectsAtLengths2D(otherShape); - if (dv.size() > 0) { - const SUMOReal minDV = dv[0]; - if (minDV < shape.length() - .1 && minDV > .1) { // !!!? - assert(minDV >= 0); - if (crossingPositions.first < 0 || crossingPositions.first > minDV) { - crossingPositions.first = minDV; - } + const PositionVector otherShape = n.computeInternalLaneShape(*i2, *k2); + // vehicles are typically less wide than the lane + // they drive on but but bicycle lanes should be kept clear for their whole width + SUMOReal width2 = (*k2).toEdge->getLaneWidth((*k2).toLane); + if ((*k2).toEdge->getPermissions((*k2).toLane) != SVC_BICYCLE) { + width2 *= 0.5; + } + const SUMOReal minDV = firstIntersection(shape, otherShape, width2); + if (minDV < shape.length() - POSITION_EPS && minDV > POSITION_EPS) { // !!!? + assert(minDV >= 0); + if (crossingPositions.first < 0 || crossingPositions.first > minDV) { + crossingPositions.first = minDV; } } } + const bool rightTurnConflict = n.rightTurnConflict( + this, con.toEdge, con.fromLane, (*i2), (*k2).toEdge, (*k2).fromLane); // compute foe internal lanes - if (n.foes(this, con.toEdge, *i2, (*k2).toEdge)) { - if (foeInternalLanes.length() != 0) { - foeInternalLanes += " "; - } - foeInternalLanes += (":" + n.getID() + "_" + toString(index) + "_0"); + if (n.foes(this, con.toEdge, *i2, (*k2).toEdge) || rightTurnConflict) { + foeInternalLinks.push_back(index); } // compute foe incoming lanes const bool signalised = hasSignalisedConnectionTo(con.toEdge); - if (n.forbids(*i2, (*k2).toEdge, this, con.toEdge, signalised) && (needsCont || dir == LINKDIR_TURN)) { + if ((n.forbids(*i2, (*k2).toEdge, this, con.toEdge, signalised) || rightTurnConflict) && (needsCont || dir == LINKDIR_TURN)) { tmpFoeIncomingLanes.insert((*i2)->getID() + "_" + toString((*k2).fromLane)); } index++; } } - if (dir == LINKDIR_TURN && crossingPositions.first < 0 && crossingPositions.second.size() != 0) { - // let turnarounds wait in the middle if no other crossing point was found - crossingPositions.first = (SUMOReal) shape.length() / 2.; + // foe pedestrian crossings + const std::vector& crossings = n.getCrossings(); + for (std::vector::const_iterator it_c = crossings.begin(); it_c != crossings.end(); ++it_c) { + const NBNode::Crossing& crossing = *it_c; + for (EdgeVector::const_iterator it_e = crossing.edges.begin(); it_e != crossing.edges.end(); ++it_e) { + const NBEdge* edge = *it_e; + // compute foe internal lanes + if (this == edge || con.toEdge == edge) { + foeInternalLinks.push_back(index); + if (con.toEdge == edge && + ((isRightTurn && getJunctionPriority(&n) > 0) || (isTurn && n.isTLControlled()))) { + // build internal junctions (not for left turns at uncontrolled intersections) + PositionVector crossingShape = crossing.shape; + crossingShape.extrapolate(1.0); // sometimes shapes miss each other by a small margin + const SUMOReal minDV = firstIntersection(shape, crossingShape, crossing.width / 2); + if (minDV < shape.length() - POSITION_EPS && minDV > POSITION_EPS) { + assert(minDV >= 0); + if (crossingPositions.first < 0 || crossingPositions.first > minDV) { + crossingPositions.first = minDV; + } + } + } + } + } + index++; + } + + if (dir == LINKDIR_TURN && crossingPositions.first < 0 && crossingPositions.second.size() != 0 && shape.length() > 2. * POSITION_EPS) { + // let turnarounds wait in the middle if no other crossing point was found and it has a sensible length + // (if endOffset is used, the crossing point is in the middle of the part within the junction shape) + crossingPositions.first = (SUMOReal)(shape.length() + getEndOffset(con.fromLane)) / 2.; } } break; @@ -1052,14 +1156,16 @@ } - // compute the maximum speed allowed + // @todo compute the maximum speed allowed based on angular velocity // see !!! for an explanation (with a_lat_mean ~0.3) + /* SUMOReal vmax = (SUMOReal) 0.3 * (SUMOReal) 9.80778 * getLaneShape(con.fromLane).back().distanceTo( con.toEdge->getLaneShape(con.toLane).front()) / (SUMOReal) 2.0 / (SUMOReal) M_PI; vmax = MIN2(vmax, ((getSpeed() + con.toEdge->getSpeed()) / (SUMOReal) 2.0)); - vmax = (getSpeed() + con.toEdge->getSpeed()) / (SUMOReal) 2.0; + */ + SUMOReal vmax = (getSpeed() + con.toEdge->getSpeed()) / (SUMOReal) 2.0; // Position end = con.toEdge->getLaneShape(con.toLane).front(); Position beg = getLaneShape(con.fromLane).back(); @@ -1068,34 +1174,52 @@ // get internal splits if any if (crossingPositions.first >= 0) { std::pair split = shape.splitAt(crossingPositions.first); - con.id = innerID + "_" + toString(lno); - con.vmax = vmax; + con.id = innerID + "_" + toString(edgeIndex); con.shape = split.first; - con.foeInternalLanes = foeInternalLanes; - con.foeIncomingLanes = ""; // reset first because this may be called multiple times - - for (std::set::iterator q = tmpFoeIncomingLanes.begin(); q != tmpFoeIncomingLanes.end(); ++q) { - if (con.foeIncomingLanes.length() != 0) { - con.foeIncomingLanes += " "; - } - con.foeIncomingLanes += *q; - } - con.viaID = innerID + "_" + toString(splitNo + noInternalNoSplits); + con.foeIncomingLanes = joinToString(tmpFoeIncomingLanes, " "); + con.foeInternalLinks = foeInternalLinks; // resolve link indices to lane ids later + con.viaID = innerID + "_" + toString(splitIndex + noInternalNoSplits); + ++splitIndex; con.viaVmax = vmax; con.viaShape = split.second; con.haveVia = true; - splitNo++; } else { - con.id = innerID + "_" + toString(lno); - con.vmax = vmax; + con.id = innerID + "_" + toString(edgeIndex); con.shape = shape; } + con.vmax = vmax; + con.internalLaneIndex = internalLaneIndex; + ++internalLaneIndex; + ++linkIndex; + } +} - lno++; +SUMOReal +NBEdge::firstIntersection(const PositionVector& v1, const PositionVector& v2, SUMOReal width2) { + SUMOReal intersect = std::numeric_limits::max(); + if (v2.length() < POSITION_EPS) { + return intersect; + } + PositionVector v2Right = v2; + v2Right.move2side(width2); + + PositionVector v2Left = v2; + v2Left.move2side(-width2); + + // intersect center line of v1 with left and right border of v2 + std::vector tmp = v1.intersectsAtLengths2D(v2Right); + if (tmp.size() > 0) { + intersect = MIN2(intersect, tmp[0]); + } + tmp = v1.intersectsAtLengths2D(v2Left); + if (tmp.size() > 0) { + intersect = MIN2(intersect, tmp[0]); } + return intersect; } + // ----------- int NBEdge::getJunctionPriority(const NBNode* const node) const { @@ -1129,9 +1253,27 @@ } +SUMOReal +NBEdge::getAngleAtNodeToCenter(const NBNode* const atNode) const { + if (atNode == myFrom) { + SUMOReal res = myStartAngle - 180; + if (res < 0) { + res += 360; + } + return res; + } else { + assert(atNode == myTo); + return myEndAngle; + } +} + + void -NBEdge::setTurningDestination(NBEdge* e) { - myTurnDestination = e; +NBEdge::setTurningDestination(NBEdge* e, bool onlyPossible) { + if (!onlyPossible) { + myTurnDestination = e; + } + myPossibleTurnDestination = e; } @@ -1157,7 +1299,6 @@ offset += (getLaneWidth(i) + getLaneWidth(i + 1)) / 2. + SUMO_const_laneOffset; offsets[i] = offset; } - offset -= SUMO_const_laneOffset; if (myLaneSpreadFunction == LANESPREAD_RIGHT) { SUMOReal laneWidth = myLanes.back().width != UNSPECIFIED_WIDTH ? myLanes.back().width : SUMO_const_laneWidth; offset = (laneWidth + SUMO_const_laneOffset) / 2.; // @todo: why is the lane offset counted in here? @@ -1265,24 +1406,46 @@ // taking the angle at the first might be unstable, thus we take the angle // at a certain distance. (To compare two edges, additional geometry // segments are considered to resolve ambiguities) - const Position referencePosStart = myGeom.positionAtOffset2D(ANGLE_LOOKAHEAD); + const bool hasFromShape = myFrom->getShape().size() > 0; + const bool hasToShape = myTo->getShape().size() > 0; + Position fromCenter = (hasFromShape ? myFrom->getShape().getCentroid() : myFrom->getPosition()); + Position toCenter = (hasToShape ? myTo->getShape().getCentroid() : myTo->getPosition()); + PositionVector shape = ((hasFromShape || hasToShape) && getNumLanes() > 0 ? + (myLaneSpreadFunction == LANESPREAD_RIGHT ? + myLanes[getNumLanes() - 1].shape + : myLanes[getNumLanes() / 2].shape) + : myGeom); + + // if the junction shape is suspicious we cannot trust the angle to the centroid + if ((hasFromShape && (myFrom->getShape().distance(shape[0]) > 2 * POSITION_EPS + || myFrom->getShape().around(shape[-1]))) + || (hasToShape && (myTo->getShape().distance(shape[-1]) > 2 * POSITION_EPS + || myTo->getShape().around(shape[0])))) { + fromCenter = myFrom->getPosition(); + toCenter = myTo->getPosition(); + shape = myGeom; + } + + const SUMOReal angleLookahead = MIN2(shape.length2D() / 2, ANGLE_LOOKAHEAD); + const Position referencePosStart = shape.positionAtOffset2D(angleLookahead); myStartAngle = NBHelpers::angle( - myFrom->getPosition().x(), myFrom->getPosition().y(), + fromCenter.x(), fromCenter.y(), referencePosStart.x(), referencePosStart.y()); - const Position referencePosEnd = myGeom.positionAtOffset2D(myGeom.length() - ANGLE_LOOKAHEAD); + const Position referencePosEnd = shape.positionAtOffset2D(shape.length() - angleLookahead); myEndAngle = NBHelpers::angle( referencePosEnd.x(), referencePosEnd.y(), - myTo->getPosition().x(), myTo->getPosition().y()); + toCenter.x(), toCenter.y()); myTotalAngle = NBHelpers::angle( myFrom->getPosition().x(), myFrom->getPosition().y(), myTo->getPosition().x(), myTo->getPosition().y()); + } bool NBEdge::hasRestrictions() const { for (std::vector::const_iterator i = myLanes.begin(); i != myLanes.end(); ++i) { - if ((*i).permissions != SVCFreeForAll) { + if ((*i).permissions != SVCAll) { return true; } } @@ -1327,9 +1490,9 @@ bool -NBEdge::hasLaneSpecificOffset() const { +NBEdge::hasLaneSpecificEndOffset() const { for (std::vector::const_iterator i = myLanes.begin(); i != myLanes.end(); ++i) { - if (i->offset != myLanes.begin()->offset) { + if (i->endOffset != myLanes.begin()->endOffset) { return true; } } @@ -1339,7 +1502,7 @@ bool NBEdge::needsLaneSpecificOutput() const { - return hasRestrictions() || hasLaneSpecificSpeed() || hasLaneSpecificWidth() || hasLaneSpecificOffset(); + return hasRestrictions() || hasLaneSpecificSpeed() || hasLaneSpecificWidth() || hasLaneSpecificEndOffset(); } @@ -1366,7 +1529,7 @@ bool -NBEdge::computeLanes2Edges() { +NBEdge::computeLanes2Edges(const bool buildCrossingsAndWalkingAreas) { // return if this relationship has been build in previous steps or // during the import if (myStep >= LANES2EDGES) { @@ -1381,7 +1544,7 @@ myConnections.clear(); } else { // divide the lanes on reachable edges - divideOnEdges(edges); + divideOnEdges(edges, buildCrossingsAndWalkingAreas); } delete edges; myStep = LANES2EDGES; @@ -1390,7 +1553,7 @@ bool -NBEdge::recheckLanes() { +NBEdge::recheckLanes(const bool buildCrossingsAndWalkingAreas) { std::vector connNumbersPerLane(myLanes.size(), 0); for (std::vector::iterator i = myConnections.begin(); i != myConnections.end();) { if ((*i).toEdge == 0 || (*i).fromLane < 0 || (*i).toLane < 0) { @@ -1409,11 +1572,11 @@ // This check is only done for edges which connections were assigned // using the standard algorithm. for (unsigned int i = 0; i < myLanes.size(); i++) { - if (connNumbersPerLane[i] == 0) { + if (connNumbersPerLane[i] == 0 && !isForbidden(getPermissions((int)i))) { if (i > 0 && connNumbersPerLane[i - 1] > 1) { - moveConnectionToLeft(i - 1); + moveConnectionToLeft(i - 1, buildCrossingsAndWalkingAreas); } else if (i < myLanes.size() - 1 && connNumbersPerLane[i + 1] > 1) { - moveConnectionToRight(i + 1); + moveConnectionToRight(i + 1, buildCrossingsAndWalkingAreas); } } } @@ -1427,18 +1590,27 @@ void -NBEdge::divideOnEdges(const EdgeVector* outgoing) { +NBEdge::divideOnEdges(const EdgeVector* outgoing, const bool buildCrossingsAndWalkingAreas) { if (outgoing->size() == 0) { // we have to do this, because the turnaround may have been added before myConnections.clear(); return; } - // precompute priorities; needed as some kind of assumptions for + // precompute edge priorities; needed as some kind of assumptions for // priorities of directions (see preparePriorities) - std::vector* priorities = preparePriorities(outgoing); - + std::vector* priorities = prepareEdgePriorities(outgoing); // compute the sum of priorities (needed for normalisation) unsigned int prioSum = computePrioritySum(priorities); + // compute the indices of lanes that should have connections (excluding + // forbidden lanes and pedestrian lanes that will be connected via walkingAreas) + std::vector availableLanes; + for (int i = 0; i < (int)myLanes.size(); ++i) { + const SVCPermissions perms = getPermissions(i); + if ((perms == SVC_PEDESTRIAN && buildCrossingsAndWalkingAreas) || isForbidden(perms)) { + continue; + } + availableLanes.push_back(i); + } // compute the resulting number of lanes that should be used to // reach the following edge unsigned int size = (unsigned int) outgoing->size(); @@ -1452,15 +1624,16 @@ // current outgoing edge SUMOReal res = (SUMOReal)(*priorities)[i] * - (SUMOReal) myLanes.size() / (SUMOReal) prioSum; + (SUMOReal) availableLanes.size() / (SUMOReal) prioSum; // do not let this number be greater than the number of available lanes - if (res > myLanes.size()) { - res = (SUMOReal) myLanes.size(); + if (res > availableLanes.size()) { + res = (SUMOReal) availableLanes.size(); } // add it to the list resultingLanes.push_back(res); sumResulting += res; - if (minResulting > res) { + if (minResulting > res && res > 0) { + // prevent minResulting from becoming 0 minResulting = res; } } @@ -1483,20 +1656,28 @@ transition.push_back((*outgoing)[i]); } } - // assign lanes to edges // (conversion from virtual to real edges is done) ToEdgeConnectionsAdder adder(transition); - Bresenham::compute(&adder, static_cast(myLanes.size()), noVirtual); + Bresenham::compute(&adder, static_cast(availableLanes.size()), noVirtual); const std::map >& l2eConns = adder.getBuiltConnections(); myConnections.clear(); for (std::map >::const_iterator i = l2eConns.begin(); i != l2eConns.end(); ++i) { const std::vector lanes = (*i).second; for (std::vector::const_iterator j = lanes.begin(); j != lanes.end(); ++j) { + const int fromIndex = availableLanes[*j]; + if ((getPermissions(fromIndex) & (*i).first->getPermissions()) == 0) { + // exclude connection if fromLane and toEdge have no common permissions + continue; + } + if (buildCrossingsAndWalkingAreas && (getPermissions(fromIndex) & (*i).first->getPermissions()) == SVC_PEDESTRIAN) { + // exclude connection if the only commonly permitted class are pedestrians and there is already a walkingArea + continue; + } if (myAmLeftHand) { - myConnections.push_back(Connection(int(myLanes.size() - 1 - *j), (*i).first, -1)); + myConnections.push_back(Connection(int(myLanes.size() - 1 - fromIndex), (*i).first, -1)); } else { - myConnections.push_back(Connection(int(*j), (*i).first, -1)); + myConnections.push_back(Connection(fromIndex, (*i).first, -1)); } } } @@ -1505,7 +1686,7 @@ std::vector* -NBEdge::preparePriorities(const EdgeVector* outgoing) { +NBEdge::prepareEdgePriorities(const EdgeVector* outgoing) { // copy the priorities first std::vector* priorities = new std::vector(); if (outgoing->size() == 0) { @@ -1572,7 +1753,7 @@ bool -NBEdge::isTurningDirectionAt(const NBNode* n, const NBEdge* const edge) const { +NBEdge::isTurningDirectionAt(const NBEdge* const edge) const { // maybe it was already set as the turning direction if (edge == myTurnDestination) { return true; @@ -1580,25 +1761,10 @@ // otherwise - it's not if a turning direction exists return false; } - // if the same nodes are connected - if (myFrom == edge->myTo && myTo == edge->myFrom) { - return true; - } - // we have to check whether the connection between the nodes is - // geometrically similar - SUMOReal thisFromAngle2 = getAngleAtNode(n); - SUMOReal otherToAngle2 = edge->getAngleAtNode(n); - if (thisFromAngle2 < otherToAngle2) { - std::swap(thisFromAngle2, otherToAngle2); - } - if (thisFromAngle2 - otherToAngle2 > 170 && thisFromAngle2 - otherToAngle2 < 190) { - return true; - } - return false; + return edge == myPossibleTurnDestination; } - NBNode* NBEdge::tryGetNodeAtPosition(SUMOReal pos, SUMOReal tolerance) const { // return the from-node when the position is at the begin of the edge @@ -1623,6 +1789,7 @@ assert(el.tlID == ""); bool ok = addLane2LaneConnection(i + laneOff, el.toEdge, el.toLane, L2L_COMPUTED); assert(ok); + UNUSED_PARAMETER(ok); // only used for assertion } } } @@ -1735,41 +1902,41 @@ PositionVector -NBEdge::getCWBoundaryLine(const NBNode& n, SUMOReal offset) const { +NBEdge::getCWBoundaryLine(const NBNode& n) const { PositionVector ret; + SUMOReal width; if (myFrom == (&n)) { // outgoing ret = !myAmLeftHand ? myLanes[0].shape : myLanes.back().shape; + width = getLaneWidth(0); } else { // incoming ret = !myAmLeftHand ? myLanes.back().shape.reverse() : myLanes[0].shape.reverse(); + width = getLaneWidth((int)getNumLanes() - 1); } - ret.move2side(offset); + ret.move2side(width * 0.5); return ret; } PositionVector -NBEdge::getCCWBoundaryLine(const NBNode& n, SUMOReal offset) const { +NBEdge::getCCWBoundaryLine(const NBNode& n) const { PositionVector ret; + SUMOReal width; if (myFrom == (&n)) { // outgoing ret = !myAmLeftHand ? myLanes.back().shape : myLanes[0].shape; + width = getLaneWidth((int)getNumLanes() - 1); } else { // incoming ret = !myAmLeftHand ? myLanes[0].shape.reverse() : myLanes.back().shape.reverse(); + width = getLaneWidth(0); } - ret.move2side(-offset); + ret.move2side(-width * 0.5); return ret; } -SUMOReal -NBEdge::width() const { - return (SUMOReal) myLanes.size() * SUMO_const_laneWidth + (SUMOReal)(myLanes.size() - 1) * SUMO_const_laneOffset; -} - - bool NBEdge::expandableBy(NBEdge* possContinuation) const { // ok, the number of lanes must match @@ -1845,14 +2012,18 @@ myStep = e->myStep; myConnections = e->myConnections; myTurnDestination = e->myTurnDestination; + myPossibleTurnDestination = e->myPossibleTurnDestination; // set the node myTo = e->myTo; + if (e->getSignalOffset() != UNSPECIFIED_SIGNAL_OFFSET) { + mySignalOffset = e->getSignalOffset(); + } else { + mySignalOffset += e->getLength(); + } + computeAngle(); // myEndAngle may be different now } - - - bool NBEdge::hasSignalisedConnectionTo(const NBEdge* const e) const { for (std::vector::const_iterator i = myConnections.begin(); i != myConnections.end(); ++i) { @@ -1865,7 +2036,10 @@ NBEdge* -NBEdge::getTurnDestination() const { +NBEdge::getTurnDestination(bool possibleDestination) const { + if (myTurnDestination == 0 && possibleDestination) { + return myPossibleTurnDestination; + } return myTurnDestination; } @@ -2003,24 +2177,33 @@ SUMOReal -NBEdge::getOffset(int lane) const { - return myLanes[lane].offset != UNSPECIFIED_OFFSET ? myLanes[lane].offset : getOffset(); +NBEdge::getTotalWidth() const { + SUMOReal result = 0; + for (unsigned int i = 0; i < myLanes.size(); i++) { + result += getLaneWidth(i); + } + return result; +} + +SUMOReal +NBEdge::getEndOffset(int lane) const { + return myLanes[lane].endOffset != UNSPECIFIED_OFFSET ? myLanes[lane].endOffset : getEndOffset(); } void -NBEdge::setOffset(int lane, SUMOReal offset) { +NBEdge::setEndOffset(int lane, SUMOReal offset) { if (lane < 0) { // all lanes are meant... - myOffset = offset; + myEndOffset = offset; for (unsigned int i = 0; i < myLanes.size(); i++) { // ... do it for each lane - setOffset((int) i, offset); + setEndOffset((int) i, offset); } return; } assert(lane < (int) myLanes.size()); - myLanes[lane].offset = offset; + myLanes[lane].endOffset = offset; } @@ -2092,10 +2275,129 @@ void NBEdge::dismissVehicleClassInformation() { for (std::vector::iterator i = myLanes.begin(); i != myLanes.end(); ++i) { - (*i).permissions = SVCFreeForAll; + (*i).permissions = SVCAll; (*i).preferred = 0; } } +bool +NBEdge::connections_sorter(const Connection& c1, const Connection& c2) { + if (c1.fromLane != c2.fromLane) { + return c1.fromLane < c2.fromLane; + } + if (c1.toEdge != c2.toEdge) { + return false; // do not change ordering among toEdges as this is determined by angle in an earlier step + } + return c1.toLane < c2.toLane; +} + + +int +NBEdge::getFirstNonPedestrianLaneIndex(int direction, bool exclusive) const { + assert(direction == NBNode::FORWARD || direction == NBNode::BACKWARD); + const int start = (direction == NBNode::FORWARD ? 0 : (int)myLanes.size() - 1); + const int end = (direction == NBNode::FORWARD ? (int)myLanes.size() : - 1); + for (int i = start; i != end; i += direction) { + // SVCAll, does not count as a sidewalk, green verges (permissions = 0) do not count as road + // in the exclusive case, lanes that allow pedestrians along with any other class also count as road + if ((exclusive && myLanes[i].permissions != SVC_PEDESTRIAN && myLanes[i].permissions != 0) + || (myLanes[i].permissions == SVCAll || ((myLanes[i].permissions & SVC_PEDESTRIAN) == 0 && myLanes[i].permissions != 0))) { + return i; + } + } + return -1; +} + + +SUMOReal +NBEdge::getCrossingAngle(NBNode* node) { + SUMOReal angle = getAngleAtNode(node) + (getFromNode() == node ? 180.0 : 0.0); + if (angle < 0) { + angle += 360.0; + } + if (angle >= 360) { + angle -= 360.0; + } + if (gDebugFlag1) { + std::cout << getID() << " angle=" << getAngleAtNode(node) << " convAngle=" << angle << "\n"; + } + return angle; +} + + +NBEdge::Lane +NBEdge::getFirstNonPedestrianLane(int direction) const { + int index = getFirstNonPedestrianLaneIndex(direction); + if (index < 0) { + throw ProcessError("Edge " + getID() + " allows pedestrians on all lanes"); + } + return myLanes[index]; +} + +void +NBEdge::addSidewalk(SUMOReal width) { + if (myLanes[0].permissions == SVC_PEDESTRIAN) { + WRITE_WARNING("Edge '" + getID() + "' already has a sidewalk. Not adding another one."); + return; + } + if (myLaneSpreadFunction == LANESPREAD_CENTER) { + myGeom.move2side(width / 2); + } + // disallow pedestrians on all lanes to ensure that sidewalks are used and + // crossings can be guessed + disallowVehicleClass(-1, SVC_PEDESTRIAN); + // add new lane + myLanes.insert(myLanes.begin(), Lane(this)); + myLanes[0].permissions = SVC_PEDESTRIAN; + myLanes[0].width = width; + // shift outgoing connections to the left + for (std::vector::iterator it = myConnections.begin(); it != myConnections.end(); ++it) { + Connection& c = *it; + if (c.fromLane >= 0) { + c.fromLane += 1; + } + } + // shift incoming connections to the left + const EdgeVector& incoming = myFrom->getIncomingEdges(); + for (EdgeVector::const_iterator it = incoming.begin(); it != incoming.end(); ++it) { + (*it)->shiftToLanesToEdge(this, 1); + } + myFrom->shiftTLConnectionLaneIndex(this, 1); + myTo->shiftTLConnectionLaneIndex(this, 1); + computeLaneShapes(); +} + + +void +NBEdge::shiftToLanesToEdge(NBEdge* to, unsigned int laneOff) { + /// XXX could we repurpose the function replaceInConnections ? + for (std::vector::iterator it = myConnections.begin(); it != myConnections.end(); ++it) { + if ((*it).toEdge == to && (*it).toLane >= 0) { + (*it).toLane += laneOff; + } + } +} + + +void +NBEdge::shiftPositionAtNode(NBNode* node, NBEdge* other) { + if (myLaneSpreadFunction == LANESPREAD_CENTER && !isRailway(getPermissions())) { + const int i = (node == myTo ? -1 : 0); + const int i2 = (node == myTo ? 0 : -1); + const SUMOReal dist = myGeom[i].distanceTo2D(node->getPosition()); + const SUMOReal neededOffset = (getTotalWidth() + getNumLanes() * SUMO_const_laneOffset) / 2; + const SUMOReal dist2 = MIN2(myGeom.distance(other->getGeometry()[i2]), + other->getGeometry().distance(myGeom[i])); + const SUMOReal neededOffset2 = neededOffset + (other->getTotalWidth() + other->getNumLanes() * SUMO_const_laneOffset) / 2; + if (dist < neededOffset && dist2 < neededOffset2) { + PositionVector tmp = myGeom; + // @note this doesn't work well for vissim networks + //tmp.move2side(MIN2(neededOffset - dist, neededOffset2 - dist2)); + tmp.move2side(neededOffset - dist); + myGeom[i] = tmp[i]; + } + } +} + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBEdge.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBEdge.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBEdge.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBEdge.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NBEdge.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBEdge.h 18096 2015-03-17 09:50:59Z behrisch $ /// // The representation of a single edge during network building /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -122,8 +122,8 @@ */ struct Lane { Lane(NBEdge* e) : - speed(e->getSpeed()), permissions(SVCFreeForAll), preferred(0), - offset(e->getOffset()), width(e->getLaneWidth()) {} + speed(e->getSpeed()), permissions(SVCAll), preferred(0), + endOffset(e->getEndOffset()), width(e->getLaneWidth()) {} /// @brief The lane's shape PositionVector shape; /// @brief The speed allowed on this lane @@ -133,7 +133,7 @@ /// @brief List of vehicle types that are preferred on this lane SVCPermissions preferred; /// @brief This lane's offset to the intersection begin - SUMOReal offset; + SUMOReal endOffset; /// @brief This lane's width SUMOReal width; /// @brief An original ID, if given (@todo: is only seldom used, should be stored somewhere else, probably) @@ -183,9 +183,14 @@ SUMOReal viaVmax; PositionVector viaShape; - std::string foeInternalLanes; + std::vector foeInternalLinks; std::string foeIncomingLanes; + /// @brief The lane index of this internal lane within the internal edge + unsigned int internalLaneIndex; + + std::string getInternalLaneID() const; + }; /// Computes the offset from the edge shape on the current segment @@ -196,9 +201,14 @@ static const SUMOReal UNSPECIFIED_WIDTH; /// @brief unspecified lane offset static const SUMOReal UNSPECIFIED_OFFSET; + /// @brief unspecified lane speed + static const SUMOReal UNSPECIFIED_SPEED; + /// @brief no length override given static const SUMOReal UNSPECIFIED_LOADED_LENGTH; - /// @brief the distance at which to take the default anglen + /// @brief unspecified signal offset + static const SUMOReal UNSPECIFIED_SIGNAL_OFFSET; + /// @brief the distance at which to take the default angle static const SUMOReal ANGLE_LOOKAHEAD; public: @@ -265,10 +275,14 @@ * @param[in] from The node the edge starts at * @param[in] to The node the edge ends at * @param[in] tpl The template edge to copy attributes from + * @param[in] geom The geometry to use (may be empty) + * @param[in] numLanes The number of lanes of the new edge (copy from tpl by default) */ NBEdge(const std::string& id, NBNode* from, NBNode* to, - NBEdge* tpl); + NBEdge* tpl, + const PositionVector& geom = PositionVector(), + int numLanes = -1); /** @brief Destructor @@ -442,6 +456,10 @@ SUMOReal getLaneWidth(int lane) const; + /** @brief Returns the combined width of all lanes of this edge + */ + SUMOReal getTotalWidth() const; + /** @brief Returns the street name of this edge */ const std::string& getStreetName() const { @@ -457,15 +475,26 @@ /** @brief Returns the offset to the destination node * @return The offset to the destination node */ - SUMOReal getOffset() const { - return myOffset; + SUMOReal getEndOffset() const { + return myEndOffset; } /** @brief Returns the offset to the destination node a the specified lane * @return The offset to the destination node */ - SUMOReal getOffset(int lane) const; + SUMOReal getEndOffset(int lane) const; + /** @brief Returns the offset of a traffic signal from the end of this edge + */ + SUMOReal getSignalOffset() const { + return mySignalOffset; + } + + /** @brief sets the offset of a traffic signal from the end of this edge + */ + void setSignalOffset(SUMOReal offset) { + mySignalOffset = offset; + } /** @brief Returns the type name * @return The name of this edge's type @@ -483,7 +512,15 @@ } //@} + /** @brief return the first lane with permissions other than SVC_PEDESTRIAN and 0 + * @param[in] direction The direction in which the lanes shall be checked + * @param[in] exclusive Whether lanes that allow pedestrians along with other classes shall be counted as non-pedestrian + */ + int getFirstNonPedestrianLaneIndex(int direction, bool exclusive = false) const; + NBEdge::Lane getFirstNonPedestrianLane(int direction) const; + /// @brief return the angle for computing pedestrian crossings at the given node + SUMOReal getCrossingAngle(NBNode* node); /// @name Edge geometry access and computation //@{ @@ -537,6 +574,10 @@ */ void addGeometryPoint(int index, const Position& p); + /** @brief shift geometry at the given node + * to avoid overlap + */ + void shiftPositionAtNode(NBNode* node, NBEdge* opposite); /** @brief Recomputeds the lane shapes to terminate at the node shape * For every lane the intersection with the fromNode and toNode is @@ -699,9 +740,10 @@ * Turnaround edge is ignored! * @param[in] destEdge The connection's destination edge * @param[in] destLane The connection's destination lane + * @param[in] fromLane If a value >= 0 is given, only return true if a connection from the given lane exists * @return whether a connection to the specified lane exists */ - bool hasConnectionTo(NBEdge* destEdge, unsigned int destLane) const; + bool hasConnectionTo(NBEdge* destEdge, unsigned int destLane, int fromLane = -1) const; /** @brief Returns the information whethe a connection to the given edge has been added (or computed) @@ -778,17 +820,26 @@ void replaceInConnections(NBEdge* which, NBEdge* by, unsigned int laneOff); void replaceInConnections(NBEdge* which, const std::vector& origConns); void copyConnectionsFrom(NBEdge* src); + + /// @brief modifify the toLane for all connections to the given edge + void shiftToLanesToEdge(NBEdge* to, unsigned int laneOff); /// @} /** @brief Returns whether the given edge is the opposite direction to this edge - * @param[in] n The node at which this may be turnaround direction * @param[in] edge The edge which may be the turnaround direction * @return Whether the given edge is this edge's turnaround direction + * (regardless of whether a connection exists) */ - bool isTurningDirectionAt(const NBNode* n, const NBEdge* const edge) const; - void setTurningDestination(NBEdge* e); + bool isTurningDirectionAt(const NBEdge* const edge) const; + + + /** @brief Sets the turing destination at the given edge + * @param[in] e The turn destination + * @param[in] onlyPossible If true, only sets myPossibleTurnDestination + */ + void setTurningDestination(NBEdge* e, bool onlyPossible = false); @@ -868,7 +919,7 @@ bool hasLaneSpecificSpeed() const; /// @brief whether lanes differ in offset - bool hasLaneSpecificOffset() const; + bool hasLaneSpecificEndOffset() const; /// @brief whether lanes differ in width bool hasLaneSpecificWidth() const; @@ -877,11 +928,11 @@ bool computeEdge2Edges(bool noLeftMovers); /// computes the edge, step2: computation of which lanes approach the edges) - bool computeLanes2Edges(); + bool computeLanes2Edges(const bool buildCrossingsAndWalkingAreas); /** recheck whether all lanes within the edge are all right and optimises the connections once again */ - bool recheckLanes(); + bool recheckLanes(const bool buildCrossingsAndWalkingAreas); /** @brief Add a connection to the previously computed turnaround, if wished * @@ -916,10 +967,11 @@ void addCrossingPointsAsIncomingWithGivenOutgoing(NBEdge* o, PositionVector& into); - SUMOReal width() const; + /// @brief get the outer boundary of this edge when going clock-wise around the given node + PositionVector getCWBoundaryLine(const NBNode& n) const; - PositionVector getCWBoundaryLine(const NBNode& n, SUMOReal offset) const; - PositionVector getCCWBoundaryLine(const NBNode& n, SUMOReal offset) const; + /// @brief get the outer boundary of this edge when going counter-clock-wise around the given node + PositionVector getCCWBoundaryLine(const NBNode& n) const; bool expandableBy(NBEdge* possContinuation) const; void append(NBEdge* continuation); @@ -929,7 +981,11 @@ void moveOutgoingConnectionsFrom(NBEdge* e, unsigned int laneOff); - NBEdge* getTurnDestination() const; + /* @brief return the turn destination if it exists + * @param[in] possibleDestination Wether myPossibleTurnDestination should be returned if no turnaround connection + * exists + */ + NBEdge* getTurnDestination(bool possibleDestination = false) const; std::string getLaneID(unsigned int lane) const; @@ -950,12 +1006,26 @@ SUMOReal getAngleAtNode(const NBNode* const node) const; + /** @brief Returns the angle of from the node shape center to where the edge meets + * the node shape + * + * The angle is signed, disregards direction, and starts at 12 o'clock + * (north->south), proceeds positive clockwise. + * @param[in] node The node for which the edge's angle shall be returned + * @return This edge's angle at the given node shape + */ + SUMOReal getAngleAtNodeToCenter(const NBNode* const node) const; + + void incLaneNo(unsigned int by); void decLaneNo(unsigned int by, int dir = 0); void markAsInLane2LaneState(); + /// add a pedestrian sidewalk of the given width and shift existing connctions + void addSidewalk(SUMOReal width); + /// @brief set allowed/disallowed classes for the given lane or for all lanes if -1 is given void setPermissions(SVCPermissions permissions, int lane = -1); @@ -969,12 +1039,11 @@ void preferVehicleClass(int lane, SUMOVehicleClass vclass); - /// @brief set lane specific width (negative lane implies set for all lanes) void setLaneWidth(int lane, SUMOReal width); /// @brief set lane specific end-offset (negative lane implies set for all lanes) - void setOffset(int lane, SUMOReal offset); + void setEndOffset(int lane, SUMOReal offset); /// @brief set lane specific speed (negative lane implies set for all lanes) void setSpeed(int lane, SUMOReal speed); @@ -1001,7 +1070,13 @@ myStep = LANES2LANES_USER; } - void buildInnerEdges(const NBNode& n, unsigned int noInternalNoSplits, unsigned int& lno, unsigned int& splitNo); + /* @brief fill connection attributes shape, viaShape, ... + * + * @param[in,out] edgeIndex The number of connections already handled + * @param[in,out] splitIndex The number of via edges already built + * @param[in] tryIgnoreNodePositions Does not add node geometries if geom.size()>=2 + */ + void buildInnerEdges(const NBNode& n, unsigned int noInternalNoSplits, unsigned int& linkIndex, unsigned int& splitIndex); inline const std::vector& getSigns() const { return mySigns; @@ -1122,11 +1197,11 @@ /** divides the lanes on the outgoing edges */ - void divideOnEdges(const EdgeVector* outgoing); + void divideOnEdges(const EdgeVector* outgoing, const bool buildCrossingsAndWalkingAreas); - /** recomputes the priorities and manipulates them for a distribution + /** recomputes the edge priorities and manipulates them for a distribution of lanes on edges which is more like in real-life */ - std::vector* preparePriorities( + std::vector* prepareEdgePriorities( const EdgeVector* outgoing); /** computes the sum of the given list's entries (sic!) */ @@ -1138,11 +1213,14 @@ /** moves a connection one place to the left; Attention! no checking for field validity */ - void moveConnectionToLeft(unsigned int lane); + void moveConnectionToLeft(unsigned int lane, const bool buildCrossingsAndWalkingAreas); /** moves a connection one place to the right; Attention! no checking for field validity */ - void moveConnectionToRight(unsigned int lane); + void moveConnectionToRight(unsigned int lane, const bool buildCrossingsAndWalkingAreas); + + /// @brief whether the connection can originate on newFromLane + bool canMoveConnection(const Connection& con, unsigned int newFromLane, const bool buildCrossingsAndWalkingAreas) const; /// @} @@ -1155,6 +1233,11 @@ /// @brief computes the angle of this edge and stores it in myAngle void computeAngle(); + + /* @brief compute the first intersection point between the given lane + * geometries considering their rspective widths */ + static SUMOReal firstIntersection(const PositionVector& v1, const PositionVector& v2, SUMOReal width2); + private: /** @brief The building step * @see EdgeBuildingStep @@ -1190,8 +1273,10 @@ */ std::vector myConnectionsToDelete; - /// @brief The turn destination edge + /// @brief The turn destination edge (if a connection exists) NBEdge* myTurnDestination; + /// @brief The edge that would be the turn destination if there was one + NBEdge* myPossibleTurnDestination; /// @brief The priority normalised for the node the edge is outgoing of int myFromJunctionPriority; @@ -1206,7 +1291,7 @@ LaneSpreadFunction myLaneSpreadFunction; /// @brief This edges's offset to the intersection begin (will be applied to all lanes) - SUMOReal myOffset; + SUMOReal myEndOffset; /// @brief This width of this edge's lanes SUMOReal myLaneWidth; @@ -1245,6 +1330,8 @@ /// @brief the street signs along this edge std::vector mySigns; + /// @brief the offset of a traffic light signal from the end of this edge (-1 for None) + SUMOReal mySignalOffset; public: /** @@ -1306,15 +1393,19 @@ class connections_toedgelane_finder { public: /// constructor - connections_toedgelane_finder(NBEdge* const edge2find, int lane2find) : myEdge2Find(edge2find), myLane2Find(lane2find) { } + connections_toedgelane_finder(NBEdge* const edge2find, int lane2find, int fromLane2find) : + myEdge2Find(edge2find), + myLane2Find(lane2find), + myFromLane2Find(fromLane2find) { } bool operator()(const Connection& c) const { - return c.toEdge == myEdge2Find && c.toLane == myLane2Find; + return c.toEdge == myEdge2Find && c.toLane == myLane2Find && (myFromLane2Find < 0 || c.fromLane == myFromLane2Find); } private: NBEdge* const myEdge2Find; int myLane2Find; + int myFromLane2Find; private: /// @brief invalidated assignment operator @@ -1368,17 +1459,9 @@ }; /** - * connections_sorter + * connections_sorter sort by fromLane, toEdge and toLane */ - static bool connections_sorter(const Connection& c1, const Connection& c2) { - if (c1.fromLane != c2.fromLane) { - return c1.fromLane < c2.fromLane; - } - if (c1.toEdge != c2.toEdge) { - return c1.toEdge->getID().compare(c1.toEdge->getID()) < 0; - } - return c1.toLane < c2.toLane; - } + static bool connections_sorter(const Connection& c1, const Connection& c2); /** * connections_relative_edgelane_sorter diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBFrame.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBFrame.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBFrame.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBFrame.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date 09.05.2011 -/// @version $Id: NBFrame.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBFrame.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for netbuild /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -73,6 +73,8 @@ oc.addSynonyme("default.priority", "priority", true); oc.addDescription("default.priority", "Building Defaults", "The default priority of an edge"); + oc.doRegister("default.sidewalk-width", new Option_Float((SUMOReal) 2.0)); + oc.addDescription("default.sidewalk-width", "Building Defaults", "The default width of added sidewalks"); // register the data processing options oc.doRegister("no-internal-links", new Option_Bool(false)); // !!! not described @@ -80,7 +82,7 @@ if (!forNetgen) { oc.doRegister("dismiss-vclasses", new Option_Bool(false)); - oc.addDescription("dismiss-vclasses", "Processing", "Removes vehicle class restrictions from imported edges."); + oc.addDescription("dismiss-vclasses", "Processing", "Removes vehicle class restrictions from imported edges"); } oc.doRegister("no-turnarounds", new Option_Bool(false)); @@ -116,6 +118,9 @@ oc.doRegister("geometry.min-radius.fix", new Option_Bool(false)); oc.addDescription("geometry.min-radius.fix", "Processing", "Straighten edge geometries to avoid turning radii less than geometry.min-radius"); + + oc.doRegister("geometry.junction-mismatch-threshold", new Option_Float(20)); + oc.addDescription("geometry.junction-mismatch-threshold", "Processing", "Warn if the junction shape is to far away from the original node position"); } oc.doRegister("offset.disable-normalization", new Option_Bool(false)); @@ -157,17 +162,40 @@ oc.addDescription("speed.offset", "Processing", "Modifies all edge speeds by adding FLOAT"); oc.doRegister("speed.factor", new Option_Float(1)); - oc.addDescription("speed.factor", "Processing", "Modifies all edge speeds by multiplying FLOAT"); + oc.addDescription("speed.factor", "Processing", "Modifies all edge speeds by multiplying by FLOAT"); } + oc.doRegister("junctions.corner-detail", new Option_Integer(0)); + oc.addDescription("junctions.corner-detail", "Processing", "Generate INT intermediate points to smooth out intersection corners"); oc.doRegister("check-lane-foes.roundabout", new Option_Bool(true)); oc.addDescription("check-lane-foes.roundabout", "Processing", "Allow driving onto a multi-lane road if there are foes on other lanes (at roundabouts)"); + oc.doRegister("check-lane-foes.all", new Option_Bool(false)); oc.addDescription("check-lane-foes.all", "Processing", "Allow driving onto a multi-lane road if there are foes on other lanes (everywhere)"); + oc.doRegister("sidewalks.guess", new Option_Bool(false)); + oc.addDescription("sidewalks.guess", "Processing", + "Guess pedestrian sidewalks based on edge speed"); + + oc.doRegister("sidewalks.guess.max-speed", new Option_Float((SUMOReal) 13.89)); + oc.addDescription("sidewalks.guess.max-speed", "Processing", + "Add sidewalks for edges with a speed equal or below the given limit"); + + oc.doRegister("sidewalks.guess.min-speed", new Option_Float((SUMOReal) 5.8)); + oc.addDescription("sidewalks.guess.min-speed", "Processing", + "Add sidewalks for edges with a speed above the given limit"); + + oc.doRegister("sidewalks.guess.from-permissions", new Option_Bool(false)); + oc.addDescription("sidewalks.guess.from-permissions", "Processing", + "Add sidewalks for edges that allow pedestrians on any of their lanes regardless of speed"); + + oc.doRegister("crossings.guess", new Option_Bool(false)); + oc.addDescription("crossings.guess", "Processing", + "Guess pedestrian crossings based on the presence of sidewalks"); + // tls setting options // explicit tls oc.doRegister("tls.set", new Option_String()); @@ -200,6 +228,15 @@ oc.addDescription("tls.join-dist", "Processing", "Determines the maximal distance for joining traffic lights (defaults to 20)"); + if (!forNetgen) { + oc.doRegister("tls.guess-signals", new Option_Bool(false)); + oc.addDescription("tls.guess-signals", "Processing", "Interprets tls nodes surrounding an intersection as signal positions for a larger TLS. This is typical pattern for OSM-derived networks"); + + oc.doRegister("tls.guess-signals.dist", new Option_Float(25)); + oc.addDescription("tls.guess-signals.dist", "Processing", "Distance for interpreting nodes as signal locations"); + } + + // computational oc.doRegister("tls.green.time", new Option_Integer(31)); oc.addSynonyme("tls.green.time", "traffic-light-green", true); @@ -228,7 +265,7 @@ // tls type oc.doRegister("tls.default-type", new Option_String("static")); - oc.addDescription("tls.default-type", "TLS Building", "TLSs with unspecified type will use STR as their algorithm."); + oc.addDescription("tls.default-type", "TLS Building", "TLSs with unspecified type will use STR as their algorithm"); // edge pruning diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBFrame.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBFrame.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBFrame.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBFrame.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 09.05.2011 -/// @version $Id: NBFrame.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBFrame.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for netbuild /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBHeightMapper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBHeightMapper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBHeightMapper.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBHeightMapper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,368 @@ +/****************************************************************************/ +/// @file NBHeightMapper.cpp +/// @author Jakob Erdmann +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date Sept 2011 +/// @version $Id: NBHeightMapper.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Set z-values for all network positions based on data from a height map +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include "NBHeightMapper.h" +#include +#include +#include + +#ifdef HAVE_GDAL +#include +#include +#include +#endif + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + +// =========================================================================== +// static members +// =========================================================================== +NBHeightMapper NBHeightMapper::Singleton; + +// =========================================================================== +// method definitions +// =========================================================================== + + +NBHeightMapper::NBHeightMapper(): + myRTree(&Triangle::addSelf), myRaster(0) +{ } + + +NBHeightMapper::~NBHeightMapper() { + clearData(); +} + + +const NBHeightMapper& +NBHeightMapper::get() { + return Singleton; +} + + +bool +NBHeightMapper::ready() const { + return myRaster != 0 || myTriangles.size() > 0; +} + + +SUMOReal +NBHeightMapper::getZ(const Position& geo) const { + if (!ready()) { + WRITE_WARNING("Cannot supply height since no height data was loaded"); + return 0; + } + if (myRaster != 0) { + SUMOReal result = -1e6; + if (myBoundary.around(geo)) { + const int xSize = int((myBoundary.xmax() - myBoundary.xmin()) / mySizeOfPixel.x() + .5); + const int iX = int((geo.x() - myBoundary.xmin()) / mySizeOfPixel.x() + .5); + const int iY = int((geo.y() - myBoundary.ymax()) / mySizeOfPixel.y() + .5); + result = myRaster[iY * xSize + iX]; + } + if (result > -1e5 && result < 1e5) { + return result; + } + } + // coordinates in degrees hence a small search window + float minB[2]; + float maxB[2]; + minB[0] = (float)geo.x() - 0.00001f; + minB[1] = (float)geo.y() - 0.00001f; + maxB[0] = (float)geo.x() + 0.00001f; + maxB[1] = (float)geo.y() + 0.00001f; + QueryResult queryResult; + int hits = myRTree.Search(minB, maxB, queryResult); + Triangles result = queryResult.triangles; + assert(hits == (int)result.size()); + UNUSED_PARAMETER(hits); // only used for assertion + + for (Triangles::iterator it = result.begin(); it != result.end(); it++) { + const Triangle* triangle = *it; + if (triangle->contains(geo)) { + return triangle->getZ(geo); + } + } + WRITE_WARNING("Could not get height data for coordinate " + toString(geo)); + return 0; +} + + +void +NBHeightMapper::addTriangle(PositionVector corners) { + Triangle* triangle = new Triangle(corners); + myTriangles.push_back(triangle); + Boundary b = corners.getBoxBoundary(); + const float cmin[2] = {(float) b.xmin(), (float) b.ymin()}; + const float cmax[2] = {(float) b.xmax(), (float) b.ymax()}; + myRTree.Insert(cmin, cmax, triangle); +} + + +void +NBHeightMapper::loadIfSet(OptionsCont& oc) { + if (oc.isSet("heightmap.geotiff")) { + // parse file(s) + std::vector files = oc.getStringVector("heightmap.geotiff"); + for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { + PROGRESS_BEGIN_MESSAGE("Parsing from GeoTIFF '" + *file + "'"); + int numFeatures = Singleton.loadTiff(*file); + MsgHandler::getMessageInstance()->endProcessMsg( + " done (parsed " + toString(numFeatures) + + " features, Boundary: " + toString(Singleton.getBoundary()) + ")."); + } + } + if (oc.isSet("heightmap.shapefiles")) { + // parse file(s) + std::vector files = oc.getStringVector("heightmap.shapefiles"); + for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { + PROGRESS_BEGIN_MESSAGE("Parsing from shape-file '" + *file + "'"); + int numFeatures = Singleton.loadShapeFile(*file); + MsgHandler::getMessageInstance()->endProcessMsg( + " done (parsed " + toString(numFeatures) + + " features, Boundary: " + toString(Singleton.getBoundary()) + ")."); + } + } +} + + +int +NBHeightMapper::loadShapeFile(const std::string& file) { +#ifdef HAVE_GDAL + OGRRegisterAll(); + OGRDataSource* ds = OGRSFDriverRegistrar::Open(file.c_str(), FALSE); + if (ds == NULL) { + throw ProcessError("Could not open shape file '" + file + "'."); + } + + // begin file parsing + OGRLayer* layer = ds->GetLayer(0); + layer->ResetReading(); + + // triangle coordinates are stored in WGS84 and later matched with network coordinates in WGS84 + // build coordinate transformation + OGRSpatialReference* sr_src = layer->GetSpatialRef(); + OGRSpatialReference sr_dest; + sr_dest.SetWellKnownGeogCS("WGS84"); + OGRCoordinateTransformation* toWGS84 = OGRCreateCoordinateTransformation(sr_src, &sr_dest); + if (toWGS84 == 0) { + WRITE_WARNING("Could not create geocoordinates converter; check whether proj.4 is installed."); + } + + int numFeatures = 0; + OGRFeature* feature; + layer->ResetReading(); + while ((feature = layer->GetNextFeature()) != NULL) { + OGRGeometry* geom = feature->GetGeometryRef(); + assert(geom != 0); + + // @todo gracefull handling of shapefiles with unexpected contents or any error handling for that matter + assert(std::string(geom->getGeometryName()) == std::string("POLYGON")); + // try transform to wgs84 + geom->transform(toWGS84); + OGRLinearRing* cgeom = ((OGRPolygon*) geom)->getExteriorRing(); + // assume TIN with with 4 points and point0 == point3 + assert(cgeom->getNumPoints() == 4); + PositionVector corners; + for (int j = 0; j < 3; j++) { + Position pos((SUMOReal) cgeom->getX(j), (SUMOReal) cgeom->getY(j), (SUMOReal) cgeom->getZ(j)); + corners.push_back(pos); + myBoundary.add(pos); + } + addTriangle(corners); + numFeatures++; + + /* + OGRwkbGeometryType gtype = geom->getGeometryType(); + switch (gtype) { + case wkbPolygon: { + break; + } + case wkbPoint: { + WRITE_WARNING("got wkbPoint"); + break; + } + case wkbLineString: { + WRITE_WARNING("got wkbLineString"); + break; + } + case wkbMultiPoint: { + WRITE_WARNING("got wkbMultiPoint"); + break; + } + case wkbMultiLineString: { + WRITE_WARNING("got wkbMultiLineString"); + break; + } + case wkbMultiPolygon: { + WRITE_WARNING("got wkbMultiPolygon"); + break; + } + default: + WRITE_WARNING("Unsupported shape type occured"); + break; + } + */ + OGRFeature::DestroyFeature(feature); + } + OGRDataSource::DestroyDataSource(ds); + OCTDestroyCoordinateTransformation(toWGS84); + OGRCleanupAll(); + return numFeatures; +#else + WRITE_ERROR("Cannot load shape file since SUMO was compiled without GDAL support."); + return 0; +#endif +} + + +int +NBHeightMapper::loadTiff(const std::string& file) { +#ifdef HAVE_GDAL + GDALAllRegister(); + GDALDataset* poDataset = (GDALDataset*)GDALOpen(file.c_str(), GA_ReadOnly); + if (poDataset == 0) { + WRITE_ERROR("Cannot load GeoTIFF file."); + return 0; + } + const int xSize = poDataset->GetRasterXSize(); + const int ySize = poDataset->GetRasterYSize(); + double adfGeoTransform[6]; + if (poDataset->GetGeoTransform(adfGeoTransform) == CE_None) { + Position topLeft(adfGeoTransform[0], adfGeoTransform[3]); + mySizeOfPixel.set(adfGeoTransform[1], adfGeoTransform[5]); + const double horizontalSize = xSize * mySizeOfPixel.x(); + const double verticalSize = ySize * mySizeOfPixel.y(); + myBoundary.add(topLeft); + myBoundary.add(topLeft.x() + horizontalSize, topLeft.y() + verticalSize); + } else { + WRITE_ERROR("Could not parse geo information from " + file + "."); + return 0; + } + const int picSize = xSize * ySize; + myRaster = (int16_t*)CPLMalloc(sizeof(int16_t) * picSize); + for (int i = 1; i <= poDataset->GetRasterCount(); i++) { + GDALRasterBand* poBand = poDataset->GetRasterBand(i); + if (poBand->GetColorInterpretation() != GCI_GrayIndex) { + WRITE_ERROR("Unknown color band in " + file + "."); + clearData(); + break; + } + if (poBand->GetRasterDataType() != GDT_Int16) { + WRITE_ERROR("Unknown data type in " + file + "."); + clearData(); + break; + } + assert(xSize == poBand->GetXSize() && ySize == poBand->GetYSize()); + if (poBand->RasterIO(GF_Read, 0, 0, xSize, ySize, myRaster, xSize, ySize, GDT_Int16, 0, 0) == CE_Failure) { + WRITE_ERROR("Failure in reading " + file + "."); + clearData(); + break; + } + } + GDALClose(poDataset); + return picSize; +#else + WRITE_ERROR("Cannot load GeoTIFF file since SUMO was compiled without GDAL support."); + return 0; +#endif +} + + +void +NBHeightMapper::clearData() { + for (Triangles::iterator it = myTriangles.begin(); it != myTriangles.end(); it++) { + delete *it; + } + myTriangles.clear(); +#ifdef HAVE_GDAL + if (myRaster != 0) { + CPLFree(myRaster); + myRaster = 0; + } +#endif + myBoundary.reset(); +} + + +// =========================================================================== +// Triangle member methods +// =========================================================================== +NBHeightMapper::Triangle::Triangle(const PositionVector& corners): + myCorners(corners) { + assert(myCorners.size() == 3); + // @todo assert non-colinearity +} + + +void +NBHeightMapper::Triangle::addSelf(const QueryResult& queryResult) const { + queryResult.triangles.push_back(this); +} + + +bool +NBHeightMapper::Triangle::contains(const Position& pos) const { + return myCorners.around(pos); +} + + +SUMOReal +NBHeightMapper::Triangle::getZ(const Position& geo) const { + // en.wikipedia.org/wiki/Line-plane_intersection + Position p0 = myCorners.front(); + Position line(0, 0, 1); + p0.sub(geo); // p0 - l0 + Position normal = normalVector(); + return p0.dotProduct(normal) / line.dotProduct(normal); +} + + +Position +NBHeightMapper::Triangle::normalVector() const { + // @todo maybe cache result to avoid multiple computations? + Position side1 = myCorners[1] - myCorners[0]; + Position side2 = myCorners[2] - myCorners[0]; + return side1.crossProduct(side2); +} + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBHeightMapper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBHeightMapper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBHeightMapper.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBHeightMapper.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,210 @@ +/****************************************************************************/ +/// @file NBHeightMapper.h +/// @author Jakob Erdmann +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date Sept 2011 +/// @version $Id: NBHeightMapper.h 18096 2015-03-17 09:50:59Z behrisch $ +/// +// Set z-values for all network positions based on data from a height map +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef NBHeightMapper_h +#define NBHeightMapper_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#ifdef _MSC_VER +typedef __int16 int16_t; +#else +#include +#endif + +#include +#include +#include +#include +#include + +#define TRIANGLE_RTREE_QUAL RTree + +// =========================================================================== +// class declarations +// =========================================================================== +class OptionsCont; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class NBHeightMapper + * @brief Set z-values for all network positions based on data from a height map + * + * Importing data from '.shp'-files works only if SUMO was compiled with GDAL-support. + * If not, an error message is generated. + */ +class NBHeightMapper { + + friend class NBHeightMapperTest; + +public: + /** @brief loads heigh map data if any loading options are set + * + * @param[in] oc The options container to get further options from + * @exception ProcessError if something fails + */ + static void loadIfSet(OptionsCont& oc); + + /// @brief return the singleton instance (maybe 0) + static const NBHeightMapper& get(); + + /// @brief returns whether the NBHeightMapper has data + bool ready() const; + + /// @brief returns the convex boundary of all known triangles + const Boundary& getBoundary() { + return Singleton.myBoundary; + } + + /// @brief returns height for the given geo coordinate (WGS84) + SUMOReal getZ(const Position& geo) const; + + class QueryResult; + /* @brief content class for the rtree. Since we wish to be able to use the + * rtree for spatial querying we have to jump through some minor hoops: + * We let each found triangle callback the NBHeightMapper and add itself the + * the query result + * */ + class Triangle { + + public: + Triangle(const PositionVector& corners); + ~Triangle() {}; + + /// @brief callback for RTree search + void addSelf(const QueryResult& queryResult) const; + + /// @brief checks whether pos lies within triangle (only checks x,y) + bool contains(const Position& pos) const; + + /// @brief returns the projection of the give geoCoordinate (WGS84) onto triangle plane + SUMOReal getZ(const Position& geo) const; + + /// @brief returns the normal vector for this triangles plane + Position normalVector() const; + + /// @brief the corners of the triangle + PositionVector myCorners; + + }; + + typedef std::vector Triangles; + + /// @brief class for cirumventing the const-restriction of RTree::Search-context + class QueryResult { + public: + QueryResult() {}; + ~QueryResult() {}; + // @brief method not realy const + void add(Triangle* triangle) const { + triangles.push_back(triangle); + }; + mutable Triangles triangles; + }; + +private: + /// @brief the singleton instance + static NBHeightMapper Singleton; + + Triangles myTriangles; + + /// @brief The RTree for spatial queries + TRIANGLE_RTREE_QUAL myRTree; + + /// @brief raster height information in m + int16_t* myRaster; + + /// @brief dimensions of one pixel in raster data + Position mySizeOfPixel; + + /// @brief convex boundary of all known triangles; + Boundary myBoundary; + +private: + /// @brief private constructor and destructor (Singleton) + NBHeightMapper(); + ~NBHeightMapper(); + + /// @brief adds one triangles worth of height data + void addTriangle(PositionVector corners); + + /** @brief load height data from Arcgis-shape file and returns the number of parsed features + * @return The number of parsed features + * @throws ProcessError + */ + int loadShapeFile(const std::string& file); + + /** @brief load height data from GeoTIFF file and returns the number of non void pixels + * @return The number of valid pixels + * @throws ProcessError + */ + int loadTiff(const std::string& file); + + /// @brief clears loaded data + void clearData(); + + /// @brief Invalidated copy constructor. + NBHeightMapper(const NBHeightMapper&); + + /// @brief Invalidated assignment operator. + NBHeightMapper& operator=(const NBHeightMapper&); + +}; + + +// =========================================================================== +// RTree specialization for speedup and avoiding warnings (ripped from SUMORTree.h) +// =========================================================================== +template<> +inline float TRIANGLE_RTREE_QUAL::RectSphericalVolume(Rect* a_rect) { + ASSERT(a_rect); + const float extent0 = a_rect->m_max[0] - a_rect->m_min[0]; + const float extent1 = a_rect->m_max[1] - a_rect->m_min[1]; + return .78539816f * (extent0 * extent0 + extent1 * extent1); +} + +template<> +inline TRIANGLE_RTREE_QUAL::Rect TRIANGLE_RTREE_QUAL::CombineRect(Rect* a_rectA, Rect* a_rectB) { + ASSERT(a_rectA && a_rectB); + Rect newRect; + newRect.m_min[0] = rtree_min(a_rectA->m_min[0], a_rectB->m_min[0]); + newRect.m_max[0] = rtree_max(a_rectA->m_max[0], a_rectB->m_max[0]); + newRect.m_min[1] = rtree_min(a_rectA->m_min[1], a_rectB->m_min[1]); + newRect.m_max[1] = rtree_max(a_rectA->m_max[1], a_rectB->m_max[1]); + return newRect; +} + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBHelpers.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBHelpers.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBHelpers.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBHelpers.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Tue, 20 Nov 2001 -/// @version $Id: NBHelpers.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBHelpers.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Some mathematical helper methods /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -74,10 +75,11 @@ SUMOReal NBHelpers::normRelAngle(SUMOReal angle1, SUMOReal angle2) { SUMOReal rel = relAngle(angle1, angle2); - if (rel < -170 || rel > 170) { - rel = -180; + if (rel + NUMERICAL_EPS >= 180) { + return -180; + } else { + return rel; } - return rel; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBHelpers.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBHelpers.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBHelpers.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBHelpers.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Tue, 20 Nov 2001 -/// @version $Id: NBHelpers.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBHelpers.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Some mathematical helper methods /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -58,8 +59,7 @@ /** computes the relative angle between the two angles */ static SUMOReal relAngle(SUMOReal angle1, SUMOReal angle2); - /** normalises angle <-170 and >170 to 180 after the computation with - "relAngle" */ + ///@brief ensure that reverse relAngles (>=179.999) always count as turnarounds (-180) static SUMOReal normRelAngle(SUMOReal angle1, SUMOReal angle2); /** converts the numerical id to its "normal" string representation */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBJoinedEdgesMap.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBJoinedEdgesMap.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBJoinedEdgesMap.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBJoinedEdgesMap.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Tue, 29.05.2005 -/// @version $Id: NBJoinedEdgesMap.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBJoinedEdgesMap.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A structure storing information about which edges were joined /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBJoinedEdgesMap.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBJoinedEdgesMap.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBJoinedEdgesMap.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBJoinedEdgesMap.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @date Fri, 29.04.2005 -/// @version $Id: NBJoinedEdgesMap.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBJoinedEdgesMap.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A structure storing information about which edges were joined /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBLinkPossibilityMatrix.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBLinkPossibilityMatrix.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBLinkPossibilityMatrix.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBLinkPossibilityMatrix.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NBLinkPossibilityMatrix.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBLinkPossibilityMatrix.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A matric to describe whether two links are foes to each other /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBLoadedSUMOTLDef.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBLoadedSUMOTLDef.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBLoadedSUMOTLDef.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBLoadedSUMOTLDef.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,14 +1,16 @@ /****************************************************************************/ /// @file NBLoadedSUMOTLDef.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @author Jakob Erdmann /// @date Mar 2011 -/// @version $Id: NBLoadedSUMOTLDef.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBLoadedSUMOTLDef.cpp 18156 2015-03-26 11:58:37Z namdre $ /// // A complete traffic light logic loaded from a sumo-net. (opted to reimplement // since NBLoadedTLDef is quite vissim specific) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,6 +38,7 @@ #include #include #include "NBTrafficLightLogic.h" +#include "NBOwnTLDef.h" #include "NBTrafficLightDefinition.h" #include "NBLoadedSUMOTLDef.h" #include "NBNode.h" @@ -57,7 +60,8 @@ NBLoadedSUMOTLDef::NBLoadedSUMOTLDef(NBTrafficLightDefinition* def, NBTrafficLightLogic* logic) : - NBTrafficLightDefinition(def->getID(), def->getProgramID(), def->getOffset(), def->getType()), + // allow for adding a new program for the same def: take the programID from the new logic + NBTrafficLightDefinition(def->getID(), logic->getProgramID(), def->getOffset(), def->getType()), myTLLogic(new NBTrafficLightLogic(logic)), myOriginalNodes(def->getNodes().begin(), def->getNodes().end()) { assert(def->getOffset() == logic->getOffset()); @@ -77,6 +81,7 @@ UNUSED_PARAMETER(ec); UNUSED_PARAMETER(brakingTime); myTLLogic->closeBuilding(); + patchIfCrossingsAdded(); return new NBTrafficLightLogic(myTLLogic); } @@ -98,7 +103,7 @@ myOriginalNodes.insert(from->getToNode()); myOriginalNodes.insert(to->getFromNode()); // added connections are definitely controlled. make sure none are removed because they lie within the tl - myControlledInnerEdges.insert(from->getID()); + // myControlledInnerEdges.insert(from->getID()); // @todo recheck: this appears to be obsolete // set this information now so that it can be used while loading diffs from->setControllingTLInformation(conn, getID()); } @@ -216,6 +221,57 @@ void +NBLoadedSUMOTLDef::setType(TrafficLightType type) { + myType = type; + myTLLogic->setType(type); +} + + +void +NBLoadedSUMOTLDef::collectEdges() { + if (myControlledLinks.size() == 0) { + NBTrafficLightDefinition::collectEdges(); + } + myIncomingEdges.clear(); + EdgeVector myOutgoing; + // collect the edges from the participating nodes + for (std::vector::iterator i = myControlledNodes.begin(); i != myControlledNodes.end(); i++) { + const EdgeVector& incoming = (*i)->getIncomingEdges(); + copy(incoming.begin(), incoming.end(), back_inserter(myIncomingEdges)); + const EdgeVector& outgoing = (*i)->getOutgoingEdges(); + copy(outgoing.begin(), outgoing.end(), back_inserter(myOutgoing)); + } + // check which of the edges are completely within the junction + // and which are uncontrolled as well (we already know myControlledLinks) + for (EdgeVector::iterator j = myIncomingEdges.begin(); j != myIncomingEdges.end();) { + NBEdge* edge = *j; + // an edge lies within the logic if it is outgoing as well as incoming + EdgeVector::iterator k = find(myOutgoing.begin(), myOutgoing.end(), edge); + if (k != myOutgoing.end()) { + if (myControlledInnerEdges.count(edge->getID()) == 0) { + bool controlled = false; + for (NBConnectionVector::iterator it = myControlledLinks.begin(); it != myControlledLinks.end(); it++) { + if ((*it).getFrom() == edge) { + controlled = true; + break; + } + } + if (controlled) { + myControlledInnerEdges.insert(edge->getID()); + } else { + myEdgesWithin.push_back(edge); + (*j)->setIsInnerEdge(); + j = myIncomingEdges.erase(j); + continue; + } + } + } + ++j; + } +} + + +void NBLoadedSUMOTLDef::collectLinks() { if (myControlledLinks.size() == 0) { // maybe we only loaded a different program for a default traffic light. @@ -224,5 +280,63 @@ collectAllLinks(); } } + + +/// @brief patches signal plans by modifying lane indices +void +NBLoadedSUMOTLDef::shiftTLConnectionLaneIndex(NBEdge* edge, int offset) { + // avoid shifting twice if the edge is incoming and outgoing to a joined TLS + if (myShifted.count(edge) == 0) { + /// XXX what if an edge should really be shifted twice? + myShifted.insert(edge); + for (NBConnectionVector::iterator it = myControlledLinks.begin(); it != myControlledLinks.end(); it++) { + (*it).shiftLaneIndex(edge, offset); + } + } +} + +void +NBLoadedSUMOTLDef::patchIfCrossingsAdded() { + // XXX what to do if crossings are removed during network building? + const unsigned int size = myTLLogic->getNumLinks(); + unsigned int noLinksAll = size; + // collect crossings + std::vector crossings; + for (std::vector::iterator i = myControlledNodes.begin(); i != myControlledNodes.end(); i++) { + const std::vector& c = (*i)->getCrossings(); + // set tl indices for crossings + (*i)->setCrossingTLIndices(noLinksAll); + copy(c.begin(), c.end(), std::back_inserter(crossings)); + noLinksAll += (unsigned int)c.size(); + } + if (crossings.size() > 0) { + // collect edges + assert(size > 0); + EdgeVector fromEdges(size, 0); + EdgeVector toEdges(size, 0); + for (NBConnectionVector::const_iterator it = myControlledLinks.begin(); it != myControlledLinks.end(); it++) { + const NBConnection& c = *it; + if (c.getTLIndex() != NBConnection::InvalidTlIndex) { + assert(c.getTLIndex() < (int)size); + fromEdges[c.getTLIndex()] = c.getFrom(); + toEdges[c.getTLIndex()] = c.getTo(); + } + } + /// XXX handle the case where some crossings are already loaded + const std::string crossingDefaultState(crossings.size(), 'r'); + + // rebuild the logic (see NBOwnTLDef.cpp::myCompute) + const std::vector phases = myTLLogic->getPhases(); + NBTrafficLightLogic* newLogic = new NBTrafficLightLogic(getID(), getProgramID(), 0, myOffset, myType); + //std::cout << "patchIfCrossingsAdded for " << getID() << " numPhases=" << phases.size() << "\n"; + for (std::vector::const_iterator it = phases.begin(); it != phases.end(); it++) { + NBOwnTLDef::addPedestrianPhases(newLogic, it->duration, it->state + crossingDefaultState, crossings, fromEdges, toEdges); + } + delete myTLLogic; + myTLLogic = newLogic; + } +} + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBLoadedSUMOTLDef.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBLoadedSUMOTLDef.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBLoadedSUMOTLDef.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBLoadedSUMOTLDef.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,14 +1,15 @@ /****************************************************************************/ /// @file NBLoadedSUMOTLDef.h /// @author Jakob Erdmann +/// @author Michael Behrisch /// @date Mar 2011 -/// @version $Id: NBLoadedSUMOTLDef.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBLoadedSUMOTLDef.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A complete traffic light logic loaded from a sumo-net. (opted to reimplement // since NBLoadedTLDef is quite vissim specific) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -92,6 +93,9 @@ void replaceRemoved(NBEdge* removed, int removedLane, NBEdge* by, int byLane); + /// @brief patches signal plans by modifying lane indices + void shiftTLConnectionLaneIndex(NBEdge* edge, int offset); + /** @brief Adds a phase to the logic * the new phase is inserted at the end of the list of already added phases * @param[in] duration The duration of the phase to add in SECONDS! @@ -122,12 +126,20 @@ */ void setOffset(SUMOTime offset); + /** @brief Sets the algorithm type of this tls + * @param[in] offset The algorithm type of this tls + */ + void setType(TrafficLightType type); + protected: /** @brief Collects the links participating in this traffic light * (only if not previously loaded) */ void collectLinks(); + /** @brief Build the list of participating edges + */ + void collectEdges(); /** @brief Computes the traffic light logic finally in dependence to the type * @param[in] ec The edge container @@ -150,6 +162,12 @@ /** @brief Informs edges about being controlled by a tls */ void setTLControllingInformation() const; + /// @brief repair the plan if controlled nodes received pedestrian crossings + void patchIfCrossingsAdded(); + + /// @brief set of edges with shifted lane indices (to avoid shifting twice) + std::set myShifted; + private: /// @brief class for identifying connections class connection_equal { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBLoadedTLDef.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBLoadedTLDef.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBLoadedTLDef.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBLoadedTLDef.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Tue, 29.05.2005 -/// @version $Id: NBLoadedTLDef.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBLoadedTLDef.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A loaded (complete) traffic light logic /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBLoadedTLDef.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBLoadedTLDef.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBLoadedTLDef.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBLoadedTLDef.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @date Fri, 29.04.2005 -/// @version $Id: NBLoadedTLDef.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBLoadedTLDef.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A loaded (complete) traffic light logic /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNetBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNetBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNetBuilder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNetBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -7,12 +7,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date 20 Nov 2001 -/// @version $Id: NBNetBuilder.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NBNetBuilder.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Instance responsible for building networks /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -52,10 +52,7 @@ #include #include "NBAlgorithms.h" #include "NBAlgorithms_Ramps.h" - -#ifdef HAVE_INTERNAL -#include -#endif +#include "NBHeightMapper.h" #ifdef CHECK_MEMORY_LEAKS #include @@ -66,8 +63,7 @@ // method definitions // =========================================================================== NBNetBuilder::NBNetBuilder() : - myEdgeCont(myTypeCont), - myHaveSeenRoundabouts(false) + myEdgeCont(myTypeCont) {} @@ -76,25 +72,6 @@ void NBNetBuilder::applyOptions(OptionsCont& oc) { - // we possibly have to load the edges to keep - if (oc.isSet("keep-edges.input-file")) { - std::ifstream strm(oc.getString("keep-edges.input-file").c_str()); - if (!strm.good()) { - throw ProcessError("Could not load names of edges too keep from '" + oc.getString("keep-edges.input-file") + "'."); - } - std::ostringstream oss; - bool first = true; - while (strm.good()) { - if (!first) { - oss << ','; - } - std::string name; - strm >> name; - oss << name; - first = false; - } - oc.set("keep-edges.explicit", oss.str()); - } // apply options to type control myTypeCont.setDefaults(oc.getInt("default.lanenumber"), oc.getFloat("default.speed"), oc.getInt("default.priority")); // apply options to edge control @@ -107,7 +84,7 @@ void NBNetBuilder::compute(OptionsCont& oc, const std::set& explicitTurnarounds, - bool removeUnwishedNodes) { + bool removeElements) { GeoConvHelper& geoConvHelper = GeoConvHelper::getProcessing(); @@ -125,7 +102,7 @@ } // if (oc.exists("keep-edges.postload") && oc.getBool("keep-edges.postload")) { - if (oc.isSet("keep-edges.explicit")) { + if (oc.isSet("keep-edges.explicit") || oc.isSet("keep-edges.input-file")) { PROGRESS_BEGIN_MESSAGE("Removing unwished edges"); myEdgeCont.removeUnwishedEdges(myDistrictCont); PROGRESS_DONE_MESSAGE(); @@ -146,18 +123,17 @@ myNodeCont.computeNodeShapes(oc.getBool("lefthand")); myEdgeCont.computeEdgeShapes(); // preliminary roundabout computations to avoid destroying roundabouts - if (oc.getBool("roundabouts.guess") || (oc.isDefault("roundabouts.guess") && myHaveSeenRoundabouts)) { - assert(myRoundabouts.size() == 0); - myEdgeCont.guessRoundabouts(myRoundabouts); - for (std::vector::const_iterator it_round = myRoundabouts.begin(); - it_round != myRoundabouts.end(); ++it_round) { - std::vector nodeIDs; - for (EdgeVector::const_iterator it_edge = it_round->begin(); it_edge != it_round->end(); ++it_edge) { - nodeIDs.push_back((*it_edge)->getToNode()->getID()); - } - myNodeCont.addJoinExclusion(nodeIDs); + if (oc.getBool("roundabouts.guess")) { + myEdgeCont.guessRoundabouts(); + } + const std::set& roundabouts = myEdgeCont.getRoundabouts(); + for (std::set::const_iterator it_round = roundabouts.begin(); + it_round != roundabouts.end(); ++it_round) { + std::vector nodeIDs; + for (EdgeSet::const_iterator it_edge = it_round->begin(); it_edge != it_round->end(); ++it_edge) { + nodeIDs.push_back((*it_edge)->getToNode()->getID()); } - myRoundabouts.clear(); + myNodeCont.addJoinExclusion(nodeIDs); } numJoined += myNodeCont.joinJunctions(oc.getFloat("junctions.join-dist"), myDistrictCont, myEdgeCont, myTLLCont); // reset geometry to avoid influencing subsequent steps (ramps.guess) @@ -169,7 +145,7 @@ WRITE_MESSAGE(" Joined " + toString(numJoined) + " junction cluster(s)."); } // - if (removeUnwishedNodes) { + if (removeElements) { unsigned int no = 0; const bool removeGeometryNodes = oc.exists("geometry.remove") && oc.getBool("geometry.remove"); PROGRESS_BEGIN_MESSAGE("Removing empty nodes" + std::string(removeGeometryNodes ? " and geometry nodes" : "")); @@ -177,7 +153,18 @@ PROGRESS_DONE_MESSAGE(); WRITE_MESSAGE(" " + toString(no) + " nodes removed."); } + // MOVE TO ORIGIN + // compute new boundary after network modifications have taken place + Boundary boundary; + for (std::map::const_iterator it = myNodeCont.begin(); it != myNodeCont.end(); ++it) { + boundary.add(it->second->getPosition()); + } + for (std::map::const_iterator it = myEdgeCont.begin(); it != myEdgeCont.end(); ++it) { + boundary.add(it->second->getGeometry().getBoxBoundary()); + } + geoConvHelper.setConvBoundary(boundary); + if (!oc.getBool("offset.disable-normalization") && oc.isDefault("offset.x") && oc.isDefault("offset.y")) { moveToOrigin(geoConvHelper); } @@ -190,16 +177,24 @@ } // @note: removing geometry can create similar edges so joinSimilarEdges must come afterwards // @note: likewise splitting can destroy similarities so joinSimilarEdges must come before - PROGRESS_BEGIN_MESSAGE("Joining similar edges"); - myJoinedEdges.init(myEdgeCont); - myNodeCont.joinSimilarEdges(myDistrictCont, myEdgeCont, myTLLCont); - PROGRESS_DONE_MESSAGE(); + if (removeElements) { + PROGRESS_BEGIN_MESSAGE("Joining similar edges"); + myJoinedEdges.init(myEdgeCont); + myNodeCont.joinSimilarEdges(myDistrictCont, myEdgeCont, myTLLCont); + PROGRESS_DONE_MESSAGE(); + } // if (oc.exists("geometry.split") && oc.getBool("geometry.split")) { PROGRESS_BEGIN_MESSAGE("Splitting geometry edges"); myEdgeCont.splitGeometry(myNodeCont); PROGRESS_DONE_MESSAGE(); } + // turning direction + PROGRESS_BEGIN_MESSAGE("Computing turning directions"); + NBTurningDirectionsComputer::computeTurnDirections(myNodeCont); + PROGRESS_DONE_MESSAGE(); + // correct edge geometries to avoid overlap + myNodeCont.avoidOverlap(); // guess ramps if ((oc.exists("ramps.guess") && oc.getBool("ramps.guess")) || (oc.exists("ramps.set") && oc.isSet("ramps.set"))) { PROGRESS_BEGIN_MESSAGE("Guessing and setting on-/off-ramps"); @@ -207,6 +202,14 @@ NBRampsComputer::computeRamps(*this, oc); PROGRESS_DONE_MESSAGE(); } + // guess sidewalks + if (oc.getBool("sidewalks.guess") || oc.getBool("sidewalks.guess.from-permissions")) { + const int sidewalks = myEdgeCont.guessSidewalks(oc.getFloat("default.sidewalk-width"), + oc.getFloat("sidewalks.guess.min-speed"), + oc.getFloat("sidewalks.guess.max-speed"), + oc.getBool("sidewalks.guess.from-permissions")); + WRITE_MESSAGE("Guessed " + toString(sidewalks) + " sidewalks."); + } // check whether any not previously setable connections may be set now myEdgeCont.recheckPostProcessConnections(); @@ -217,8 +220,28 @@ oc.getFloat("geometry.min-radius"), oc.getBool("geometry.min-radius.fix")); } + + // GEOMETRY COMPUTATION // + PROGRESS_BEGIN_MESSAGE("Sorting nodes' edges"); + NBNodesEdgesSorter::sortNodesEdges(myNodeCont, oc.getBool("lefthand")); + PROGRESS_DONE_MESSAGE(); myEdgeCont.computeLaneShapes(); + // + PROGRESS_BEGIN_MESSAGE("Computing node shapes"); + if (oc.exists("geometry.junction-mismatch-threshold")) { + myNodeCont.computeNodeShapes(oc.getBool("lefthand"), oc.getFloat("geometry.junction-mismatch-threshold")); + } else { + myNodeCont.computeNodeShapes(oc.getBool("lefthand")); + } + PROGRESS_DONE_MESSAGE(); + // + PROGRESS_BEGIN_MESSAGE("Computing edge shapes"); + myEdgeCont.computeEdgeShapes(); + PROGRESS_DONE_MESSAGE(); + // resort edges based on the node and edge shapes + NBNodesEdgesSorter::sortNodesEdges(myNodeCont, oc.getBool("lefthand"), true); + NBTurningDirectionsComputer::computeTurnDirections(myNodeCont); // APPLY SPEED MODIFICATIONS if (oc.exists("speed.offset")) { @@ -235,18 +258,29 @@ // CONNECTIONS COMPUTATION // - PROGRESS_BEGIN_MESSAGE("Computing turning directions"); - NBTurningDirectionsComputer::computeTurnDirections(myNodeCont); - PROGRESS_DONE_MESSAGE(); - // - PROGRESS_BEGIN_MESSAGE("Sorting nodes' edges"); - NBNodesEdgesSorter::sortNodesEdges(myNodeCont, oc.getBool("lefthand")); - PROGRESS_DONE_MESSAGE(); - // PROGRESS_BEGIN_MESSAGE("Computing node types"); NBNodeTypeComputer::computeNodeTypes(myNodeCont); PROGRESS_DONE_MESSAGE(); // + bool buildCrossingsAndWalkingAreas = false; + if (oc.getBool("crossings.guess")) { + buildCrossingsAndWalkingAreas = true; + int crossings = 0; + for (std::map::const_iterator i = myNodeCont.begin(); i != myNodeCont.end(); ++i) { + crossings += (*i).second->guessCrossings(); + } + WRITE_MESSAGE("Guessed " + toString(crossings) + " pedestrian crossings."); + } + if (!oc.getBool("no-internal-links") && !buildCrossingsAndWalkingAreas) { + // recheck whether we had crossings in the input + for (std::map::const_iterator i = myNodeCont.begin(); i != myNodeCont.end(); ++i) { + if (i->second->getCrossings().size() > 0) { + buildCrossingsAndWalkingAreas = true; + break; + } + } + } + // PROGRESS_BEGIN_MESSAGE("Computing priorities"); NBEdgePriorityComputer::computeEdgePriorities(myNodeCont); PROGRESS_DONE_MESSAGE(); @@ -255,18 +289,19 @@ myEdgeCont.computeEdge2Edges(oc.getBool("no-left-connections")); PROGRESS_DONE_MESSAGE(); // - if (oc.getBool("roundabouts.guess") || (oc.isDefault("roundabouts.guess") && myHaveSeenRoundabouts)) { + if (oc.getBool("roundabouts.guess")) { PROGRESS_BEGIN_MESSAGE("Guessing and setting roundabouts"); - myEdgeCont.guessRoundabouts(myRoundabouts); + myEdgeCont.guessRoundabouts(); PROGRESS_DONE_MESSAGE(); } + myEdgeCont.markRoundabouts(); // PROGRESS_BEGIN_MESSAGE("Computing approaching lanes"); - myEdgeCont.computeLanes2Edges(); + myEdgeCont.computeLanes2Edges(buildCrossingsAndWalkingAreas); PROGRESS_DONE_MESSAGE(); // PROGRESS_BEGIN_MESSAGE("Dividing of lanes on approached lanes"); - myNodeCont.computeLanes2Lanes(); + myNodeCont.computeLanes2Lanes(buildCrossingsAndWalkingAreas); myEdgeCont.sortOutgoingLanesConnections(); PROGRESS_DONE_MESSAGE(); // @@ -279,18 +314,7 @@ PROGRESS_DONE_MESSAGE(); // PROGRESS_BEGIN_MESSAGE("Rechecking of lane endings"); - myEdgeCont.recheckLanes(); - PROGRESS_DONE_MESSAGE(); - - - // GEOMETRY COMPUTATION - // - PROGRESS_BEGIN_MESSAGE("Computing node shapes"); - myNodeCont.computeNodeShapes(oc.getBool("lefthand")); - PROGRESS_DONE_MESSAGE(); - // - PROGRESS_BEGIN_MESSAGE("Computing edge shapes"); - myEdgeCont.computeEdgeShapes(); + myEdgeCont.recheckLanes(buildCrossingsAndWalkingAreas); PROGRESS_DONE_MESSAGE(); @@ -321,7 +345,7 @@ // COMPUTING RIGHT-OF-WAY AND TRAFFIC LIGHT PROGRAMS // PROGRESS_BEGIN_MESSAGE("Computing traffic light control information"); - myTLLCont.setTLControllingInformation(myEdgeCont); + myTLLCont.setTLControllingInformation(myEdgeCont, myNodeCont); PROGRESS_DONE_MESSAGE(); // PROGRESS_BEGIN_MESSAGE("Computing node logics"); @@ -349,8 +373,9 @@ for (std::map::const_iterator i = myEdgeCont.begin(); i != myEdgeCont.end(); ++i) { (*i).second->sortOutgoingConnectionsByIndex(); } + // walking areas shall only be built if crossings are wished as well for (std::map::const_iterator i = myNodeCont.begin(); i != myNodeCont.end(); ++i) { - (*i).second->buildInnerEdges(); + (*i).second->buildInnerEdges(buildCrossingsAndWalkingAreas); } PROGRESS_DONE_MESSAGE(); } @@ -377,15 +402,7 @@ void NBNetBuilder::moveToOrigin(GeoConvHelper& geoConvHelper) { PROGRESS_BEGIN_MESSAGE("Moving network to origin"); - // compute new boundary after network modifications have taken place - Boundary boundary; - for (std::map::const_iterator it = myNodeCont.begin(); it != myNodeCont.end(); ++it) { - boundary.add(it->second->getPosition()); - } - for (std::map::const_iterator it = myEdgeCont.begin(); it != myEdgeCont.end(); ++it) { - boundary.add(it->second->getGeometry().getBoxBoundary()); - } - geoConvHelper.setConvBoundary(boundary); + Boundary boundary = geoConvHelper.getConvBoundary(); const SUMOReal x = -boundary.xmin(); const SUMOReal y = -boundary.ymin(); for (std::map::const_iterator i = myNodeCont.begin(); i != myNodeCont.end(); ++i) { @@ -406,9 +423,8 @@ NBNetBuilder::transformCoordinates(Position& from, bool includeInBoundary, GeoConvHelper* from_srs) { Position orig(from); bool ok = GeoConvHelper::getProcessing().x2cartesian(from, includeInBoundary); -#ifdef HAVE_INTERNAL if (ok) { - const HeightMapper& hm = HeightMapper::get(); + const NBHeightMapper& hm = NBHeightMapper::get(); if (hm.ready()) { if (from_srs != 0 && from_srs->usingGeoProjection()) { from_srs->cartesian2geo(orig); @@ -417,9 +433,6 @@ from = Position(from.x(), from.y(), z); } } -#else - UNUSED_PARAMETER(from_srs); -#endif return ok; } @@ -458,4 +471,5 @@ } return ok; } + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNetBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNetBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNetBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNetBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Fri, 29.04.2005 -/// @version $Id: NBNetBuilder.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBNetBuilder.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Instance responsible for building networks /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -136,12 +136,12 @@ * * @param[in] oc Container that contains options for building * @param[in] explicitTurnarounds List of edge ids for which turn-arounds should be added (used by NETEDIT) - * @param[in] removeUnwishedNodes Whether to remove orphan nodes (and optionally convert some nodes to geometry) + * @param[in] removeElements whether processing steps which cause nodes and edges to be removed shall be triggered * @exception ProcessError (recheck) */ void compute(OptionsCont& oc, const std::set& explicitTurnarounds = std::set(), - bool removeUnwishedNodes = true); + bool removeElements = true); @@ -187,15 +187,6 @@ return myDistrictCont; } - - /** @brief Returns the determined roundabouts - * @return The list of roundabout edges - */ - const std::vector& getRoundabouts() const { - return myRoundabouts; - } - - /** @brief Returns the joined edges map * @return The map of joined edges */ @@ -205,18 +196,13 @@ /// @} - /// @brief declare that roundabouts have been seen during loading - void haveSeenRoundabouts() { - myHaveSeenRoundabouts = true; - } - /** * @brief transforms loaded coordinates - * handles projections, offsets (using GeoConvHelper) and import of height data (using Heightmapper if available) + * handles projections, offsets (using GeoConvHelper) and import of height data (using NBHeightMapper) * @param[in,out] from The coordinate to be transformed * @param[in] includeInBoundary Whether to patch the convex boundary of the GeoConvHelper default instance * @param[in] from_srs The spatial reference system of the input coordinate - * @notde These methods are located outside of GeoConvHelper to avoid linker-dependecies on INTERNAL_LIBS and GDAL for libgeom + * @notde These methods are located outside of GeoConvHelper to avoid linker-dependencies on GDAL for libgeom */ static bool transformCoordinates(Position& from, bool includeInBoundary = true, GeoConvHelper* from_srs = 0); static bool transformCoordinates(PositionVector& from, bool includeInBoundary = true, GeoConvHelper* from_srs = 0); @@ -254,12 +240,6 @@ /// @brief The used container for districts NBDistrictCont myDistrictCont; - /// @brief whether a sumo network with roundabout information was loaded - bool myHaveSeenRoundabouts; - - /// @brief Edges marked as belonging to a roundabout (each EdgeVector is a roundabout) - std::vector myRoundabouts; - /// @brief Map of joined edges NBJoinedEdgesMap myJoinedEdges; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNodeCont.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNodeCont.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNodeCont.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNodeCont.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,18 +2,18 @@ /// @file NBNodeCont.cpp /// @author Daniel Krajzewicz /// @author Jakob Erdmann -/// @author Yun-Pang Wang +/// @author Yun-Pang Floetteroed /// @author Walter Bamberger /// @author Laura Bieker /// @author Michael Behrisch /// @author Sascha Krieg /// @date Tue, 20 Nov 2001 -/// @version $Id: NBNodeCont.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBNodeCont.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Container for nodes during the netbuilding process /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -65,7 +65,8 @@ // method definitions // =========================================================================== NBNodeCont::NBNodeCont() - : myInternalID(1) {} + : myInternalID(1) { +} NBNodeCont::~NBNodeCont() { @@ -83,37 +84,13 @@ } NBNode* node = new NBNode(id, position, district); myNodes[id] = node; + const float pos[2] = {(float)position.x(), (float)position.y()}; + myRTree.Insert(pos, pos, node); return true; } bool -NBNodeCont::insert(const std::string& id, const Position& position) { - NodeCont::iterator i = myNodes.find(id); - if (i != myNodes.end()) { - return false; - } - NBNode* node = new NBNode(id, position); - myNodes[id] = node; - return true; -} - - -Position -NBNodeCont::insert(const std::string& id) { - std::pair ret(-1.0, -1.0); - NodeCont::iterator i = myNodes.find(id); - if (i != myNodes.end()) { - return (*i).second->getPosition(); - } else { - NBNode* node = new NBNode(id, Position(-1.0, -1.0)); - myNodes[id] = node; - } - return Position(-1, -1); -} - - -bool NBNodeCont::insert(NBNode* node) { std::string id = node->getID(); NodeCont::iterator i = myNodes.find(id); @@ -121,6 +98,8 @@ return false; } myNodes[id] = node; + const float pos[2] = {(float)node->getPosition().x(), (float)node->getPosition().y()}; + myRTree.Insert(pos, pos, node); return true; } @@ -136,12 +115,18 @@ NBNode* -NBNodeCont::retrieve(const Position& position, SUMOReal offset) const { - for (NodeCont::const_iterator i = myNodes.begin(); i != myNodes.end(); i++) { - NBNode* node = (*i).second; - if (fabs(node->getPosition().x() - position.x()) < offset +NBNodeCont::retrieve(const Position& position, const SUMOReal offset) const { + const SUMOReal extOffset = offset + POSITION_EPS; + const float cmin[2] = {(float)(position.x() - extOffset), (float)(position.y() - extOffset)}; + const float cmax[2] = {(float)(position.x() + extOffset), (float)(position.y() + extOffset)}; + std::set into; + Named::StoringVisitor sv(into); + myRTree.Search(cmin, cmax, sv); + for (std::set::const_iterator i = into.begin(); i != into.end(); i++) { + NBNode* const node = myNodes.find(*i)->second; + if (fabs(node->getPosition().x() - position.x()) <= offset && - fabs(node->getPosition().y() - position.y()) < offset) { + fabs(node->getPosition().y() - position.y()) <= offset) { return node; } } @@ -167,6 +152,8 @@ return false; } myNodes.erase(i); + const float pos[2] = {(float)node->getPosition().x(), (float)node->getPosition().y()}; + myRTree.Remove(pos, pos, node); node->removeTrafficLights(); if (remember) { myExtractedNodes.insert(node); @@ -384,6 +371,13 @@ } +void +NBNodeCont::avoidOverlap() { + for (NodeCont::iterator i = myNodes.begin(); i != myNodes.end(); i++) { + (*i).second->avoidOverlap(); + } +} + // ----------- (Helper) methods for joining nodes void NBNodeCont::generateNodeClusters(SUMOReal maxDist, NodeClusters& into) const { @@ -487,10 +481,10 @@ unsigned int -NBNodeCont::joinJunctions(SUMOReal maxdist, NBDistrictCont& dc, NBEdgeCont& ec, NBTrafficLightLogicCont& tlc) { +NBNodeCont::joinJunctions(SUMOReal maxDist, NBDistrictCont& dc, NBEdgeCont& ec, NBTrafficLightLogicCont& tlc) { NodeClusters cands; NodeClusters clusters; - generateNodeClusters(maxdist, cands); + generateNodeClusters(maxDist, cands); for (NodeClusters::iterator i = cands.begin(); i != cands.end(); ++i) { std::set cluster = (*i); // remove join exclusions @@ -509,40 +503,138 @@ std::set::iterator check = j; NBNode* n = *check; ++j; - // remove nodes with degree <= 2 at fringe of the cluster (at least one edge leads to a non-cluster node) - if ( - (n->getIncomingEdges().size() <= 1 && n->getOutgoingEdges().size() <= 1) && - ((n->getIncomingEdges().size() == 0 || - (n->getIncomingEdges().size() == 1 && cluster.count(n->getIncomingEdges()[0]->getFromNode()) == 0)) || - (n->getOutgoingEdges().size() == 0 || - (n->getOutgoingEdges().size() == 1 && cluster.count(n->getOutgoingEdges()[0]->getToNode()) == 0))) - ) { + // remove geometry-like nodes at fringe of the cluster + // (they have 1 neighbor in the cluster and at most 1 neighbor outside the cluster) + std::set neighbors; + std::set clusterNeigbors; + for (EdgeVector::const_iterator it_edge = n->getOutgoingEdges().begin(); it_edge != n->getOutgoingEdges().end(); ++it_edge) { + NBNode* neighbor = (*it_edge)->getToNode(); + if (cluster.count(neighbor) == 0) { + neighbors.insert(neighbor); + } else { + clusterNeigbors.insert(neighbor); + } + } + for (EdgeVector::const_iterator it_edge = n->getIncomingEdges().begin(); it_edge != n->getIncomingEdges().end(); ++it_edge) { + NBNode* neighbor = (*it_edge)->getFromNode(); + if (cluster.count(neighbor) == 0) { + neighbors.insert(neighbor); + } else { + clusterNeigbors.insert(neighbor); + } + } + if (neighbors.size() <= 1 && clusterNeigbors.size() == 1) { cluster.erase(check); pruneFringe = true; // other nodes could belong to the fringe now } } } + // exclude the fromNode of a long edge if the toNode is in the cluster (and they were both added via an alternative path). + std::set toRemove; + for (std::set::iterator j = cluster.begin(); j != cluster.end(); ++j) { + NBNode* n = *j; + const EdgeVector& edges = n->getOutgoingEdges(); + for (EdgeVector::const_iterator it_edge = edges.begin(); it_edge != edges.end(); ++it_edge) { + NBEdge* edge = *it_edge; + if (cluster.count(edge->getToNode()) != 0 && edge->getLoadedLength() > maxDist) { + //std::cout << "long edge " << edge->getID() << " (" << edge->getLoadedLength() << ", max=" << maxDist << ")\n"; + toRemove.insert(n); + toRemove.insert(edge->getToNode()); + } + } + } + for (std::set::iterator j = toRemove.begin(); j != toRemove.end(); ++j) { + cluster.erase(*j); + } if (cluster.size() > 1) { // check for clusters which are to complex and probably won't work very well // we count the incoming edges of the final junction - std::set finalIncoming; + std::map finalIncomingAngles; + std::map finalOutgoingAngles; std::vector nodeIDs; for (std::set::const_iterator j = cluster.begin(); j != cluster.end(); ++j) { nodeIDs.push_back((*j)->getID()); - const EdgeVector& edges = (*j)->getIncomingEdges(); - for (EdgeVector::const_iterator it_edge = edges.begin(); it_edge != edges.end(); ++it_edge) { + for (EdgeVector::const_iterator it_edge = (*j)->getIncomingEdges().begin(); it_edge != (*j)->getIncomingEdges().end(); ++it_edge) { NBEdge* edge = *it_edge; if (cluster.count(edge->getFromNode()) == 0) { // incoming edge, does not originate in the cluster - finalIncoming.insert(edge); + finalIncomingAngles[edge->getID()] = edge->getAngleAtNode(edge->getToNode()); + } + } + for (EdgeVector::const_iterator it_edge = (*j)->getOutgoingEdges().begin(); it_edge != (*j)->getOutgoingEdges().end(); ++it_edge) { + NBEdge* edge = *it_edge; + if (cluster.count(edge->getToNode()) == 0) { + // outgoing edge, does not end in the cluster + finalOutgoingAngles[edge->getID()] = edge->getAngleAtNode(edge->getFromNode()); } } } - if (finalIncoming.size() > 4) { - WRITE_WARNING("Not joining junctions " + joinToString(nodeIDs, ',') + " because the cluster is too complex"); + if (finalIncomingAngles.size() > 4) { + std::sort(nodeIDs.begin(), nodeIDs.end()); + WRITE_WARNING("Not joining junctions " + joinToStringSorting(nodeIDs, ',') + " because the cluster is too complex (" + toString(finalIncomingAngles.size()) + " incoming edges)"); } else { - clusters.push_back(cluster); + // check for incoming parallel edges + const SUMOReal PARALLEL_INCOMING_THRESHOLD = 10.0; + bool foundParallel = false; + for (std::map::const_iterator j = finalIncomingAngles.begin(); j != finalIncomingAngles.end() && !foundParallel; ++j) { + std::map::const_iterator k = j; + for (++k; k != finalIncomingAngles.end() && !foundParallel; ++k) { + if (fabs(j->second - k->second) < PARALLEL_INCOMING_THRESHOLD) { + WRITE_WARNING("Not joining junctions " + joinToStringSorting(nodeIDs, ',') + " because the cluster is too complex (parallel incoming " + + j->first + "," + k->first + ")"); + foundParallel = true; + } + } + } + // check for outgoing parallel edges + for (std::map::const_iterator j = finalOutgoingAngles.begin(); j != finalOutgoingAngles.end() && !foundParallel; ++j) { + std::map::const_iterator k = j; + for (++k; k != finalOutgoingAngles.end() && !foundParallel; ++k) { + if (fabs(j->second - k->second) < PARALLEL_INCOMING_THRESHOLD) { + WRITE_WARNING("Not joining junctions " + joinToStringSorting(nodeIDs, ',') + " because the cluster is too complex (parallel outgoing " + + j->first + "," + k->first + ")"); + foundParallel = true; + } + } + } + if (!foundParallel && cluster.size() > 1) { + // compute all connected components of this cluster + // (may be more than 1 if intermediate nodes were removed) + NodeClusters components; + for (std::set::iterator j = cluster.begin(); j != cluster.end(); ++j) { + // merge all connected components into newComp + std::set newComp; + NBNode* current = *j; + //std::cout << "checking connectivity for " << current->getID() << "\n"; + newComp.insert(current); + for (NodeClusters::iterator it_comp = components.begin(); it_comp != components.end();) { + NodeClusters::iterator check = it_comp; + //std::cout << " connected with " << toString(*check) << "?\n"; + bool connected = false; + for (std::set::iterator k = (*check).begin(); k != (*check).end(); ++k) { + if (current->getConnectionTo(*k) != 0 || (*k)->getConnectionTo(current) != 0) { + //std::cout << "joining with connected component " << toString(*check) << "\n"; + newComp.insert((*check).begin(), (*check).end()); + it_comp = components.erase(check); + connected = true; + break; + } + } + if (!connected) { + it_comp++; + } + } + //std::cout << "adding new component " << toString(newComp) << "\n"; + components.push_back(newComp); + } + for (NodeClusters::iterator it_comp = components.begin(); it_comp != components.end(); ++it_comp) { + if ((*it_comp).size() > 1) { + //std::cout << "adding cluster " << toString(*it_comp) << "\n"; + clusters.push_back(*it_comp); + } + } + } } } } @@ -729,6 +821,58 @@ } } + // figure out which nodes mark the locations of TLS signals + // This assumes nodes are already joined + if (oc.exists("tls.guess-signals") && oc.getBool("tls.guess-signals")) { + // prepare candidate edges + const SUMOReal signalDist = oc.getFloat("tls.guess-signals.dist"); + for (std::map::const_iterator i = myNodes.begin(); i != myNodes.end(); ++i) { + NBNode* node = (*i).second; + if (node->isTLControlled() && node->geometryLike()) { + const EdgeVector& outgoing = node->getOutgoingEdges(); + for (EdgeVector::const_iterator it_o = outgoing.begin(); it_o != outgoing.end(); ++it_o) { + (*it_o)->setSignalOffset((*it_o)->getLength()); + } + } + } + // check which nodes should be controlled + for (std::map::const_iterator i = myNodes.begin(); i != myNodes.end(); ++i) { + NBNode* node = i->second; + const EdgeVector& incoming = node->getIncomingEdges(); + if (!node->isTLControlled() && incoming.size() > 1 && !node->geometryLike()) { + std::vector signals; + bool isTLS = true; + for (EdgeVector::const_iterator it_i = incoming.begin(); it_i != incoming.end(); ++it_i) { + const NBEdge* inEdge = *it_i; + if (inEdge->getSignalOffset() == NBEdge::UNSPECIFIED_SIGNAL_OFFSET || inEdge->getSignalOffset() > signalDist) { + isTLS = false; + break; + } + if (inEdge->getSignalOffset() == inEdge->getLength()) { + signals.push_back(inEdge->getFromNode()); + } + } + if (isTLS) { + for (std::vector::iterator j = signals.begin(); j != signals.end(); ++j) { + std::set tls = (*j)->getControllingTLS(); + (*j)->removeTrafficLights(); + for (std::set::iterator k = tls.begin(); k != tls.end(); ++k) { + tlc.removeFully((*j)->getID()); + } + } + NBTrafficLightDefinition* tlDef = new NBOwnTLDef("GS_" + node->getID(), node, 0, TLTYPE_STATIC); + // @todo patch endOffset for all incoming lanes according to the signal positions + if (!tlc.insert(tlDef)) { + // actually, nothing should fail here + WRITE_WARNING("Could not build joined tls '" + node->getID() + "'."); + delete tlDef; + return; + } + } + } + } + } + // maybe no tls shall be guessed if (!oc.getBool("tls.guess")) { return; @@ -861,9 +1005,9 @@ // ----------- void -NBNodeCont::computeLanes2Lanes() { +NBNodeCont::computeLanes2Lanes(const bool buildCrossingsAndWalkingAreas) { for (NodeCont::iterator i = myNodes.begin(); i != myNodes.end(); i++) { - (*i).second->computeLanes2Lanes(); + (*i).second->computeLanes2Lanes(buildCrossingsAndWalkingAreas); } } @@ -900,9 +1044,9 @@ void -NBNodeCont::computeNodeShapes(bool leftHand) { +NBNodeCont::computeNodeShapes(bool leftHand, SUMOReal mismatchThreshold) { for (NodeCont::iterator i = myNodes.begin(); i != myNodes.end(); i++) { - (*i).second->computeNodeShape(leftHand); + (*i).second->computeNodeShape(leftHand, mismatchThreshold); } } @@ -914,6 +1058,7 @@ int numPriorityJunctions = 0; int numRightBeforeLeftJunctions = 0; int numAllWayStopJunctions = 0; + int numRailSignals = 0; for (NodeCont::const_iterator i = myNodes.begin(); i != myNodes.end(); i++) { switch ((*i).second->getType()) { case NODETYPE_NOJUNCTION: @@ -939,6 +1084,9 @@ break; case NODETYPE_UNKNOWN: break; + case NODETYPE_RAIL_SIGNAL: + ++numRailSignals; + break; default: break; } @@ -953,6 +1101,9 @@ if (numAllWayStopJunctions > 0) { WRITE_MESSAGE(" All-way stop junctions : " + toString(numAllWayStopJunctions)); } + if (numRailSignals > 0) { + WRITE_MESSAGE(" Rail signal junctions : " + toString(numRailSignals)); + } } @@ -978,12 +1129,19 @@ void -NBNodeCont::discardTrafficLights(NBTrafficLightLogicCont& tlc, bool geometryLike) { +NBNodeCont::discardTrafficLights(NBTrafficLightLogicCont& tlc, bool geometryLike, bool guessSignals) { for (NodeCont::const_iterator i = myNodes.begin(); i != myNodes.end(); ++i) { NBNode* node = i->second; if (!geometryLike || node->geometryLike()) { // make a copy of tldefs const std::set tldefs = node->getControllingTLS(); + if (guessSignals && node->isTLControlled() && node->geometryLike()) { + // record signal location + const EdgeVector& outgoing = node->getOutgoingEdges(); + for (EdgeVector::const_iterator it_o = outgoing.begin(); it_o != outgoing.end(); ++it_o) { + (*it_o)->setSignalOffset((*it_o)->getLength()); + } + } for (std::set::const_iterator it = tldefs.begin(); it != tldefs.end(); ++it) { NBTrafficLightDefinition* tlDef = *it; node->removeTrafficLight(tlDef); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNodeCont.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNodeCont.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNodeCont.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNodeCont.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,16 +2,16 @@ /// @file NBNodeCont.h /// @author Daniel Krajzewicz /// @author Jakob Erdmann -/// @author Yun-Pang Wang +/// @author Yun-Pang Floetteroed /// @author Michael Behrisch /// @author Walter Bamberger /// @date Tue, 20 Nov 2001 -/// @version $Id: NBNodeCont.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBNodeCont.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Container for nodes during the netbuilding process /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -38,6 +38,7 @@ #include #include #include +#include #include #include "NBEdgeCont.h" #include "NBNode.h" @@ -81,22 +82,7 @@ * @return Whether the node could be added (no other with the same id or position is stored) */ bool insert(const std::string& id, const Position& position, - NBDistrict* district); - - - /** @brief Inserts a node into the map - * @param[in] id The node's id - * @param[in] position The node's position - * @return Whether the node could be added (no other with the same id or position is stored) - */ - bool insert(const std::string& id, const Position& position); - - - /** @brief Inserts a node into the map - * @param[in] id The node's id - * @return Whether the node could be added (no other with the same id is stored) - */ - Position insert(const std::string& id); + NBDistrict* district = 0); /** @brief Inserts a node into the map @@ -132,7 +118,7 @@ * @param[in] offset An offset which can be applied in the case positions are blurred * @return The node at the given position, or 0 if no such node exists */ - NBNode* retrieve(const Position& position, SUMOReal offset = 0.) const; + NBNode* retrieve(const Position& position, const SUMOReal offset = 0.) const; /** @brief Returns the pointer to the begin of the stored nodes @@ -177,7 +163,7 @@ /** @brief Joins junctions that are very close together */ - unsigned int joinJunctions(SUMOReal maxdist, NBDistrictCont& dc, NBEdgeCont& ec, NBTrafficLightLogicCont& tlc); + unsigned int joinJunctions(SUMOReal maxDist, NBDistrictCont& dc, NBEdgeCont& ec, NBTrafficLightLogicCont& tlc); /// @} @@ -203,6 +189,11 @@ void joinSimilarEdges(NBDistrictCont& dc, NBEdgeCont& ec, NBTrafficLightLogicCont& tlc); + /** @brief fix overlap + */ + void avoidOverlap(); + + /** @brief Removes sequences of edges that are not connected with a junction. * Simple roads without junctions sometimes remain when converting from OpenStreetMake, * but they make no sense. Remaining empty nodes are also deleted. @@ -271,7 +262,7 @@ /// divides the incoming lanes on outgoing lanes - void computeLanes2Lanes(); + void computeLanes2Lanes(const bool buildCrossingsAndWalkingAreas); /// build the list of outgoing edges and lanes void computeLogics(const NBEdgeCont& ec, OptionsCont& oc); @@ -290,10 +281,11 @@ std::string getFreeID(); - void computeNodeShapes(bool leftHand); - - - + /** @brief Compute the junction shape for this node + * @param[in] lefhand Whether the network uses left-hand traffic + * @param[in] mismatchThreshold The threshold for warning about shapes which are away from myPosition + */ + void computeNodeShapes(bool leftHand, SUMOReal mismatchThreshold = -1); /** @brief Prints statistics about built nodes * @@ -329,7 +321,7 @@ /* @brief discards traffic lights * @param[in] geometryLike Whether only tls at geometry-like nodes shall be discarded */ - void discardTrafficLights(NBTrafficLightLogicCont& tlc, bool geometryLike); + void discardTrafficLights(NBTrafficLightLogicCont& tlc, bool geometryLike, bool guessSignals); private: /// @name Helper methods for for joining nodes @@ -392,6 +384,9 @@ /// @brief ids found in loaded join clusters used for error checking std::set myJoined; + /// @brief node positions for faster lookup + NamedRTree myRTree; + private: /// @brief invalidated copy constructor NBNodeCont(const NBNodeCont& s); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNode.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNode.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNode.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNode.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NBNode.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NBNode.cpp 18167 2015-03-27 11:26:11Z namdre $ /// // The representation of a single node /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -53,6 +53,7 @@ #include #include #include "NBNode.h" +#include "NBAlgorithms.h" #include "NBNodeCont.h" #include "NBNodeShapeComputer.h" #include "NBEdgeCont.h" @@ -69,10 +70,25 @@ #include #endif // CHECK_MEMORY_LEAKS +// allow to extend a crossing across multiple edges +#define EXTEND_CROSSING_ANGLE_THRESHOLD 35.0 // degrees +// create intermediate walking areas if either of the following thresholds is exceeded +#define SPLIT_CROSSING_WIDTH_THRESHOLD 1.5 // meters +#define SPLIT_CROSSING_ANGLE_THRESHOLD 5 // degrees +// do not build uncontrolled crossings across edges with a speed above the threshold +#define UNCONTROLLED_CROSSING_SPEED_THRESHOLD 13.89 // meters/second + +#define DEBUGID "C" // =========================================================================== // static members // =========================================================================== +const int NBNode::MAX_CONNECTIONS(64); +const int NBNode::FORWARD(1); +const int NBNode::BACKWARD(-1); +const SUMOReal NBNode::DEFAULT_CROSSING_WIDTH(4); +const SUMOReal NBNode::UNSPECIFIED_RADIUS = -1; +const SUMOReal NBNode::DEFAULT_RADIUS = 1.5; // =========================================================================== // method definitions @@ -81,10 +97,32 @@ * NBNode::ApproachingDivider-methods * ----------------------------------------------------------------------- */ NBNode::ApproachingDivider::ApproachingDivider( - EdgeVector* approaching, NBEdge* currentOutgoing) : + EdgeVector* approaching, NBEdge* currentOutgoing, const bool buildCrossingsAndWalkingAreas) : myApproaching(approaching), myCurrentOutgoing(currentOutgoing) { // check whether origin lanes have been given assert(myApproaching != 0); + // collect lanes which are expliclity targeted + std::set approachedLanes; + for (EdgeVector::iterator it = myApproaching->begin(); it != myApproaching->end(); ++it) { + const std::vector conns = (*it)->getConnections(); + for (std::vector::const_iterator it_con = conns.begin(); it_con != conns.end(); ++it_con) { + if ((*it_con).toEdge == myCurrentOutgoing) { + approachedLanes.insert((*it_con).toLane); + } + } + } + // compute the indices of lanes that should be targeted (excluding pedestrian + // lanes that will be connected from walkingAreas and forbidden lanes) + // if the lane is targeted by an explicitly set connection we need + // to make it available anyway + for (int i = 0; i < (int)currentOutgoing->getNumLanes(); ++i) { + if (((buildCrossingsAndWalkingAreas && currentOutgoing->getPermissions(i) == SVC_PEDESTRIAN) + || isForbidden(currentOutgoing->getPermissions(i))) + && approachedLanes.count(i) == 0) { + continue; + } + myAvailableLanes.push_back((unsigned int)i); + } } @@ -103,12 +141,13 @@ incomingEdge->getConnectionLanes(myCurrentOutgoing); assert(approachingLanes.size() != 0); std::deque* approachedLanes = spread(approachingLanes, dest); - assert(approachedLanes->size() <= myCurrentOutgoing->getNumLanes()); + assert(approachedLanes->size() <= myAvailableLanes.size()); // set lanes for (unsigned int i = 0; i < approachedLanes->size(); i++) { - unsigned int approached = (*approachedLanes)[i]; assert(approachedLanes->size() > i); assert(approachingLanes.size() > i); + unsigned int approached = myAvailableLanes[(*approachedLanes)[i]]; + //std::cout << "setting connection from " << incomingEdge->getID() << "_" << approachingLanes[i] << " to " << myCurrentOutgoing->getID() << "_" << approached << "\n"; incomingEdge->setConnection((unsigned int) approachingLanes[i], myCurrentOutgoing, approached, NBEdge::L2L_COMPUTED); } @@ -128,7 +167,7 @@ return ret; } - unsigned int noOutgoingLanes = myCurrentOutgoing->getNumLanes(); + unsigned int noOutgoingLanes = (unsigned int)myAvailableLanes.size(); // ret->push_back(dest); unsigned int noSet = 1; @@ -187,30 +226,29 @@ } - - /* ------------------------------------------------------------------------- * NBNode-methods * ----------------------------------------------------------------------- */ -NBNode::NBNode(const std::string& id, const Position& position) : - Named(StringUtils::convertUmlaute(id)), - myPosition(position), - myType(NODETYPE_UNKNOWN), myDistrict(0), myRequest(0) -{ } - - NBNode::NBNode(const std::string& id, const Position& position, SumoXMLNodeType type) : Named(StringUtils::convertUmlaute(id)), myPosition(position), - myType(type), myDistrict(0), myRequest(0) + myType(type), + myDistrict(0), + myHaveCustomPoly(false), + myRequest(0), + myRadius(UNSPECIFIED_RADIUS) { } NBNode::NBNode(const std::string& id, const Position& position, NBDistrict* district) : Named(StringUtils::convertUmlaute(id)), myPosition(position), - myType(NODETYPE_DISTRICT), myDistrict(district), myRequest(0) + myType(district == 0 ? NODETYPE_UNKNOWN : NODETYPE_DISTRICT), + myDistrict(district), + myHaveCustomPoly(false), + myRequest(0), + myRadius(UNSPECIFIED_RADIUS) { } @@ -256,7 +294,7 @@ void NBNode::addTrafficLight(NBTrafficLightDefinition* tlDef) { myTrafficLights.insert(tlDef); - if (myType != NODETYPE_TRAFFIC_LIGHT_NOJUNCTION) { + if (myType != NODETYPE_TRAFFIC_LIGHT_NOJUNCTION && myType != NODETYPE_RAIL_SIGNAL) { myType = NODETYPE_TRAFFIC_LIGHT; } } @@ -295,32 +333,31 @@ void NBNode::invalidateTLS(NBTrafficLightLogicCont& tlCont) { if (isTLControlled()) { - std::set newDefs; - for (std::set::iterator it = myTrafficLights.begin(); it != myTrafficLights.end(); ++it) { + std::set oldDefs(myTrafficLights); + for (std::set::iterator it = oldDefs.begin(); it != oldDefs.end(); ++it) { NBTrafficLightDefinition* orig = *it; - if (dynamic_cast(orig) != 0) { - // this definition will be guessed anyway. no need to invalidate - newDefs.insert(orig); - } else { - const std::string new_id = orig->getID() + "_reguessed"; - NBTrafficLightDefinition* newDef = new NBOwnTLDef(new_id, orig->getOffset(), orig->getType()); - if (!tlCont.insert(newDef)) { - // the original definition was shared by other nodes and was already invalidated - delete newDef; - newDef = tlCont.getDefinition(new_id, orig->getProgramID()); - assert(newDef != 0); + if (dynamic_cast(orig) == 0) { + NBTrafficLightDefinition* newDef = new NBOwnTLDef(orig->getID(), orig->getOffset(), orig->getType()); + const std::vector& nodes = orig->getNodes(); + while (!nodes.empty()) { + nodes.front()->removeTrafficLight(orig); + newDef->addNode(nodes.front()); } - newDefs.insert(newDef); + tlCont.removeFully(orig->getID()); + tlCont.insert(newDef); } } - removeTrafficLights(); - for (std::set::iterator it = newDefs.begin(); it != newDefs.end(); ++it) { - (*it)->addNode(this); - } } } +void +NBNode::shiftTLConnectionLaneIndex(NBEdge* edge, int offset) { + for (std::set::iterator it = myTrafficLights.begin(); it != myTrafficLights.end(); ++it) { + (*it)->shiftTLConnectionLaneIndex(edge, offset); + } +} + // ----------- Prunning the input unsigned int NBNode::removeSelfLoops(NBDistrictCont& dc, NBEdgeCont& ec, NBTrafficLightLogicCont& tc) { @@ -396,7 +433,7 @@ if (myIncomingEdges.size() == 2 && myOutgoingEdges.size() == 2) { for (EdgeVector::const_iterator i = myIncomingEdges.begin(); i != myIncomingEdges.end(); i++) { NBEdge* in = *i; - EdgeVector::const_iterator opposite = find_if(myOutgoingEdges.begin(), myOutgoingEdges.end(), NBContHelper::opposite_finder(in, this)); + EdgeVector::const_iterator opposite = find_if(myOutgoingEdges.begin(), myOutgoingEdges.end(), NBContHelper::opposite_finder(in)); // must have an opposite edge if (opposite == myOutgoingEdges.end()) { return false; @@ -415,32 +452,30 @@ PositionVector -NBNode::computeInternalLaneShape(NBEdge* fromE, int fromL, - NBEdge* toE, int toL, int numPoints) const { - if (fromL >= (int) fromE->getNumLanes()) { - throw ProcessError("Connection '" + fromE->getID() + "_" + toString(fromL) + "->" + toE->getID() + "_" + toString(toL) + "' starts at a not existing lane."); - } - if (toL >= (int) toE->getNumLanes()) { - throw ProcessError("Connection '" + fromE->getID() + "_" + toString(fromL) + "->" + toE->getID() + "_" + toString(toL) + "' yields in a not existing lane."); - } - bool noSpline = false; +NBNode::computeSmoothShape(const PositionVector& begShape, + const PositionVector& endShape, + int numPoints, + bool isTurnaround, + SUMOReal extrapolateBeg, + SUMOReal extrapolateEnd) const { + + const Position beg = begShape.back(); + const Position end = endShape.front(); PositionVector ret; PositionVector init; - Position beg = fromE->getLaneShape(fromL).back(); - Position end = toE->getLaneShape(toL).front(); - Position intersection; unsigned int noInitialPoints = 0; + bool noSpline = false; if (beg.distanceTo(end) <= POSITION_EPS) { noSpline = true; } else { - if (fromE->getTurnDestination() == toE) { + if (isTurnaround) { // turnarounds: // - end of incoming lane // - position between incoming/outgoing end/begin shifted by the distance orthogonally // - begin of outgoing lane noInitialPoints = 3; init.push_back(beg); - Line straightConn(fromE->getLaneShape(fromL)[-1], toE->getLaneShape(toL)[0]); + Line straightConn(begShape[-1], endShape[0]); Position straightCenter = straightConn.getPositionAtDistance((SUMOReal) straightConn.length() / (SUMOReal) 2.); Position center = straightCenter;//.add(straightCenter); Line cross(straightConn); @@ -450,25 +485,25 @@ init.push_back(center); init.push_back(end); } else { - const SUMOReal angle = fabs(fromE->getLaneShape(fromL).getEndLine().atan2Angle() - toE->getLaneShape(toL).getBegLine().atan2Angle()); + const SUMOReal angle = fabs(begShape.getEndLine().atan2Angle() - endShape.getBegLine().atan2Angle()); if (angle < M_PI / 4. || angle > 7. / 4.*M_PI) { // very low angle: almost straight noInitialPoints = 4; init.push_back(beg); - Line begL = fromE->getLaneShape(fromL).getEndLine(); + Line begL = begShape.getEndLine(); begL.extrapolateSecondBy(100); - Line endL = toE->getLaneShape(toL).getBegLine(); + Line endL = endShape.getBegLine(); endL.extrapolateFirstBy(100); SUMOReal distance = beg.distanceTo(end); if (distance > 10) { { - SUMOReal off1 = fromE->getLaneShape(fromL).getEndLine().length() + (SUMOReal) 5. * (SUMOReal) fromE->getNumLanes(); - off1 = MIN2(off1, (SUMOReal)(fromE->getLaneShape(fromL).getEndLine().length() + distance / 2.)); + SUMOReal off1 = begShape.getEndLine().length() + extrapolateBeg; + off1 = MIN2(off1, (SUMOReal)(begShape.getEndLine().length() + distance / 2.)); Position tmp = begL.getPositionAtDistance(off1); init.push_back(tmp); } { - SUMOReal off1 = (SUMOReal) 100. - (SUMOReal) 5. * (SUMOReal) toE->getNumLanes(); + SUMOReal off1 = (SUMOReal) 100. - extrapolateEnd; off1 = MAX2(off1, (SUMOReal)(100. - distance / 2.)); Position tmp = endL.getPositionAtDistance(off1); init.push_back(tmp); @@ -485,8 +520,8 @@ // attention: if there is no intersection, use a straight line noInitialPoints = 3; init.push_back(beg); - Line begL = fromE->getLaneShape(fromL).getEndLine(); - Line endL = toE->getLaneShape(toL).getBegLine(); + Line begL = begShape.getEndLine(); + Line endL = endShape.getBegLine(); bool check = !begL.p1().almostSame(begL.p2()) && !endL.p1().almostSame(endL.p2()); if (check) { begL.extrapolateSecondBy(100); @@ -505,8 +540,8 @@ } // if (noSpline) { - ret.push_back(fromE->getLaneShape(fromL).back()); - ret.push_back(toE->getLaneShape(toL).front()); + ret.push_back(begShape.back()); + ret.push_back(endShape.front()); } else { SUMOReal* def = new SUMOReal[1 + noInitialPoints * 3]; for (int i = 0; i < (int) init.size(); ++i) { @@ -520,17 +555,52 @@ delete[] def; Position prev; for (int i = 0; i < (int) numPoints; i++) { - Position current(ret_buf[i * 3 + 1], ret_buf[i * 3 + 3]); - if (prev != current) { + Position current(ret_buf[i * 3 + 1], ret_buf[i * 3 + 3], myPosition.z()); + if (prev != current && !ISNAN(current.x()) && !ISNAN(current.y())) { ret.push_back(current); } prev = current; } delete[] ret_buf; } - const NBEdge::Lane& lane = fromE->getLaneStruct(fromL); - if (lane.offset > 0) { - PositionVector beg = lane.shape.getSubpart(lane.shape.length() - lane.offset, lane.shape.length());; + return ret; +} + + +PositionVector +NBNode::computeInternalLaneShape(NBEdge* fromE, const NBEdge::Connection& con, int numPoints) const { + if (con.fromLane >= (int) fromE->getNumLanes()) { + throw ProcessError("Connection '" + fromE->getID() + "_" + toString(con.fromLane) + "->" + con.toEdge->getID() + "_" + toString(con.toLane) + "' starts at a non-existant lane."); + } + if (con.toLane >= (int) con.toEdge->getNumLanes()) { + throw ProcessError("Connection '" + fromE->getID() + "_" + toString(con.fromLane) + "->" + con.toEdge->getID() + "_" + toString(con.toLane) + "' targets a non-existant lane."); + } + PositionVector ret; + if (myCustomLaneShapes.size() > 0 && con.id != "") { + // this is the second pass (ids and shapes are already set + assert(con.shape.size() > 0); + CustomShapeMap::const_iterator it = myCustomLaneShapes.find(con.getInternalLaneID()); + if (it != myCustomLaneShapes.end()) { + ret = it->second; + } else { + ret = con.shape; + } + it = myCustomLaneShapes.find(con.viaID + "_0"); + if (it != myCustomLaneShapes.end()) { + ret.append(it->second); + } else { + ret.append(con.viaShape); + } + return ret; + } + + ret = computeSmoothShape(fromE->getLaneShape(con.fromLane), con.toEdge->getLaneShape(con.toLane), + numPoints, fromE->getTurnDestination() == con.toEdge, + (SUMOReal) 5. * (SUMOReal) fromE->getNumLanes(), + (SUMOReal) 5. * (SUMOReal) con.toEdge->getNumLanes()); + const NBEdge::Lane& lane = fromE->getLaneStruct(con.fromLane); + if (lane.endOffset > 0) { + PositionVector beg = lane.shape.getSubpart(lane.shape.length() - lane.endOffset, lane.shape.length());; beg.append(ret); ret = beg; } @@ -539,29 +609,45 @@ bool -NBNode::needsCont(NBEdge* fromE, NBEdge* toE, NBEdge* otherFromE, NBEdge* otherToE, const NBEdge::Connection& c) const { - if (myType == NODETYPE_RIGHT_BEFORE_LEFT) { +NBNode::needsCont(const NBEdge* fromE, const NBEdge* otherFromE, + const NBEdge::Connection& c, const NBEdge::Connection& otherC) const { + const NBEdge* toE = c.toEdge; + const NBEdge* otherToE = otherC.toEdge; + + if (myType == NODETYPE_RIGHT_BEFORE_LEFT || myType == NODETYPE_ALLWAY_STOP) { return false; } - if (fromE == otherFromE) { - // ignore same edge links + LinkDirection d1 = getDirection(fromE, toE); + const bool thisRight = (d1 == LINKDIR_RIGHT || d1 == LINKDIR_PARTRIGHT); + const bool rightTurnConflict = (thisRight && + myRequest->rightTurnConflict(fromE, toE, c.fromLane, otherFromE, otherToE, otherC.fromLane)); + if (thisRight && !rightTurnConflict) { return false; } - if (!foes(otherFromE, otherToE, fromE, toE)) { + if (!(foes(otherFromE, otherToE, fromE, toE) || myRequest == 0 || rightTurnConflict)) { // if they do not cross, no waiting place is needed return false; } - LinkDirection d1 = getDirection(fromE, toE); LinkDirection d2 = getDirection(otherFromE, otherToE); - bool thisLeft = (d1 == LINKDIR_LEFT || d1 == LINKDIR_TURN); - bool otherLeft = (d2 == LINKDIR_LEFT || d2 == LINKDIR_TURN); - bool bothLeft = thisLeft && otherLeft; + if (d2 == LINKDIR_TURN) { + return false; + } + const bool thisLeft = (d1 == LINKDIR_LEFT || d1 == LINKDIR_TURN); + const bool otherLeft = (d2 == LINKDIR_LEFT || d2 == LINKDIR_TURN); + const bool bothLeft = thisLeft && otherLeft; + if (fromE == otherFromE && !thisRight) { + // ignore same edge links except for right-turns + return false; + } + if (thisRight && d2 != LINKDIR_STRAIGHT) { + return false; + } if (c.tlID != "" && !bothLeft) { - // tls-controlled links will have space - return true; + assert(myTrafficLights.size() > 0); + return (*myTrafficLights.begin())->needsCont(fromE, toE, otherFromE, otherToE); } if (fromE->getJunctionPriority(this) > 0 && otherFromE->getJunctionPriority(this) > 0) { - return mustBrake(fromE, toE, c.toLane); + return mustBrake(fromE, toE, c.fromLane, false); } return false; } @@ -574,6 +660,12 @@ if (myIncomingEdges.size() == 0 || myOutgoingEdges.size() == 0) { // no logic if nothing happens here myType = NODETYPE_NOJUNCTION; + std::set trafficLights = myTrafficLights; // make a copy because we will modify the original + removeTrafficLights(); + for (std::set::const_iterator i = trafficLights.begin(); i != trafficLights.end(); ++i) { + (*i)->setParticipantsInformation(); + (*i)->setTLControllingInformation(ec); + } return; } // check whether the node was set to be unregulated by the user @@ -585,11 +677,10 @@ // compute the logic if necessary or split the junction if (myType != NODETYPE_NOJUNCTION && myType != NODETYPE_DISTRICT && myType != NODETYPE_TRAFFIC_LIGHT_NOJUNCTION) { // build the request - myRequest = new NBRequest(ec, this, - myAllEdges, myIncomingEdges, myOutgoingEdges, myBlockedConnections); + myRequest = new NBRequest(ec, this, myAllEdges, myIncomingEdges, myOutgoingEdges, myBlockedConnections); // check whether it is not too large - unsigned int numConnections = myRequest->getSizes().second; - if (numConnections >= 64) { + unsigned int numConnections = numNormalConnections(); + if (numConnections >= MAX_CONNECTIONS) { // yep -> make it untcontrolled, warn WRITE_WARNING("Junction '" + getID() + "' is too complicated (#links>64); will be set to unregulated."); delete myRequest; @@ -617,13 +708,28 @@ void -NBNode::computeNodeShape(bool leftHand) { +NBNode::computeNodeShape(bool leftHand, SUMOReal mismatchThreshold) { + if (myHaveCustomPoly) { + return; + } if (myIncomingEdges.size() == 0 && myOutgoingEdges.size() == 0) { + // may be an intermediate step during network editing + myPoly.clear(); + myPoly.push_back(myPosition); return; } try { NBNodeShapeComputer computer(*this); myPoly = computer.compute(leftHand); + if (myPoly.size() > 0) { + PositionVector tmp = myPoly; + tmp.push_back_noDoublePos(tmp[0]); // need closed shape + if (mismatchThreshold >= 0 + && !tmp.around(myPosition) + && tmp.distance(myPosition) > mismatchThreshold) { + WRITE_WARNING("Junction shape for '" + myID + "' has distance " + toString(tmp.distance(myPosition)) + " to its given position"); + } + } } catch (InvalidArgument&) { WRITE_WARNING("For node '" + getID() + "': could not compute shape."); // make sure our shape is not empty because our XML schema forbids empty attributes @@ -634,10 +740,11 @@ void -NBNode::computeLanes2Lanes() { +NBNode::computeLanes2Lanes(const bool buildCrossingsAndWalkingAreas) { // special case a): // one in, one out, the outgoing has one lane more if (myIncomingEdges.size() == 1 && myOutgoingEdges.size() == 1 + && myIncomingEdges[0]->getStep() <= NBEdge::LANES2EDGES && myIncomingEdges[0]->getNumLanes() == myOutgoingEdges[0]->getNumLanes() - 1 && myIncomingEdges[0] != myOutgoingEdges[0] && myIncomingEdges[0]->isConnectedTo(myOutgoingEdges[0])) { @@ -658,53 +765,57 @@ // special case b): // two in, one out, the outgoing has the same number of lanes as the sum of the incoming // --> highway on-ramp - bool check = false; if (myIncomingEdges.size() == 2 && myOutgoingEdges.size() == 1) { - check = myIncomingEdges[0]->getNumLanes() + myIncomingEdges[1]->getNumLanes() == myOutgoingEdges[0]->getNumLanes(); - check &= (myIncomingEdges[0]->getStep() <= NBEdge::LANES2EDGES); - check &= (myIncomingEdges[1]->getStep() <= NBEdge::LANES2EDGES); - check &= myIncomingEdges[0] != myOutgoingEdges[0]; - check &= myIncomingEdges[1] != myOutgoingEdges[0]; - check &= myIncomingEdges[0]->isConnectedTo(myOutgoingEdges[0]); - check &= myIncomingEdges[1]->isConnectedTo(myOutgoingEdges[0]); - } - if (check) { - NBEdge* inc1 = myIncomingEdges[0]; - NBEdge* inc2 = myIncomingEdges[1]; - // for internal: check which one is the rightmost - SUMOReal a1 = inc1->getAngleAtNode(this); - SUMOReal a2 = inc2->getAngleAtNode(this); - SUMOReal ccw = GeomHelper::getCCWAngleDiff(a1, a2); - SUMOReal cw = GeomHelper::getCWAngleDiff(a1, a2); - if (ccw > cw) { - std::swap(inc1, inc2); + NBEdge* out = myOutgoingEdges[0]; + NBEdge* in1 = myIncomingEdges[0]; + NBEdge* in2 = myIncomingEdges[1]; + if (in1->getNumLanes() + in2->getNumLanes() == out->getNumLanes() + && (in1->getStep() <= NBEdge::LANES2EDGES) + && (in2->getStep() <= NBEdge::LANES2EDGES) + && in1 != out + && in2 != out + && in1->isConnectedTo(out) + && in2->isConnectedTo(out)) { + // for internal: check which one is the rightmost + SUMOReal a1 = in1->getAngleAtNode(this); + SUMOReal a2 = in2->getAngleAtNode(this); + SUMOReal ccw = GeomHelper::getCCWAngleDiff(a1, a2); + SUMOReal cw = GeomHelper::getCWAngleDiff(a1, a2); + if (ccw > cw) { + std::swap(in1, in2); + } + const int outOffset = MAX2(0, out->getFirstNonPedestrianLaneIndex(FORWARD, true)); + const int in1Offset = MAX2(0, in1->getFirstNonPedestrianLaneIndex(FORWARD, true)); + const int in2Offset = MAX2(0, in2->getFirstNonPedestrianLaneIndex(FORWARD, true)); + in1->addLane2LaneConnections(in1Offset, out, outOffset, in1->getNumLanes() - in1Offset, NBEdge::L2L_VALIDATED, true, true); + in2->addLane2LaneConnections(in2Offset, out, in1->getNumLanes() + outOffset - in1Offset, in2->getNumLanes() - in2Offset, NBEdge::L2L_VALIDATED, true, true); + return; } - inc1->addLane2LaneConnections(0, myOutgoingEdges[0], 0, inc1->getNumLanes(), NBEdge::L2L_VALIDATED, true, true); - inc2->addLane2LaneConnections(0, myOutgoingEdges[0], inc1->getNumLanes(), inc2->getNumLanes(), NBEdge::L2L_VALIDATED, true, true); - return; } // special case c): // one in, two out, the incoming has the same number of lanes as the sum of the outgoing // --> highway off-ramp - check = false; if (myIncomingEdges.size() == 1 && myOutgoingEdges.size() == 2) { - check = myIncomingEdges[0]->getNumLanes() == myOutgoingEdges[1]->getNumLanes() + myOutgoingEdges[0]->getNumLanes(); - check &= (myIncomingEdges[0]->getStep() <= NBEdge::LANES2EDGES); - check &= myIncomingEdges[0] != myOutgoingEdges[0]; - check &= myIncomingEdges[0] != myOutgoingEdges[1]; - check &= myIncomingEdges[0]->isConnectedTo(myOutgoingEdges[0]); - check &= myIncomingEdges[0]->isConnectedTo(myOutgoingEdges[1]); - } - if (check) { + NBEdge* in = myIncomingEdges[0]; NBEdge* out1 = myOutgoingEdges[0]; NBEdge* out2 = myOutgoingEdges[1]; - // for internal: check which one is the rightmost - if (NBContHelper::relative_outgoing_edge_sorter(myIncomingEdges[0])(out2, out1)) { - std::swap(out1, out2); + if (in->getNumLanes() == out2->getNumLanes() + out1->getNumLanes() + && (in->getStep() <= NBEdge::LANES2EDGES) + && in != out1 + && in != out2 + && in->isConnectedTo(out1) + && in->isConnectedTo(out2)) { + // for internal: check which one is the rightmost + if (NBContHelper::relative_outgoing_edge_sorter(in)(out2, out1)) { + std::swap(out1, out2); + } + const int inOffset = MAX2(0, in->getFirstNonPedestrianLaneIndex(FORWARD, true)); + const int out1Offset = MAX2(0, out1->getFirstNonPedestrianLaneIndex(FORWARD, true)); + const int out2Offset = MAX2(0, out2->getFirstNonPedestrianLaneIndex(FORWARD, true)); + in->addLane2LaneConnections(inOffset, out1, out1Offset, out1->getNumLanes() - out1Offset, NBEdge::L2L_VALIDATED, true, true); + in->addLane2LaneConnections(out1->getNumLanes() + inOffset - out1Offset, out2, out2Offset, out2->getNumLanes() - out2Offset, NBEdge::L2L_VALIDATED, false, true); + return; } - myIncomingEdges[0]->addLane2LaneConnections(0, out1, 0, out1->getNumLanes(), NBEdge::L2L_VALIDATED, true, true); - myIncomingEdges[0]->addLane2LaneConnections(out1->getNumLanes(), out2, 0, out2->getNumLanes(), NBEdge::L2L_VALIDATED, false, true); - return; } // go through this node's outgoing edges @@ -716,10 +827,10 @@ NBEdge* currentOutgoing = *i; // get the information about edges that do approach this edge EdgeVector* approaching = getEdgesThatApproach(currentOutgoing); - if (approaching->size() != 0) { - ApproachingDivider divider(approaching, currentOutgoing); - Bresenham::compute(÷r, static_cast(approaching->size()), - currentOutgoing->getNumLanes()); + const unsigned int numApproaching = (unsigned int)approaching->size(); + if (numApproaching != 0) { + ApproachingDivider divider(approaching, currentOutgoing, buildCrossingsAndWalkingAreas); + Bresenham::compute(÷r, numApproaching, divider.numAvailableLanes()); } delete approaching; } @@ -731,6 +842,15 @@ (*i)->markAsInLane2LaneState(); } } + + // DEBUG + //std::cout << "connections at " << getID() << "\n"; + //for (i = myIncomingEdges.rbegin(); i != myIncomingEdges.rend(); i++) { + // const std::vector& elv = (*i)->getConnections(); + // for (std::vector::const_iterator k = elv.begin(); k != elv.end(); ++k) { + // std::cout << " " << (*i)->getID() << "_" << (*k).fromLane << " -> " << (*k).toEdge->getID() << "_" << (*k).toLane << "\n"; + // } + //} } @@ -1044,16 +1164,7 @@ bool -NBNode::mustBrake(const NBEdge* const from, const NBEdge* const to, int toLane) const { - // check whether it is participant to a traffic light - // - controlled links are set by the traffic lights, not the normal - // right-of-way rules - // - uncontrolled participants (spip lanes etc.) should always break - if (myTrafficLights.size() != 0) { - // ok, we have a traffic light, return true by now, it will be later - // controlled by the tls - return true; - } +NBNode::mustBrake(const NBEdge* const from, const NBEdge* const to, int fromLane, bool includePedCrossings) const { // unregulated->does not need to brake if (myRequest == 0) { return false; @@ -1063,27 +1174,19 @@ return true; } // check whether any other connection on this node prohibits this connection - bool try1 = myRequest->mustBrake(from, to); - if (!try1 || toLane == -1) { - return try1; - } - if (from->getSpeed() < 70. / 3.6) { - return try1; - } - // on highways (on-ramps, in fact): - // check whether any other connection uses the same destination edge - for (EdgeVector::const_iterator i = myIncomingEdges.begin(); i != myIncomingEdges.end(); i++) { - if ((*i) == from) { - continue; - } - const std::vector& connections = (*i)->getConnections(); - for (std::vector::const_iterator j = connections.begin(); j != connections.end(); ++j) { - if ((*j).toEdge == to && ((*j).toLane < 0 || (*j).toLane == toLane)) { - return true; - } - } - } - return false; + return myRequest->mustBrake(from, to, fromLane, includePedCrossings); +} + +bool +NBNode::mustBrakeForCrossing(const NBEdge* const from, const NBEdge* const to, const NBNode::Crossing& crossing) const { + return myRequest->mustBrakeForCrossing(from, to, crossing); +} + + +bool +NBNode::rightTurnConflict(const NBEdge* from, const NBEdge* to, int fromLane, + const NBEdge* prohibitorFrom, const NBEdge* prohibitorTo, int prohibitorFromLane) const { + return myRequest->rightTurnConflict(from, to, fromLane, prohibitorFrom, prohibitorTo, prohibitorFromLane); } @@ -1101,7 +1204,7 @@ std::vector::const_iterator i = std::find(myAllEdges.begin(), myAllEdges.end(), from); do { NBContHelper::nextCW(myAllEdges, i); - } while ((!hasOutgoing(*i) || from->isTurningDirectionAt(this, *i)) && *i != from); + } while ((!hasOutgoing(*i) || from->isTurningDirectionAt(*i)) && *i != from); return cw < ccw && (*i) == to && myOutgoingEdges.size() > 2; } @@ -1211,7 +1314,7 @@ return LINKDIR_NODIR; } // turning direction - if (incoming->isTurningDirectionAt(this, outgoing)) { + if (incoming->isTurningDirectionAt(outgoing)) { return LINKDIR_TURN; } // get the angle between incoming/outgoing at the junction @@ -1241,7 +1344,7 @@ find(myAllEdges.begin(), myAllEdges.end(), outgoing); NBContHelper::nextCCW(myAllEdges, i); while ((*i) != incoming) { - if ((*i)->getFromNode() == this && !incoming->isTurningDirectionAt(this, *i)) { + if ((*i)->getFromNode() == this && !incoming->isTurningDirectionAt(*i)) { return LINKDIR_PARTLEFT; } NBContHelper::nextCCW(myAllEdges, i); @@ -1265,7 +1368,7 @@ if (myType == NODETYPE_ALLWAY_STOP) { return LINKSTATE_ALLWAY_STOP; // all drive, first one to arrive may drive first } - if ((!incoming->isInnerEdge() && mustBrake(incoming, outgoing, fromlane)) && !mayDefinitelyPass) { + if ((!incoming->isInnerEdge() && mustBrake(incoming, outgoing, fromlane, true)) && !mayDefinitelyPass) { return myType == NODETYPE_PRIORITY_STOP ? LINKSTATE_STOP : LINKSTATE_MINOR; // minor road } // traffic lights are not regarded here @@ -1360,6 +1463,23 @@ } +void +NBNode::setCustomShape(const PositionVector& shape) { + myPoly = shape; + myHaveCustomPoly = (myPoly.size() > 1); +} + + +void +NBNode::setCustomLaneShape(const std::string& laneID, const PositionVector& shape) { + if (shape.size() > 1) { + myCustomLaneShapes[laneID] = shape; + } else { + myCustomLaneShapes.erase(laneID); + } +} + + NBEdge* NBNode::getConnectionTo(NBNode* n) const { for (EdgeVector::const_iterator i = myOutgoingEdges.begin(); i != myOutgoingEdges.end(); i++) { @@ -1408,8 +1528,196 @@ } +int +NBNode::guessCrossings() { + //gDebugFlag1 = getID() == DEBUGID; + int numGuessed = 0; + if (myCrossings.size() > 0) { + // user supplied crossings, do not guess + return numGuessed; + } + if (gDebugFlag1) { + std::cout << "guess crossings for " << getID() << "\n"; + } + EdgeVector allEdges = getEdgesSortedByAngleAtNodeCenter(); + // check for pedestrial lanes going clockwise around the node + std::vector > normalizedLanes; + for (EdgeVector::const_iterator it = allEdges.begin(); it != allEdges.end(); ++it) { + NBEdge* edge = *it; + const std::vector& lanes = edge->getLanes(); + if (edge->getFromNode() == this) { + for (std::vector::const_reverse_iterator it_l = lanes.rbegin(); it_l != lanes.rend(); ++it_l) { + normalizedLanes.push_back(std::make_pair(edge, ((*it_l).permissions & SVC_PEDESTRIAN) != 0)); + } + } else { + for (std::vector::const_iterator it_l = lanes.begin(); it_l != lanes.end(); ++it_l) { + normalizedLanes.push_back(std::make_pair(edge, ((*it_l).permissions & SVC_PEDESTRIAN) != 0)); + } + } + } + // do we even have a pedestrian lane? + int firstSidewalk = -1; + for (int i = 0; i < (int)normalizedLanes.size(); ++i) { + if (normalizedLanes[i].second) { + firstSidewalk = i; + break; + } + } + if (firstSidewalk != -1) { + // rotate lanes to ensure that the first one allows pedestrians + std::vector > tmp; + copy(normalizedLanes.begin() + firstSidewalk, normalizedLanes.end(), std::back_inserter(tmp)); + copy(normalizedLanes.begin(), normalizedLanes.begin() + firstSidewalk, std::back_inserter(tmp)); + normalizedLanes = tmp; + // find candidates + EdgeVector candidates; + bool hadCandidates = false; + for (int i = 0; i < (int)normalizedLanes.size(); ++i) { + NBEdge* edge = normalizedLanes[i].first; + const bool allowsPed = normalizedLanes[i].second; + if (gDebugFlag1) { + std::cout << " cands=" << toString(candidates) << " edge=" << edge->getID() << " allowsPed=" << allowsPed << "\n"; + } + if (!allowsPed && (candidates.size() == 0 || candidates.back() != edge)) { + candidates.push_back(edge); + } else if (allowsPed) { + if (candidates.size() > 0) { + if (hadCandidates || forbidsPedestriansAfter(normalizedLanes, i)) { + hadCandidates = true; + numGuessed += checkCrossing(candidates); + } + candidates.clear(); + } + } + } + if (hadCandidates) { + // avoid wrapping around to the same sidewalk + numGuessed += checkCrossing(candidates); + } + } + std::sort(myCrossings.begin(), myCrossings.end(), NBNodesEdgesSorter::crossing_by_junction_angle_sorter(this, myAllEdges)); + return numGuessed; +} + + +int +NBNode::checkCrossing(EdgeVector candidates) { + if (gDebugFlag1) { + std::cout << "checkCrossing candidates=" << toString(candidates) << "\n"; + } + if (candidates.size() == 0) { + if (gDebugFlag1) { + std::cout << "no crossing added (numCandidates=" << candidates.size() << ")\n"; + } + return 0; + } else { + // check whether the edges may be part of a common crossing due to having similar angle + SUMOReal prevAngle = -100000; // dummy + for (size_t i = 0; i < candidates.size(); ++i) { + NBEdge* edge = candidates[i]; + SUMOReal angle = edge->getCrossingAngle(this); + // edges should be sorted by angle but this only holds true approximately + if (i > 0 && fabs(angle - prevAngle) > EXTEND_CROSSING_ANGLE_THRESHOLD) { + if (gDebugFlag1) { + std::cout << "no crossing added (found angle difference of " << fabs(angle - prevAngle) << " at i=" << i << "\n"; + } + return 0; + } + if (!isTLControlled() && edge->getSpeed() > UNCONTROLLED_CROSSING_SPEED_THRESHOLD) { + if (gDebugFlag1) { + std::cout << "no crossing added (uncontrolled, edge with speed=" << edge->getSpeed() << ")\n"; + } + return 0; + } + prevAngle = angle; + } + if (candidates.size() == 1) { + addCrossing(candidates, DEFAULT_CROSSING_WIDTH, isTLControlled()); + if (gDebugFlag1) { + std::cout << "adding crossing: " << toString(candidates) << "\n"; + } + return 1; + } else { + // check for intermediate walking areas + SUMOReal prevAngle = -100000; // dummy + for (EdgeVector::iterator it = candidates.begin(); it != candidates.end(); ++it) { + SUMOReal angle = (*it)->getCrossingAngle(this); + if (it != candidates.begin()) { + NBEdge* prev = *(it - 1); + NBEdge* curr = *it; + Position prevPos, currPos; + unsigned int laneI; + // compute distance between candiate edges + SUMOReal intermediateWidth = 0; + if (prev->getToNode() == this) { + laneI = prev->getNumLanes() - 1; + prevPos = prev->getLanes()[laneI].shape[-1]; + } else { + laneI = 0; + prevPos = prev->getLanes()[laneI].shape[0]; + } + intermediateWidth -= 0.5 * prev->getLaneWidth(laneI); + if (curr->getFromNode() == this) { + laneI = curr->getNumLanes() - 1; + currPos = curr->getLanes()[laneI].shape[0]; + } else { + laneI = 0; + currPos = curr->getLanes()[laneI].shape[-1]; + } + intermediateWidth -= 0.5 * curr->getLaneWidth(laneI); + intermediateWidth += currPos.distanceTo2D(prevPos); + if (gDebugFlag1) { + std::cout + << " prevAngle=" << prevAngle + << " angle=" << angle + << " intermediateWidth=" << intermediateWidth + << "\n"; + } + if (fabs(prevAngle - angle) > SPLIT_CROSSING_ANGLE_THRESHOLD + || (intermediateWidth > SPLIT_CROSSING_WIDTH_THRESHOLD)) { + return checkCrossing(EdgeVector(candidates.begin(), it)) + + checkCrossing(EdgeVector(it, candidates.end())); + } + } + prevAngle = angle; + } + addCrossing(candidates, DEFAULT_CROSSING_WIDTH, isTLControlled()); + if (gDebugFlag1) { + std::cout << "adding crossing: " << toString(candidates) << "\n"; + } + return 1; + } + } +} + + +bool +NBNode::forbidsPedestriansAfter(std::vector > normalizedLanes, int startIndex) { + for (int i = startIndex; i < (int)normalizedLanes.size(); ++i) { + if (!normalizedLanes[i].second) { + return true; + } + } + return false; +} + + void -NBNode::buildInnerEdges() { +NBNode::buildInnerEdges(bool buildCrossingsAndWalkingAreas) { + if (buildCrossingsAndWalkingAreas) { + buildCrossings(); + buildWalkingAreas(OptionsCont::getOptions().getInt("junctions.corner-detail")); + // ensure that all crossings are properly connected + for (std::vector::iterator it = myCrossings.begin(); it != myCrossings.end(); it++) { + if ((*it).prevWalkingArea == "" || (*it).nextWalkingArea == "") { + // there is no way to check this apart from trying to build all + // walkingAreas and there is no way to recover because the junction + // logic assumes that the crossing can be built. + throw ProcessError("Invalid crossing '" + (*it).id + "' at node '" + getID() + "' with edges '" + toString((*it).edges) + "'."); + } + } + } + // build inner edges for vehicle movements across the junction unsigned int noInternalNoSplits = 0; for (EdgeVector::const_iterator i = myIncomingEdges.begin(); i != myIncomingEdges.end(); i++) { const std::vector& elv = (*i)->getConnections(); @@ -1425,6 +1733,431 @@ for (EdgeVector::const_iterator i = myIncomingEdges.begin(); i != myIncomingEdges.end(); i++) { (*i)->buildInnerEdges(*this, noInternalNoSplits, lno, splitNo); } + // if there are custom lane shapes we need to built twice: + // first to set the ids then to build intersections with the custom geometries + if (myCustomLaneShapes.size() > 0) { + unsigned int lno = 0; + unsigned int splitNo = 0; + for (EdgeVector::const_iterator i = myIncomingEdges.begin(); i != myIncomingEdges.end(); i++) { + (*i)->buildInnerEdges(*this, noInternalNoSplits, lno, splitNo); + } + } +} + + +unsigned int +NBNode::buildCrossings() { + //gDebugFlag1 = getID() == DEBUGID; + if (gDebugFlag1) { + std::cout << "build crossings for " << getID() << ":\n"; + } + unsigned int index = 0; + for (std::vector::iterator it = myCrossings.begin(); it != myCrossings.end(); it++) { + (*it).id = ":" + getID() + "_c" + toString(index++); + EdgeVector& edges = (*it).edges; + if (gDebugFlag1) { + std::cout << " crossing=" << (*it).id << " edges=" << toString(edges); + } + // sorting the edges in the right way is imperative. We want to sort + // them by getAngleAtNodeToCenter() but need to be extra carefull to avoid wrapping around 0 somewhere in between + std::sort(edges.begin(), edges.end(), NBContHelper::edge_by_angle_to_nodeShapeCentroid_sorter(this)); + if (gDebugFlag1) { + std::cout << " sortedEdges=" << toString(edges) << "\n"; + }; + // rotate the edges so that the largest relative angle difference comes at the end + SUMOReal maxAngleDiff = 0; + int maxAngleDiffIndex = 0; // index before maxDist + for (int i = 0; i < (int) edges.size(); i++) { + SUMOReal diff = NBHelpers::relAngle(edges[i]->getAngleAtNodeToCenter(this), + edges[(i + 1) % edges.size()]->getAngleAtNodeToCenter(this)); + if (diff < 0) { + diff += 360; + } + if (gDebugFlag1) { + std::cout << " i=" << i << " a1=" << edges[i]->getAngleAtNodeToCenter(this) << " a2=" << edges[(i + 1) % edges.size()]->getAngleAtNodeToCenter(this) << " diff=" << diff << "\n"; + } + if (diff > maxAngleDiff) { + maxAngleDiff = diff; + maxAngleDiffIndex = i; + } + } + if (maxAngleDiff > 2 && maxAngleDiff < 360 - 2) { + // if the angle differences is too small, we better not rotate + std::rotate(edges.begin(), edges.begin() + (maxAngleDiffIndex + 1) % edges.size(), edges.end()); + if (gDebugFlag1) { + std::cout << " rotatedEdges=" << toString(edges); + } + } + // reverse to get them in CCW order (walking direction around the node) + std::reverse(edges.begin(), edges.end()); + if (gDebugFlag1) { + std::cout << " finalEdges=" << toString(edges) << "\n"; + } + // compute shape + (*it).shape.clear(); + const int begDir = (edges.front()->getFromNode() == this ? FORWARD : BACKWARD); + const int endDir = (edges.back()->getToNode() == this ? FORWARD : BACKWARD); + NBEdge::Lane crossingBeg = edges.front()->getFirstNonPedestrianLane(begDir); + NBEdge::Lane crossingEnd = edges.back()->getFirstNonPedestrianLane(endDir); + crossingBeg.width = (crossingBeg.width == NBEdge::UNSPECIFIED_WIDTH ? SUMO_const_laneWidth : crossingBeg.width); + crossingEnd.width = (crossingEnd.width == NBEdge::UNSPECIFIED_WIDTH ? SUMO_const_laneWidth : crossingEnd.width); + crossingBeg.shape.move2side(begDir * crossingBeg.width / 2); + crossingEnd.shape.move2side(endDir * crossingEnd.width / 2); + crossingBeg.shape.extrapolate((*it).width / 2); + crossingEnd.shape.extrapolate((*it).width / 2); + (*it).shape.push_back(crossingBeg.shape[begDir == FORWARD ? 0 : -1]); + (*it).shape.push_back(crossingEnd.shape[endDir == FORWARD ? -1 : 0]); + } + return index; +} + + +void +NBNode::buildWalkingAreas(int cornerDetail) { + //gDebugFlag1 = getID() == DEBUGID; + unsigned int index = 0; + myWalkingAreas.clear(); + if (gDebugFlag1) { + std::cout << "build walkingAreas for " << getID() << ":\n"; + } + if (myAllEdges.size() == 0) { + return; + } + EdgeVector allEdges = getEdgesSortedByAngleAtNodeCenter(); + // shapes are all pointing away from the intersection + std::vector > normalizedLanes; + for (EdgeVector::const_iterator it = allEdges.begin(); it != allEdges.end(); ++it) { + NBEdge* edge = *it; + const std::vector& lanes = edge->getLanes(); + if (edge->getFromNode() == this) { + for (std::vector::const_reverse_iterator it_l = lanes.rbegin(); it_l != lanes.rend(); ++it_l) { + NBEdge::Lane l = *it_l; + l.shape = l.shape.getSubpartByIndex(0, 2); + l.width = (l.width == NBEdge::UNSPECIFIED_WIDTH ? SUMO_const_laneWidth : l.width); + normalizedLanes.push_back(std::make_pair(edge, l)); + } + } else { + for (std::vector::const_iterator it_l = lanes.begin(); it_l != lanes.end(); ++it_l) { + NBEdge::Lane l = *it_l; + l.shape = l.shape.reverse(); + l.shape = l.shape.getSubpartByIndex(0, 2); + l.width = (l.width == NBEdge::UNSPECIFIED_WIDTH ? SUMO_const_laneWidth : l.width); + normalizedLanes.push_back(std::make_pair(edge, l)); + } + } + } + //if (gDebugFlag1) std::cout << " normalizedLanes=" << normalizedLanes.size() << "\n"; + // collect [start,cound[ indices in normalizedLanes that belong to a walkingArea + std::vector > waIndices; + int start = -1; + NBEdge* prevEdge = normalizedLanes.back().first; + for (int i = 0; i < (int)normalizedLanes.size(); ++i) { + NBEdge* edge = normalizedLanes[i].first; + NBEdge::Lane& l = normalizedLanes[i].second; + if (start == -1) { + if ((l.permissions & SVC_PEDESTRIAN) != 0) { + start = i; + } + } else { + if ((l.permissions & SVC_PEDESTRIAN) == 0 || crossingBetween(edge, prevEdge)) { + waIndices.push_back(std::make_pair(start, i - start)); + if ((l.permissions & SVC_PEDESTRIAN) != 0) { + start = i; + } else { + start = -1; + } + + } + } + if (gDebugFlag1) std::cout << " i=" << i << " edge=" << edge->getID() << " start=" << start << " ped=" << ((l.permissions & SVC_PEDESTRIAN) != 0) + << " waI=" << waIndices.size() << " crossingBetween=" << crossingBetween(edge, prevEdge) << "\n"; + prevEdge = edge; + } + // deal with wrap-around issues + if (start != - 1) { + const int waNumLanes = (int)normalizedLanes.size() - start; + if (waIndices.size() == 0) { + waIndices.push_back(std::make_pair(start, waNumLanes)); + if (gDebugFlag1) { + std::cout << " single wa, end at wrap-around\n"; + } + } else { + if (waIndices.front().first == 0) { + NBEdge* edge = normalizedLanes.front().first; + NBEdge* prevEdge = normalizedLanes.back().first; + if (crossingBetween(edge, prevEdge)) { + // do not wrap-around if there is a crossing in between + waIndices.push_back(std::make_pair(start, waNumLanes)); + if (gDebugFlag1) { + std::cout << " do not wrap around, turn-around in between\n"; + } + } else { + // first walkingArea wraps around + waIndices.front().first = start; + waIndices.front().second = waNumLanes + waIndices.front().second; + if (gDebugFlag1) { + std::cout << " wrapping around\n"; + } + } + } else { + // last walkingArea ends at the wrap-around + waIndices.push_back(std::make_pair(start, waNumLanes)); + if (gDebugFlag1) { + std::cout << " end at wrap-around\n"; + } + } + } + } + if (gDebugFlag1) { + std::cout << " normalizedLanes=" << normalizedLanes.size() << " waIndices:\n"; + for (int i = 0; i < (int)waIndices.size(); ++i) { + std::cout << " " << waIndices[i].first << ", " << waIndices[i].second << "\n"; + } + } + // build walking areas connected to a sidewalk + for (int i = 0; i < (int)waIndices.size(); ++i) { + const bool buildExtensions = waIndices[i].second != (int)normalizedLanes.size(); + const int start = waIndices[i].first; + const int prev = start > 0 ? start - 1 : (int)normalizedLanes.size() - 1; + const int count = waIndices[i].second; + const int end = (start + count) % normalizedLanes.size(); + + WalkingArea wa(":" + getID() + "_w" + toString(index++), 1); + if (gDebugFlag1) { + std::cout << "build walkingArea " << wa.id << " start=" << start << " end=" << end << " count=" << count << " prev=" << prev << ":\n"; + } + SUMOReal endCrossingWidth = 0; + SUMOReal startCrossingWidth = 0; + PositionVector endCrossingShape; + PositionVector startCrossingShape; + // check for connected crossings + bool connectsCrossing = false; + std::vector connectedPoints; + for (std::vector::iterator it = myCrossings.begin(); it != myCrossings.end(); ++it) { + if (gDebugFlag1) { + std::cout << " crossing=" << (*it).id << " sortedEdges=" << toString((*it).edges) << "\n"; + } + if ((*it).edges.back() == normalizedLanes[end].first + && (normalizedLanes[end].second.permissions & SVC_PEDESTRIAN) == 0) { + // crossing ends + (*it).nextWalkingArea = wa.id; + endCrossingWidth = (*it).width; + endCrossingShape = (*it).shape; + wa.width = MAX2(wa.width, endCrossingWidth); + connectsCrossing = true; + connectedPoints.push_back((*it).shape[-1]); + if (gDebugFlag1) { + std::cout << " crossing " << (*it).id << " ends\n"; + } + } + if ((*it).edges.front() == normalizedLanes[prev].first + && (normalizedLanes[prev].second.permissions & SVC_PEDESTRIAN) == 0) { + // crossing starts + (*it).prevWalkingArea = wa.id; + wa.nextCrossing = (*it).id; + startCrossingWidth = (*it).width; + startCrossingShape = (*it).shape; + wa.width = MAX2(wa.width, startCrossingWidth); + connectsCrossing = true; + if (isTLControlled()) { + wa.tlID = (*getControllingTLS().begin())->getID(); + } + connectedPoints.push_back((*it).shape[0]); + if (gDebugFlag1) { + std::cout << " crossing " << (*it).id << " starts\n"; + } + } + if (gDebugFlag1) std::cout << " check connections to crossing " << (*it).id + << " cFront=" << (*it).edges.front()->getID() << " cBack=" << (*it).edges.back()->getID() + << " wEnd=" << normalizedLanes[end].first->getID() << " wStart=" << normalizedLanes[start].first->getID() + << " wStartPrev=" << normalizedLanes[prev].first->getID() + << "\n"; + } + if (count < 2 && !connectsCrossing) { + // not relevant for walking + continue; + } + // build shape and connections + std::set connected; + for (int j = 0; j < count; ++j) { + const int nlI = (start + j) % normalizedLanes.size(); + NBEdge* edge = normalizedLanes[nlI].first; + NBEdge::Lane l = normalizedLanes[nlI].second; + wa.width = MAX2(wa.width, l.width); + if (connected.count(edge) == 0) { + if (edge->getFromNode() == this) { + wa.nextSidewalks.push_back(edge->getID()); + connectedPoints.push_back(edge->getLaneShape(0)[0]); + } else { + wa.prevSidewalks.push_back(edge->getID()); + connectedPoints.push_back(edge->getLaneShape(0)[-1]); + } + connected.insert(edge); + } + l.shape.move2side(-l.width / 2); + wa.shape.push_back(l.shape[0]); + l.shape.move2side(l.width); + wa.shape.push_back(l.shape[0]); + } + if (buildExtensions) { + // extension at starting crossing + if (startCrossingShape.size() > 0) { + if (gDebugFlag1) { + std::cout << " extension at startCrossing shape=" << startCrossingShape << "\n"; + } + startCrossingShape.move2side(startCrossingWidth / 2); + wa.shape.push_front_noDoublePos(startCrossingShape[0]); // right corner + startCrossingShape.move2side(-startCrossingWidth); + wa.shape.push_front_noDoublePos(startCrossingShape[0]); // left corner goes first + } + // extension at ending crossing + if (endCrossingShape.size() > 0) { + if (gDebugFlag1) { + std::cout << " extension at endCrossing shape=" << endCrossingShape << "\n"; + } + endCrossingShape.move2side(endCrossingWidth / 2); + wa.shape.push_back_noDoublePos(endCrossingShape[-1]); + endCrossingShape.move2side(-endCrossingWidth); + wa.shape.push_back_noDoublePos(endCrossingShape[-1]); + } + } + if (connected.size() == 2 && !connectsCrossing && wa.nextSidewalks.size() == 1 && wa.prevSidewalks.size() == 1) { + // do not build a walkingArea since a normal connection exists + NBEdge* e1 = *connected.begin(); + NBEdge* e2 = *(++connected.begin()); + if (e1->hasConnectionTo(e2, 0, 0) || e2->hasConnectionTo(e1, 0, 0)) { + continue; + } + } + // build smooth inner curve (optional) + if (cornerDetail > 0) { + int smoothEnd = end; + int smoothPrev = prev; + // extend to green verge + if (endCrossingWidth > 0 && normalizedLanes[smoothEnd].second.permissions == 0) { + smoothEnd = (smoothEnd + 1) % normalizedLanes.size(); + } + if (startCrossingWidth > 0 && normalizedLanes[smoothPrev].second.permissions == 0) { + if (smoothPrev == 0) { + smoothPrev = (int)normalizedLanes.size() - 1; + } else { + smoothPrev--; + } + } + PositionVector begShape = normalizedLanes[smoothEnd].second.shape; + begShape = begShape.reverse(); + //begShape.extrapolate(endCrossingWidth); + begShape.move2side(normalizedLanes[smoothEnd].second.width / 2); + PositionVector endShape = normalizedLanes[smoothPrev].second.shape; + endShape.move2side(normalizedLanes[smoothPrev].second.width / 2); + //endShape.extrapolate(startCrossingWidth); + PositionVector curve = computeSmoothShape(begShape, endShape, cornerDetail + 2, false, 25, 25); + if (gDebugFlag1) std::cout + << " end=" << smoothEnd << " prev=" << smoothPrev + << " endCrossingWidth=" << endCrossingWidth << " startCrossingWidth=" << startCrossingWidth + << " begShape=" << begShape << " endShape=" << endShape << " smooth curve=" << curve << "\n"; + if (curve.size() > 2) { + curve.eraseAt(0); + curve.eraseAt(-1); + if (endCrossingWidth > 0) { + wa.shape.eraseAt(-1); + } + if (startCrossingWidth > 0) { + wa.shape.eraseAt(0); + } + wa.shape.append(curve, 0); + } + } + // determine length (average of all possible connections) + SUMOReal lengthSum = 0; + int combinations = 0; + for (std::vector::const_iterator it1 = connectedPoints.begin(); it1 != connectedPoints.end(); ++it1) { + for (std::vector::const_iterator it2 = connectedPoints.begin(); it2 != connectedPoints.end(); ++it2) { + const Position& p1 = *it1; + const Position& p2 = *it2; + if (p1 != p2) { + lengthSum += p1.distanceTo2D(p2); + combinations += 1; + } + } + } + if (gDebugFlag1) { + std::cout << " combinations=" << combinations << " connectedPoints=" << connectedPoints << "\n"; + } + wa.length = POSITION_EPS; + if (combinations > 0) { + wa.length = MAX2(POSITION_EPS, lengthSum / combinations); + } + myWalkingAreas.push_back(wa); + } + // build walkingAreas between split crossings + for (std::vector::iterator it = myCrossings.begin(); it != myCrossings.end(); ++it) { + Crossing& prev = *it; + Crossing& next = (it != myCrossings.begin() ? * (it - 1) : * (myCrossings.end() - 1)); + if (gDebugFlag1) { + std::cout << " checkIntermediate: prev=" << prev.id << " next=" << next.id << " prev.nextWA=" << prev.nextWalkingArea << "\n"; + } + if (prev.nextWalkingArea == "") { + WalkingArea wa(":" + getID() + "_w" + toString(index++), prev.width); + prev.nextWalkingArea = wa.id; + wa.nextCrossing = next.id; + next.prevWalkingArea = wa.id; + if (isTLControlled()) { + wa.tlID = (*getControllingTLS().begin())->getID(); + } + // back of previous crossing + PositionVector tmp = prev.shape; + tmp.move2side(-prev.width / 2); + wa.shape.push_back(tmp[-1]); + tmp.move2side(prev.width); + wa.shape.push_back(tmp[-1]); + // front of next crossing + tmp = next.shape; + tmp.move2side(prev.width / 2); + wa.shape.push_back(tmp[0]); + tmp.move2side(-prev.width); + wa.shape.push_back(tmp[0]); + // length (special case) + wa.length = MAX2(POSITION_EPS, prev.shape.back().distanceTo2D(next.shape.front())); + myWalkingAreas.push_back(wa); + if (gDebugFlag1) { + std::cout << " build wa=" << wa.id << "\n"; + } + } + } +} + + +bool +NBNode::crossingBetween(const NBEdge* e1, const NBEdge* e2) const { + if (e1 == e2) { + return false; + } + for (std::vector::const_iterator it = myCrossings.begin(); it != myCrossings.end(); ++it) { + const EdgeVector& edges = (*it).edges; + EdgeVector::const_iterator it1 = find(edges.begin(), edges.end(), e1); + EdgeVector::const_iterator it2 = find(edges.begin(), edges.end(), e2); + if (it1 != edges.end() && it2 != edges.end()) { + return true; + } + } + return false; +} + + +EdgeVector +NBNode::edgesBetween(const NBEdge* e1, const NBEdge* e2) const { + EdgeVector result; + EdgeVector::const_iterator it = find(myAllEdges.begin(), myAllEdges.end(), e1); + assert(it != myAllEdges.end()); + NBContHelper::nextCW(myAllEdges, it); + EdgeVector::const_iterator it_end = find(myAllEdges.begin(), myAllEdges.end(), e2); + assert(it_end != myAllEdges.end()); + while (it != it_end) { + result.push_back(*it); + NBContHelper::nextCW(myAllEdges, it); + } + return result; } @@ -1452,6 +2185,59 @@ return false; } + +void +NBNode::setRoundabout() { + if (myType == NODETYPE_RIGHT_BEFORE_LEFT) { + myType = NODETYPE_PRIORITY; + } +} + + +void +NBNode::addCrossing(EdgeVector edges, SUMOReal width, bool priority) { + myCrossings.push_back(Crossing(this, edges, width, priority)); +} + + +void +NBNode::removeCrossing(const EdgeVector& edges) { + EdgeSet edgeSet(edges.begin(), edges.end()); + for (std::vector::iterator it = myCrossings.begin(); it != myCrossings.end();) { + EdgeSet edgeSet2((*it).edges.begin(), (*it).edges.end()); + if (edgeSet == edgeSet2) { + it = myCrossings.erase(it); + } else { + ++it; + } + } +} + + +const NBNode::Crossing& +NBNode::getCrossing(const std::string& id) const { + for (std::vector::const_iterator it = myCrossings.begin(); it != myCrossings.end(); ++it) { + if ((*it).id == id) { + return *it; + } + } + throw ProcessError("Request for unknown crossing '" + id + "'"); +} + + +void +NBNode::setCrossingTLIndices(unsigned int startIndex) { + for (std::vector::iterator it = myCrossings.begin(); it != myCrossings.end(); ++it) { + (*it).tlLinkNo = startIndex++; + } +} + + +int +NBNode::numNormalConnections() const { + return myRequest->getSizes().second; +} + Position NBNode::getCenter() const { /* Conceptually, the center point would be identical with myPosition. @@ -1469,5 +2255,63 @@ } } + +EdgeVector +NBNode::getEdgesSortedByAngleAtNodeCenter() const { + EdgeVector result = myAllEdges; + if (gDebugFlag1) { + std::cout << " angles:\n"; + for (EdgeVector::const_iterator it = result.begin(); it != result.end(); ++it) { + std::cout << " edge=" << (*it)->getID() << " edgeAngle=" << (*it)->getAngleAtNode(this) << " angleToShape=" << (*it)->getAngleAtNodeToCenter(this) << "\n"; + } + std::cout << " allEdges before: " << toString(result) << "\n"; + } + sort(result.begin(), result.end(), NBContHelper::edge_by_angle_to_nodeShapeCentroid_sorter(this)); + // let the first edge in myAllEdges remain the first + if (gDebugFlag1) { + std::cout << " allEdges sorted: " << toString(result) << "\n"; + } + rotate(result.begin(), std::find(result.begin(), result.end(), *myAllEdges.begin()), result.end()); + if (gDebugFlag1) { + std::cout << " allEdges rotated: " << toString(result) << "\n"; + } + return result; +} + + +std::string +NBNode::getNodeIDFromInternalLane(const std::string id) { + // this relies on the fact that internal ids always have the form + // :__ + // i.e. :C_3_0, :C_c1_0 :C_w0_0 + assert(id[0] == ':'); + size_t sep_index = id.rfind('_'); + if (sep_index == std::string::npos) { + WRITE_ERROR("Invalid lane id '" + id + "' (missing '_')."); + return ""; + } + sep_index = id.substr(0, sep_index).rfind('_'); + if (sep_index == std::string::npos) { + WRITE_ERROR("Invalid lane id '" + id + "' (missing '_')."); + return ""; + } + return id.substr(1, sep_index - 1); +} + + +void +NBNode::avoidOverlap() { + // simple case: edges with LANESPREAD_CENTER and a (possible) turndirection at the same node + for (EdgeVector::iterator it = myIncomingEdges.begin(); it != myIncomingEdges.end(); it++) { + NBEdge* edge = *it; + NBEdge* turnDest = edge->getTurnDestination(true); + if (turnDest != 0) { + edge->shiftPositionAtNode(this, turnDest); + turnDest->shiftPositionAtNode(this, edge); + } + } + // @todo: edges in the same direction with sharp angles starting/ending at the same position +} + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNode.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNode.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNode.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNode.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,15 +2,15 @@ /// @file NBNode.h /// @author Daniel Krajzewicz /// @author Jakob Erdmann -/// @author Yun-Pang Wang +/// @author Yun-Pang Floetteroed /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NBNode.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBNode.h 18167 2015-03-27 11:26:11Z namdre $ /// // The representation of a single node /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -79,6 +80,8 @@ friend class NBEdgePriorityComputer; // < computes priorities of edges per intersection public: + typedef std::map CustomShapeMap; + /** * @class ApproachingDivider * @brief Computes lane-2-lane connections @@ -98,17 +101,24 @@ /// @brief The approached current edge NBEdge* myCurrentOutgoing; + /// @brief The available lanes to which connections shall be built + std::vector myAvailableLanes; + public: /** @brief Constructor * @param[in] approaching The list of the edges that approach the outgoing edge * @param[in] currentOutgoing The outgoing edge */ ApproachingDivider(EdgeVector* approaching, - NBEdge* currentOutgoing); + NBEdge* currentOutgoing, const bool buildCrossingsAndWalkingAreas); /// @brief Destructor ~ApproachingDivider(); + unsigned int numAvailableLanes() const { + return (unsigned int)myAvailableLanes.size(); + } + /** the bresenham-callback */ void execute(const unsigned int src, const unsigned int dest); @@ -118,14 +128,78 @@ }; -public: - /** @brief Constructor - * @param[in] id The id of the node - * @param[in] position The position of the node + /** @struct Crossing + * @brief A definition of a pedestrian crossing */ - NBNode(const std::string& id, const Position& position); + struct Crossing { + Crossing(const NBNode* _node, const EdgeVector& _edges, SUMOReal _width, bool _priority) : + node(_node), edges(_edges), width(_width), priority(_priority), tlLinkNo(-1) + {} + /// @brief The parent node of this crossing + const NBNode* node; + /// @brief The edges being crossed + EdgeVector edges; + /// @brief The lane's shape + PositionVector shape; + /// @brief This lane's width + SUMOReal width; + /// @brief the (edge)-id of this crossing + std::string id; + /// @brief the lane-id of the previous walkingArea + std::string prevWalkingArea; + /// @brief the lane-id of the next walkingArea + std::string nextWalkingArea; + /// @brief whether the pedestrians have priority + bool priority; + /// @brief the traffic light index of this crossing (if controlled) + int tlLinkNo; + }; + /** @struct WalkingArea + * @brief A definition of a pedestrian walking area + */ + struct WalkingArea { + WalkingArea(const std::string& _id, SUMOReal _width) : + id(_id), + width(_width), + nextCrossing(""), + tlID("") + {} + /// @brief the (edge)-id of this walkingArea + std::string id; + /// @brief This lane's width + SUMOReal width; + /// @brief This lane's width + SUMOReal length; + /// @brief The polygonal shape + PositionVector shape; + /// @brief the lane-id of the next crossing + std::string nextCrossing; + /// @brief the traffic light id of the next crossing or "" + std::string tlID; + /// @brief the lane-id of the next sidewalk lane or "" + std::vector nextSidewalks; + /// @brief the lane-id of the previous sidewalk lane or "" + std::vector prevSidewalks; + }; + + /// @brief edge directions (for pedestrian related stuff) + static const int FORWARD; + static const int BACKWARD; + /// @brief default width of pedetrian crossings + static const SUMOReal DEFAULT_CROSSING_WIDTH; + + /// @brief the default turning radius at intersections in m + static const SUMOReal DEFAULT_RADIUS; + + /// @brief unspecified lane width + static const SUMOReal UNSPECIFIED_RADIUS; + +public: + /// @brief maximum number of connections allowed + static const int MAX_CONNECTIONS; + /** @brief Constructor * @param[in] id The id of the node * @param[in] position The position of the node @@ -137,9 +211,9 @@ /** @brief Constructor * @param[in] id The id of the node * @param[in] position The position of the node - * @param[in] district The district this district node represents + * @param[in] district The district this district node represents, 0 means no district node */ - NBNode(const std::string& id, const Position& position, NBDistrict* district); + NBNode(const std::string& id, const Position& position, NBDistrict* district = 0); /// @brief Destructor @@ -202,6 +276,13 @@ SumoXMLNodeType getType() const { return myType; } + + /** @brief Returns the turning radius of this node + * @return The turning radius of this node + */ + SUMOReal getRadius() const { + return myRadius; + } /// @} @@ -246,6 +327,9 @@ /// @brief causes the traffic light to be computed anew void invalidateTLS(NBTrafficLightLogicCont& tlCont); + + /// @brief patches loaded signal plans by modifying lane indices + void shiftTLConnectionLaneIndex(NBEdge* edge, int offset); /// @} @@ -289,7 +373,7 @@ /// computes the connections of lanes to edges - void computeLanes2Lanes(); + void computeLanes2Lanes(const bool buildCrossingsAndWalkingAreas); /// computes the node's type, logic and traffic light void computeLogic(const NBEdgeCont& ec, OptionsCont& oc); @@ -350,11 +434,24 @@ /** @brief Returns the information whether the described flow must let any other flow pass * @param[in] from The connection's start edge * @param[in] to The connection's end edge - * @param[in] toLane The lane the connection ends at + * @param[in] fromLane The lane the connection start at + * @param[in] includePedCrossings Whether braking due to a pedestrian crossing counts + * @return Whether the described connection must brake (has higher priorised foes) + */ + bool mustBrake(const NBEdge* const from, const NBEdge* const to, int fromLane, bool includePedCrossings) const; + + /** @brief Returns the information whether the described flow must brake for the given crossing + * @param[in] from The connection's start edge + * @param[in] to The connection's end edge + * @param[in] crossing The pedestrian crossing to check * @return Whether the described connection must brake (has higher priorised foes) */ - bool mustBrake(const NBEdge* const from, const NBEdge* const to, int toLane) const; + bool mustBrakeForCrossing(const NBEdge* const from, const NBEdge* const to, const Crossing& crossing) const; + /** @brief return whether the given laneToLane connection is a right turn which must yield to a bicycle crossings + */ + bool rightTurnConflict(const NBEdge* from, const NBEdge* to, int fromLane, + const NBEdge* prohibitorFrom, const NBEdge* prohibitorTo, int prohibitorFromLane) const; /** @brief Returns the information whether "prohibited" flow must let "prohibitor" flow pass * @param[in] possProhibitedFrom The maybe prohibited connection's begin @@ -390,11 +487,36 @@ LinkState getLinkState(const NBEdge* incoming, NBEdge* outgoing, int fromLane, bool mayDefinitelyPass, const std::string& tlID) const; - void computeNodeShape(bool leftHand); - + /** @brief Compute the junction shape for this node + * @param[in] lefhand Whether the network uses left-hand traffic + * @param[in] mismatchThreshold The threshold for warning about shapes which are away from myPosition + */ + void computeNodeShape(bool leftHand, SUMOReal mismatchThreshold); + /// @brief retrieve the junction shape const PositionVector& getShape() const; + /// @brief set the junction shape + void setCustomShape(const PositionVector& shape); + + /// @brief sets a custom shape for an internal lane + void setCustomLaneShape(const std::string& laneID, const PositionVector& shape); + + /// @brief sets a custom shape for an internal lane + const CustomShapeMap& getCustomLaneShapes() const { + return myCustomLaneShapes; + } + + /// @brief set the turning radius + void setRadius(SUMOReal radius) { + myRadius = radius; + } + + /// @brief return whether the shape was set by the user + bool hasCustomShape() const { + return myHaveCustomPoly; + } + bool checkIsRemovable() const; @@ -406,18 +528,35 @@ bool isNearDistrict() const; bool isDistrict() const; - bool needsCont(NBEdge* fromE, NBEdge* toE, NBEdge* otherFromE, NBEdge* otherToE, const NBEdge::Connection& c) const; + /// @brief whether an internal junction should be built at from and respect other + bool needsCont(const NBEdge* fromE, const NBEdge* otherFromE, + const NBEdge::Connection& c, const NBEdge::Connection& otherC) const; /** @brief Compute the shape for an internal lane * @param[in] fromE The starting edge - * @param[in] fromL The index of the starting lane - * @param[in] toE The destination edge - * @param[in] toL The index of the destination lane + * @param[in] con The connection for this internal lane + * @param[in] numPoints The number of geometry points for the internal lane + * @return The shape of the internal lane + */ + PositionVector computeInternalLaneShape(NBEdge* fromE, const NBEdge::Connection& con, int numPoints = 5) const; + + + /** @brief Compute a smooth curve between the given geometries + * @param[in] begShape The geometry at the start + * @param[in] endShape The geometry at the end * @param[in] numPoints The number of geometry points for the internal lane + * @param[in] isTurnaround Whether this shall be the shape for a turnaround + * @param[in] extrapolateBeg Extrapolation distance at the beginning + * @param[in] extrapolateEnd Extrapolation distance at the end * @return The shape of the internal lane */ - PositionVector computeInternalLaneShape( - NBEdge* fromE, int fromL, NBEdge* toE, int toL, int numPoints = 5) const; + PositionVector computeSmoothShape( + const PositionVector& begShape, + const PositionVector& endShape, + int numPoints, + bool isTurnaround, + SUMOReal extrapolateBeg, + SUMOReal extrapolateEnd) const; /** @brief Replaces occurences of the first edge within the list of incoming by the second @@ -436,7 +575,33 @@ Connections are remapped, too */ void replaceOutgoing(const EdgeVector& which, NBEdge* by); - void buildInnerEdges(); + /// @brief guess pedestrian crossings and return how many were guessed + int guessCrossings(); + + /* @brief check whether a crossing should be build for the candiate edges and build 0 to n crossings + * @param[in] candidates The candidate vector of edges to be crossed + * @return The number of crossings built + * */ + int checkCrossing(EdgeVector candidates); + + /// @brief build internal lanes, pedestrian crossings and walking areas + void buildInnerEdges(bool buildCrossingsAndWalkingAreas); + + /* @brief build pedestrian crossings + * @return The next index for creating internal lanes + * */ + unsigned int buildCrossings(); + + /* @brief build pedestrian walking areas and set connections from/to walkingAreas + * @param[in] cornerDetail The detail level when generating the inner curve + * */ + void buildWalkingAreas(int cornerDetail); + + /// @brief return all edges that lie clockwise between the given edges + EdgeVector edgesBetween(const NBEdge* e1, const NBEdge* e2) const; + + /// @brief return true if the given edges are connected by a crossing + bool crossingBetween(const NBEdge* e1, const NBEdge* e2) const; const NBConnectionProhibits& getProhibitions() { return myBlockedConnections; @@ -446,6 +611,39 @@ */ bool geometryLike() const; + /// @brief update the type of this node as a roundabout + void setRoundabout(); + + /// @brief add a pedestrian crossing to this node + void addCrossing(EdgeVector edges, SUMOReal width, bool priority); + + /// @brief remove a pedestrian crossing from this node (identified by its edges) + void removeCrossing(const EdgeVector& edges); + + /// @brief return this junctions pedestrian crossings + inline const std::vector& getCrossings() const { + return myCrossings; + } + + /// @brief return this junctions pedestrian walking areas + inline const std::vector& getWalkingAreas() const { + return myWalkingAreas; + } + + /// @brief return the crossing with the given id + const Crossing& getCrossing(const std::string& id) const; + + /// @brief set tl indices of this nodes crossing starting at the given index + void setCrossingTLIndices(unsigned int startIndex); + + /// @brief return the number of lane-to-lane connections at this junction (excluding crossings) + int numNormalConnections() const; + + /** @brief fix overlap + */ + void avoidOverlap(); + + /** * @class nodes_by_id_sorter * @brief Used for sorting the cells by the begin time they describe @@ -463,6 +661,27 @@ }; + + /** @class edge_by_direction_sorter + * @brief Sorts outgoing before incoming edges + */ + class edge_by_direction_sorter { + public: + explicit edge_by_direction_sorter(NBNode* n) : myNode(n) {} + int operator()(NBEdge* e1, NBEdge* e2) const { + UNUSED_PARAMETER(e2); + return e1->getFromNode() == myNode; + } + + private: + /// @brief The node to compute the relative angle of + NBNode* myNode; + + }; + + /// @brief returns the node id for internal lanes, crossings and walkingareas + static std::string getNodeIDFromInternalLane(const std::string id); + private: bool isSimpleContinuation() const; @@ -484,6 +703,13 @@ NBEdge* removed, const EdgeVector& incoming, const EdgeVector& outgoing); + /// @brief return whether there is a non-sidewalk lane after the given index; + bool forbidsPedestriansAfter(std::vector > normalizedLanes, int startIndex); + + + /// @brief returns the list of all edges sorted clockwise by getAngleAtNodeToCenter + EdgeVector getEdgesSortedByAngleAtNodeCenter() const; + private: /// @brief The position the node lies at Position myPosition; @@ -497,6 +723,12 @@ /// @brief Vector of incoming and outgoing edges EdgeVector myAllEdges; + /// @brief Vector of crossings + std::vector myCrossings; + + /// @brief Vector of walking areas + std::vector myWalkingAreas; + /// @brief The type of the junction SumoXMLNodeType myType; @@ -509,10 +741,18 @@ /// the (outer) shape of the junction PositionVector myPoly; + /// @brief whether this nodes shape was set by the user + bool myHaveCustomPoly; + NBRequest* myRequest; std::set myTrafficLights; + /// @brief the turning radius (for all corners) at this node in m. + SUMOReal myRadius; + + CustomShapeMap myCustomLaneShapes; + private: /// @brief invalidated copy constructor NBNode(const NBNode& s); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNodeShapeComputer.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNodeShapeComputer.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNodeShapeComputer.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNodeShapeComputer.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NBNodeShapeComputer.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBNodeShapeComputer.cpp 18169 2015-03-27 13:40:16Z behrisch $ /// // This class computes shapes of junctions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -31,6 +31,7 @@ #endif #include +#include #include #include #include @@ -62,22 +63,22 @@ UNUSED_PARAMETER(leftHand); PositionVector ret; // check whether the node is a dead end node or a node where only turning is possible - // in this case, we will use "computeNodeShapeByCrosses" + // in this case, we will use "computeNodeShapeSmall" bool singleDirection = false; if (myNode.myAllEdges.size() == 1) { singleDirection = true; } if (myNode.myAllEdges.size() == 2 && myNode.getIncomingEdges().size() == 1) { - if (myNode.getIncomingEdges()[0]->isTurningDirectionAt(&myNode, myNode.getOutgoingEdges()[0])) { + if (myNode.getIncomingEdges()[0]->isTurningDirectionAt(myNode.getOutgoingEdges()[0])) { singleDirection = true; } } if (singleDirection) { - return computeNodeShapeByCrosses(); + return computeNodeShapeSmall(); } // check whether the node is a just something like a geometry // node (one in and one out or two in and two out, pair-wise continuations) - // also in this case "computeNodeShapeByCrosses" is used + // also in this case "computeNodeShapeSmall" is used bool geometryLike = myNode.isSimpleContinuation(); if (geometryLike) { // additionally, the angle between the edges must not be larger than 45 degrees @@ -96,15 +97,15 @@ } } if (maxAngle > 22.5) { - return computeNodeShapeByCrosses(); + return computeNodeShapeSmall(); } } // - ret = computeContinuationNodeShape(geometryLike); - // fail fall-back: use "computeNodeShapeByCrosses" + ret = computeNodeShapeDefault(geometryLike); + // fail fall-back: use "computeNodeShapeSmall" if (ret.size() < 3) { - ret = computeNodeShapeByCrosses(); + ret = computeNodeShapeSmall(); } return ret; } @@ -112,98 +113,47 @@ void computeSameEnd(PositionVector& l1, PositionVector& l2) { - Line sub(l1.lineAt(0).getPositionAtDistance(100), l1[1]); + Line sub(l1.lineAt(0).getPositionAtDistance2D(100), l1[1]); Line tmp(sub); tmp.rotateAtP1(M_PI / 2); - tmp.extrapolateBy(100); + tmp.extrapolateBy2D(100); if (l1.intersects(tmp.p1(), tmp.p2())) { SUMOReal offset1 = l1.intersectsAtLengths2D(tmp)[0]; Line tl1 = Line( - l1.lineAt(0).getPositionAtDistance(offset1), + l1.lineAt(0).getPositionAtDistance2D(offset1), l1[1]); - tl1.extrapolateBy(100); + tl1.extrapolateBy2D(100); l1.replaceAt(0, tl1.p1()); } if (l2.intersects(tmp.p1(), tmp.p2())) { SUMOReal offset2 = l2.intersectsAtLengths2D(tmp)[0]; Line tl2 = Line( - l2.lineAt(0).getPositionAtDistance(offset2), + l2.lineAt(0).getPositionAtDistance2D(offset2), l2[1]); - tl2.extrapolateBy(100); + tl2.extrapolateBy2D(100); l2.replaceAt(0, tl2.p1()); } } -void -NBNodeShapeComputer::replaceLastChecking(PositionVector& g, bool decenter, - PositionVector counter, - size_t counterLanes, SUMOReal counterDist, - int laneDiff) { - counter.extrapolate(100); - Position counterPos = counter.positionAtOffset2D(counterDist); - PositionVector t = g; - t.extrapolate(100); - SUMOReal p = t.nearest_offset_to_point2D(counterPos); - if (p >= 0) { - counterPos = t.positionAtOffset2D(p); - } - if (g[-1].distanceTo(counterPos) < SUMO_const_laneWidth * (SUMOReal) counterLanes) { - g.replaceAt((int)g.size() - 1, counterPos); - } else { - g.push_back_noDoublePos(counterPos); - } - if (decenter) { - Line l(g[-2], g[-1]); - SUMOReal factor = laneDiff % 2 != 0 ? SUMO_const_halfLaneAndOffset : SUMO_const_laneWidthAndOffset; - l.move2side(-factor);//SUMO_const_laneWidthAndOffset); - g.replaceAt((int)g.size() - 1, l.p2()); - } -} - - -void -NBNodeShapeComputer::replaceFirstChecking(PositionVector& g, bool decenter, - PositionVector counter, - size_t counterLanes, SUMOReal counterDist, - int laneDiff) { - counter.extrapolate(100); - Position counterPos = counter.positionAtOffset2D(counterDist); - PositionVector t = g; - t.extrapolate(100); - SUMOReal p = t.nearest_offset_to_point2D(counterPos); - if (p >= 0) { - counterPos = t.positionAtOffset2D(p); - } - if (g[0].distanceTo(counterPos) < SUMO_const_laneWidth * (SUMOReal) counterLanes) { - g.replaceAt(0, counterPos); - } else { - g.push_front_noDoublePos(counterPos); - } - if (decenter) { - Line l(g[0], g[1]); - SUMOReal factor = laneDiff % 2 != 0 ? SUMO_const_halfLaneAndOffset : SUMO_const_laneWidthAndOffset; - l.move2side(-factor); - g.replaceAt(0, l.p1()); - } -} - - - PositionVector -NBNodeShapeComputer::computeContinuationNodeShape(bool simpleContinuation) { +NBNodeShapeComputer::computeNodeShapeDefault(bool simpleContinuation) { // if we have less than two edges, we can not compute the node's shape this way if (myNode.myAllEdges.size() < 2) { return PositionVector(); } + // magic values + const SUMOReal radius = (myNode.getRadius() == NBNode::UNSPECIFIED_RADIUS ? NBNode::DEFAULT_RADIUS : myNode.getRadius()); + const int cornerDetail = OptionsCont::getOptions().getInt("junctions.corner-detail"); + // initialise EdgeVector::const_iterator i; // edges located in the value-vector have the same direction as the key edge - std::map same; + std::map > same; // the counter-clockwise boundary of the edge regarding possible same-direction edges - std::map geomsCCW; + GeomsMap geomsCCW; // the clockwise boundary of the edge regarding possible same-direction edges - std::map geomsCW; + GeomsMap geomsCW; // store relationships std::map ccwBoundary; std::map cwBoundary; @@ -219,63 +169,34 @@ if (newAll.size() < 2) { return PositionVector(); } - // combine all geoms - std::map myExtended; + + // All geoms are outoing from myNode. + // for every direction in newAll we compute the offset at which the + // intersection ends and the edge starts. This value is saved in 'distances' + // If the geometries need to be extended to get an intersection, this is + // recorded in 'myExtended' std::map distances; + std::map myExtended; + for (i = newAll.begin(); i != newAll.end(); ++i) { EdgeVector::const_iterator cwi = i; - cwi++; - if (cwi == newAll.end()) { - cwi = newAll.begin(); - } EdgeVector::const_iterator ccwi = i; - if (ccwi == newAll.begin()) { - ccwi = newAll.end() - 1; - } else { - ccwi--; - } - + SUMOReal ccad; + SUMOReal cad; + initNeighbors(newAll, i, geomsCW, geomsCCW, cwi, ccwi, cad, ccad); assert(geomsCCW.find(*i) != geomsCCW.end()); assert(geomsCW.find(*ccwi) != geomsCW.end()); assert(geomsCW.find(*cwi) != geomsCW.end()); - SUMOReal angleI = geomsCCW[*i].lineAt(0).atan2PositiveAngle(); - SUMOReal angleCCW = geomsCW[*ccwi].lineAt(0).atan2PositiveAngle(); - SUMOReal angleCW = geomsCW[*cwi].lineAt(0).atan2PositiveAngle(); - SUMOReal ccad; - SUMOReal cad; - SUMOReal twoPI = (SUMOReal)(2 * M_PI); - if (angleI > angleCCW) { - ccad = angleI - angleCCW; - } else { - ccad = twoPI - angleCCW + angleI; - } - - if (angleI > angleCW) { - cad = twoPI - angleI + angleCW; - } else { - cad = angleCW - angleI; - } - if (ccad < 0) { - ccad += twoPI; - } - if (ccad > twoPI) { - ccad -= twoPI; - } - if (cad < 0) { - cad += twoPI; - } - if (cad > twoPI) { - cad -= twoPI; - } - if (simpleContinuation && ccad < DEG2RAD(45.)) { - ccad += twoPI; - } - if (simpleContinuation && cad < DEG2RAD(45.)) { - cad += twoPI; - } - - if (fabs(ccad - cad) < (SUMOReal) 0.1 && *cwi == *ccwi) { + // there are only 2 directions and they are almost parallel + if (*cwi == *ccwi && + ( + // no change in lane numbers, even low angles still give a good intersection + (simpleContinuation && fabs(ccad - cad) < (SUMOReal) 0.1) + // lane numbers change, a direct intersection could be far away from the node position + // so we use a larger threshold + || (!simpleContinuation && fabs(ccad - cad) < DEG2RAD(22.5))) + ) { // compute the mean position between both edges ends ... Position p; if (myExtended.find(*ccwi) != myExtended.end()) { @@ -304,323 +225,161 @@ } (*i)->setGeometry(g); // and rebuild previous information - geomsCCW[*i] = (*i)->getCCWBoundaryLine(myNode, SUMO_const_halfLaneWidth); + geomsCCW[*i] = (*i)->getCCWBoundaryLine(myNode); geomsCCW[*i].extrapolate(100); - geomsCW[*i] = (*i)->getCWBoundaryLine(myNode, SUMO_const_halfLaneWidth); + geomsCW[*i] = (*i)->getCWBoundaryLine(myNode); geomsCW[*i].extrapolate(100); // the distance is now = zero (the point we have appended) distances[*i] = 100; myExtended[*i] = true; } else { if (!simpleContinuation) { - // let us put some geometry stuff into it - dist = (SUMOReal) 1.5 + dist; + // since there are only two (almost parallel) directions, the + // concept of a turning radius does not quite fit. Instead we need + // to enlarge the intersection to accomodate the change in + // the number of lanes + // @todo: make this independently configurable + dist += radius; } distances[*i] = dist; } } else { - if (ccad < cad) { - if (!simpleContinuation) { - if (geomsCCW[*i].intersects(geomsCW[*ccwi])) { - distances[*i] = (SUMOReal) 1.5 + geomsCCW[*i].intersectsAtLengths2D(geomsCW[*ccwi])[0]; - if (*cwi != *ccwi && geomsCW[*i].intersects(geomsCCW[*cwi])) { - SUMOReal a1 = distances[*i]; - SUMOReal a2 = (SUMOReal) 1.5 + geomsCW[*i].intersectsAtLengths2D(geomsCCW[*cwi])[0]; - if (ccad > DEG2RAD(90. + 45.) && cad > DEG2RAD(90. + 45.)) { - SUMOReal mmin = MIN2(distances[*cwi], distances[*ccwi]); - if (mmin > 100) { - distances[*i] = (SUMOReal) 5. + (SUMOReal) 100. - (SUMOReal)(mmin - 100); //100 + 1.5; - } - } else if (a2 > a1 + POSITION_EPS && a2 - a1 < (SUMOReal) 10) { - distances[*i] = a2; + // the angles are different enough to compute the intersection of + // the outer boundaries directly (or there are more than 2 directions). The "nearer" neighbar causes the furthest distance + const bool ccwCloser = ccad < cad; + // the border facing the closer neighbor + const PositionVector& currGeom = ccwCloser ? geomsCCW[*i] : geomsCW[*i]; + // the border facing the far neighbor + const PositionVector& currGeom2 = ccwCloser ? geomsCW[*i] : geomsCCW[*i]; + // the border of the closer neighbor + const PositionVector& neighGeom = ccwCloser ? geomsCW[*ccwi] : geomsCCW[*cwi]; + // the border of the far neighbor + const PositionVector& neighGeom2 = ccwCloser ? geomsCCW[*cwi] : geomsCW[*ccwi]; + if (!simpleContinuation) { + if (currGeom.intersects(neighGeom)) { + distances[*i] = radius + closestIntersection(currGeom, neighGeom, 100); + if (*cwi != *ccwi && currGeom2.intersects(neighGeom2)) { + const SUMOReal farAngleDist = ccwCloser ? cad : ccad; + SUMOReal a1 = distances[*i]; + SUMOReal a2 = radius + closestIntersection(currGeom2, neighGeom2, 100); + if (ccad > DEG2RAD(90. + 45.) && cad > DEG2RAD(90. + 45.)) { + SUMOReal mmin = MIN2(distances[*cwi], distances[*ccwi]); + if (mmin > 100) { + distances[*i] = (SUMOReal) 5. + (SUMOReal) 100. - (SUMOReal)(mmin - 100); //100 + 1.5; } - } - } else { - if (*cwi != *ccwi && geomsCW[*i].intersects(geomsCCW[*cwi])) { - distances[*i] = (SUMOReal) 1.5 + geomsCW[*i].intersectsAtLengths2D(geomsCCW[*cwi])[0]; - } else { - distances[*i] = (SUMOReal)(100. + 1.5); + } else if (fabs(a2 - a1) < 10 || farAngleDist < DEG2RAD(135)) { + distances[*i] = MAX2(a1, a2); } } } else { - if (geomsCCW[*i].intersects(geomsCW[*ccwi])) { - distances[*i] = geomsCCW[*i].intersectsAtLengths2D(geomsCW[*ccwi])[0]; + if (*cwi != *ccwi && currGeom2.intersects(neighGeom2)) { + distances[*i] = radius + currGeom2.intersectsAtLengths2D(neighGeom2)[0]; } else { - distances[*i] = (SUMOReal) 100.; + distances[*i] = 100 + radius; } } } else { - if (!simpleContinuation) { - if (geomsCW[*i].intersects(geomsCCW[*cwi])) { - distances[*i] = (SUMOReal)(1.5 + geomsCW[*i].intersectsAtLengths2D(geomsCCW[*cwi])[0]); - if (*cwi != *ccwi && geomsCCW[*i].intersects(geomsCW[*ccwi])) { - SUMOReal a1 = distances[*i]; - SUMOReal a2 = (SUMOReal)(1.5 + geomsCCW[*i].intersectsAtLengths2D(geomsCW[*ccwi])[0]); - if (ccad > DEG2RAD(90. + 45.) && cad > DEG2RAD(90. + 45.)) { - SUMOReal mmin = MIN2(distances[*cwi], distances[*ccwi]); - if (mmin > 100) { - distances[*i] = (SUMOReal) 5. + (SUMOReal) 100. - (SUMOReal)(mmin - 100); //100 + 1.5; - } - } else if (a2 > a1 + POSITION_EPS && a2 - a1 < (SUMOReal) 10) { - distances[*i] = a2; - } - } - } else { - if (*cwi != *ccwi && geomsCCW[*i].intersects(geomsCW[*ccwi])) { - distances[*i] = (SUMOReal) 1.5 + geomsCCW[*i].intersectsAtLengths2D(geomsCW[*ccwi])[0]; - } else { - distances[*i] = (SUMOReal)(100. + 1.5); - } - } + if (currGeom.intersects(neighGeom)) { + distances[*i] = currGeom.intersectsAtLengths2D(neighGeom)[0]; } else { - if (geomsCW[*i].intersects(geomsCCW[*cwi])) { - distances[*i] = geomsCW[*i].intersectsAtLengths2D(geomsCCW[*cwi])[0]; - } else { - distances[*i] = (SUMOReal) 100; - } + distances[*i] = (SUMOReal) 100.; } } } } for (i = newAll.begin(); i != newAll.end(); ++i) { - if (distances.find(*i) != distances.end()) { - continue; - } - EdgeVector::const_iterator cwi = i; - cwi++; - if (cwi == newAll.end()) { - cwi = newAll.begin(); - } - EdgeVector::const_iterator ccwi = i; - if (ccwi == newAll.begin()) { - ccwi = newAll.end() - 1; - } else { - ccwi--; - } - - assert(geomsCW.find(*ccwi) != geomsCW.end()); - assert(geomsCW.find(*cwi) != geomsCW.end()); - Position p1 = distances.find(*cwi) != distances.end() && distances[*cwi] != -1 - ? geomsCCW[*cwi].positionAtOffset2D(distances[*cwi]) - : geomsCCW[*cwi].positionAtOffset2D((SUMOReal) - .1); - Position p2 = distances.find(*ccwi) != distances.end() && distances[*ccwi] != -1 - ? geomsCW[*ccwi].positionAtOffset2D(distances[*ccwi]) - : geomsCW[*ccwi].positionAtOffset2D((SUMOReal) - .1); - Line l(p1, p2); - l.extrapolateBy(1000); - SUMOReal angleI = geomsCCW[*i].lineAt(0).atan2PositiveAngle(); - SUMOReal angleCCW = geomsCW[*ccwi].lineAt(0).atan2PositiveAngle(); - SUMOReal angleCW = geomsCW[*cwi].lineAt(0).atan2PositiveAngle(); - SUMOReal ccad; - SUMOReal cad; - SUMOReal twoPI = (SUMOReal)(2 * M_PI); - if (angleI > angleCCW) { - ccad = angleI - angleCCW; - } else { - ccad = twoPI - angleCCW + angleI; - } - - if (angleI > angleCW) { - cad = twoPI - angleI + angleCW; - } else { - cad = angleCW - angleI; - } - - if (ccad < 0) { - ccad += twoPI; - } - if (ccad > twoPI) { - ccad -= twoPI; - } - if (cad < 0) { - cad += twoPI; - } - if (cad > twoPI) { - cad -= twoPI; - } - SUMOReal offset = 0; - int laneDiff = (*i)->getNumLanes() - (*ccwi)->getNumLanes(); - if (*ccwi != *cwi) { - laneDiff -= (*cwi)->getNumLanes(); - } - laneDiff = 0; - if (myNode.hasIncoming(*i) && (*ccwi)->getNumLanes() % 2 == 1) { - laneDiff = 1; - } - if (myNode.hasOutgoing(*i) && (*cwi)->getNumLanes() % 2 == 1) { - laneDiff = 1; - } - - PositionVector g = (*i)->getGeometry(); - PositionVector counter; - if (myNode.hasIncoming(*i)) { - if (myNode.hasOutgoing(*ccwi) && myNode.hasOutgoing(*cwi)) { - if (distances.find(*cwi) == distances.end()) { - return PositionVector(); - } - replaceLastChecking(g, (*i)->getLaneSpreadFunction() == LANESPREAD_CENTER, - (*cwi)->getGeometry(), (*cwi)->getNumLanes(), distances[*cwi], - laneDiff); - } else { - if (distances.find(*ccwi) == distances.end()) { - return PositionVector(); - } - counter = (*ccwi)->getGeometry(); - if (myNode.hasIncoming(*ccwi)) { - counter = counter.reverse(); - } - replaceLastChecking(g, (*i)->getLaneSpreadFunction() == LANESPREAD_CENTER, - counter, (*ccwi)->getNumLanes(), distances[*ccwi], - laneDiff); - } - } else { - if (myNode.hasIncoming(*ccwi) && myNode.hasIncoming(*cwi)) { - if (distances.find(*ccwi) == distances.end()) { - return PositionVector(); - } - replaceFirstChecking(g, (*i)->getLaneSpreadFunction() == LANESPREAD_CENTER, - (*ccwi)->getGeometry().reverse(), (*ccwi)->getNumLanes(), distances[*ccwi], - laneDiff); - } else { - if (distances.find(*cwi) == distances.end()) { - return PositionVector(); - } - counter = (*cwi)->getGeometry(); - if (myNode.hasIncoming(*cwi)) { - counter = counter.reverse(); - } - replaceFirstChecking(g, (*i)->getLaneSpreadFunction() == LANESPREAD_CENTER, - counter, (*cwi)->getNumLanes(), distances[*cwi], - laneDiff); - } - } - (*i)->setGeometry(g); - - if (cwBoundary[*i] != *i) { - PositionVector g = cwBoundary[*i]->getGeometry(); - PositionVector counter = (*cwi)->getGeometry(); - if (myNode.hasIncoming(*cwi)) { - counter = counter.reverse(); - } - if (myNode.hasIncoming(cwBoundary[*i])) { - if (distances.find(*cwi) == distances.end()) { - return PositionVector(); - } - replaceLastChecking(g, (*i)->getLaneSpreadFunction() == LANESPREAD_CENTER, - counter, (*cwi)->getNumLanes(), distances[*cwi], - laneDiff); - } else { - if (distances.find(*cwi) == distances.end()) { - return PositionVector(); - } - replaceFirstChecking(g, (*i)->getLaneSpreadFunction() == LANESPREAD_CENTER, - counter, (*cwi)->getNumLanes(), distances[*cwi], - laneDiff); - } - cwBoundary[*i]->setGeometry(g); - myExtended[cwBoundary[*i]] = true; - geomsCW[*i] = cwBoundary[*i]->getCWBoundaryLine(myNode, SUMO_const_halfLaneWidth); - } else { - geomsCW[*i] = (*i)->getCWBoundaryLine(myNode, SUMO_const_halfLaneWidth); - - } - - geomsCW[*i].extrapolate(100); - - if (ccwBoundary[*i] != *i) { - PositionVector g = ccwBoundary[*i]->getGeometry(); - PositionVector counter = (*ccwi)->getGeometry(); - if (myNode.hasIncoming(*ccwi)) { - counter = counter.reverse(); - } - if (myNode.hasIncoming(ccwBoundary[*i])) { - if (distances.find(*ccwi) == distances.end()) { - return PositionVector(); - } - replaceLastChecking(g, (*i)->getLaneSpreadFunction() == LANESPREAD_CENTER, - counter, (*ccwi)->getNumLanes(), distances[*ccwi], - laneDiff); - } else { - if (distances.find(*cwi) == distances.end()) { - return PositionVector(); - } - replaceFirstChecking(g, (*i)->getLaneSpreadFunction() == LANESPREAD_CENTER, - counter, (*cwi)->getNumLanes(), distances[*cwi], - laneDiff); - } - ccwBoundary[*i]->setGeometry(g); - myExtended[ccwBoundary[*i]] = true; - geomsCCW[*i] = ccwBoundary[*i]->getCCWBoundaryLine(myNode, SUMO_const_halfLaneWidth); - } else { - geomsCCW[*i] = (*i)->getCCWBoundaryLine(myNode, SUMO_const_halfLaneWidth); - - } - geomsCCW[*i].extrapolate(100); - - computeSameEnd(geomsCW[*i], geomsCCW[*i]); - - // and rebuild previous information - if (((*cwi)->getNumLanes() + (*ccwi)->getNumLanes()) > (*i)->getNumLanes()) { - offset = 5; - } - if (ccwBoundary[*i] != cwBoundary[*i]) { - offset = 5; - } - - myExtended[*i] = true; - distances[*i] = 100 + offset; + if (distances.find(*i) == distances.end()) { + assert(false); + distances[*i] = 100; + } } // build PositionVector ret; for (i = newAll.begin(); i != newAll.end(); ++i) { - PositionVector l = geomsCCW[*i]; - SUMOReal len = l.length(); + const PositionVector& ccwBound = geomsCCW[*i]; + SUMOReal len = ccwBound.length(); SUMOReal offset = distances[*i]; if (offset == -1) { offset = (SUMOReal) - .1; } Position p; if (len >= offset) { - p = l.positionAtOffset2D(offset); + p = ccwBound.positionAtOffset2D(offset); } else { - p = l.positionAtOffset2D(len); + p = ccwBound.positionAtOffset2D(len); } p.set(p.x(), p.y(), myNode.getPosition().z()); + if (i != newAll.begin()) { + ret.append(getSmoothCorner(geomsCW[*(i - 1)].reverse(), ccwBound, ret[-1], p, cornerDetail)); + } ret.push_back_noDoublePos(p); // - l = geomsCW[*i]; - len = l.length(); + const PositionVector& cwBound = geomsCW[*i]; + len = cwBound.length(); if (len >= offset) { - p = l.positionAtOffset2D(offset); + p = cwBound.positionAtOffset2D(offset); } else { - p = l.positionAtOffset2D(len); + p = cwBound.positionAtOffset2D(len); } p.set(p.x(), p.y(), myNode.getPosition().z()); ret.push_back_noDoublePos(p); } + // final curve segment + ret.append(getSmoothCorner(geomsCW[*(newAll.end() - 1)], geomsCCW[*newAll.begin()], ret[-1], ret[0], cornerDetail)); return ret; } +SUMOReal +NBNodeShapeComputer::closestIntersection(const PositionVector& geom1, const PositionVector& geom2, SUMOReal offset) { + std::vector intersections = geom1.intersectsAtLengths2D(geom2); + SUMOReal result = intersections[0]; + for (std::vector::iterator it = intersections.begin() + 1; it != intersections.end(); ++it) { + if (fabs(*it - offset) < fabs(result - offset)) { + result = *it; + } + } + return result; +} + + +PositionVector +NBNodeShapeComputer::getSmoothCorner(PositionVector begShape, PositionVector endShape, + const Position& begPoint, const Position& endPoint, int cornerDetail) { + PositionVector ret; + if (cornerDetail > 0) { + begShape = begShape.reverse(); + begShape[-1] = begPoint; + endShape[0] = endPoint; + PositionVector curve = myNode.computeSmoothShape(begShape, endShape, cornerDetail + 2, false, 25, 25); + if (curve.size() > 2) { + curve.eraseAt(0); + curve.eraseAt(-1); + ret = curve; + } + } + return ret; +} void -NBNodeShapeComputer::joinSameDirectionEdges(std::map& same, - std::map& geomsCCW, - std::map& geomsCW) { +NBNodeShapeComputer::joinSameDirectionEdges(std::map >& same, + GeomsMap& geomsCCW, + GeomsMap& geomsCW) { EdgeVector::const_iterator i, j; + // compute boundary lines and extend it by 100m for (i = myNode.myAllEdges.begin(); i != myNode.myAllEdges.end() - 1; i++) { // store current edge's boundary as current ccw/cw boundary try { - geomsCCW[*i] = (*i)->getCCWBoundaryLine(myNode, SUMO_const_halfLaneWidth); + geomsCCW[*i] = (*i)->getCCWBoundaryLine(myNode); } catch (InvalidArgument& e) { WRITE_WARNING(std::string("While computing intersection geometry: ") + std::string(e.what())); geomsCCW[*i] = (*i)->getGeometry(); } try { - geomsCW[*i] = (*i)->getCWBoundaryLine(myNode, SUMO_const_halfLaneWidth); + geomsCW[*i] = (*i)->getCWBoundaryLine(myNode); } catch (InvalidArgument& e) { WRITE_WARNING(std::string("While computing intersection geometry: ") + std::string(e.what())); geomsCW[*i] = (*i)->getGeometry(); @@ -628,68 +387,142 @@ // extend the boundary by extroplating it by 100m PositionVector g1 = myNode.hasIncoming(*i) - ? (*i)->getCCWBoundaryLine(myNode, SUMO_const_halfLaneWidth) - : (*i)->getCWBoundaryLine(myNode, SUMO_const_halfLaneWidth); + ? (*i)->getCCWBoundaryLine(myNode) + : (*i)->getCWBoundaryLine(myNode); Line l1 = g1.lineAt(0); Line tmp = geomsCCW[*i].lineAt(0); - tmp.extrapolateBy(100); + tmp.extrapolateBy2D(100); geomsCCW[*i].replaceAt(0, tmp.p1()); tmp = geomsCW[*i].lineAt(0); - tmp.extrapolateBy(100); + tmp.extrapolateBy2D(100); geomsCW[*i].replaceAt(0, tmp.p1()); // for (j = i + 1; j != myNode.myAllEdges.end(); j++) { - geomsCCW[*j] = (*j)->getCCWBoundaryLine(myNode, SUMO_const_halfLaneWidth); - geomsCW[*j] = (*j)->getCWBoundaryLine(myNode, SUMO_const_halfLaneWidth); + geomsCCW[*j] = (*j)->getCCWBoundaryLine(myNode); + geomsCW[*j] = (*j)->getCWBoundaryLine(myNode); PositionVector g2 = myNode.hasIncoming(*j) - ? (*j)->getCCWBoundaryLine(myNode, SUMO_const_halfLaneWidth) - : (*j)->getCWBoundaryLine(myNode, SUMO_const_halfLaneWidth); + ? (*j)->getCCWBoundaryLine(myNode) + : (*j)->getCWBoundaryLine(myNode); Line l2 = g2.lineAt(0); tmp = geomsCCW[*j].lineAt(0); - tmp.extrapolateBy(100); + tmp.extrapolateBy2D(100); geomsCCW[*j].replaceAt(0, tmp.p1()); tmp = geomsCW[*j].lineAt(0); - tmp.extrapolateBy(100); + tmp.extrapolateBy2D(100); geomsCW[*j].replaceAt(0, tmp.p1()); - if (fabs(l1.atan2DegreeAngle() - l2.atan2DegreeAngle()) < 20) { - if (same.find(*i) == same.end()) { - same[*i] = EdgeVector(); - } - if (same.find(*j) == same.end()) { - same[*j] = EdgeVector(); - } - if (find(same[*i].begin(), same[*i].end(), *j) == same[*i].end()) { - same[*i].push_back(*j); + } + } + // compute same (edges where an intersection doesn't work well + // (always check an edge and its cw neightbor) + // distance to look ahead for a misleading angle + const SUMOReal angleChangeLookahead = 35; + EdgeSet foundOpposite; + for (i = myNode.myAllEdges.begin(); i != myNode.myAllEdges.end() - 1; i++) { + EdgeVector::const_iterator j = i + 1; + if (j == myNode.myAllEdges.end()) { + j = myNode.myAllEdges.begin(); + } + const bool incoming = (*i)->getToNode() == &myNode; + const bool incoming2 = (*j)->getToNode() == &myNode; + const Position positionAtNode = (*i)->getGeometry()[incoming ? -1 : 0]; + const Position positionAtNode2 = (*j)->getGeometry()[incoming2 ? -1 : 0]; + PositionVector g1 = incoming ? (*i)->getCCWBoundaryLine(myNode) : (*i)->getCWBoundaryLine(myNode); + PositionVector g2 = incoming ? (*j)->getCCWBoundaryLine(myNode) : (*j)->getCWBoundaryLine(myNode); + Line l1 = g1.lineAt(0); + Line l2 = g2.lineAt(0); + const SUMOReal angle1further = (g1.size() > 2 && l1.length2D() < angleChangeLookahead ? + g1.lineAt(1).atan2DegreeAngle() : l1.atan2DegreeAngle()); + const SUMOReal angle2further = (g2.size() > 2 && l2.length2D() < angleChangeLookahead ? + g2.lineAt(1).atan2DegreeAngle() : l2.atan2DegreeAngle()); + const SUMOReal angleDiff = NBHelpers::relAngle(l1.atan2DegreeAngle(), l2.atan2DegreeAngle()); + const SUMOReal angleDiffFurther = NBHelpers::relAngle(angle1further, angle2further); + const bool ambiguousGeometry = ((angleDiff > 0 && angleDiffFurther < 0) || (angleDiff < 0 && angleDiffFurther > 0)); + const bool differentDirs = (incoming != incoming2); + //if (ambiguousGeometry) { + // @todo: this warning would be helpful in many cases. However, if angle and angleFurther jump between 179 and -179 it is misleading + // WRITE_WARNING("Ambigous angles at node '" + myNode.getID() + "' for edges '" + (*i)->getID() + "' and '" + (*j)->getID() + "'."); + //} + if (fabs(angleDiff) < 20) { + const bool isOpposite = differentDirs && foundOpposite.count(*i) == 0; + if (isOpposite) { + foundOpposite.insert(*i); + foundOpposite.insert(*j); + } + if (isOpposite || ambiguousGeometry || badIntersection(*i, *j, geomsCW[*i], geomsCCW[*j], 100)) { + // maintain equivalence relation for all members of the equivalence class + for (std::set::iterator k = same[*i].begin(); k != same[*i].end(); ++k) { + if (*j != *k) { + same[*k].insert(*j); + same[*j].insert(*k); + } } - if (find(same[*j].begin(), same[*j].end(), *i) == same[*j].end()) { - same[*j].push_back(*i); + for (std::set::iterator k = same[*j].begin(); k != same[*j].end(); ++k) { + if (*i != *k) { + same[*k].insert(*i); + same[*i].insert(*k); + } } + same[*i].insert(*j); + same[*j].insert(*i); } } } } +bool +NBNodeShapeComputer::badIntersection(const NBEdge* e1, const NBEdge* e2, + const PositionVector& e1cw, const PositionVector& e2ccw, + SUMOReal distance) { + // check whether the two edges are on top of each other. In that case they should be joined + // also, if they never touch along their common length + const SUMOReal commonLength = MIN3(distance, e1->getGeometry().length(), e2->getGeometry().length()); + PositionVector geom1 = e1->getGeometry(); + PositionVector geom2 = e2->getGeometry(); + // shift to make geom the centerline of the edge regardless of spreadtype + if (e1->getLaneSpreadFunction() == LANESPREAD_RIGHT) { + geom1.move2side(e1->getTotalWidth() / 2); + } + if (e2->getLaneSpreadFunction() == LANESPREAD_RIGHT) { + geom2.move2side(e2->getTotalWidth() / 2); + } + // always let geometry start at myNode + if (e1->getToNode() == &myNode) { + geom1 = geom1.reverse(); + } + if (e2->getToNode() == &myNode) { + geom2 = geom2.reverse(); + } + geom1 = geom1.getSubpart2D(0, commonLength); + geom2 = geom2.getSubpart2D(0, commonLength); + std::vector distances = geom1.distances(geom2, true); + const SUMOReal minDistanceThreshold = (e1->getTotalWidth() + e2->getTotalWidth()) / 2 + POSITION_EPS; + const SUMOReal minDist = VectorHelper::minValue(distances); + const SUMOReal maxDist = VectorHelper::maxValue(distances); + const bool onTop = maxDist - POSITION_EPS < minDistanceThreshold; + const bool curvingTowards = geom1[0].distanceTo2D(geom2[0]) > minDistanceThreshold && minDist < minDistanceThreshold; + const bool intersects = e1cw.intersects(e2ccw); + return onTop || curvingTowards || !intersects; +} + + EdgeVector NBNodeShapeComputer::computeUniqueDirectionList( - const std::map& same, - std::map& geomsCCW, - std::map& geomsCW, + std::map >& same, + GeomsMap& geomsCCW, + GeomsMap& geomsCW, std::map& ccwBoundary, std::map& cwBoundary) { EdgeVector newAll = myNode.myAllEdges; - EdgeVector::const_iterator j; + std::set::const_iterator j; EdgeVector::iterator i2; std::map::iterator k; bool changed = true; while (changed) { changed = false; for (i2 = newAll.begin(); !changed && i2 != newAll.end();) { - EdgeVector other; - if (same.find(*i2) != same.end()) { - other = same.find(*i2)->second; - } + std::set other = same[*i2]; for (j = other.begin(); j != other.end(); ++j) { EdgeVector::iterator k = find(newAll.begin(), newAll.end(), *j); if (k != newAll.end()) { @@ -719,20 +552,73 @@ } +void +NBNodeShapeComputer::initNeighbors(const EdgeVector& edges, const EdgeVector::const_iterator& current, + GeomsMap& geomsCW, + GeomsMap& geomsCCW, + EdgeVector::const_iterator& cwi, + EdgeVector::const_iterator& ccwi, + SUMOReal& cad, + SUMOReal& ccad) { + const SUMOReal twoPI = (SUMOReal)(2 * M_PI); + cwi = current; + cwi++; + if (cwi == edges.end()) { + std::advance(cwi, -((int)edges.size())); // set to edges.begin(); + } + ccwi = current; + if (ccwi == edges.begin()) { + std::advance(ccwi, edges.size() - 1); // set to edges.end() - 1; + } else { + ccwi--; + } + + const SUMOReal angleCurCCW = geomsCCW[*current].lineAt(0).atan2PositiveAngle(); + const SUMOReal angleCurCW = geomsCW[*current].lineAt(0).atan2PositiveAngle(); + const SUMOReal angleCCW = geomsCW[*ccwi].lineAt(0).atan2PositiveAngle(); + const SUMOReal angleCW = geomsCCW[*cwi].lineAt(0).atan2PositiveAngle(); + if (angleCurCCW > angleCCW) { + ccad = angleCurCCW - angleCCW; + } else { + ccad = twoPI - (angleCCW - angleCurCCW); + } + + if (angleCurCW > angleCW) { + cad = twoPI - (angleCurCW - angleCW); + } else { + cad = angleCW - angleCurCW; + } + + if (ccad < 0) { + ccad += twoPI; + } + if (ccad > twoPI) { + ccad -= twoPI; + } + if (cad < 0) { + cad += twoPI; + } + if (cad > twoPI) { + cad -= twoPI; + } +} + + + PositionVector -NBNodeShapeComputer::computeNodeShapeByCrosses() { +NBNodeShapeComputer::computeNodeShapeSmall() { PositionVector ret; EdgeVector::const_iterator i; for (i = myNode.myAllEdges.begin(); i != myNode.myAllEdges.end(); i++) { // compute crossing with normal - Line edgebound1 = (*i)->getCCWBoundaryLine(myNode, SUMO_const_halfLaneWidth).lineAt(0); - Line edgebound2 = (*i)->getCWBoundaryLine(myNode, SUMO_const_halfLaneWidth).lineAt(0); + Line edgebound1 = (*i)->getCCWBoundaryLine(myNode).lineAt(0); + Line edgebound2 = (*i)->getCWBoundaryLine(myNode).lineAt(0); Line cross(edgebound1); cross.rotateAtP1(M_PI / 2.); cross.add(myNode.getPosition() - cross.p1()); - cross.extrapolateBy(500); - edgebound1.extrapolateBy(500); - edgebound2.extrapolateBy(500); + cross.extrapolateBy2D(500); + edgebound1.extrapolateBy2D(500); + edgebound2.extrapolateBy2D(500); if (cross.intersects(edgebound1)) { Position np = cross.intersectsAt(edgebound1); np.set(np.x(), np.y(), myNode.getPosition().z()); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNodeShapeComputer.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNodeShapeComputer.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBNodeShapeComputer.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBNodeShapeComputer.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date 2004-01-12 -/// @version $Id: NBNodeShapeComputer.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBNodeShapeComputer.h 18169 2015-03-27 13:40:16Z behrisch $ /// // This class computes shapes of junctions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -61,7 +61,14 @@ PositionVector compute(bool leftHand); private: - PositionVector computeContinuationNodeShape(bool simpleContinuation); + typedef std::map GeomsMap; + + /** @brief Computes the node geometry + * Edges with the same direction are grouped. + * Then the node geometry is built from intersection between the borders + * of adjacent edge groups + */ + PositionVector computeNodeShapeDefault(bool simpleContinuation); /** @brief Computes the node geometry using normals * @@ -70,19 +77,13 @@ * the normals of participating edges' geometry boundaries (cw/ccw) * at the node's height (the length of the edge the edge would cross the node * point). + * + * @note This usually gives a very small node shape, appropriate for + * dead-ends or turn-around-only situations */ - PositionVector computeNodeShapeByCrosses(); - - - void replaceLastChecking(PositionVector& g, bool decenter, - PositionVector counter, size_t counterLanes, SUMOReal counterDist, - int laneDiff); + PositionVector computeNodeShapeSmall(); - void replaceFirstChecking(PositionVector& g, bool decenter, - PositionVector counter, size_t counterLanes, SUMOReal counterDist, - int laneDiff); - /** @brief Joins edges and computes ccw/cw boundaries * * This method goes through all edges and stores each edge's ccw and cw @@ -92,9 +93,9 @@ * all edges within the value-vector which direction at the node differs * less than 1 from the key-edge's direction. */ - void joinSameDirectionEdges(std::map& same, - std::map& geomsCCW, - std::map& geomsCW); + void joinSameDirectionEdges(std::map >& same, + GeomsMap& geomsCCW, + GeomsMap& geomsCW); /** @brief Joins edges and computes ccw/cw boundaries * @@ -104,12 +105,47 @@ * ccwBoundary/cwBoundary. */ EdgeVector computeUniqueDirectionList( - const std::map& same, - std::map& geomsCCW, - std::map& geomsCW, + std::map >& same, + GeomsMap& geomsCCW, + GeomsMap& geomsCW, std::map& ccwBoundary, std::map& cwBoundary); + /** @brief Compute smoothed corner shape + * @param[in] begShape + * @param[in] endShape + * @param[in] begPoint + * @param[in] endPoint + * @param[in] cornerDetail + * @return shape to be appended between begPoint and endPoint + */ + PositionVector getSmoothCorner(PositionVector begShape, PositionVector endShape, + const Position& begPoint, const Position& endPoint, int cornerDetail); + + /** @brief Initialize neighbors and angles + * @param[in] edges The list of edges sorted in clockwise direction + * @param[in] current An iterator to the current edge + * @param[in] geomsCW geometry map + * @param[in] geomsCCW geometry map + * @param[out] cwi An iterator to the clockwise neighbor + * @param[out] ccwi An iterator to the counter-clockwise neighbor + * @param[out] cad The angle difference to the clockwise neighbor + * @param[out] ccad The angle difference to the counter-clockwise neighbor + */ + static void initNeighbors(const EdgeVector& edges, const EdgeVector::const_iterator& current, + GeomsMap& geomsCW, + GeomsMap& geomsCCW, + EdgeVector::const_iterator& cwi, + EdgeVector::const_iterator& ccwi, + SUMOReal& cad, + SUMOReal& ccad); + + /// @return whether trying to intersect these edges would probably fail + bool badIntersection(const NBEdge* e1, const NBEdge* e2, + const PositionVector& e1cw, const PositionVector& e2ccw, SUMOReal distance); + + /// @brief return the intersection point closest to the given offset + SUMOReal closestIntersection(const PositionVector& geom1, const PositionVector& geom2, SUMOReal offset); private: /// The node to compute the geometry for diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBOwnTLDef.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBOwnTLDef.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBOwnTLDef.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBOwnTLDef.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Tue, 29.05.2005 -/// @version $Id: NBOwnTLDef.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBOwnTLDef.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // A traffic light logics which must be computed (only nodes/edges are given) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,6 +33,7 @@ #include #include +#include #include "NBTrafficLightDefinition.h" #include "NBNode.h" #include "NBOwnTLDef.h" @@ -54,17 +55,23 @@ NBOwnTLDef::NBOwnTLDef(const std::string& id, const std::vector& junctions, SUMOTime offset, TrafficLightType type) : - NBTrafficLightDefinition(id, junctions, DefaultProgramID, offset, type) {} + NBTrafficLightDefinition(id, junctions, DefaultProgramID, offset, type), + myHaveSinglePhase(false) +{} NBOwnTLDef::NBOwnTLDef(const std::string& id, NBNode* junction, SUMOTime offset, TrafficLightType type) : - NBTrafficLightDefinition(id, junction, DefaultProgramID, offset, type) {} + NBTrafficLightDefinition(id, junction, DefaultProgramID, offset, type), + myHaveSinglePhase(false) +{} NBOwnTLDef::NBOwnTLDef(const std::string& id, SUMOTime offset, TrafficLightType type) : - NBTrafficLightDefinition(id, DefaultProgramID, offset, type) {} + NBTrafficLightDefinition(id, DefaultProgramID, offset, type), + myHaveSinglePhase(false) +{} NBOwnTLDef::~NBOwnTLDef() {} @@ -162,7 +169,7 @@ used.push_back(*incoming.begin()); // the first will definitely be used // get the ones with the same priority int prio = getToPrio(*used.begin()); - for (EdgeVector::iterator i = incoming.begin() + 1; i != incoming.end() && prio != getToPrio(*i); ++i) { + for (EdgeVector::iterator i = incoming.begin() + 1; i != incoming.end() && prio == getToPrio(*i); ++i) { used.push_back(*i); } // if there only lower priorised, use these, too @@ -175,16 +182,21 @@ return ret; } +NBTrafficLightLogic* +NBOwnTLDef::myCompute(const NBEdgeCont&, unsigned int brakingTimeSeconds) { + return computeLogicAndConts(brakingTimeSeconds); +} NBTrafficLightLogic* -NBOwnTLDef::myCompute(const NBEdgeCont&, - unsigned int brakingTimeSeconds) { +NBOwnTLDef::computeLogicAndConts(unsigned int brakingTimeSeconds, bool onlyConts) { + myNeedsContRelation.clear(); const SUMOTime brakingTime = TIME2STEPS(brakingTimeSeconds); - const SUMOTime leftTurnTime = TIME2STEPS(6); // make configurable ? + const SUMOTime leftTurnTime = TIME2STEPS(6); // make configurable // build complete lists first const EdgeVector& incoming = getIncomingEdges(); EdgeVector fromEdges, toEdges; - std::vector isLeftMoverV, isTurnaround; + std::vector isTurnaround; + std::vector fromLanes; unsigned int noLanesAll = 0; unsigned int noLinksAll = 0; for (unsigned int i1 = 0; i1 < incoming.size(); i1++) { @@ -202,24 +214,27 @@ assert(i3 < approached.size()); NBEdge* toEdge = approached[i3].toEdge; fromEdges.push_back(fromEdge); - //myFromLanes.push_back(i2); + fromLanes.push_back((int)i2); toEdges.push_back(toEdge); if (toEdge != 0) { - isLeftMoverV.push_back( - isLeftMover(fromEdge, toEdge) - || - fromEdge->isTurningDirectionAt(fromEdge->getToNode(), toEdge)); - - isTurnaround.push_back( - fromEdge->isTurningDirectionAt( - fromEdge->getToNode(), toEdge)); + isTurnaround.push_back(fromEdge->isTurningDirectionAt(toEdge)); } else { - isLeftMoverV.push_back(true); isTurnaround.push_back(true); } } } } + // collect crossings + std::vector crossings; + for (std::vector::iterator i = myControlledNodes.begin(); i != myControlledNodes.end(); i++) { + const std::vector& c = (*i)->getCrossings(); + if (!onlyConts) { + // set tl indices for crossings + (*i)->setCrossingTLIndices(noLinksAll); + } + copy(c.begin(), c.end(), std::back_inserter(crossings)); + noLinksAll += (unsigned int)c.size(); + } NBTrafficLightLogic* logic = new NBTrafficLightLogic(getID(), getProgramID(), noLinksAll, myOffset, myType); EdgeVector toProc = incoming; @@ -228,13 +243,21 @@ while (toProc.size() > 0) { std::pair chosen; if (incoming.size() == 2) { - chosen = std::pair(toProc[0], static_cast(0)); - toProc.erase(toProc.begin()); + // if there are only 2 incoming edges we need to decide whether they are a crossing or a "continuation" + // @node: this heuristic could be extended to also check the number of outgoing edges + SUMOReal angle = fabs(NBHelpers::relAngle(toProc[0]->getAngleAtNode(toProc[0]->getToNode()), toProc[1]->getAngleAtNode(toProc[1]->getToNode()))); + // angle would be 180 for straight opposing incoming edges + if (angle < 135) { + chosen = std::pair(toProc[0], static_cast(0)); + toProc.erase(toProc.begin()); + } else { + chosen = getBestPair(toProc); + } } else { chosen = getBestPair(toProc); } unsigned int pos = 0; - std::string state((size_t) noLinksAll, 'o'); + std::string state((size_t) noLinksAll, 'r'); // plain straight movers for (unsigned int i1 = 0; i1 < (unsigned int) incoming.size(); ++i1) { NBEdge* fromEdge = incoming[i1]; @@ -267,27 +290,39 @@ isForbidden = true; } } - if (!isForbidden) { + if (!isForbidden && !hasCrossing(fromEdges[i1], toEdges[i1], crossings)) { state[i1] = 'G'; } } // correct behaviour for those that have to wait (mainly left-mover) bool haveForbiddenLeftMover = false; + std::vector rightTurnConflicts(pos, false); for (unsigned int i1 = 0; i1 < pos; ++i1) { if (state[i1] != 'G') { continue; } for (unsigned int i2 = 0; i2 < pos; ++i2) { - if ((state[i2] == 'G' || state[i2] == 'g') && forbids(fromEdges[i2], toEdges[i2], fromEdges[i1], toEdges[i1], true)) { - state[i1] = 'g'; - if (!isTurnaround[i1]) { - haveForbiddenLeftMover = true; + if ((state[i2] == 'G' || state[i2] == 'g')) { + if (fromEdges[i2]->getToNode()->rightTurnConflict( + fromEdges[i1], toEdges[i1], fromLanes[i1], fromEdges[i2], toEdges[i2], fromLanes[i2])) { + rightTurnConflicts[i1] = true; + } + if (forbids(fromEdges[i2], toEdges[i2], fromEdges[i1], toEdges[i1], true) || rightTurnConflicts[i1]) { + state[i1] = 'g'; + myNeedsContRelation.insert(StreamPair(fromEdges[i1], toEdges[i1], fromEdges[i2], toEdges[i2])); + if (!isTurnaround[i1]) { + haveForbiddenLeftMover = true; + } } } } } - // add step - logic->addStep(greenTime, state); + const std::string vehicleState = state; // backup state before pedestrian modifications + state = addPedestrianPhases(logic, greenTime, state, crossings, fromEdges, toEdges); + // pedestrians have 'r' from here on + for (unsigned int i1 = pos; i1 < pos + crossings.size(); ++i1) { + state[i1] = 'r'; + } if (brakingTime > 0) { // build yellow (straight) @@ -295,7 +330,7 @@ if (state[i1] != 'G' && state[i1] != 'g') { continue; } - if ((state[i1] >= 'a' && state[i1] <= 'z') && haveForbiddenLeftMover) { + if ((vehicleState[i1] >= 'a' && vehicleState[i1] <= 'z') && haveForbiddenLeftMover && !rightTurnConflicts[i1]) { continue; } state[i1] = 'y'; @@ -304,7 +339,7 @@ logic->addStep(brakingTime, state); } - if (haveForbiddenLeftMover) { + if (haveForbiddenLeftMover && !myHaveSinglePhase) { // build left green for (unsigned int i1 = 0; i1 < pos; ++i1) { if (state[i1] == 'Y' || state[i1] == 'y') { @@ -332,10 +367,13 @@ } } const SUMOTime totalDuration = logic->getDuration(); + // this computation only makes sense for single nodes + myNeedsContRelationReady = (myControlledNodes.size() == 1); if (totalDuration > 0) { if (totalDuration > 3 * (greenTime + 2 * brakingTime + leftTurnTime)) { WRITE_WARNING("The traffic light '" + getID() + "' has a high cycle time of " + time2string(totalDuration) + "."); } + logic->closeBuilding(); return logic; } else { delete logic; @@ -344,6 +382,102 @@ } +bool +NBOwnTLDef::hasCrossing(const NBEdge* from, const NBEdge* to, const std::vector& crossings) { + assert(from != 0); + assert(to != 0); + for (std::vector::const_iterator it = crossings.begin(); it != crossings.end(); it++) { + const NBNode::Crossing& cross = *it; + // only check connections at this crossings node + if (from->getToNode() == cross.node) { + for (EdgeVector::const_iterator it_e = cross.edges.begin(); it_e != cross.edges.end(); ++it_e) { + const NBEdge* edge = *it_e; + if (edge == from || edge == to) { + return true; + } + } + } + } + return false; +} + + +std::string +NBOwnTLDef::addPedestrianPhases(NBTrafficLightLogic* logic, SUMOTime greenTime, + std::string state, const std::vector& crossings, const EdgeVector& fromEdges, const EdgeVector& toEdges) { + const SUMOTime pedClearingTime = TIME2STEPS(5); // compute based on length of the crossing + const SUMOTime minPedTime = TIME2STEPS(4); // compute: must be able to reach the middle of the second "Richtungsfahrbahn" + const std::string orig = state; + state = patchStateForCrossings(state, crossings, fromEdges, toEdges); + if (orig == state) { + // add step + logic->addStep(greenTime, state); + } else { + const SUMOTime pedTime = greenTime - pedClearingTime; + if (pedTime >= minPedTime) { + // ensure clearing time for pedestrians + const size_t pedStates = crossings.size(); + logic->addStep(pedTime, state); + state = state.substr(0, state.size() - pedStates) + std::string(pedStates, 'r'); + logic->addStep(pedClearingTime, state); + } else { + state = orig; + // not safe for pedestrians. + logic->addStep(greenTime, state); + } + } + return state; +} + + +std::string +NBOwnTLDef::patchStateForCrossings(const std::string& state, const std::vector& crossings, const EdgeVector& fromEdges, const EdgeVector& toEdges) { + std::string result = state; + const unsigned int pos = (unsigned int)(state.size() - crossings.size()); // number of controlled vehicle links + for (int ic = 0; ic < (int)crossings.size(); ++ic) { + const int i1 = pos + ic; + const NBNode::Crossing& cross = crossings[ic]; + bool isForbidden = false; + for (unsigned int i2 = 0; i2 < pos && !isForbidden; ++i2) { + // only check connections at this crossings node + if (fromEdges[i2] != 0 && toEdges[i2] != 0 && fromEdges[i2]->getToNode() == cross.node) { + for (EdgeVector::const_iterator it = cross.edges.begin(); it != cross.edges.end(); ++it) { + const NBEdge* edge = *it; + const LinkDirection i2dir = cross.node->getDirection(fromEdges[i2], toEdges[i2]); + if (state[i2] != 'r' && (edge == fromEdges[i2] || + (edge == toEdges[i2] && (i2dir == LINKDIR_STRAIGHT || i2dir == LINKDIR_PARTLEFT || i2dir == LINKDIR_PARTRIGHT)))) { + isForbidden = true; + break; + } + } + } + } + if (!isForbidden) { + result[i1] = 'G'; + } else { + result[i1] = 'r'; + } + } + + // correct behaviour for roads that are in conflict with a pedestrian crossing + for (unsigned int i1 = 0; i1 < pos; ++i1) { + if (result[i1] == 'G') { + for (int ic = 0; ic < (int)crossings.size(); ++ic) { + const NBNode::Crossing& crossing = crossings[ic]; + if (fromEdges[i1] != 0 && toEdges[i1] != 0 && fromEdges[i1]->getToNode() == crossing.node) { + const int i2 = pos + ic; + if (result[i2] == 'G' && crossing.node->mustBrakeForCrossing(fromEdges[i1], toEdges[i1], crossing)) { + result[i1] = 'g'; + break; + } + } + } + } + } + return result; +} + + void NBOwnTLDef::collectNodes() {} @@ -386,5 +520,31 @@ NBEdge* /*by*/, int /*byLane*/) {} +void +NBOwnTLDef::initNeedsContRelation() const { + if (!myNeedsContRelationReady) { + assert(myControlledNodes.size() > 0); + // there are basically 2 cases for controlling multiple nodes + // a) a complex (unjoined) intersection. Here, internal junctions should + // not be needed since real nodes are used instead + // b) two far-away junctions which shall be coordinated + // This is likely to mess up the bestPair computation for each + // individual node and thus generate incorrect needsCont data + // + // Therefore we compute needsCont for individual nodes which doesn't + // matter for a) and is better for b) + myNeedsContRelation.clear(); + for (std::vector::const_iterator i = myControlledNodes.begin(); i != myControlledNodes.end(); i++) { + NBNode* n = *i; + NBOwnTLDef dummy("dummy", n, 0, TLTYPE_STATIC); + dummy.setParticipantsInformation(); + dummy.computeLogicAndConts(0, true); + myNeedsContRelation.insert(dummy.myNeedsContRelation.begin(), dummy.myNeedsContRelation.end()); + n->removeTrafficLight(&dummy); + } + myNeedsContRelationReady = true; + } + +} /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBOwnTLDef.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBOwnTLDef.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBOwnTLDef.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBOwnTLDef.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Sascha Krieg /// @date Tue, 29.05.2005 -/// @version $Id: NBOwnTLDef.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBOwnTLDef.h 18155 2015-03-26 09:57:55Z namdre $ /// // A traffic light logics which must be computed (only nodes/edges are given) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,12 +36,12 @@ #include #include #include "NBTrafficLightDefinition.h" +#include "NBNode.h" // =========================================================================== // class declarations // =========================================================================== -class NBNode; // =========================================================================== @@ -114,6 +114,30 @@ /// @} + /** @brief Forces the definition not to compute an additional phase for left-movers + */ + void setSinglePhase() { + myHaveSinglePhase = true; + } + + /// @brief add 1 or 2 phases depending on the presence of pedestrian crossings + static std::string addPedestrianPhases(NBTrafficLightLogic* logic, SUMOTime greenTime, + std::string state, const std::vector& crossings, const EdgeVector& fromEdges, const EdgeVector& toEdges); + + /// @brief compute phase state in regard to pedestrian crossings + static std::string patchStateForCrossings(const std::string& state, + const std::vector& crossings, const EdgeVector& fromEdges, const EdgeVector& toEdges); + + /** @brief helper function for myCompute + * @param[in] brakingTime Duration a vehicle needs for braking in front of the tls + * @param[in] onlyConts whether the method is only called to compute myNeedsContRelation + * @return The computed logic + */ + NBTrafficLightLogic* computeLogicAndConts(unsigned int brakingTimeSeconds, bool onlyConts = false); + + /* initialize myNeedsContRelation and set myNeedsContRelationReady to true */ + void initNeedsContRelation() const; + protected: /// @name Protected methods from NBTrafficLightDefinition-interface /// @{ @@ -194,6 +218,10 @@ std::pair getBestPair(EdgeVector& incoming); + /// @brief compute whether the given connection is crossed by pedestrians + static bool hasCrossing(const NBEdge* from, const NBEdge* to, const std::vector& crossings); + + /** @class edge_by_incoming_priority_sorter * @brief Sorts edges by their priority within the node they end at */ @@ -211,6 +239,11 @@ } }; + +private: + /// @brief Whether left-mover should not have an additional phase + bool myHaveSinglePhase; + }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBRequest.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBRequest.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBRequest.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBRequest.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Tue, 20 Nov 2001 -/// @version $Id: NBRequest.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NBRequest.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // This class computes the logic of a junction /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,8 +45,6 @@ #include #include "NBEdge.h" #include "NBContHelper.h" -#include "NBTrafficLightLogic.h" -#include "NBTrafficLightLogicCont.h" #include "NBNode.h" #include "NBRequest.h" @@ -70,10 +68,13 @@ const EdgeVector& all, const EdgeVector& incoming, const EdgeVector& outgoing, - const NBConnectionProhibits& loadedProhibits) - : myJunction(junction), - myAll(all), myIncoming(incoming), myOutgoing(outgoing) { - size_t variations = myIncoming.size() * myOutgoing.size(); + const NBConnectionProhibits& loadedProhibits) : + myJunction(junction), + myAll(all), + myIncoming(incoming), + myOutgoing(outgoing), + myCrossings(junction->getCrossings()) { + const size_t variations = numLinks(); // build maps with information which forbidding connection were // computed and what's in there myForbids.reserve(variations); @@ -131,9 +132,8 @@ } // ok, check whether someone has prohibited two links vice versa // (this happens also in some Vissim-networks, when edges are joined) - size_t no = myIncoming.size() * myOutgoing.size(); - for (size_t s1 = 0; s1 < no; s1++) { - for (size_t s2 = s1 + 1; s2 < no; s2++) { + for (size_t s1 = 0; s1 < variations; s1++) { + for (size_t s2 = s1 + 1; s2 < variations; s2++) { // not set, yet if (!myDone[s1][s2]) { continue; @@ -235,11 +235,11 @@ } // check if one of the links is a turn; this link is always not priorised // true for right-before-left and priority - if (from1->isTurningDirectionAt(myJunction, to1)) { + if (from1->isTurningDirectionAt(to1)) { myForbids[idx2][idx1] = true; return; } - if (from2->isTurningDirectionAt(myJunction, to2)) { + if (from2->isTurningDirectionAt(to2)) { myForbids[idx1][idx2] = true; return; } @@ -334,12 +334,17 @@ NBRequest::writeLogic(std::string /* key */, OutputDevice& into, const bool checkLaneFoes) const { int pos = 0; EdgeVector::const_iterator i; + // normal connections for (i = myIncoming.begin(); i != myIncoming.end(); i++) { unsigned int noLanes = (*i)->getNumLanes(); for (unsigned int k = 0; k < noLanes; k++) { pos = writeLaneResponse(into, *i, k, pos, checkLaneFoes); } } + // crossings + for (std::vector::const_iterator i = myCrossings.begin(); i != myCrossings.end(); i++) { + pos = writeCrossingResponse(into, *i, pos); + } } @@ -482,7 +487,7 @@ od.openTag(SUMO_TAG_REQUEST); od.writeAttr(SUMO_ATTR_INDEX, pos++); od.writeAttr(SUMO_ATTR_RESPONSE, getResponseString(from, (*j).toEdge, fromLane, (*j).toLane, (*j).mayDefinitelyPass, checkLaneFoes)); - od.writeAttr(SUMO_ATTR_FOES, getFoesString(from, (*j).toEdge, (*j).toLane, checkLaneFoes)); + od.writeAttr(SUMO_ATTR_FOES, getFoesString(from, (*j).toEdge, fromLane, (*j).toLane, checkLaneFoes)); if (!OptionsCont::getOptions().getBool("no-internal-links")) { od.writeAttr(SUMO_ATTR_CONT, j->haveVia); } @@ -492,6 +497,42 @@ } +int +NBRequest::writeCrossingResponse(OutputDevice& od, const NBNode::Crossing& crossing, int pos) const { + std::string foes(myCrossings.size(), '0'); + std::string response(myCrossings.size(), '0'); + // conflicts with normal connections + for (EdgeVector::const_reverse_iterator i = myIncoming.rbegin(); i != myIncoming.rend(); i++) { + //const std::vector &allConnections = (*i)->getConnections(); + const NBEdge* from = *i; + unsigned int noLanes = from->getNumLanes(); + for (int j = noLanes; j-- > 0;) { + std::vector connected = from->getConnectionsFromLane(j); + int size = (int) connected.size(); + for (int k = size; k-- > 0;) { + const NBEdge* to = connected[k].toEdge; + bool foe = false; + for (EdgeVector::const_iterator it_e = crossing.edges.begin(); it_e != crossing.edges.end(); ++it_e) { + if ((*it_e) == from || (*it_e) == to) { + foe = true; + break; + } + } + foes += foe ? '1' : '0'; + response += mustBrakeForCrossing(from, to, crossing) || !foe ? '0' : '1'; + } + } + } + od.openTag(SUMO_TAG_REQUEST); + od.writeAttr(SUMO_ATTR_INDEX, pos++); + od.writeAttr(SUMO_ATTR_RESPONSE, response); + od.writeAttr(SUMO_ATTR_FOES, foes); + od.writeAttr(SUMO_ATTR_CONT, false); + od.closeTag(); + return pos; +} + + std::string NBRequest::getResponseString(const NBEdge* const from, const NBEdge* const to, int fromLane, int toLane, bool mayDefinitelyPass, const bool checkLaneFoes) const { @@ -500,6 +541,11 @@ idx = getIndex(from, to); } std::string result; + // crossings + for (std::vector::const_reverse_iterator i = myCrossings.rbegin(); i != myCrossings.rend(); i++) { + result += mustBrakeForCrossing(from, to, *i) ? '1' : '0'; + } + // normal connections for (EdgeVector::const_reverse_iterator i = myIncoming.rbegin(); i != myIncoming.rend(); i++) { //const std::vector &allConnections = (*i)->getConnections(); unsigned int noLanes = (*i)->getNumLanes(); @@ -518,12 +564,13 @@ assert(connected[k].toEdge != 0); assert((size_t) getIndex(*i, connected[k].toEdge) < myIncoming.size()*myOutgoing.size()); // check whether the connection is prohibited by another one - if (myForbids[getIndex(*i, connected[k].toEdge)][idx] && - (!checkLaneFoes || laneConflict(from, to, toLane, *i, connected[k].toEdge, connected[k].toLane))) { + if ((myForbids[getIndex(*i, connected[k].toEdge)][idx] && + (!checkLaneFoes || laneConflict(from, to, toLane, *i, connected[k].toEdge, connected[k].toLane))) + || rightTurnConflict(from, to, fromLane, *i, connected[k].toEdge, connected[k].fromLane)) { result += '1'; - continue; + } else { + result += '0'; } - result += '0'; } } } @@ -533,22 +580,34 @@ std::string -NBRequest::getFoesString(NBEdge* from, NBEdge* to, int toLane, const bool checkLaneFoes) const { +NBRequest::getFoesString(NBEdge* from, NBEdge* to, int fromLane, int toLane, const bool checkLaneFoes) const { // remember the case when the lane is a "dead end" in the meaning that // vehicles must choose another lane to move over the following // junction // !!! move to forbidden std::string result; + // crossings + for (std::vector::const_reverse_iterator i = myCrossings.rbegin(); i != myCrossings.rend(); i++) { + bool foes = false; + for (EdgeVector::const_iterator it_e = (*i).edges.begin(); it_e != (*i).edges.end(); ++it_e) { + if ((*it_e) == from || (*it_e) == to) { + foes = true; + break; + } + } + result += foes ? '1' : '0'; + } + // normal connections for (EdgeVector::const_reverse_iterator i = myIncoming.rbegin(); i != myIncoming.rend(); i++) { - unsigned int noLanes = (*i)->getNumLanes(); - for (unsigned int j = noLanes; j-- > 0;) { + for (int j = (int)(*i)->getNumLanes() - 1; j >= 0; --j) { std::vector connected = (*i)->getConnectionsFromLane(j); int size = (int) connected.size(); for (int k = size; k-- > 0;) { - if (foes(from, to, (*i), connected[k].toEdge) && - (!checkLaneFoes || laneConflict(from, to, toLane, *i, connected[k].toEdge, connected[k].toLane))) { + if ((foes(from, to, (*i), connected[k].toEdge) && + (!checkLaneFoes || laneConflict(from, to, toLane, *i, connected[k].toEdge, connected[k].toLane))) + || rightTurnConflict(from, to, fromLane, *i, connected[k].toEdge, connected[k].fromLane)) { result += '1'; } else { result += '0'; @@ -576,12 +635,40 @@ } const SUMOReal prohibitorAngle = NBHelpers::relAngle( prohibitorFrom->getAngleAtNode(prohibitorFrom->getToNode()), to->getAngleAtNode(to->getFromNode())); - const bool rightOfProhibitor = prohibitorFrom->isTurningDirectionAt(prohibitorFrom->getToNode(), to) - || (angle > prohibitorAngle && !from->isTurningDirectionAt(from->getToNode(), to)); + const bool rightOfProhibitor = prohibitorFrom->isTurningDirectionAt(to) + || (angle > prohibitorAngle && !from->isTurningDirectionAt(to)); return rightOfProhibitor ? toLane >= prohibitorToLane : toLane <= prohibitorToLane; } +bool +NBRequest::rightTurnConflict(const NBEdge* from, const NBEdge* to, int fromLane, + const NBEdge* prohibitorFrom, const NBEdge* prohibitorTo, int prohibitorFromLane) const { + if (from != prohibitorFrom) { + return false; + } + if (from->isTurningDirectionAt(to) + || prohibitorFrom->isTurningDirectionAt(prohibitorTo)) { + // XXX should warn if there are any non-turning connections left of this + return false; + } + const bool lefthand = OptionsCont::getOptions().getBool("lefthand"); + if ((!lefthand && fromLane <= prohibitorFromLane) || + (lefthand && fromLane >= prohibitorFromLane)) { + return false; + } + // conflict if to is between prohibitorTo and from when going clockwise + if (to->getStartAngle() == prohibitorTo->getStartAngle()) { + // reduce rounding errors + return false; + } + const SUMOReal toAngleAtNode = fmod(to->getStartAngle() + 180, (SUMOReal)360.0); + const SUMOReal prohibitorToAngleAtNode = fmod(prohibitorTo->getStartAngle() + 180, (SUMOReal)360.0); + return (lefthand != (GeomHelper::getCWAngleDiff(from->getEndAngle(), toAngleAtNode) < + GeomHelper::getCWAngleDiff(from->getEndAngle(), prohibitorToAngleAtNode))); +} + + int NBRequest::getIndex(const NBEdge* const from, const NBEdge* const to) const { EdgeVector::const_iterator fp = find(myIncoming.begin(), myIncoming.end(), from); @@ -596,7 +683,7 @@ std::ostream& operator<<(std::ostream& os, const NBRequest& r) { - size_t variations = r.myIncoming.size() * r.myOutgoing.size(); + size_t variations = r.numLinks(); for (size_t i = 0; i < variations; i++) { os << i << ' '; for (size_t j = 0; j < variations; j++) { @@ -614,7 +701,7 @@ bool -NBRequest::mustBrake(const NBEdge* const from, const NBEdge* const to) const { +NBRequest::mustBrake(const NBEdge* const from, const NBEdge* const to, int fromLane, bool includePedCrossings) const { // vehicles which do not have a following lane must always decelerate to the end if (to == 0) { return true; @@ -627,12 +714,47 @@ // go through all (existing) connections; // check whether any of these forbids the one to determine assert((size_t) idx2 < myIncoming.size()*myOutgoing.size()); - for (size_t idx1 = 0; idx1 < myIncoming.size()*myOutgoing.size(); idx1++) { + for (size_t idx1 = 0; idx1 < numLinks(); idx1++) { //assert(myDone[idx1][idx2]); if (myDone[idx1][idx2] && myForbids[idx1][idx2]) { return true; } } + // maybe we need to brake for a pedestrian crossing + if (includePedCrossings) { + for (std::vector::const_reverse_iterator i = myCrossings.rbegin(); i != myCrossings.rend(); i++) { + if (mustBrakeForCrossing(from, to, *i)) { + return true; + } + } + } + // maybe we need to brake due to a right-turn conflict with straight-going + // bicycles + LinkDirection dir = myJunction->getDirection(from, to); + if (dir == LINKDIR_RIGHT || dir == LINKDIR_PARTRIGHT) { + const std::vector& cons = from->getConnections(); + for (std::vector::const_iterator i = cons.begin(); i != cons.end(); i++) { + if (rightTurnConflict(from, to, fromLane, + from, (*i).toEdge, (*i).fromLane)) { + return true; + } + } + } + return false; +} + +bool +NBRequest::mustBrakeForCrossing(const NBEdge* const from, const NBEdge* const to, const NBNode::Crossing& crossing) const { + const LinkDirection dir = myJunction->getDirection(from, to); + const bool mustYield = dir == LINKDIR_LEFT || dir == LINKDIR_RIGHT; + if (crossing.priority || mustYield) { + for (EdgeVector::const_iterator it_e = crossing.edges.begin(); it_e != crossing.edges.end(); ++it_e) { + // left and right turns must yield to unprioritized crossings only on their destination edge + if (((*it_e) == from && crossing.priority) || (*it_e) == to) { + return true; + } + } + } return false; } @@ -687,5 +809,11 @@ } } + +size_t +NBRequest::numLinks() const { + return myIncoming.size() * myOutgoing.size() + myCrossings.size(); +} + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBRequest.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBRequest.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBRequest.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBRequest.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NBRequest.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NBRequest.h 18096 2015-03-17 09:50:59Z behrisch $ /// // This class computes the logic of a junction /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -101,9 +101,19 @@ /** @brief Returns the information whether the described flow must let any other flow pass * @param[in] from The connection's start edge * @param[in] to The connection's end edge + * @param[in] fromLane The connection starting lane + * @param[in] includePedCrossings Whether braking due to a pedestrian crossing counts * @return Whether the described connection must brake (has higher priorised foes) */ - bool mustBrake(const NBEdge* const from, const NBEdge* const to) const; // !!! + bool mustBrake(const NBEdge* const from, const NBEdge* const to, int fromLane, bool includePedCrossings) const; + + /** @brief Returns the information whether the described flow must brake for the given crossing + * @param[in] from The connection's start edge + * @param[in] to The connection's end edge + * @param[in] crossing The pedestrian crossing to check + * @return Whether the described connection must brake (has higher priorised foes) + */ + bool mustBrakeForCrossing(const NBEdge* const from, const NBEdge* const to, const NBNode::Crossing& crossing) const; /** @brief Returns the information whether the given flows cross * @param[in] from1 The starting edge of the first stream @@ -135,6 +145,10 @@ /// prints the request friend std::ostream& operator<<(std::ostream& os, const NBRequest& r); + /** @brief return whether the given laneToLane connection is a right turn which must yield to a bicycle crossings + */ + bool rightTurnConflict(const NBEdge* from, const NBEdge* to, int fromLane, const NBEdge* prohibitorFrom, const NBEdge* prohibitorTo, int prohibitorFromLane) const; + /// reports warnings if any occured static void reportWarnings(); @@ -149,6 +163,10 @@ int writeLaneResponse(OutputDevice& od, NBEdge* from, int lane, int pos, const bool checkLaneFoes) const; + /** @brief writes the response of a certain crossing + Returns the next link index within the junction */ + int writeCrossingResponse(OutputDevice& od, const NBNode::Crossing& crossing, int pos) const; + /** @brief Writes the response of a certain link * * For the link (described by the connected edges and lanes), the response in dependence @@ -172,7 +190,8 @@ /** writes which participating links are foes to the given */ - std::string getFoesString(NBEdge* from, NBEdge* to, int toLane, const bool checkLaneFoes) const; + std::string getFoesString(NBEdge* from, NBEdge* to, + int fromLane, int toLane, const bool checkLaneFoes) const; /** @brief Returns the index to the internal combination container for the given edge combination @@ -210,6 +229,10 @@ */ bool laneConflict(const NBEdge* from, const NBEdge* to, int toLane, const NBEdge* prohibitorFrom, const NBEdge* prohibitorTo, int prohibitorToLane) const; + /// @brief return to total number of edge-to-edge connections of this request-logic + inline size_t numLinks() const; + + private: /// the node the request is assigned to NBNode* myJunction; @@ -223,6 +246,9 @@ /** edges outgoing from the junction */ const EdgeVector& myOutgoing; + /** edges outgoing from the junction */ + const std::vector& myCrossings; + /** definition of a container to store boolean informations about a link into */ typedef std::vector LinkInfoCont; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBSign.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBSign.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBSign.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBSign.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file NBSign.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @author Jakob Erdmann /// @date Nov 2012 -/// @version $Id: NBSign.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBSign.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A class representing a street sign /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -29,6 +31,7 @@ #endif #include +#include #include #include #include "NBEdge.h" @@ -42,7 +45,7 @@ // =========================================================================== // static members // =========================================================================== -StringBijection::Entry signTypeStringsInitializaer[] = { +StringBijection::Entry signTypeStringsInitializer[] = { {"speed limit", NBSign::SIGN_TYPE_SPEED}, {"yield", NBSign::SIGN_TYPE_YIELD}, {"stop", NBSign::SIGN_TYPE_STOP}, @@ -58,27 +61,9 @@ }; StringBijection NBSign::SignTypeStrings( - signTypeStringsInitializaer, NBSign::SIGN_TYPE_INFO); + signTypeStringsInitializer, NBSign::SIGN_TYPE_INFO); -StringBijection::Entry SignTypeColorsInitializaer[] = { - {"0.5,0.5,0.5", NBSign::SIGN_TYPE_SPEED}, - {"1.0,0.0,0.0", NBSign::SIGN_TYPE_YIELD}, - {"1.0,0.0,0.0", NBSign::SIGN_TYPE_STOP}, - {"1.0,0.0,0.0", NBSign::SIGN_TYPE_ALLWAY_STOP}, - {"1.0,0.0,0.0", NBSign::SIGN_TYPE_ON_RAMP}, - {"1.0,1.0,0.0", NBSign::SIGN_TYPE_PRIORITY}, - {"1.0,0.6,0.0", NBSign::SIGN_TYPE_RIGHT_BEFORE_LEFT}, - {"0.0,0.0,1.0", NBSign::SIGN_TYPE_ROUNDABOUT}, - {"1.0,0.0,0.0", NBSign::SIGN_TYPE_RAIL_CROSSING}, - {"0.5,0.5,0.5", NBSign::SIGN_TYPE_SLOPE}, - {"0.5,0.5,0.5", NBSign::SIGN_TYPE_CITY}, - {"0.5,0.5,0.5", NBSign::SIGN_TYPE_INFO}, -}; - -StringBijection NBSign::SignTypeColors( - SignTypeColorsInitializaer, NBSign::SIGN_TYPE_INFO); - // =========================================================================== // member method definitions // =========================================================================== @@ -105,7 +90,30 @@ into.openTag(SUMO_TAG_POI); into.writeAttr(SUMO_ATTR_ID, edge->getID() + "." + toString(myOffset)); into.writeAttr(SUMO_ATTR_TYPE, SignTypeStrings.getString(myType)); - into.writeAttr(SUMO_ATTR_COLOR, SignTypeColors.getString(myType)); /// XXX @todo add default colors + switch (myType) { /// XXX @todo add default colors + case SIGN_TYPE_SPEED: + case SIGN_TYPE_SLOPE: + case SIGN_TYPE_CITY: + case SIGN_TYPE_INFO: + into.writeAttr(SUMO_ATTR_COLOR, RGBColor::GREY); + break; + case SIGN_TYPE_YIELD: + case SIGN_TYPE_STOP: + case SIGN_TYPE_ALLWAY_STOP: + case SIGN_TYPE_ON_RAMP: + case SIGN_TYPE_RAIL_CROSSING: + into.writeAttr(SUMO_ATTR_COLOR, RGBColor::RED); + break; + case SIGN_TYPE_PRIORITY: + into.writeAttr(SUMO_ATTR_COLOR, RGBColor::YELLOW); + break; + case SIGN_TYPE_RIGHT_BEFORE_LEFT: + into.writeAttr(SUMO_ATTR_COLOR, RGBColor(255, 153, 0, 255)); + break; + case SIGN_TYPE_ROUNDABOUT: + into.writeAttr(SUMO_ATTR_COLOR, RGBColor::BLUE); + break; + } into.writeAttr(SUMO_ATTR_X, pos.x()); into.writeAttr(SUMO_ATTR_Y, pos.y()); into.writeAttr(SUMO_ATTR_ANGLE, 0); // XXX use road angle? diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBSign.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBSign.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBSign.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBSign.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NBSign.h /// @author Jakob Erdmann +/// @author Michael Behrisch /// @date Nov 2012 -/// @version $Id: NBSign.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBSign.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A class representing a street sign /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTrafficLightDefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTrafficLightDefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTrafficLightDefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTrafficLightDefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NBTrafficLightDefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBTrafficLightDefinition.cpp 18155 2015-03-26 09:57:55Z namdre $ /// // The base class for traffic light logic definitions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -41,6 +41,7 @@ #include #include "NBLinkPossibilityMatrix.h" #include "NBTrafficLightLogic.h" +#include "NBOwnTLDef.h" #include "NBContHelper.h" #ifdef CHECK_MEMORY_LEAKS @@ -61,7 +62,8 @@ Named(id), myControlledNodes(junctions), mySubID(programID), myOffset(offset), - myType(type) { + myType(type), + myNeedsContRelationReady(false) { std::vector::iterator i = myControlledNodes.begin(); while (i != myControlledNodes.end()) { for (std::vector::iterator j = i + 1; j != myControlledNodes.end();) { @@ -85,9 +87,9 @@ Named(id), mySubID(programID), myOffset(offset), - myType(type) { + myType(type), + myNeedsContRelationReady(false) { addNode(junction); - junction->addTrafficLight(this); } @@ -96,7 +98,9 @@ Named(id), mySubID(programID), myOffset(offset), - myType(type) {} + myType(type), + myNeedsContRelationReady(false) +{} NBTrafficLightDefinition::~NBTrafficLightDefinition() {} @@ -121,7 +125,9 @@ if (oc.isSet("tls.yellow.time")) { brakingTime = oc.getInt("tls.yellow.time"); } - return myCompute(ec, brakingTime); + NBTrafficLightLogic* ret = myCompute(ec, brakingTime); + ret->addParameter(getMap()); + return ret; } @@ -178,22 +184,6 @@ bool -NBTrafficLightDefinition::isLeftMover(const NBEdge* const from, const NBEdge* const to) const { - // the destination edge may be unused - if (to == 0) { - return false; - } - // get the node which is holding this connection - std::vector::const_iterator i = - find_if(myControlledNodes.begin(), myControlledNodes.end(), - NBContHelper::node_with_incoming_finder(from)); - assert(i != myControlledNodes.end()); - NBNode* node = *i; - return node->isLeftMover(from, to); -} - - -bool NBTrafficLightDefinition::mustBrake(const NBEdge* const from, const NBEdge* const to) const { std::vector::const_iterator i = find_if(myControlledNodes.begin(), myControlledNodes.end(), @@ -203,7 +193,7 @@ if (!node->hasOutgoing(to)) { return true; // !!! } - return node->mustBrake(from, to, -1); + return node->mustBrake(from, to, -1, true); } @@ -355,6 +345,12 @@ } +std::vector +NBTrafficLightDefinition::getControlledInnerEdges() const { + return std::vector(myControlledInnerEdges.begin(), myControlledInnerEdges.end()); +} + + const EdgeVector& NBTrafficLightDefinition::getIncomingEdges() const { return myIncomingEdges; @@ -384,5 +380,30 @@ } } + +bool +NBTrafficLightDefinition::needsCont(const NBEdge* fromE, const NBEdge* toE, const NBEdge* otherFromE, const NBEdge* otherToE) const { + if (!myNeedsContRelationReady) { + initNeedsContRelation(); + assert(myNeedsContRelationReady); + } + return std::find(myNeedsContRelation.begin(), myNeedsContRelation.end(), + StreamPair(fromE, toE, otherFromE, otherToE)) != myNeedsContRelation.end(); +} + + +void +NBTrafficLightDefinition::initNeedsContRelation() const { + if (!amInvalid()) { + NBOwnTLDef dummy("dummy", myControlledNodes, 0, TLTYPE_STATIC); + dummy.initNeedsContRelation(); + myNeedsContRelation = dummy.myNeedsContRelation; + for (std::vector::const_iterator i = myControlledNodes.begin(); i != myControlledNodes.end(); i++) { + (*i)->removeTrafficLight(&dummy); + } + } + myNeedsContRelationReady = true; +} + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTrafficLightDefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTrafficLightDefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTrafficLightDefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTrafficLightDefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file NBTrafficLightDefinition.h /// @author Daniel Krajzewicz /// @author Jakob Erdmann +/// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NBTrafficLightDefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBTrafficLightDefinition.h 18155 2015-03-26 09:57:55Z namdre $ /// // The base class for traffic light logic definitions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,10 +37,12 @@ #include #include #include +#include #include #include #include #include +#include #include "NBCont.h" #include "NBConnection.h" #include "NBConnectionDefs.h" @@ -69,7 +72,7 @@ * @see NBLoadedTLDef * @see NBOwnTLDef */ -class NBTrafficLightDefinition : public Named { +class NBTrafficLightDefinition : public Named, public Parameterised { public: static const std::string DefaultProgramID; @@ -246,11 +249,14 @@ virtual void setParticipantsInformation(); - /** @brief Adds the given ids into the list of edges not controlled by the tls - * @param[in] edges The list of edge ids to add the inner edges to + /** @brief Adds the given ids into the list of inner edges controlled by the tls + * @param[in] edges The list of edge ids which shall be controlled despite lying with the jointly controlled node cluster */ void addControlledInnerEdges(const std::vector& edges); + /** @brief Retrieve the ids of edges explicitly controlled by the tls + */ + std::vector getControlledInnerEdges() const; /** @brief Replaces occurences of the removed edge in incoming/outgoing edges of all definitions * @param[in] removed The removed edge @@ -270,14 +276,11 @@ virtual void replaceRemoved(NBEdge* removed, int removedLane, NBEdge* by, int byLane) = 0; - - /** @brief returns the information whether the given link is a left-mover - * @param[in] from The connection's start edge - * @param[in] to The connection's end edge - * @return Whether the connection is a left-mover - */ - bool isLeftMover(const NBEdge* const from, const NBEdge* const to) const; - + /// @brief patches (loaded) signal plans by modifying lane indices + virtual void shiftTLConnectionLaneIndex(NBEdge* edge, int offset) { + UNUSED_PARAMETER(edge); + UNUSED_PARAMETER(offset); + } /** @brief Returns the list of incoming edges (must be build first) * @return The edges which are incoming into the tls @@ -291,12 +294,6 @@ } - // @breif returns the controlled nodes - const std::vector& getControlledNodes() const { - return myControlledNodes; - } - - /** @brief Returns the ProgramID * @return The ID of the program (subID) */ @@ -326,6 +323,16 @@ return myType; } + /* @brief computes whether the given stream may have green minor while the + * other stream has green major in the same phase + */ + bool needsCont(const NBEdge* fromE, const NBEdge* toE, const NBEdge* otherFromE, const NBEdge* otherToE) const; + + /* initialize myNeedsContRelation and set myNeedsContRelationReady to true + * This information is a byproduct of NBOwnTLDef::myCompute. All other + * subclasses instantiate a private instance of NBOwnTLDef to answer this query */ + virtual void initNeedsContRelation() const; + protected: /** @brief Computes the traffic light logic finally in dependence to the type * @param[in] ec The edge container @@ -344,7 +351,7 @@ /** @brief Build the list of participating edges */ - void collectEdges(); + virtual void collectEdges(); /** @brief Computes the time vehicles may need to brake @@ -361,7 +368,6 @@ /// @brief helper method for use in NBOwnTLDef and NBLoadedSUMOTLDef void collectAllLinks(); - protected: /// @brief The container with participating nodes std::vector myControlledNodes; @@ -386,6 +392,43 @@ /// @brief The algorithm type for the traffic light TrafficLightType myType; + + /// @brief data structure for caching needsCont information + struct StreamPair { + StreamPair(const NBEdge* _from1, const NBEdge* _to1, const NBEdge* _from2, const NBEdge* _to2): + from1(_from1), + to1(_to1), + from2(_from2), + to2(_to2) {} + + bool operator==(const StreamPair& o) const { + return (from1 == o.from1 && to1 == o.to1 + && from2 == o.from2 && to2 == o.to2); + } + + bool operator<(const StreamPair& o) const { + if (from1 != o.from1) { + return from1 < o.from1; + } + if (to1 != o.to1) { + return to1 < o.to1; + } + if (from2 != o.from2) { + return from2 < o.from2; + } + return to2 < o.to2; + } + + const NBEdge* from1; + const NBEdge* to1; + const NBEdge* from2; + const NBEdge* to2; + }; + typedef std::set NeedsContRelation; + mutable NeedsContRelation myNeedsContRelation; + mutable bool myNeedsContRelationReady; + + }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTrafficLightLogicCont.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTrafficLightLogicCont.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTrafficLightLogicCont.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTrafficLightLogicCont.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NBTrafficLightLogicCont.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBTrafficLightLogicCont.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A container for traffic light definitions and built programs /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -39,7 +39,9 @@ #include #include "NBTrafficLightLogic.h" #include "NBTrafficLightLogicCont.h" +#include "NBOwnTLDef.h" #include "NBEdgeCont.h" +#include "NBNodeCont.h" #ifdef CHECK_MEMORY_LEAKS #include @@ -272,7 +274,7 @@ void -NBTrafficLightLogicCont::setTLControllingInformation(const NBEdgeCont& ec) { +NBTrafficLightLogicCont::setTLControllingInformation(const NBEdgeCont& ec, const NBNodeCont& nc) { Definitions definitions = getDefinitions(); // set the information about all participants, first for (Definitions::iterator it = definitions.begin(); it != definitions.end(); it++) { @@ -284,6 +286,16 @@ for (Definitions::iterator it = definitions.begin(); it != definitions.end(); it++) { (*it)->setTLControllingInformation(ec); } + // handle rail signals which are not instantiated as normal definitions + for (std::map::const_iterator it = nc.begin(); it != nc.end(); it ++) { + NBNode* n = it->second; + if (n->getType() == NODETYPE_RAIL_SIGNAL) { + NBOwnTLDef dummy(n->getID(), n, 0, TLTYPE_STATIC); + dummy.setParticipantsInformation(); + dummy.setTLControllingInformation(ec); + n->removeTrafficLight(&dummy); + } + } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTrafficLightLogicCont.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTrafficLightLogicCont.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTrafficLightLogicCont.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTrafficLightLogicCont.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NBTrafficLightLogicCont.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBTrafficLightLogicCont.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A container for traffic light definitions and built programs /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -87,7 +87,7 @@ * name and programID exists within this container. * * @param[in] logic The logic to add - * @param[in] renameProgram If true, rename the program to make insertion succeed + * @param[in] forceInsert If true, rename the program to make insertion succeed * @return Whether the logic was valid (no logic with the same id and programID is already known) */ bool insert(NBTrafficLightDefinition* logic, bool forceInsert = false); @@ -214,7 +214,7 @@ * @see NBTrafficLightDefinition::setParticipantsInformation * @see NBTrafficLightDefinition::setTLControllingInformation */ - void setTLControllingInformation(const NBEdgeCont& ec); + void setTLControllingInformation(const NBEdgeCont& ec, const NBNodeCont& nc); private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTrafficLightLogic.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTrafficLightLogic.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTrafficLightLogic.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTrafficLightLogic.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NBTrafficLightLogic.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBTrafficLightLogic.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A SUMO-compliant built logic for a traffic light /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -56,13 +56,14 @@ const char NBTrafficLightLogic::allowedStatesInitializer[] = {LINKSTATE_TL_GREEN_MAJOR, LINKSTATE_TL_GREEN_MINOR, LINKSTATE_TL_RED, + LINKSTATE_TL_REDYELLOW, LINKSTATE_TL_YELLOW_MAJOR, LINKSTATE_TL_YELLOW_MINOR, LINKSTATE_TL_OFF_BLINKING, LINKSTATE_TL_OFF_NOSIGNAL }; -const std::string NBTrafficLightLogic::ALLOWED_STATES(NBTrafficLightLogic::allowedStatesInitializer); +const std::string NBTrafficLightLogic::ALLOWED_STATES(NBTrafficLightLogic::allowedStatesInitializer, 8); // =========================================================================== // member method definitions diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTrafficLightLogic.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTrafficLightLogic.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTrafficLightLogic.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTrafficLightLogic.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NBTrafficLightLogic.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBTrafficLightLogic.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A SUMO-compliant built logic for a traffic light /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -40,6 +40,7 @@ #include "NBConnectionDefs.h" #include #include +#include // =========================================================================== @@ -55,7 +56,7 @@ * @class NBTrafficLightLogic * @brief A SUMO-compliant built logic for a traffic light */ -class NBTrafficLightLogic : public Named { +class NBTrafficLightLogic : public Named, public Parameterised { public: /** * @class PhaseDefinition diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTypeCont.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTypeCont.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTypeCont.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTypeCont.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date Tue, 20 Nov 2001 -/// @version $Id: NBTypeCont.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBTypeCont.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A storage for the available types of an edge /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -58,20 +58,20 @@ bool NBTypeCont::insert(const std::string& id, int noLanes, SUMOReal maxSpeed, int prio, - SUMOReal width, SUMOVehicleClass vClass, bool oneWayIsDefault) { - SVCPermissions permissions = (vClass == SVC_UNKNOWN ? SVCFreeForAll : vClass); - return insert(id, noLanes, maxSpeed, prio, permissions, width, oneWayIsDefault); + SUMOReal width, SUMOVehicleClass vClass, bool oneWayIsDefault, SUMOReal sidewalkWidth) { + SVCPermissions permissions = (vClass == SVC_IGNORING ? SVCAll : vClass); + return insert(id, noLanes, maxSpeed, prio, permissions, width, oneWayIsDefault, sidewalkWidth); } bool NBTypeCont::insert(const std::string& id, int noLanes, SUMOReal maxSpeed, int prio, - SVCPermissions permissions, SUMOReal width, bool oneWayIsDefault) { + SVCPermissions permissions, SUMOReal width, bool oneWayIsDefault, SUMOReal sidewalkWidth) { TypesCont::iterator i = myTypes.find(id); if (i != myTypes.end()) { return false; } - myTypes[id] = TypeDefinition(noLanes, maxSpeed, prio, width, permissions, oneWayIsDefault); + myTypes[id] = TypeDefinition(noLanes, maxSpeed, prio, width, permissions, oneWayIsDefault, sidewalkWidth); return true; } @@ -136,6 +136,12 @@ } +SUMOReal +NBTypeCont::getSidewalkWidth(const std::string& type) const { + return getType(type).sidewalkWidth; +} + + const NBTypeCont::TypeDefinition& NBTypeCont::getType(const std::string& name) const { TypesCont::const_iterator i = myTypes.find(name); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTypeCont.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTypeCont.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netbuild/NBTypeCont.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netbuild/NBTypeCont.h 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date Tue, 20 Nov 2001 -/// @version $Id: NBTypeCont.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NBTypeCont.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A storage for available types of edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -84,7 +84,8 @@ * @return Whether the type could be added (no type with the same id existed) */ bool insert(const std::string& id, int noLanes, SUMOReal maxSpeed, int prio, - SUMOReal width, SUMOVehicleClass vClasses = SVC_UNKNOWN, bool oneWayIsDefault = false); + SUMOReal width, SUMOVehicleClass vClasses = SVC_IGNORING, bool oneWayIsDefault = false, + SUMOReal sidewalkWidth = NBEdge::UNSPECIFIED_WIDTH); /** @brief Adds a type into the list * @param[in] id The id of the type @@ -99,7 +100,8 @@ bool insert(const std::string& id, int noLanes, SUMOReal maxSpeed, int prio, SVCPermissions permissions, - SUMOReal width, bool oneWayIsDefault); + SUMOReal width, bool oneWayIsDefault, + SUMOReal sidewalkWidth); /** @brief Returns the number of known types * @return The number of known edge types (excluding the default) @@ -179,13 +181,22 @@ SVCPermissions getPermissions(const std::string& type) const; - /** @brief Returns the lane width for the given type [m/s] + /** @brief Returns the lane width for the given type [m] * * If the named type is not known, the default is returned * @param[in] type The name of the type to return the width for * @return The width of lanes of edges of this type */ SUMOReal getWidth(const std::string& type) const; + + + /** @brief Returns the lane width for a sidewalk to be added [m] + * + * If the named type is not known, the default is returned + * @param[in] type The name of the type to return the width for + * @return The width of lanes of edges of this type + */ + SUMOReal getSidewalkWidth(const std::string& type) const; /// @} @@ -194,15 +205,21 @@ /// @brief Constructor TypeDefinition() : noLanes(1), speed((SUMOReal) 13.9), priority(-1), - permissions(SVCFreeForAll), - oneWay(true), discard(false), width(NBEdge::UNSPECIFIED_WIDTH) { } + permissions(SVCAll), + oneWay(true), discard(false), + width(NBEdge::UNSPECIFIED_WIDTH), + sidewalkWidth(NBEdge::UNSPECIFIED_WIDTH) + { } /// @brief Constructor TypeDefinition(int _noLanes, SUMOReal _speed, int _priority, - SUMOReal _width, SVCPermissions _permissions, bool _oneWay) : + SUMOReal _width, SVCPermissions _permissions, bool _oneWay, + SUMOReal _sideWalkWidth) : noLanes(_noLanes), speed(_speed), priority(_priority), permissions(_permissions), - oneWay(_oneWay), discard(false), width(_width) { } + oneWay(_oneWay), discard(false), width(_width), + sidewalkWidth(_sideWalkWidth) + { } /// @brief The number of lanes of an edge int noLanes; @@ -218,6 +235,9 @@ bool discard; /// @brief The width of lanes of edges of this type [m] SUMOReal width; + /* @brief The width of the sidewalk that should be added as an additional lane + * a value of NBEdge::UNSPECIFIED_WIDTH indicates that no sidewalk should be added */ + SUMOReal sidewalkWidth; }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netconvert_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netconvert_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netconvert_main.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netconvert_main.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: netconvert_main.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: netconvert_main.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Main for NETCONVERT /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -104,7 +104,7 @@ OptionsCont& oc = OptionsCont::getOptions(); // give some application descriptions oc.setApplicationDescription("Road network importer / builder for the road traffic simulation SUMO."); - oc.setApplicationName("netconvert", "SUMO netconvert Version " + (std::string)VERSION_STRING); + oc.setApplicationName("netconvert", "SUMO netconvert Version " + getBuildName(VERSION_STRING)); int ret = 0; try { XMLSubSys::init(); @@ -114,7 +114,7 @@ SystemFrame::close(); return 0; } - XMLSubSys::setValidation(oc.getBool("xml-validation")); + XMLSubSys::setValidation(oc.getString("xml-validation"), oc.getString("xml-validation.net")); MsgHandler::initOutputOptions(); if (!checkOptions()) { throw ProcessError(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -1,27 +1,13 @@ -if WITH_PROJ -PROJ_LIBS = -l$(LIB_PROJ) -endif - -if WITH_GDAL -GDAL_LIBS = -l$(LIB_GDAL) -endif - if CHECK_MEMORY_LEAKS MEM_LIBS = ../foreign/nvwa/libnvwa.a endif -if INTERNAL -INTERNAL_LIBS = ../internal/libinternal.a $(GDAL_LIBS) -endif - bin_PROGRAMS = netgenerate netgenerate_SOURCES = netgen_main.cpp NGEdge.cpp NGEdge.h NGFrame.cpp NGFrame.h \ NGNet.h NGNet.cpp NGNode.cpp NGNode.h \ NGRandomNetBuilder.h NGRandomNetBuilder.cpp -netgenerate_LDFLAGS = $(XERCES_LDFLAGS) $(PROJ_LDFLAGS) - netgenerate_LDADD = ../netbuild/libnetbuild.a \ ../netwrite/libnetwrite.a \ ../utils/geom/libgeom.a \ @@ -33,5 +19,4 @@ ../foreign/tcpip/libtcpip.a \ $(MEM_LIBS) \ -l$(LIB_XERCES) \ -$(INTERNAL_LIBS) \ -$(PROJ_LIBS) +$(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -37,7 +81,8 @@ target_triplet = @target@ bin_PROGRAMS = netgenerate$(EXEEXT) subdir = src/netgen -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -53,41 +98,93 @@ NGRandomNetBuilder.$(OBJEXT) netgenerate_OBJECTS = $(am_netgenerate_OBJECTS) am__DEPENDENCIES_1 = -@INTERNAL_TRUE@am__DEPENDENCIES_2 = ../internal/libinternal.a \ -@INTERNAL_TRUE@ $(am__DEPENDENCIES_1) netgenerate_DEPENDENCIES = ../netbuild/libnetbuild.a \ ../netwrite/libnetwrite.a ../utils/geom/libgeom.a \ ../utils/options/liboptions.a ../utils/xml/libxml.a \ ../utils/common/libcommon.a ../utils/importio/libimportio.a \ ../utils/iodevices/libiodevices.a ../foreign/tcpip/libtcpip.a \ - $(MEM_LIBS) $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) -netgenerate_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(netgenerate_LDFLAGS) $(LDFLAGS) -o $@ + $(MEM_LIBS) $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(netgenerate_SOURCES) DIST_SOURCES = $(netgenerate_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -96,6 +193,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -122,9 +220,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -135,10 +237,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -232,15 +330,11 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -@WITH_PROJ_TRUE@PROJ_LIBS = -l$(LIB_PROJ) -@WITH_GDAL_TRUE@GDAL_LIBS = -l$(LIB_GDAL) @CHECK_MEMORY_LEAKS_TRUE@MEM_LIBS = ../foreign/nvwa/libnvwa.a -@INTERNAL_TRUE@INTERNAL_LIBS = ../internal/libinternal.a $(GDAL_LIBS) netgenerate_SOURCES = netgen_main.cpp NGEdge.cpp NGEdge.h NGFrame.cpp NGFrame.h \ NGNet.h NGNet.cpp NGNode.cpp NGNode.h \ NGRandomNetBuilder.h NGRandomNetBuilder.cpp -netgenerate_LDFLAGS = $(XERCES_LDFLAGS) $(PROJ_LDFLAGS) netgenerate_LDADD = ../netbuild/libnetbuild.a \ ../netwrite/libnetwrite.a \ ../utils/geom/libgeom.a \ @@ -252,8 +346,7 @@ ../foreign/tcpip/libtcpip.a \ $(MEM_LIBS) \ -l$(LIB_XERCES) \ -$(INTERNAL_LIBS) \ -$(PROJ_LIBS) +$(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) all: all-am @@ -291,14 +384,19 @@ $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -319,7 +417,8 @@ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -332,9 +431,10 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -netgenerate$(EXEEXT): $(netgenerate_OBJECTS) $(netgenerate_DEPENDENCIES) + +netgenerate$(EXEEXT): $(netgenerate_OBJECTS) $(netgenerate_DEPENDENCIES) $(EXTRA_netgenerate_DEPENDENCIES) @rm -f netgenerate$(EXEEXT) - $(netgenerate_LINK) $(netgenerate_OBJECTS) $(netgenerate_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(netgenerate_OBJECTS) $(netgenerate_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -350,25 +450,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netgen_main.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -376,26 +476,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -407,15 +496,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -424,6 +509,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -475,10 +575,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -562,19 +667,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/netgen_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/netgen_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/netgen_main.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/netgen_main.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mar, 2003 -/// @version $Id: netgen_main.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: netgen_main.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Main for NETGENERATE /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -205,7 +205,7 @@ OptionsCont& oc = OptionsCont::getOptions(); // give some application descriptions oc.setApplicationDescription("Road network generator for the microscopic road traffic simulation SUMO."); - oc.setApplicationName("netgenerate", "SUMO netgenerate Version " + (std::string)VERSION_STRING); + oc.setApplicationName("netgenerate", "SUMO netgenerate Version " + getBuildName(VERSION_STRING)); int ret = 0; try { // initialise the application system (messaging, xml, options) @@ -216,7 +216,7 @@ SystemFrame::close(); return 0; } - XMLSubSys::setValidation(oc.getBool("xml-validation")); + XMLSubSys::setValidation(oc.getString("xml-validation"), oc.getString("xml-validation.net")); MsgHandler::initOutputOptions(); if (!checkOptions()) { throw ProcessError(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGEdge.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGEdge.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGEdge.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGEdge.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Markus Hartinger /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Mar, 2003 -/// @version $Id: NGEdge.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NGEdge.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A netgen-representation of an edge /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGEdge.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGEdge.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGEdge.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGEdge.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mar, 2003 -/// @version $Id: NGEdge.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NGEdge.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A netgen-representation of an edge /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGFrame.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGFrame.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGFrame.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGFrame.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file NGFrame.cpp /// @author Daniel Krajzewicz /// @author Jakob Erdmann +/// @author Michael Behrisch /// @date 06.05.2011 -/// @version $Id: NGFrame.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NGFrame.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for netgen /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -218,6 +219,8 @@ type != toString(NODETYPE_PRIORITY) && type != toString(NODETYPE_PRIORITY_STOP) && type != toString(NODETYPE_ALLWAY_STOP) && + type != toString(NODETYPE_NOJUNCTION) && + type != toString(NODETYPE_RAIL_SIGNAL) && type != toString(NODETYPE_RIGHT_BEFORE_LEFT)) { WRITE_ERROR("Only the following junction types are known: " + toString(NODETYPE_TRAFFIC_LIGHT) + ", " + @@ -225,6 +228,8 @@ toString(NODETYPE_PRIORITY) + ", " + toString(NODETYPE_PRIORITY_STOP) + ", " + toString(NODETYPE_ALLWAY_STOP) + ", " + + toString(NODETYPE_NOJUNCTION) + ", " + + toString(NODETYPE_RAIL_SIGNAL) + ", " + toString(NODETYPE_RIGHT_BEFORE_LEFT)); ok = false; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGFrame.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGFrame.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGFrame.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGFrame.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NGFrame.h /// @author Daniel Krajzewicz /// @date 06.05.2011 -/// @version $Id: NGFrame.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NGFrame.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for netgen /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGNet.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGNet.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGNet.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGNet.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Markus Hartinger /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Mar, 2003 -/// @version $Id: NGNet.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NGNet.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The class storing the generated network /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGNet.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGNet.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGNet.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGNet.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mar, 2003 -/// @version $Id: NGNet.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NGNet.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The class storing the generated network /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGNode.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGNode.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGNode.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGNode.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mar, 2003 -/// @version $Id: NGNode.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NGNode.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A netgen-representation of a node /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGNode.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGNode.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGNode.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGNode.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mar, 2003 -/// @version $Id: NGNode.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NGNode.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A netgen-representation of a node /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGRandomNetBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGRandomNetBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGRandomNetBuilder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGRandomNetBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mar, 2003 -/// @version $Id: NGRandomNetBuilder.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NGRandomNetBuilder.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Additional structures for building random nets /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGRandomNetBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGRandomNetBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netgen/NGRandomNetBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netgen/NGRandomNetBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mar, 2003 -/// @version $Id: NGRandomNetBuilder.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NGRandomNetBuilder.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Additional structures for building random nets /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/netimport -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,6 +92,10 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libnetimport_a_AR = $(AR) $(ARFLAGS) libnetimport_a_LIBADD = am_libnetimport_a_OBJECTS = NIFrame.$(OBJEXT) NILoader.$(OBJEXT) \ @@ -60,42 +109,102 @@ NIXMLNodesHandler.$(OBJEXT) NIXMLTypesHandler.$(OBJEXT) \ NIXMLTrafficLightsHandler.$(OBJEXT) NINavTeqHelper.$(OBJEXT) libnetimport_a_OBJECTS = $(am_libnetimport_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libnetimport_a_SOURCES) DIST_SOURCES = $(libnetimport_a_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -130,6 +239,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -156,9 +266,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -169,10 +283,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -324,10 +434,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libnetimport.a: $(libnetimport_a_OBJECTS) $(libnetimport_a_DEPENDENCIES) - -rm -f libnetimport.a - $(libnetimport_a_AR) libnetimport.a $(libnetimport_a_OBJECTS) $(libnetimport_a_LIBADD) - $(RANLIB) libnetimport.a + +libnetimport.a: $(libnetimport_a_OBJECTS) $(libnetimport_a_DEPENDENCIES) $(EXTRA_libnetimport_a_DEPENDENCIES) + $(AM_V_at)-rm -f libnetimport.a + $(AM_V_AR)$(libnetimport_a_AR) libnetimport.a $(libnetimport_a_OBJECTS) $(libnetimport_a_LIBADD) + $(AM_V_at)$(RANLIB) libnetimport.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -355,25 +466,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIXMLTypesHandler.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -382,22 +493,25 @@ -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -412,57 +526,12 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -478,12 +547,7 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -495,15 +559,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -512,6 +572,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -548,13 +623,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -589,10 +661,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -675,12 +752,11 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - clean-noinstLIBRARIES ctags ctags-recursive distclean \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ @@ -690,8 +766,8 @@ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIFrame.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIFrame.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIFrame.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIFrame.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NIFrame.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIFrame.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for netimport /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -107,7 +107,7 @@ oc.doRegister("opendrive-files", new Option_FileName()); oc.addSynonyme("opendrive-files", "opendrive"); - oc.addDescription("opendrive-files", "Input", "Read openDrive-network from FILE"); + oc.addDescription("opendrive-files", "Input", "Read OpenDRIVE-network from FILE"); oc.doRegister("visum-file", new Option_FileName()); oc.addSynonyme("visum-file", "visum"); @@ -130,10 +130,11 @@ oc.addSynonyme("itsumo-files", "itsumo"); oc.addDescription("itsumo-files", "Input", "Read ITSUMO-net from FILE"); -#ifdef HAVE_INTERNAL // catchall for internal stuff oc.doRegister("heightmap.shapefiles", new Option_FileName()); oc.addDescription("heightmap.shapefiles", "Input", "Read heightmap from ArcGIS shapefile"); -#endif // have HAVE_INTERNAL + + oc.doRegister("heightmap.geotiff", new Option_FileName()); + oc.addDescription("heightmap.geotiff", "Input", "Read heightmap from GeoTIFF"); // register basic processing options oc.doRegister("ignore-errors", new Option_Bool(false)); @@ -151,7 +152,7 @@ oc.doRegister("lanes-from-capacity.norm", new Option_Float((SUMOReal) 1800)); oc.addSynonyme("lanes-from-capacity.norm", "capacity-norm"); - oc.addDescription("lanes-from-capacity.norm", "Processing", "The factor for flow to no. lanes conversion."); + oc.addDescription("lanes-from-capacity.norm", "Processing", "The factor for flow to no. lanes conversion"); oc.doRegister("speed-in-kmh", new Option_Bool(false)); oc.addDescription("speed-in-kmh", "Processing", "vmax is parsed as given in km/h (some)"); @@ -166,10 +167,10 @@ // register matsim options oc.doRegister("matsim.keep-length", new Option_Bool(false)); - oc.addDescription("matsim.keep-length", "Processing", "The edge lengths given in the MATSIM-file will be kept."); + oc.addDescription("matsim.keep-length", "Processing", "The edge lengths given in the MATSIM-file will be kept"); oc.doRegister("matsim.lanes-from-capacity", new Option_Bool(false)); - oc.addDescription("matsim.lanes-from-capacity", "Processing", "The lane number will be computed from the capacity."); + oc.addDescription("matsim.lanes-from-capacity", "Processing", "The lane number will be computed from the capacity"); // register shapefile options @@ -215,7 +216,7 @@ oc.addDescription("vissim.speed-norm", "Processing", "Factor for edge velocity"); oc.doRegister("vissim.report-unset-speeds", new Option_Bool(false)); - oc.addDescription("vissim.report-unset-speeds", "Processing", "Writes lanes without an explicit speed set."); + oc.addDescription("vissim.report-unset-speeds", "Processing", "Writes lanes without an explicit speed set"); // register visum options @@ -248,17 +249,19 @@ // register osm options oc.doRegister("osm.skip-duplicates-check", new Option_Bool(false)); - oc.addDescription("osm.skip-duplicates-check", "Processing", "Skips the check for duplicate nodes and edges."); + oc.addDescription("osm.skip-duplicates-check", "Processing", "Skips the check for duplicate nodes and edges"); oc.doRegister("osm.railway.oneway-default", new Option_Bool(true)); oc.addDescription("osm.railway.oneway-default", "Processing", "Imports railway edges as one-way by default"); + oc.doRegister("osm.elevation", new Option_Bool(false)); + oc.addDescription("osm.elevation", "Processing", "Imports elevation data"); // register opendrive options oc.doRegister("opendrive.import-all-lanes", new Option_Bool(false)); - oc.addDescription("opendrive.import-all-lanes", "Processing", "Imports all lane types."); - oc.doRegister("opendrive.import-widths", new Option_Bool(false)); - oc.addDescription("opendrive.import-widths", "Processing", "Whether lane widths shall be imported."); + oc.addDescription("opendrive.import-all-lanes", "Processing", "Imports all lane types"); + oc.doRegister("opendrive.ignore-widths", new Option_Bool(false)); + oc.addDescription("opendrive.ignore-widths", "Processing", "Whether lane widths shall be ignored."); @@ -288,6 +291,11 @@ if (oc.isSet("dlr-navteq-prefix") && oc.isDefault("proj.scale")) { oc.set("proj.scale", toString(NIImporter_DlrNavteq::GEO_SCALE)); } +#else + if ((oc.isSet("osm-files") || oc.isSet("dlr-navteq-prefix") || oc.isSet("shapefile-prefix")) && !oc.getBool("simple-projection")) { + WRITE_ERROR("Cannot import network data without PROJ-Library. Please install packages proj before building sumo"); + ok = false; + } #endif if (oc.isSet("sumo-net-file")) { if (oc.isWriteable("no-turnarounds")) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIFrame.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIFrame.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIFrame.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIFrame.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NIFrame.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIFrame.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for netimport /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_ArcView.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_ArcView.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_ArcView.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_ArcView.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Thimor Bohn /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIImporter_ArcView.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_ArcView.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in ArcView-shape format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -78,14 +78,14 @@ std::string shp_file = oc.getString("shapefile-prefix") + ".shp"; std::string shx_file = oc.getString("shapefile-prefix") + ".shx"; // check whether the files do exist - if (!FileHelpers::exists(dbf_file)) { - WRITE_ERROR("File not found: " + dbf_file); + if (!FileHelpers::isReadable(dbf_file)) { + WRITE_ERROR("File not accessible: " + dbf_file); } - if (!FileHelpers::exists(shp_file)) { - WRITE_ERROR("File not found: " + shp_file); + if (!FileHelpers::isReadable(shp_file)) { + WRITE_ERROR("File not accessible: " + shp_file); } - if (!FileHelpers::exists(shx_file)) { - WRITE_ERROR("File not found: " + shx_file); + if (!FileHelpers::isReadable(shx_file)) { + WRITE_ERROR("File not accessible: " + shx_file); } if (MsgHandler::getErrorInstance()->wasInformed()) { return; @@ -210,6 +210,7 @@ OGRGeometry* poGeometry = poFeature->GetGeometryRef(); OGRwkbGeometryType gtype = poGeometry->getGeometryType(); assert(gtype == wkbLineString); + UNUSED_PARAMETER(gtype); // ony used for assertion OGRLineString* cgeom = (OGRLineString*) poGeometry; if (poCT != 0) { // try transform to wgs84 diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_ArcView.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_ArcView.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_ArcView.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_ArcView.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file NIImporter_ArcView.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: NIImporter_ArcView.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_ArcView.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in ArcView-shape format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_DlrNavteq.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_DlrNavteq.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_DlrNavteq.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_DlrNavteq.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 14.04.2008 -/// @version $Id: NIImporter_DlrNavteq.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NIImporter_DlrNavteq.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in Elmar's format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_DlrNavteq.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_DlrNavteq.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_DlrNavteq.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_DlrNavteq.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file NIImporter_DlrNavteq.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Mon, 14.04.2008 -/// @version $Id: NIImporter_DlrNavteq.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NIImporter_DlrNavteq.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in Elmar's format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_ITSUMO.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_ITSUMO.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_ITSUMO.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_ITSUMO.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file NIImporter_ITSUMO.cpp /// @author Daniel Krajzewicz /// @author Jakob Erdmann +/// @author Michael Behrisch /// @date 2011-09-16 -/// @version $Id: NIImporter_ITSUMO.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_ITSUMO.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in ITSUMO format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -124,7 +125,7 @@ Handler Handler(nb); for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { // nodes - if (!FileHelpers::exists(*file)) { + if (!FileHelpers::isReadable(*file)) { WRITE_ERROR("Could not open itsumo-file '" + *file + "'."); return; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_ITSUMO.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_ITSUMO.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_ITSUMO.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_ITSUMO.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIImporter_ITSUMO.h /// @author Daniel Krajzewicz /// @date 2011-09-16 -/// @version $Id: NIImporter_ITSUMO.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_ITSUMO.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in ITSUMO format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_MATSim.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_MATSim.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_MATSim.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_MATSim.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 26.04.2011 -/// @version $Id: NIImporter_MATSim.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_MATSim.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in MATSim format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -106,7 +106,7 @@ NodesHandler nodesHandler(nb.getNodeCont()); for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { // nodes - if (!FileHelpers::exists(*file)) { + if (!FileHelpers::isReadable(*file)) { WRITE_ERROR("Could not open matsim-file '" + *file + "'."); return; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_MATSim.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_MATSim.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_MATSim.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_MATSim.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @date Tue, 26.04.2011 -/// @version $Id: NIImporter_MATSim.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_MATSim.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in MATSim format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_OpenDrive.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_OpenDrive.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_OpenDrive.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_OpenDrive.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Mon, 14.04.2008 -/// @version $Id: NIImporter_OpenDrive.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_OpenDrive.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in openDrive format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -32,6 +32,7 @@ #endif #include #include +#include #include #include #include @@ -43,6 +44,8 @@ #include #include #include +#include +#include #include #include #include @@ -87,8 +90,8 @@ { "junction", NIImporter_OpenDrive::OPENDRIVE_TAG_JUNCTION }, { "connection", NIImporter_OpenDrive::OPENDRIVE_TAG_CONNECTION }, { "laneLink", NIImporter_OpenDrive::OPENDRIVE_TAG_LANELINK }, - { "width", NIImporter_OpenDrive::OPENDRIVE_TAG_WIDTH }, - { "speed", NIImporter_OpenDrive::OPENDRIVE_TAG_SPEED }, + { "width", NIImporter_OpenDrive::OPENDRIVE_TAG_WIDTH }, + { "speed", NIImporter_OpenDrive::OPENDRIVE_TAG_SPEED }, { "", NIImporter_OpenDrive::OPENDRIVE_TAG_NOTHING } }; @@ -120,15 +123,16 @@ { "dynamic", NIImporter_OpenDrive::OPENDRIVE_ATTR_DYNAMIC }, { "incomingRoad", NIImporter_OpenDrive::OPENDRIVE_ATTR_INCOMINGROAD }, { "connectingRoad", NIImporter_OpenDrive::OPENDRIVE_ATTR_CONNECTINGROAD }, - { "from", NIImporter_OpenDrive::OPENDRIVE_ATTR_FROM }, - { "to", NIImporter_OpenDrive::OPENDRIVE_ATTR_TO }, + { "from", NIImporter_OpenDrive::OPENDRIVE_ATTR_FROM }, + { "to", NIImporter_OpenDrive::OPENDRIVE_ATTR_TO }, { "max", NIImporter_OpenDrive::OPENDRIVE_ATTR_MAX }, + { "sOffset", NIImporter_OpenDrive::OPENDRIVE_ATTR_SOFFSET }, + { "name", NIImporter_OpenDrive::OPENDRIVE_ATTR_NAME }, { "", NIImporter_OpenDrive::OPENDRIVE_ATTR_NOTHING } }; -std::set NIImporter_OpenDrive::myLaneTypes2Import; bool NIImporter_OpenDrive::myImportAllTypes; bool NIImporter_OpenDrive::myImportWidths; @@ -144,22 +148,25 @@ if (!oc.isUsableFileList("opendrive-files")) { return; } + // prepare types myImportAllTypes = oc.getBool("opendrive.import-all-lanes"); - myImportWidths = oc.getBool("opendrive.import-widths"); - myImportWidths = true; - myLaneTypes2Import.insert("driving"); - myLaneTypes2Import.insert("stop"); - myLaneTypes2Import.insert("mwyEntry"); - myLaneTypes2Import.insert("mwyExit"); - myLaneTypes2Import.insert("special1"); - myLaneTypes2Import.insert("parking"); + myImportWidths = !oc.getBool("opendrive.ignore-widths"); + NBTypeCont& tc = nb.getTypeCont(); + const SUMOReal WIDTH(3.65); // as wanted + const SVCPermissions defaultPermissions = SVCAll & ~SVC_PEDESTRIAN; + tc.insert("driving", 1, (SUMOReal)(80. / 3.6), 1, defaultPermissions, WIDTH, true, NBEdge::UNSPECIFIED_WIDTH); + tc.insert("mwyEntry", 1, (SUMOReal)(80. / 3.6), 1, defaultPermissions, WIDTH, true, NBEdge::UNSPECIFIED_WIDTH); + tc.insert("mwyExit", 1, (SUMOReal)(80. / 3.6), 1, defaultPermissions, WIDTH, true, NBEdge::UNSPECIFIED_WIDTH); + tc.insert("stop", 1, (SUMOReal)(80. / 3.6), 1, defaultPermissions, WIDTH, true, NBEdge::UNSPECIFIED_WIDTH); + tc.insert("special1", 1, (SUMOReal)(80. / 3.6), 1, defaultPermissions, WIDTH, true, NBEdge::UNSPECIFIED_WIDTH); + tc.insert("parking", 1, (SUMOReal)(5. / 3.6), 1, defaultPermissions, WIDTH, true, NBEdge::UNSPECIFIED_WIDTH); // build the handler std::map edges; - NIImporter_OpenDrive handler(edges); + NIImporter_OpenDrive handler(tc, edges); // parse file(s) std::vector files = oc.getStringVector("opendrive-files"); for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { - if (!FileHelpers::exists(*file)) { + if (!FileHelpers::isReadable(*file)) { WRITE_ERROR("Could not open opendrive file '" + *file + "'."); return; } @@ -180,6 +187,8 @@ // convert geometries into a discretised representation computeShapes(edges); + // check whether lane sections are valid and whether further must be introduced + revisitLaneSections(tc, edges); // ------------------------- // node building @@ -288,7 +297,6 @@ } - // build start/end nodes which were not defined previously for (std::map::iterator i = outerEdges.begin(); i != outerEdges.end(); ++i) { OpenDriveEdge* e = (*i).second; @@ -306,20 +314,13 @@ // ------------------------- // edge building // ------------------------- - //bool useLoadedLengths = oc.getBool("opendrive.use-given-lengths"); - SUMOReal defaultSpeed = nb.getTypeCont().getSpeed(""); + SUMOReal defaultSpeed = tc.getSpeed(""); // build edges for (std::map::iterator i = outerEdges.begin(); i != outerEdges.end(); ++i) { OpenDriveEdge* e = (*i).second; - unsigned int noLanesRight = e->getMaxLaneNumber(OPENDRIVE_TAG_RIGHT); - unsigned int noLanesLeft = e->getMaxLaneNumber(OPENDRIVE_TAG_LEFT); - if (noLanesRight == 0 && noLanesLeft == 0) { - WRITE_WARNING("Edge '" + e->id + "' has no lanes."); - } - - // idea: go along the lane sections, build a node in between of each pair + bool lanesBuilt = false; - /// @todo: connections between lane sections are not processed, should + // go along the lane sections, build a node in between of each pair /// @todo: One could think of determining whether lane sections may be joined when being equal in SUMO's sense /// Their naming would have to be updated, too, also in TraCI @@ -331,7 +332,7 @@ int priorityL = e->getPriority(OPENDRIVE_TAG_LEFT); SUMOReal sB = 0; SUMOReal sE = e->length; - SUMOReal cF = e->length / e->geom.length(); + SUMOReal cF = e->length / e->geom.length2D(); NBEdge* prevRight = 0; NBEdge* prevLeft = 0; @@ -358,22 +359,23 @@ } sE = nextS / cF; } - PositionVector geom = e->geom.getSubpart(sB, sE); - (*j).buildLaneMapping(); + PositionVector geom = e->geom.getSubpart2D(sB, sE); std::string id = e->id; if (sFrom != e->from || sTo != e->to) { id = id + "." + toString((*j).s); + } else if (e->laneSections.size() == 1) { + id = id + ".0.00"; } // build lanes to right - int rightLanesSection = (*j).getLaneNumber(OPENDRIVE_TAG_RIGHT); NBEdge* currRight = 0; - if (rightLanesSection > 0) { - currRight = new NBEdge("-" + id, sFrom, sTo, "", defaultSpeed, rightLanesSection, priorityR, + if ((*j).rightLaneNumber > 0) { + currRight = new NBEdge("-" + id, sFrom, sTo, "", defaultSpeed, (*j).rightLaneNumber, priorityR, NBEdge::UNSPECIFIED_WIDTH, NBEdge::UNSPECIFIED_OFFSET, geom, "", LANESPREAD_RIGHT, true); if (!nb.getEdgeCont().insert(currRight)) { throw ProcessError("Could not add edge '" + currRight->getID() + "'."); } + lanesBuilt = true; const std::vector& lanes = (*j).lanesByDir[OPENDRIVE_TAG_RIGHT]; for (std::vector::const_iterator k = lanes.begin(); k != lanes.end(); ++k) { std::map::const_iterator lp = (*j).laneMap.find((*k).id); @@ -383,14 +385,9 @@ const OpenDriveLane& odLane = *k; sumoLane.origID = e->id + " -" + toString((*k).id); - sumoLane.speed = odLane.speed != 0 ? odLane.speed : defaultSpeed; - - if (myImportWidths) { - SUMOReal width = odLane.width; - if (width != 0) { - sumoLane.width = width; - } - } + sumoLane.speed = odLane.speed != 0 ? odLane.speed : tc.getSpeed(odLane.type); + sumoLane.permissions = tc.getPermissions(odLane.type); + sumoLane.width = myImportWidths && odLane.width != 0 ? odLane.width : tc.getWidth(odLane.type); } } // connect lane sections @@ -404,14 +401,14 @@ } // build lanes to left - int leftLanesSection = (*j).getLaneNumber(OPENDRIVE_TAG_LEFT); NBEdge* currLeft = 0; - if (leftLanesSection > 0) { - currLeft = new NBEdge(id, sTo, sFrom, "", defaultSpeed, leftLanesSection, priorityL, + if ((*j).leftLaneNumber > 0) { + currLeft = new NBEdge(id, sTo, sFrom, "", defaultSpeed, (*j).leftLaneNumber, priorityL, NBEdge::UNSPECIFIED_WIDTH, NBEdge::UNSPECIFIED_OFFSET, geom.reverse(), "", LANESPREAD_RIGHT, true); if (!nb.getEdgeCont().insert(currLeft)) { throw ProcessError("Could not add edge '" + currLeft->getID() + "'."); } + lanesBuilt = true; const std::vector& lanes = (*j).lanesByDir[OPENDRIVE_TAG_LEFT]; for (std::vector::const_iterator k = lanes.begin(); k != lanes.end(); ++k) { std::map::const_iterator lp = (*j).laneMap.find((*k).id); @@ -421,14 +418,9 @@ const OpenDriveLane& odLane = *k; sumoLane.origID = e->id + " " + toString((*k).id); - sumoLane.speed = odLane.speed != 0 ? odLane.speed : defaultSpeed; - - if (myImportWidths) { - SUMOReal width = odLane.width; - if (width != 0) { - sumoLane.width = width; - } - } + sumoLane.speed = odLane.speed != 0 ? odLane.speed : tc.getSpeed(odLane.type); + sumoLane.permissions = tc.getPermissions(odLane.type); + sumoLane.width = myImportWidths && odLane.width != 0 ? odLane.width : tc.getWidth(odLane.type); } } // connect lane sections @@ -446,9 +438,11 @@ sB = sE; sFrom = sTo; } + if (!lanesBuilt) { + WRITE_WARNING("Edge '" + e->id + "' has no lanes."); + } } - // ------------------------- // connections building // ------------------------- @@ -513,10 +507,10 @@ NBEdge* from = nb.getEdgeCont().retrieve(fromEdge); NBEdge* to = nb.getEdgeCont().retrieve(toEdge); if (from == 0) { - WRITE_WARNING("Could not find fromEdge representation of '' in connection ''."); + WRITE_WARNING("Could not find fromEdge representation of '" + fromEdge + "' in connection '" + (*i).origID + "'."); } if (to == 0) { - WRITE_WARNING("Could not find fromEdge representation of '' in connection ''."); + WRITE_WARNING("Could not find fromEdge representation of '" + toEdge + "' in connection '" + (*i).origID + "'."); } if (from == 0 || to == 0) { continue; @@ -535,7 +529,98 @@ } } } + + + // ------------------------- + // traffic lights + // ------------------------- + std::map tlsControlled; + for (std::map::iterator i = edges.begin(); i != edges.end(); ++i) { + OpenDriveEdge* e = (*i).second; + for (std::vector::const_iterator j = e->signals.begin(); j != e->signals.end(); ++j) { + if ((*j).type != "1000001") { + continue; + } + std::vector::iterator k = e->laneSections.begin(); + bool found = false; + for (; k != e->laneSections.end() - 1 && !found;) { + if ((*j).s > (*k).s && (*j).s <= (*(k + 1)).s) { + found = true; + } else { + ++k; + } + } + + // @todo: major problem, currently, still not completely solved: + // inner edges may have traffic lights, too. Nice on one hand, as directions can be recognized + // but hard to follow backwards + std::string id = (*k).sumoID; + if (id == "") { + if (e->junction != "") { + //WRITE_WARNING("Found a traffic light signal on an internal edge; will not build it (original edge id='" + e->id + "')."); + std::string fromID, toID; + for (std::vector::const_iterator l = e->links.begin(); l != e->links.end(); ++l) { + if ((*l).linkType == OPENDRIVE_LT_PREDECESSOR && (*l).elementType == OPENDRIVE_ET_ROAD) { + if (fromID != "") { + WRITE_WARNING("Ambigous start of connection."); + } + fromID = (*l).elementID; + OpenDriveEdge* e = edges[fromID]; + fromID = (*l).contactPoint == OPENDRIVE_CP_START ? e->laneSections[0].sumoID : e->laneSections.back().sumoID; + } + if ((*l).linkType == OPENDRIVE_LT_SUCCESSOR && (*l).elementType == OPENDRIVE_ET_ROAD) { + if (toID != "") { + WRITE_WARNING("Ambigous end of connection."); + } + toID = (*l).elementID; + OpenDriveEdge* e = edges[toID]; + toID = (*l).contactPoint == OPENDRIVE_CP_START ? e->laneSections[0].sumoID : e->laneSections.back().sumoID; + } + } + id = fromID + "->" + toID; + } else { + WRITE_WARNING("Found a traffic light signal on an unknown edge (original edge id='" + e->id + "')."); + continue; + } + } + + if ((*j).orientation > 0) { + id = "-" + id; + } + tlsControlled[id] = (*j).name; + } + } + + for (std::map::iterator i = tlsControlled.begin(); i != tlsControlled.end(); ++i) { + std::string id = (*i).first; + if (id.find("->") != std::string::npos) { + id = id.substr(0, id.find("->")); + } + NBEdge* e = nb.getEdgeCont().retrieve(id); + if (e == 0) { + WRITE_WARNING("Could not find edge '" + id + "' while building its traffic light."); + continue; + } + NBNode* toNode = e->getToNode(); + NBTrafficLightDefinition* tlDef = 0; + if (!toNode->isTLControlled()) { + TrafficLightType type = SUMOXMLDefinitions::TrafficLightTypes.get(OptionsCont::getOptions().getString("tls.default-type")); + tlDef = new NBOwnTLDef(toNode->getID(), toNode, 0, type); + if (!nb.getTLLogicCont().insert(tlDef)) { + // actually, nothing should fail here + delete tlDef; + throw ProcessError(); + } + toNode->addTrafficLight(tlDef); + static_cast(tlDef)->setSinglePhase(); + } + tlDef = *toNode->getControllingTLS().begin(); + tlDef->addParameter("connection:" + id, (*i).second); + } + + // ------------------------- // clean up + // ------------------------- if (oc.exists("geometry.min-dist") && oc.isSet("geometry.min-dist")) { oc.unSet("geometry.min-dist"); } @@ -597,10 +682,11 @@ std::string edgeID = e.id; OpenDriveLaneSection& laneSection = l.linkType == OPENDRIVE_LT_SUCCESSOR ? e.laneSections.back() : e.laneSections[0]; + const std::map& laneMap = laneSection.laneMap; if (laneSection.lanesByDir.find(OPENDRIVE_TAG_RIGHT) != laneSection.lanesByDir.end()) { const std::vector& lanes = laneSection.lanesByDir.find(OPENDRIVE_TAG_RIGHT)->second; for (std::vector::const_iterator j = lanes.begin(); j != lanes.end(); ++j) { - if (!myImportAllTypes && myLaneTypes2Import.find((*j).type) == myLaneTypes2Import.end()) { + if (!myImportAllTypes && laneMap.find((*j).id) == laneMap.end()) { continue; } Connection c; // @todo: give Connection a new name and a constructor @@ -627,7 +713,7 @@ if (laneSection.lanesByDir.find(OPENDRIVE_TAG_LEFT) != laneSection.lanesByDir.end()) { const std::vector& lanes = laneSection.lanesByDir.find(OPENDRIVE_TAG_LEFT)->second; for (std::vector::const_iterator j = lanes.begin(); j != lanes.end(); ++j) { - if (!myImportAllTypes && myLaneTypes2Import.find((*j).type) == myLaneTypes2Import.end()) { + if (!myImportAllTypes && laneMap.find((*j).id) == laneMap.end()) { continue; } Connection c; @@ -724,9 +810,6 @@ break; case OPENDRIVE_GT_POLY3: geom = geomFromPoly(e, g); - if (geom.size() == 1) { - geom = geomFromPoly(e, g); - } break; default: break; @@ -747,6 +830,55 @@ } +void +NIImporter_OpenDrive::revisitLaneSections(const NBTypeCont& tc, std::map& edges) { + for (std::map::iterator i = edges.begin(); i != edges.end(); ++i) { + OpenDriveEdge& e = *(*i).second; + std::vector& laneSections = e.laneSections; + // split by speed limits + std::vector newSections; + for (std::vector::iterator j = laneSections.begin(); j != laneSections.end(); ++j) { + std::vector splitSections; + bool splitBySpeed = (*j).buildSpeedChanges(tc, splitSections); + if (!splitBySpeed) { + newSections.push_back(*j); + } else { + std::copy(splitSections.begin(), splitSections.end(), back_inserter(newSections)); + } + } + + e.laneSections = newSections; + laneSections = e.laneSections; + SUMOReal lastS = -1; + // check whether the lane sections are in the right order + bool sorted = true; + for (std::vector::const_iterator j = laneSections.begin(); j != laneSections.end() && sorted; ++j) { + if ((*j).s <= lastS) { + sorted = false; + } + lastS = (*j).s; + } + if (!sorted) { + WRITE_WARNING("The sections of edge '" + e.id + "' are not sorted properly."); + sort(e.laneSections.begin(), e.laneSections.end(), sections_by_s_sorter()); + } + // check whether no duplicates of s-value occure + lastS = -1; + laneSections = e.laneSections; + for (std::vector::iterator j = laneSections.begin(); j != laneSections.end();) { + bool simlarToLast = fabs((*j).s - lastS) < POSITION_EPS; + lastS = (*j).s; + if (simlarToLast) { + WRITE_WARNING("Almost duplicate s-value '" + toString(lastS) + "' for lane sections occured at edge '" + e.id + "'; second entry was removed."); + j = laneSections.erase(j); + } else { + ++j; + } + } + } +} + + std::vector NIImporter_OpenDrive::geomFromLine(const OpenDriveEdge& e, const OpenDriveGeometry& g) { UNUSED_PARAMETER(e); @@ -824,7 +956,6 @@ UNUSED_PARAMETER(e); std::vector ret; for (SUMOReal off = 0; off < g.length + 2.; off += 2.) { - //SUMOReal off = g.length; SUMOReal x = off; SUMOReal y = g.params[0] + g.params[1] * off + g.params[2] * pow(off, 2.) + g.params[3] * pow(off, 3.); SUMOReal s = sin(g.hdg); @@ -909,35 +1040,24 @@ } -unsigned int -NIImporter_OpenDrive::OpenDriveLaneSection::getLaneNumber(OpenDriveXMLTag dir) const { - unsigned int laneNum = 0; - const std::vector& dirLanes = lanesByDir.find(dir)->second; - for (std::vector::const_iterator i = dirLanes.begin(); i != dirLanes.end(); ++i) { - if (myImportAllTypes || myLaneTypes2Import.find((*i).type) != myLaneTypes2Import.end()) { - ++laneNum; - } - } - return laneNum; -} - - void -NIImporter_OpenDrive::OpenDriveLaneSection::buildLaneMapping() { +NIImporter_OpenDrive::OpenDriveLaneSection::buildLaneMapping(const NBTypeCont& tc) { unsigned int sumoLane = 0; const std::vector& dirLanesR = lanesByDir.find(OPENDRIVE_TAG_RIGHT)->second; for (std::vector::const_reverse_iterator i = dirLanesR.rbegin(); i != dirLanesR.rend(); ++i) { - if (myImportAllTypes || myLaneTypes2Import.find((*i).type) != myLaneTypes2Import.end()) { + if (myImportAllTypes || (tc.knows((*i).type) && !tc.getShallBeDiscarded((*i).type))) { laneMap[(*i).id] = sumoLane++; } } + rightLaneNumber = sumoLane; sumoLane = 0; const std::vector& dirLanesL = lanesByDir.find(OPENDRIVE_TAG_LEFT)->second; for (std::vector::const_iterator i = dirLanesL.begin(); i != dirLanesL.end(); ++i) { - if (myImportAllTypes || myLaneTypes2Import.find((*i).type) != myLaneTypes2Import.end()) { + if (myImportAllTypes || (tc.knows((*i).type) && !tc.getShallBeDiscarded((*i).type))) { laneMap[(*i).id] = sumoLane++; } } + leftLaneNumber = sumoLane; } @@ -966,34 +1086,106 @@ } if (from != UNSET_CONNECTION && to != UNSET_CONNECTION) { if (ret.find(from) != ret.end()) { -// WRITE_WARNING("double connection"); +// WRITE_WARNING("double connection"); } if (dir == OPENDRIVE_TAG_LEFT) { std::swap(from, to); } ret[from] = to; } else { -// WRITE_WARNING("missing connection"); +// WRITE_WARNING("missing connection"); } } return ret; } +NIImporter_OpenDrive::OpenDriveLaneSection +NIImporter_OpenDrive::OpenDriveLaneSection::buildLaneSection(SUMOReal startPos) { + OpenDriveLaneSection ret(*this); + ret.s += startPos; + for (unsigned int k = 0; k != ret.lanesByDir[OPENDRIVE_TAG_RIGHT].size(); ++k) { + OpenDriveLane& l = ret.lanesByDir[OPENDRIVE_TAG_RIGHT][k]; + l.speed = 0; + std::vector >::const_iterator i = std::find_if(l.speeds.begin(), l.speeds.end(), same_position_finder(startPos)); + if (i != l.speeds.end()) { + l.speed = (*i).second; + } + } + for (unsigned int k = 0; k != ret.lanesByDir[OPENDRIVE_TAG_LEFT].size(); ++k) { + OpenDriveLane& l = ret.lanesByDir[OPENDRIVE_TAG_LEFT][k]; + std::vector >::const_iterator i = std::find_if(l.speeds.begin(), l.speeds.end(), same_position_finder(startPos)); + l.speed = 0; + if (i != l.speeds.end()) { + l.speed = (*i).second; + } + } + return ret; +} -// --------------------------------------------------------------------------- -// edge -// --------------------------------------------------------------------------- -unsigned int -NIImporter_OpenDrive::OpenDriveEdge::getMaxLaneNumber(OpenDriveXMLTag dir) const { - unsigned int maxLaneNum = 0; - for (std::vector::const_iterator i = laneSections.begin(); i != laneSections.end(); ++i) { - maxLaneNum = MAX2(maxLaneNum, (*i).getLaneNumber(dir)); + +bool +NIImporter_OpenDrive::OpenDriveLaneSection::buildSpeedChanges(const NBTypeCont& tc, std::vector& newSections) { + std::set speedChangePositions; + // collect speed change positions and apply initial speed to the begin + for (std::vector::iterator k = lanesByDir[OPENDRIVE_TAG_RIGHT].begin(); k != lanesByDir[OPENDRIVE_TAG_RIGHT].end(); ++k) { + for (std::vector >::const_iterator l = (*k).speeds.begin(); l != (*k).speeds.end(); ++l) { + speedChangePositions.insert((*l).first); + if ((*l).first == 0) { + (*k).speed = (*l).second; + } + } + } + for (std::vector::iterator k = lanesByDir[OPENDRIVE_TAG_LEFT].begin(); k != lanesByDir[OPENDRIVE_TAG_LEFT].end(); ++k) { + for (std::vector >::const_iterator l = (*k).speeds.begin(); l != (*k).speeds.end(); ++l) { + speedChangePositions.insert((*l).first); + if ((*l).first == 0) { + (*k).speed = (*l).second; + } + } + } + // do nothing if there is none + if (speedChangePositions.size() == 0) { + return false; } - return maxLaneNum; + if (*speedChangePositions.begin() > 0) { + speedChangePositions.insert(0); + } + // + for (std::set::iterator i = speedChangePositions.begin(); i != speedChangePositions.end(); ++i) { + if (i == speedChangePositions.begin()) { + newSections.push_back(*this); + } else { + newSections.push_back(buildLaneSection(*i)); + } + } + // propagate speeds + for (int i = 0; i != (int)newSections.size(); ++i) { + OpenDriveLaneSection& ls = newSections[i]; + std::map >& lanesByDir = ls.lanesByDir; + for (std::map >::iterator k = lanesByDir.begin(); k != lanesByDir.end(); ++k) { + std::vector& lanes = (*k).second; + for (int j = 0; j != (int)lanes.size(); ++j) { + OpenDriveLane& l = lanes[j]; + if (l.speed != 0) { + continue; + } + if (i > 0) { + l.speed = newSections[i - 1].lanesByDir[(*k).first][j].speed; + } else { + tc.getSpeed(l.type); + } + } + } + } + return true; } + +// --------------------------------------------------------------------------- +// edge +// --------------------------------------------------------------------------- int NIImporter_OpenDrive::OpenDriveEdge::getPriority(OpenDriveXMLTag dir) const { int prio = 1; @@ -1005,10 +1197,10 @@ if ((*i).type == "205") { tmp = 0; } - if (tmp != 1 && dir == OPENDRIVE_TAG_RIGHT && (*i).orientation < 0) { + if (tmp != 1 && dir == OPENDRIVE_TAG_RIGHT && (*i).orientation > 0) { prio = tmp; } - if (tmp != 1 && dir == OPENDRIVE_TAG_LEFT && (*i).orientation > 0) { + if (tmp != 1 && dir == OPENDRIVE_TAG_LEFT && (*i).orientation < 0) { prio = tmp; } @@ -1021,9 +1213,9 @@ // --------------------------------------------------------------------------- // loader methods // --------------------------------------------------------------------------- -NIImporter_OpenDrive::NIImporter_OpenDrive(std::map& edges) +NIImporter_OpenDrive::NIImporter_OpenDrive(const NBTypeCont& tc, std::map& edges) : GenericSAXHandler(openDriveTags, OPENDRIVE_TAG_NOTHING, openDriveAttrs, OPENDRIVE_ATTR_NOTHING, "opendrive"), - myCurrentEdge("", "", -1), myEdges(edges) { + myTypeContainer(tc), myCurrentEdge("", "", -1), myEdges(edges) { } @@ -1146,10 +1338,11 @@ case OPENDRIVE_TAG_SIGNAL: { int id = attrs.get(OPENDRIVE_ATTR_ID, myCurrentEdge.id.c_str(), ok); std::string type = attrs.get(OPENDRIVE_ATTR_TYPE, myCurrentEdge.id.c_str(), ok); + std::string name = attrs.getOpt(OPENDRIVE_ATTR_NAME, myCurrentEdge.id.c_str(), ok, "", false); int orientation = attrs.get(OPENDRIVE_ATTR_ORIENTATION, myCurrentEdge.id.c_str(), ok) == "-" ? -1 : 1; SUMOReal s = attrs.get(OPENDRIVE_ATTR_S, myCurrentEdge.id.c_str(), ok); bool dynamic = attrs.get(OPENDRIVE_ATTR_DYNAMIC, myCurrentEdge.id.c_str(), ok) == "no" ? false : true; - myCurrentEdge.signals.push_back(OpenDriveSignal(id, type, orientation, dynamic, s)); + myCurrentEdge.signals.push_back(OpenDriveSignal(id, type, name, orientation, dynamic, s)); } break; case OPENDRIVE_TAG_JUNCTION: @@ -1195,7 +1388,8 @@ case OPENDRIVE_TAG_SPEED: { if (myElementStack.size() >= 2 && myElementStack[myElementStack.size() - 1] == OPENDRIVE_TAG_LANE) { SUMOReal speed = attrs.get(OPENDRIVE_ATTR_MAX, myCurrentEdge.id.c_str(), ok); - myCurrentEdge.laneSections.back().lanesByDir[myCurrentLaneDirection].back().speed = speed; + SUMOReal pos = attrs.get(OPENDRIVE_ATTR_SOFFSET, myCurrentEdge.id.c_str(), ok); + myCurrentEdge.laneSections.back().lanesByDir[myCurrentLaneDirection].back().speeds.push_back(std::make_pair(pos, speed)); } } break; @@ -1231,6 +1425,10 @@ } } break; + case OPENDRIVE_TAG_LANESECTION: { + myCurrentEdge.laneSections.back().buildLaneMapping(myTypeContainer); + } + break; default: break; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_OpenDrive.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_OpenDrive.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_OpenDrive.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_OpenDrive.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 14.04.2008 -/// @version $Id: NIImporter_OpenDrive.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_OpenDrive.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in openDrive format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -146,7 +146,9 @@ OPENDRIVE_ATTR_CONNECTINGROAD, OPENDRIVE_ATTR_FROM, OPENDRIVE_ATTR_TO, - OPENDRIVE_ATTR_MAX + OPENDRIVE_ATTR_MAX, + OPENDRIVE_ATTR_SOFFSET, + OPENDRIVE_ATTR_NAME }; @@ -247,17 +249,17 @@ : id(idArg), level(levelArg), type(typeArg), successor(UNSET_CONNECTION), predecessor(UNSET_CONNECTION), speed(0), width(0) { } - int id; - std::string level; - std::string type; - int successor; - int predecessor; - SUMOReal speed; - SUMOReal width; ///< @todo: this is the maximum width only + int id; //!< The lane's id + std::string level; //!< The lane's level (not used) + std::string type; //!< The lane's type + int successor; //!< The lane's successor lane + int predecessor; //!< The lane's predecessor lane + std::vector > speeds; //!< List of positions/speeds of speed changes + SUMOReal speed; //!< The lane's speed (set in post-processing) + SUMOReal width; //!< The lane's width; @todo: this is the maximum width only }; - /** * @struct OpenDriveLaneSection * @brief Representation of a lane section @@ -269,23 +271,26 @@ OpenDriveLaneSection(SUMOReal sArg); - /** @brief Returns the number of lanes for the given direction - * @return The named direction's lane number - */ - unsigned int getLaneNumber(OpenDriveXMLTag dir) const; - - /** @brief Build the mapping from OpenDrive to SUMO lanes * * Not all lanes are converted to SUMO-lanes; the mapping includes only those * which are included in the SUMO network. + * @param[in] tc The type container needed to determine whether a lane shall be imported by using the lane's type */ - void buildLaneMapping(); + void buildLaneMapping(const NBTypeCont& tc); + /** @brief Returns the links from the previous to this lane section + * @param[in] dir The OpenDrive-direction of drive + * @param[in] pre The previous lane section + * @return which lane is approached from which lane of the given previous lane section + */ std::map getInnerConnections(OpenDriveXMLTag dir, const OpenDriveLaneSection& prev); + bool buildSpeedChanges(const NBTypeCont& tc, std::vector& newSections); + OpenDriveLaneSection buildLaneSection(SUMOReal startPos); + /// @brief The starting offset of this lane section SUMOReal s; /// @brief A mapping from OpenDrive to SUMO-index (the first is signed, the second unsigned) @@ -294,6 +299,8 @@ std::map > lanesByDir; /// @brief The id (generic, without the optionally leading '-') of the edge generated for this section std::string sumoID; + /// @brief The number of lanes on the right and on the left side, respectively + unsigned int rightLaneNumber, leftLaneNumber; }; @@ -306,15 +313,17 @@ /** @brief Constructor * @param[in] idArg The OpenDrive id of the signal * @param[in] typeArg The type of the signal + * @param[in] nameArg The type of the signal * @param[in] orientationArg The direction the signal belongs to * @param[in] dynamicArg Whether the signal is dynamic * @param[in] sArg The offset from the start, counted from the begin */ - OpenDriveSignal(int idArg, const std::string typeArg, int orientationArg, bool dynamicArg, SUMOReal sArg) - : id(idArg), type(typeArg), orientation(orientationArg), dynamic(dynamicArg), s(sArg) { } + OpenDriveSignal(int idArg, const std::string typeArg, const std::string nameArg, int orientationArg, bool dynamicArg, SUMOReal sArg) + : id(idArg), type(typeArg), name(nameArg), orientation(orientationArg), dynamic(dynamicArg), s(sArg) { } int id; std::string type; + std::string name; int orientation; bool dynamic; SUMOReal s; @@ -349,9 +358,16 @@ isInner = junction != "" && junction != "-1"; } - unsigned int getMaxLaneNumber(OpenDriveXMLTag dir) const; + + /** @brief Returns the edge's priority, regarding the direction + * + * The priority is determined by evaluating the signs located at the road + * @param[in] dir The direction which priority shall be returned + * @return The priority of the given direction + */ int getPriority(OpenDriveXMLTag dir) const; + /// @brief The id of the edge std::string id; /// @brief The id of the junction the edge belongs to @@ -370,12 +386,43 @@ }; + /** @brief A class for sorting lane sections by their s-value */ + class sections_by_s_sorter { + public: + /// @brief Constructor + explicit sections_by_s_sorter() { } + + /// @brief Sorting function; compares OpenDriveLaneSection::s + int operator()(const OpenDriveLaneSection& ls1, const OpenDriveLaneSection& ls2) { + return ls1.s < ls2.s; + } + }; + + /* @brief A class for search in position/speed tuple vectors for the given position */ + class same_position_finder { + public: + /** @brief constructor */ + explicit same_position_finder(SUMOReal pos) : myPosition(pos) { } + + /** @brief the comparing function */ + bool operator()(const std::pair& ps) { + return ps.first == myPosition; + } + + private: + same_position_finder& operator=(const same_position_finder&); // just to avoid a compiler warning + private: + /// @brief The position to search for + SUMOReal myPosition; + + }; protected: /** @brief Constructor - * @param[in] nc The node control to fill + * @param[in] tc The type container used to determine whether a lane shall kept + * @param[in] nc The edge map to fill */ - NIImporter_OpenDrive(std::map& edges); + NIImporter_OpenDrive(const NBTypeCont& tc, std::map& edges); /// @brief Destructor @@ -396,8 +443,7 @@ * @exception ProcessError If something fails * @see GenericSAXHandler::myStartElement */ - void myStartElement(int element, - const SUMOSAXAttributes& attrs); + void myStartElement(int element, const SUMOSAXAttributes& attrs); /** @brief Called when a closing tag occurs @@ -419,6 +465,7 @@ static void buildConnectionsToOuter(const Connection& c, const std::map& innerEdges, std::vector& into); friend bool operator<(const Connection& c1, const Connection& c2); static std::string revertID(const std::string& id); + const NBTypeCont& myTypeContainer; OpenDriveEdge myCurrentEdge; std::map& myEdges; @@ -430,7 +477,6 @@ ContactPoint myCurrentContactPoint; bool myConnectionWasEmpty; - static std::set myLaneTypes2Import; static bool myImportAllTypes; static bool myImportWidths; @@ -461,7 +507,19 @@ static void calcPointOnCurve(SUMOReal* ad_x, SUMOReal* ad_y, SUMOReal ad_centerX, SUMOReal ad_centerY, SUMOReal ad_r, SUMOReal ad_length); + + /** @brief Computes a polygon representation of each edge's geometry + * @param[in] edges The edges which geometries shall be converted + */ static void computeShapes(std::map& edges); + + /** @brief Rechecks lane sections of the given edges + * + * + * @param[in] edges The edges which lane sections shall be reviewed + */ + static void revisitLaneSections(const NBTypeCont& tc, std::map& edges); + static void setNodeSecure(NBNodeCont& nc, OpenDriveEdge& e, const std::string& nodeID, NIImporter_OpenDrive::LinkType lt); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_OpenStreetMap.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_OpenStreetMap.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_OpenStreetMap.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_OpenStreetMap.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date Mon, 14.04.2008 -/// @version $Id: NIImporter_OpenStreetMap.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_OpenStreetMap.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Importer for networks stored in OpenStreetMap format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -137,8 +137,8 @@ // for highways NBTypeCont& tc = nb.getTypeCont(); SUMOReal const WIDTH = NBEdge::UNSPECIFIED_WIDTH; - tc.insert("highway.motorway", 3, (SUMOReal)(160. / 3.6), 13, WIDTH, SVC_UNKNOWN, true); - tc.insert("highway.motorway_link", 1, (SUMOReal)(80. / 3.6), 12, WIDTH, SVC_UNKNOWN, true); + tc.insert("highway.motorway", 2, (SUMOReal)(160. / 3.6), 13, WIDTH, SVC_IGNORING, true); + tc.insert("highway.motorway_link", 1, (SUMOReal)(80. / 3.6), 12, WIDTH, SVC_IGNORING, true); tc.insert("highway.trunk", 2, (SUMOReal)(100. / 3.6), 11, WIDTH); // !!! 130km/h? tc.insert("highway.trunk_link", 1, (SUMOReal)(80. / 3.6), 10, WIDTH); tc.insert("highway.primary", 2, (SUMOReal)(100. / 3.6), 9, WIDTH); @@ -152,40 +152,38 @@ tc.insert("highway.living_street", 1, (SUMOReal)(10. / 3.6), 3, WIDTH); tc.insert("highway.service", 1, (SUMOReal)(20. / 3.6), 2, WIDTH, SVC_DELIVERY); tc.insert("highway.track", 1, (SUMOReal)(20. / 3.6), 1, WIDTH); - tc.insert("highway.services", 1, (SUMOReal)(30. / 3.6), 1, WIDTH); + tc.insert("highway.services", 1, (SUMOReal)(30. / 3.6), 1, WIDTH); // service area i.e. on a motorway tc.insert("highway.unsurfaced", 1, (SUMOReal)(30. / 3.6), 1, WIDTH); // unofficial value, used outside germany - tc.insert("highway.footway", 1, (SUMOReal)(30. / 3.6), 1, WIDTH, SVC_PEDESTRIAN); - tc.insert("highway.pedestrian", 1, (SUMOReal)(30. / 3.6), 1, WIDTH, SVC_PEDESTRIAN); - tc.insert("highway.path", 1, (SUMOReal)(10. / 3.6), 1, WIDTH, SVC_PEDESTRIAN); + tc.insert("highway.pedestrian", 1, (SUMOReal)(30. / 3.6), 1, WIDTH, SVC_PEDESTRIAN, true); + tc.insert("highway.path", 1, (SUMOReal)(10. / 3.6), 1, WIDTH, SVC_PEDESTRIAN, true); tc.insert("highway.bridleway", 1, (SUMOReal)(10. / 3.6), 1, WIDTH, SVC_BICYCLE); // no horse stuff tc.insert("highway.cycleway", 1, (SUMOReal)(20. / 3.6), 1, WIDTH, SVC_BICYCLE); - tc.insert("highway.footway", 1, (SUMOReal)(10. / 3.6), 1, WIDTH, SVC_PEDESTRIAN); - tc.insert("highway.step", 1, (SUMOReal)(5. / 3.6), 1, WIDTH, SVC_PEDESTRIAN); // additional - tc.insert("highway.steps", 1, (SUMOReal)(5. / 3.6), 1, WIDTH, SVC_PEDESTRIAN); // :-) do not run too fast - tc.insert("highway.stairs", 1, (SUMOReal)(5. / 3.6), 1, WIDTH, SVC_PEDESTRIAN); // additional + tc.insert("highway.footway", 1, (SUMOReal)(10. / 3.6), 1, WIDTH, SVC_PEDESTRIAN, true); + tc.insert("highway.step", 1, (SUMOReal)(5. / 3.6), 1, WIDTH, SVC_PEDESTRIAN, true); // additional + tc.insert("highway.steps", 1, (SUMOReal)(5. / 3.6), 1, WIDTH, SVC_PEDESTRIAN, true); // :-) do not run too fast + tc.insert("highway.stairs", 1, (SUMOReal)(5. / 3.6), 1, WIDTH, SVC_PEDESTRIAN, true); // additional tc.insert("highway.bus_guideway", 1, (SUMOReal)(30. / 3.6), 1, WIDTH, SVC_BUS); tc.insert("highway.raceway", 2, (SUMOReal)(300. / 3.6), 14, WIDTH, SVC_VIP); - tc.insert("highway.ford", 1, (SUMOReal)(10. / 3.6), 1, WIDTH, SVC_PUBLIC_ARMY); + tc.insert("highway.ford", 1, (SUMOReal)(10. / 3.6), 1, WIDTH, SVC_ARMY); // for railways - const bool oneWay = OptionsCont::getOptions().getBool("osm.railway.oneway-default"); - tc.insert("railway.rail", 1, (SUMOReal)(300. / 3.6), 15, WIDTH, SVC_RAIL_FAST, oneWay); - tc.insert("railway.tram", 1, (SUMOReal)(100. / 3.6), 15, WIDTH, SVC_CITYRAIL, oneWay); - tc.insert("railway.light_rail", 1, (SUMOReal)(100. / 3.6), 15, WIDTH, SVC_LIGHTRAIL, oneWay); - tc.insert("railway.subway", 1, (SUMOReal)(100. / 3.6), 15, WIDTH, SVC_CITYRAIL, oneWay); - tc.insert("railway.preserved", 1, (SUMOReal)(100. / 3.6), 15, WIDTH, SVC_LIGHTRAIL, oneWay); - tc.insert("railway.monorail", 1, (SUMOReal)(300. / 3.6), 15, WIDTH, SVC_LIGHTRAIL, oneWay); // rail stuff has to be discussed + const bool oneWay = oc.getBool("osm.railway.oneway-default"); + tc.insert("railway.rail", 1, (SUMOReal)(300. / 3.6), 15, WIDTH, SVC_RAIL, oneWay); + tc.insert("railway.tram", 1, (SUMOReal)(100. / 3.6), 15, WIDTH, SVC_TRAM, oneWay); + tc.insert("railway.light_rail", 1, (SUMOReal)(100. / 3.6), 15, WIDTH, SVC_RAIL_URBAN, oneWay); // might also correspond to higher standard trams + tc.insert("railway.subway", 1, (SUMOReal)(100. / 3.6), 15, WIDTH, SVC_RAIL_URBAN, oneWay); + tc.insert("railway.preserved", 1, (SUMOReal)(100. / 3.6), 15, WIDTH, SVC_RAIL, oneWay); /* Parse file(s) * Each file is parsed twice: first for nodes, second for edges. */ std::vector files = oc.getStringVector("osm-files"); // load nodes, first - NodesHandler nodesHandler(myOSMNodes, myUniqueNodes); + NodesHandler nodesHandler(myOSMNodes, myUniqueNodes, oc.getBool("osm.elevation")); for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { // nodes - if (!FileHelpers::exists(*file)) { + if (!FileHelpers::isReadable(*file)) { WRITE_ERROR("Could not open osm-file '" + *file + "'."); return; } @@ -207,7 +205,7 @@ } /* Remove duplicate edges with the same shape and attributes */ - if (!OptionsCont::getOptions().getBool("osm.skip-duplicates-check")) { + if (!oc.getBool("osm.skip-duplicates-check")) { PROGRESS_BEGIN_MESSAGE("Removing duplicate edges"); if (myEdges.size() > 1) { std::set dupsFinder; @@ -282,6 +280,7 @@ } insertEdge(e, running, currentFrom, last, passed, nb); } + // load relations (after edges are built since we want to apply // turn-restrictions directly to NBEdges) RelationHandler relationHandler(myOSMNodes, myEdges); @@ -300,7 +299,7 @@ NBNode* node = nc.retrieve(toString(id)); if (node == 0) { NIOSMNode* n = myOSMNodes.find(id)->second; - Position pos(n->lon, n->lat); + Position pos(n->lon, n->lat, n->ele); if (!NBNetBuilder::transformCoordinates(pos, true)) { WRITE_ERROR("Unable to project coordinates for node " + toString(id) + "."); return 0; @@ -361,59 +360,85 @@ // convert the shape PositionVector shape; + shape.push_back(from->getPosition()); for (std::vector::const_iterator i = passed.begin(); i != passed.end(); ++i) { NIOSMNode* n = myOSMNodes.find(*i)->second; - Position pos(n->lon, n->lat); + Position pos(n->lon, n->lat, n->ele); if (!NBNetBuilder::transformCoordinates(pos, true)) { WRITE_ERROR("Unable to project coordinates for edge " + id + "."); } shape.push_back_noDoublePos(pos); } + shape.push_back_noDoublePos(to->getPosition()); std::string type = e->myHighWayType; if (!tc.knows(type)) { - if (type.find(compoundTypeSeparator) != std::string::npos) { - // this edge has a combination type which does not yet exist in the TypeContainer + if (myUnusableTypes.count(type) > 0) { + return newIndex; + } else if (myKnownCompoundTypes.count(type) > 0) { + type = myKnownCompoundTypes[type]; + } else { + // this edge has a type which does not yet exist in the TypeContainer StringTokenizer tok = StringTokenizer(type, compoundTypeSeparator); - std::set types; + std::vector types; while (tok.hasNext()) { std::string t = tok.next(); if (tc.knows(t)) { - types.insert(t); - } else { - WRITE_WARNING("Discarding unknown compound \"" + t + "\" for edge " + id + " with type \"" + type + "\"."); + if (std::find(types.begin(), types.end(), t) == types.end()) { + types.push_back(t); + } + } else if (tok.size() > 1) { + WRITE_WARNING("Discarding unknown compound \"" + t + "\" in type \"" + type + "\" (first occurence for edge \"" + id + "\")."); } } - switch (types.size()) { - case 0: - WRITE_WARNING("Discarding edge " + id + " with type unknown compound type \"" + type + "\"."); - return newIndex; - break; - case 1: { - type = *(types.begin()); - break; - } - default: + if (types.size() == 0) { + WRITE_WARNING("Discarding unusable type \"" + type + "\" (first occurence for edge \"" + id + "\")."); + myUnusableTypes.insert(type); + return newIndex; + } else { + const std::string newType = joinToString(types, "|"); + if (tc.knows(newType)) { + myKnownCompoundTypes[type] = newType; + type = newType; + } else if (myKnownCompoundTypes.count(newType) > 0) { + type = myKnownCompoundTypes[newType]; + } else { // build a new type by merging all values int numLanes = 0; SUMOReal maxSpeed = 0; int prio = 0; SUMOReal width = NBEdge::UNSPECIFIED_WIDTH; + SUMOReal sidewalkWidth = NBEdge::UNSPECIFIED_WIDTH; bool defaultIsOneWay = false; - for (std::set::iterator it = types.begin(); it != types.end(); it++) { - numLanes = MAX2(numLanes, tc.getNumLanes(*it)); - maxSpeed = MAX2(maxSpeed, tc.getSpeed(*it)); - prio = MAX2(prio, tc.getPriority(*it)); - defaultIsOneWay &= tc.getIsOneWay(*it); + SVCPermissions permissions = 0; + bool discard = true; + for (std::vector::iterator it = types.begin(); it != types.end(); it++) { + if (!tc.getShallBeDiscarded(*it)) { + numLanes = MAX2(numLanes, tc.getNumLanes(*it)); + maxSpeed = MAX2(maxSpeed, tc.getSpeed(*it)); + prio = MAX2(prio, tc.getPriority(*it)); + defaultIsOneWay &= tc.getIsOneWay(*it); + permissions |= tc.getPermissions(*it); + width = MAX2(width, tc.getWidth(*it)); + sidewalkWidth = MAX2(sidewalkWidth, tc.getSidewalkWidth(*it)); + discard = false; + } + } + if (width != NBEdge::UNSPECIFIED_WIDTH) { + width = MAX2(width, SUMO_const_laneWidth); } - WRITE_MESSAGE("Adding new compound type \"" + type + "\" for edge " + id + "."); - // @todo use the propper bitsets instead of SVC_UNKNOWN (see #675) - tc.insert(type, numLanes, maxSpeed, prio, width, SVC_UNKNOWN, defaultIsOneWay); + if (discard) { + WRITE_WARNING("Discarding compound type \"" + newType + "\" (first occurence for edge \"" + id + "\")."); + myUnusableTypes.insert(newType); + return newIndex; + } else { + WRITE_MESSAGE("Adding new type \"" + type + "\" (first occurence for edge \"" + id + "\")."); + tc.insert(newType, numLanes, maxSpeed, prio, permissions, width, defaultIsOneWay, sidewalkWidth); + myKnownCompoundTypes[type] = newType; + type = newType; + } + } } - } else { - // we do not know the type -> something else, ignore - //WRITE_WARNING("Discarding edge " + id + " with unknown type \"" + type + "\"."); - return newIndex; } } @@ -424,6 +449,7 @@ SUMOReal speed = tc.getSpeed(type); bool defaultsToOneWay = tc.getIsOneWay(type); SVCPermissions permissions = tc.getPermissions(type); + const bool addSidewalk = (tc.getSidewalkWidth(type) != NBEdge::UNSPECIFIED_WIDTH); // check directions bool addForward = true; bool addBackward = true; @@ -475,8 +501,11 @@ if (addForward) { assert(numLanesForward > 0); NBEdge* nbe = new NBEdge(StringUtils::escapeXML(id), from, to, type, speed, numLanesForward, tc.getPriority(type), - tc.getWidth(type), NBEdge::UNSPECIFIED_OFFSET, shape, StringUtils::escapeXML(e->streetName), lsf); + tc.getWidth(type), NBEdge::UNSPECIFIED_OFFSET, shape, StringUtils::escapeXML(e->streetName), lsf, true); nbe->setPermissions(permissions); + if (addSidewalk) { + nbe->addSidewalk(tc.getSidewalkWidth(type)); + } if (!ec.insert(nbe)) { delete nbe; throw ProcessError("Could not add edge '" + id + "'."); @@ -486,8 +515,11 @@ if (addBackward) { assert(numLanesBackward > 0); NBEdge* nbe = new NBEdge(StringUtils::escapeXML(id), to, from, type, speed, numLanesBackward, tc.getPriority(type), - tc.getWidth(type), NBEdge::UNSPECIFIED_OFFSET, shape.reverse(), StringUtils::escapeXML(e->streetName), lsf); + tc.getWidth(type), NBEdge::UNSPECIFIED_OFFSET, shape.reverse(), StringUtils::escapeXML(e->streetName), lsf, true); nbe->setPermissions(permissions); + if (addSidewalk) { + nbe->addSidewalk(tc.getSidewalkWidth(type)); + } if (!ec.insert(nbe)) { delete nbe; throw ProcessError("Could not add edge " + id + "'."); @@ -503,14 +535,16 @@ // --------------------------------------------------------------------------- NIImporter_OpenStreetMap::NodesHandler::NodesHandler( std::map& toFill, - std::set& uniqueNodes) : + std::set& uniqueNodes, + bool importElevation) : SUMOSAXHandler("osm - file"), myToFill(toFill), myLastNodeID(-1), myIsInValidNodeTag(false), myHierarchyLevel(0), - myUniqueNodes(uniqueNodes) { -} + myUniqueNodes(uniqueNodes), + myImportElevation(importElevation) +{ } NIImporter_OpenStreetMap::NodesHandler::~NodesHandler() {} @@ -578,13 +612,20 @@ return; } bool ok = true; - std::string key = attrs.get(SUMO_ATTR_K, toString(myLastNodeID).c_str(), ok); - std::string value = attrs.get(SUMO_ATTR_V, toString(myLastNodeID).c_str(), ok, false); - if (!ok) { - return; - } - if (key == "highway" && value.find("traffic_signal") != std::string::npos) { - myToFill[myLastNodeID]->tlsControlled = true; + std::string key = attrs.get(SUMO_ATTR_K, toString(myLastNodeID).c_str(), ok, false); + // we check whether the key is relevant (and we really need to transcode the value) to avoid hitting #1636 + if (key == "highway" || key == "ele") { + std::string value = attrs.get(SUMO_ATTR_V, toString(myLastNodeID).c_str(), ok, false); + if (key == "highway" && value.find("traffic_signal") != std::string::npos) { + myToFill[myLastNodeID]->tlsControlled = true; + } else if (myImportElevation && key == "ele") { + try { + myToFill[myLastNodeID]->ele = TplConvert::_2SUMOReal(value.c_str()); + } catch (...) { + WRITE_WARNING("Value of key '" + key + "' is not numeric ('" + value + "') in node '" + + toString(myLastNodeID) + "'."); + } + } } } } @@ -667,18 +708,21 @@ return; } bool ok = true; - std::string key = attrs.get(SUMO_ATTR_K, toString(myCurrentEdge->id).c_str(), ok); - std::string value = attrs.get(SUMO_ATTR_V, toString(myCurrentEdge->id).c_str(), ok, false); - if (!ok) { + std::string key = attrs.get(SUMO_ATTR_K, toString(myCurrentEdge->id).c_str(), ok, false); + // we check whether the key is relevant (and we really need to transcode the value) to avoid hitting #1636 + if (!StringUtils::endsWith(key, "way") && !StringUtils::startsWith(key, "lanes") && key != "maxspeed" && key != "junction" && key != "name" && key != "tracks") { return; } - if (key == "highway" || key == "railway") { + std::string value = attrs.get(SUMO_ATTR_V, toString(myCurrentEdge->id).c_str(), ok, false); + + if (key == "highway" || key == "railway" || key == "waterway") { + const std::string singleTypeID = key + "." + value; if (myCurrentEdge->myHighWayType != "") { // osm-ways may be used by more than one mode (eg railway.tram + highway.residential. this is relevant for multimodal traffic) // we create a new type for this kind of situation which must then be resolved in insertEdge() - myCurrentEdge->myHighWayType = myCurrentEdge->myHighWayType + compoundTypeSeparator + key + "." + value; + myCurrentEdge->myHighWayType = myCurrentEdge->myHighWayType + compoundTypeSeparator + singleTypeID; } else { - myCurrentEdge->myHighWayType = key + "." + value; + myCurrentEdge->myHighWayType = singleTypeID; } myCurrentEdge->myCurrentIsRoad = true; } else if (key == "lanes") { @@ -702,11 +746,14 @@ toString(myCurrentEdge->id) + "'."); } } + } catch (EmptyData&) { + WRITE_WARNING("Value of key '" + key + "' is not numeric ('" + value + "') in edge '" + + toString(myCurrentEdge->id) + "'."); } } else if (key == "lanes:forward") { try { myCurrentEdge->myNoLanesForward = TplConvert::_2int(value.c_str()); - } catch (NumberFormatException&) { + } catch (...) { WRITE_WARNING("Value of key '" + key + "' is not numeric ('" + value + "') in edge '" + toString(myCurrentEdge->id) + "'."); } @@ -714,7 +761,7 @@ try { // denote backwards count with a negative sign myCurrentEdge->myNoLanesForward = -TplConvert::_2int(value.c_str()); - } catch (NumberFormatException&) { + } catch (...) { WRITE_WARNING("Value of key '" + key + "' is not numeric ('" + value + "') in edge '" + toString(myCurrentEdge->id) + "'."); } @@ -731,7 +778,7 @@ } try { myCurrentEdge->myMaxSpeed = TplConvert::_2SUMOReal(value.c_str()) * conversion; - } catch (NumberFormatException&) { + } catch (...) { WRITE_WARNING("Value of key '" + key + "' is not numeric ('" + value + "') in edge '" + toString(myCurrentEdge->id) + "'."); } @@ -745,10 +792,15 @@ } else if (key == "name") { myCurrentEdge->streetName = value; } else if (key == "tracks") { - if (TplConvert::_2int(value.c_str()) > 1) { - myCurrentEdge->myIsOneWay = "false"; - } else { - myCurrentEdge->myIsOneWay = "true"; + try { + if (TplConvert::_2int(value.c_str()) > 1) { + myCurrentEdge->myIsOneWay = "false"; + } else { + myCurrentEdge->myIsOneWay = "true"; + } + } catch (...) { + WRITE_WARNING("Value of key '" + key + "' is not numeric ('" + value + "') in edge '" + + toString(myCurrentEdge->id) + "'."); } } } @@ -839,24 +891,26 @@ // parse values if (element == SUMO_TAG_TAG) { bool ok = true; - std::string key = attrs.get(SUMO_ATTR_K, toString(myCurrentRelation).c_str(), ok); - std::string value = attrs.get(SUMO_ATTR_V, toString(myCurrentRelation).c_str(), ok, false); - if (!ok) { - return; - } - if (key == "type" && value == "restriction") { - myIsRestriction = true; - return; - } - if (key == "restriction") { - if (value.substr(0, 5) == "only_") { - myRestrictionType = RESTRICTION_ONLY; - } else if (value.substr(0, 3) == "no_") { - myRestrictionType = RESTRICTION_NO; - } else { - WRITE_WARNING("Found unknown restriction type '" + value + "' in relation '" + toString(myCurrentRelation) + "'"); + std::string key = attrs.get(SUMO_ATTR_K, toString(myCurrentRelation).c_str(), ok, false); + // we check whether the key is relevant (and we really need to transcode the value) to avoid hitting #1636 + if (key == "type" || key == "restriction") { + std::string value = attrs.get(SUMO_ATTR_V, toString(myCurrentRelation).c_str(), ok, false); + if (key == "type" && value == "restriction") { + myIsRestriction = true; + return; + } + if (key == "restriction") { + // @note: the 'right/left/straight' part is ignored since the information is + // redundantly encoded in the 'from', 'to' and 'via' members + if (value.substr(0, 5) == "only_") { + myRestrictionType = RESTRICTION_ONLY; + } else if (value.substr(0, 3) == "no_") { + myRestrictionType = RESTRICTION_NO; + } else { + WRITE_WARNING("Found unknown restriction type '" + value + "' in relation '" + toString(myCurrentRelation) + "'"); + } + return; } - return; } } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_OpenStreetMap.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_OpenStreetMap.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_OpenStreetMap.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_OpenStreetMap.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date Mon, 14.04.2008 -/// @version $Id: NIImporter_OpenStreetMap.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_OpenStreetMap.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in OpenStreetMap format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -81,18 +81,25 @@ */ struct NIOSMNode { NIOSMNode(SUMOLong _id, double _lon, double _lat) : - id(_id), lon(_lon), lat(_lat), tlsControlled(false), node(0) {} + id(_id), lon(_lon), lat(_lat), ele(0), tlsControlled(false), node(0) {} /// @brief The node's id - SUMOLong id; + const SUMOLong id; /// @brief The longitude the node is located at - double lon; + const SUMOReal lon; /// @brief The latitude the node is located at - double lat; + const SUMOReal lat; + /// @brief The elevation of this node + SUMOReal ele; /// @brief Whether this is a tls controlled junction bool tlsControlled; /// @brief the NBNode that was instantiated NBNode* node; + + private: + /// invalidated assignment operator + NIOSMNode& operator=(const NIOSMNode& s); + }; @@ -105,7 +112,7 @@ myCurrentIsRoad(false) {} /// @brief The edge's id - SUMOLong id; + const SUMOLong id; /// @brief The edge's street name std::string streetName; /// @brief number of lanes, or -1 if unknown @@ -122,6 +129,11 @@ std::vector myCurrentNodes; /// @brief Information whether this is a road bool myCurrentIsRoad; + + private: + /// invalidated assignment operator + Edge& operator=(const Edge& s); + }; @@ -160,6 +172,12 @@ /** @brief the map from OSM way ids to edge objects */ std::map myEdges; + /// @brief The compounds types that do not contain known types + std::set myUnusableTypes; + + /// @brief The compound types that have already been mapped to other known types + std::map myKnownCompoundTypes; + /** @brief Builds an NBNode * * If a node with the given id is already known, nothing is done. @@ -210,7 +228,8 @@ * @param[in] options The options to use */ NodesHandler(std::map& toFill, - std::set& uniqueNodes); + std::set& uniqueNodes, + bool importElevation); /// @brief Destructor @@ -258,6 +277,9 @@ /// @brief the set of unique nodes (used for duplicate detection/substitution) std::set& myUniqueNodes; + /// @brief whether elevation data should be imported + const bool myImportElevation; + private: /** @brief invalidated copy constructor */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_RobocupRescue.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_RobocupRescue.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_RobocupRescue.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_RobocupRescue.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 14.04.2008 -/// @version $Id: NIImporter_RobocupRescue.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_RobocupRescue.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in robocup rescue league format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -74,7 +74,7 @@ for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { // nodes std::string nodesName = (*file) + "/node.bin"; - if (!FileHelpers::exists(nodesName)) { + if (!FileHelpers::isReadable(nodesName)) { WRITE_ERROR("Could not open robocup-node-file '" + nodesName + "'."); return; } @@ -83,7 +83,7 @@ PROGRESS_DONE_MESSAGE(); // edges std::string edgesName = (*file) + "/road.bin"; - if (!FileHelpers::exists(edgesName)) { + if (!FileHelpers::isReadable(edgesName)) { WRITE_ERROR("Could not open robocup-road-file '" + edgesName + "'."); return; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_RobocupRescue.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_RobocupRescue.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_RobocupRescue.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_RobocupRescue.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 14.04.2008 -/// @version $Id: NIImporter_RobocupRescue.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_RobocupRescue.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in robocup rescue league format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_SUMO.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_SUMO.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_SUMO.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_SUMO.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 14.04.2008 -/// @version $Id: NIImporter_SUMO.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NIImporter_SUMO.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in SUMO format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -50,6 +50,7 @@ #include #include #include "NILoader.h" +#include "NIXMLEdgesHandler.h" #include "NIImporter_SUMO.h" #ifdef CHECK_MEMORY_LEAKS @@ -82,7 +83,6 @@ myCurrentLane(0), myCurrentTL(0), myLocation(0), - mySuspectKeepShape(false), myHaveSeenInternalEdge(false) {} @@ -108,20 +108,20 @@ // parse file(s) std::vector files = oc.getStringVector("sumo-net-file"); for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { - if (!FileHelpers::exists(*file)) { + if (!FileHelpers::isReadable(*file)) { WRITE_ERROR("Could not open sumo-net-file '" + *file + "'."); return; } setFileName(*file); PROGRESS_BEGIN_MESSAGE("Parsing sumo-net from '" + *file + "'"); - XMLSubSys::runParser(*this, *file); + XMLSubSys::runParser(*this, *file, true); PROGRESS_DONE_MESSAGE(); } // build edges for (std::map::const_iterator i = myEdges.begin(); i != myEdges.end(); ++i) { EdgeAttrs* ed = (*i).second; // skip internal edges - if (ed->func == EDGEFUNC_INTERNAL) { + if (ed->func == EDGEFUNC_INTERNAL || ed->func == EDGEFUNC_CROSSING || ed->func == EDGEFUNC_WALKINGAREA) { continue; } // get and check the nodes @@ -139,7 +139,6 @@ PositionVector geom; if (ed->shape.size() > 0) { geom = ed->shape; - mySuspectKeepShape = false; // no problem with reconstruction if edge shape is given explicit } else { // either the edge has default shape consisting only of the two node // positions or we have a legacy network @@ -188,7 +187,7 @@ true, c.mayDefinitelyPass); // maybe we have a tls-controlled connection - if (c.tlID != "") { + if (c.tlID != "" && myRailSignals.count(c.tlID) == 0) { const std::map& programs = myTLLCont.getPrograms(c.tlID); if (programs.size() > 0) { std::map::const_iterator it; @@ -209,15 +208,15 @@ nbe->setPermissions(parseVehicleClasses(lane->allow, lane->disallow), fromLaneIndex); // width, offset nbe->setLaneWidth(fromLaneIndex, lane->width); - nbe->setOffset(fromLaneIndex, lane->offset); + nbe->setEndOffset(fromLaneIndex, lane->endOffset); nbe->setSpeed(fromLaneIndex, lane->maxSpeed); } nbe->declareConnectionsAsLoaded(); if (!nbe->hasLaneSpecificWidth() && nbe->getLanes()[0].width != NBEdge::UNSPECIFIED_WIDTH) { nbe->setLaneWidth(-1, nbe->getLaneWidth(0)); } - if (!nbe->hasLaneSpecificOffset() && nbe->getOffset(0) != NBEdge::UNSPECIFIED_OFFSET) { - nbe->setOffset(-1, nbe->getOffset(0)); + if (!nbe->hasLaneSpecificEndOffset() && nbe->getEndOffset(0) != NBEdge::UNSPECIFIED_OFFSET) { + nbe->setEndOffset(-1, nbe->getEndOffset(0)); } } // insert loaded prohibitions @@ -235,11 +234,43 @@ if (!myHaveSeenInternalEdge && oc.isDefault("no-internal-links")) { oc.set("no-internal-links", "true"); } - // final warning - if (mySuspectKeepShape) { - WRITE_WARNING("The input network may have been built using option 'xml.keep-shape'.\n... Accuracy of junction positions cannot be guaranteed."); + if (!deprecatedVehicleClassesSeen.empty()) { + WRITE_WARNING("Deprecated vehicle class(es) '" + toString(deprecatedVehicleClassesSeen) + "' in input network."); + deprecatedVehicleClassesSeen.clear(); + } + // add loaded crossings + for (std::map >::const_iterator it = myPedestrianCrossings.begin(); it != myPedestrianCrossings.end(); ++it) { + NBNode* node = myNodeCont.retrieve((*it).first); + for (std::vector::const_iterator it_c = (*it).second.begin(); it_c != (*it).second.end(); ++it_c) { + const Crossing& crossing = (*it_c); + EdgeVector edges; + for (std::vector::const_iterator it_e = crossing.crossingEdges.begin(); it_e != crossing.crossingEdges.end(); ++it_e) { + NBEdge* edge = myNetBuilder.getEdgeCont().retrieve(*it_e); + // edge might have been removed due to options + if (edge != 0) { + edges.push_back(edge); + } + } + if (edges.size() > 0) { + node->addCrossing(edges, crossing.width, crossing.priority); + } + } + } + // add roundabouts + for (std::vector >::const_iterator it = myRoundabouts.begin(); it != myRoundabouts.end(); ++it) { + EdgeSet roundabout; + for (std::vector::const_iterator it_r = it->begin(); it_r != it->end(); ++it_r) { + NBEdge* edge = myNetBuilder.getEdgeCont().retrieve(*it_r); + if (edge == 0) { + if (!myNetBuilder.getEdgeCont().wasIgnored(*it_r)) { + WRITE_ERROR("Unknown edge '" + (*it_r) + "' in roundabout"); + } + } else { + roundabout.insert(edge); + } + } + myNetBuilder.getEdgeCont().addRoundabout(roundabout); } - } @@ -271,6 +302,9 @@ case SUMO_TAG_JUNCTION: addJunction(attrs); break; + case SUMO_TAG_REQUEST: + addRequest(attrs); + break; case SUMO_TAG_CONNECTION: addConnection(attrs); break; @@ -287,7 +321,7 @@ addProhibition(attrs); break; case SUMO_TAG_ROUNDABOUT: - myNetBuilder.haveSeenRoundabouts(); + addRoundabout(attrs); break; default: break; @@ -324,6 +358,19 @@ myCurrentTL = 0; } break; + case SUMO_TAG_JUNCTION: + // in a network without internal lanes, we do not need to check for crossings + if (myCurrentJunction.node != 0 && myCurrentJunction.intLanes.size() > 0) { + assert(myCurrentJunction.intLanes.size() == myCurrentJunction.response.size()); + std::vector& crossings = myPedestrianCrossings[myCurrentJunction.node->getID()]; + for (std::vector::iterator it = crossings.begin(); it != crossings.end(); ++it) { + for (int i = 0; i < (int)myCurrentJunction.intLanes.size(); ++i) { + if (myCurrentJunction.intLanes[i] == (*it).laneID) { + (*it).priority = myCurrentJunction.response[i].find("1") == std::string::npos; + } + } + } + } default: break; } @@ -343,7 +390,13 @@ myCurrentEdge->id = id; // get the function myCurrentEdge->func = attrs.getEdgeFunc(ok); - if (myCurrentEdge->func == EDGEFUNC_INTERNAL) { + if (myCurrentEdge->func == EDGEFUNC_CROSSING) { + // add the crossing crossing but don't do anything else + Crossing c; + SUMOSAXAttributes::parseStringVector(attrs.get(SUMO_ATTR_CROSSING_EDGES, 0, ok), c.crossingEdges); + myPedestrianCrossings[SUMOXMLDefinitions::getJunctionIDFromInternalEdge(id)].push_back(c); + return; + } else if (myCurrentEdge->func == EDGEFUNC_INTERNAL || myCurrentEdge->func == EDGEFUNC_WALKINGAREA) { return; // skip internal edges } // get the type @@ -383,8 +436,19 @@ WRITE_ERROR("Found lane '" + id + "' not within edge element"); return; } + if (attrs.getOpt(SUMO_ATTR_CUSTOMSHAPE, 0, ok, false)) { + const std::string nodeID = NBNode::getNodeIDFromInternalLane(id); + myCustomShapeMaps[nodeID][id] = attrs.get(SUMO_ATTR_SHAPE, id.c_str(), ok); + } myCurrentLane = new LaneAttrs; - if (myCurrentEdge->func == EDGEFUNC_INTERNAL) { + if (myCurrentEdge->func == EDGEFUNC_CROSSING) { + // save the width and the lane id of the crossing but don't do anything else + std::vector& crossings = myPedestrianCrossings[SUMOXMLDefinitions::getJunctionIDFromInternalEdge(myCurrentEdge->id)]; + assert(crossings.size() > 0); + crossings.back().laneID = id; + crossings.back().width = attrs.get(SUMO_ATTR_WIDTH, id.c_str(), ok); + return; + } else if (myCurrentEdge->func == EDGEFUNC_INTERNAL || myCurrentEdge->func == EDGEFUNC_WALKINGAREA) { myHaveSeenInternalEdge = true; return; // skip internal lanes } @@ -402,7 +466,7 @@ } myCurrentLane->disallow = attrs.getOpt(SUMO_ATTR_DISALLOW, id.c_str(), ok, ""); myCurrentLane->width = attrs.getOpt(SUMO_ATTR_WIDTH, id.c_str(), ok, (SUMOReal) NBEdge::UNSPECIFIED_WIDTH); - myCurrentLane->offset = attrs.getOpt(SUMO_ATTR_ENDOFFSET, id.c_str(), ok, (SUMOReal) NBEdge::UNSPECIFIED_OFFSET); + myCurrentLane->endOffset = attrs.getOpt(SUMO_ATTR_ENDOFFSET, id.c_str(), ok, (SUMOReal) NBEdge::UNSPECIFIED_OFFSET); myCurrentLane->shape = attrs.get(SUMO_ATTR_SHAPE, id.c_str(), ok); // lane coordinates are derived (via lane spread) do not include them in convex boundary NBNetBuilder::transformCoordinates(myCurrentLane->shape, false, myLocation); @@ -412,6 +476,9 @@ void NIImporter_SUMO::addJunction(const SUMOSAXAttributes& attrs) { // get the id, report an error if not given or empty... + myCurrentJunction.node = 0; + myCurrentJunction.intLanes.clear(); + myCurrentJunction.response.clear(); bool ok = true; std::string id = attrs.get(SUMO_ATTR_ID, 0, ok); if (!ok) { @@ -432,24 +499,40 @@ } Position pos = readPosition(attrs, id, ok); NBNetBuilder::transformCoordinates(pos, true, myLocation); - // the network may have non-default edge geometry. - // accurate reconstruction of legacy networks is not possible. We ought to warn about this - if (attrs.hasAttribute(SUMO_ATTR_SHAPE)) { - PositionVector shape = attrs.getOpt(SUMO_ATTR_SHAPE, id.c_str(), ok, PositionVector()); - if (shape.size() > 0) { - shape.push_back_noDoublePos(shape[0]); // need closed shape - if (!shape.around(pos) && shape.distance(pos) > 1) { // MAGIC_THRESHOLD - // WRITE_WARNING("Junction '" + id + "': distance between pos and shape is " + toString(shape.distance(pos))); - mySuspectKeepShape = true; - } - } - } NBNode* node = new NBNode(id, pos, type); if (!myNodeCont.insert(node)) { WRITE_ERROR("Problems on adding junction '" + id + "'."); delete node; return; } + myCurrentJunction.node = node; + SUMOSAXAttributes::parseStringVector(attrs.get(SUMO_ATTR_INTLANES, 0, ok, false), myCurrentJunction.intLanes); + // set optional radius + if (attrs.hasAttribute(SUMO_ATTR_RADIUS)) { + node->setRadius(attrs.get(SUMO_ATTR_RADIUS, id.c_str(), ok)); + } + // handle custom shape + if (attrs.getOpt(SUMO_ATTR_CUSTOMSHAPE, 0, ok, false)) { + node->setCustomShape(attrs.get(SUMO_ATTR_SHAPE, id.c_str(), ok)); + } + if (myCustomShapeMaps.count(id) > 0) { + NBNode::CustomShapeMap customShapes = myCustomShapeMaps[id]; + for (NBNode::CustomShapeMap::const_iterator it = customShapes.begin(); it != customShapes.end(); ++it) { + node->setCustomLaneShape(it->first, it->second); + } + } + if (type == NODETYPE_RAIL_SIGNAL) { + myRailSignals.insert(id); + } +} + + +void +NIImporter_SUMO::addRequest(const SUMOSAXAttributes& attrs) { + if (myCurrentJunction.node != 0) { + bool ok = true; + myCurrentJunction.response.push_back(attrs.get(SUMO_ATTR_RESPONSE, 0, ok)); + } } @@ -678,4 +761,16 @@ ok = false; } } + + +void +NIImporter_SUMO::addRoundabout(const SUMOSAXAttributes& attrs) { + if (attrs.hasAttribute(SUMO_ATTR_EDGES)) { + myRoundabouts.push_back(attrs.getStringVector(SUMO_ATTR_EDGES)); + } else { + WRITE_ERROR("Empty edges in roundabout."); + } +} + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_SUMO.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_SUMO.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_SUMO.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_SUMO.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 14.04.2008 -/// @version $Id: NIImporter_SUMO.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_SUMO.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in SUMO format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -147,6 +147,12 @@ void addJunction(const SUMOSAXAttributes& attrs); + /** @brief Parses a reques and saves selected attributes in myCurrentJunction + * @param[in] attrs The attributes to get the junction's values from + */ + void addRequest(const SUMOSAXAttributes& attrs); + + /** @brief Parses a connection and saves it * into the lane's definition stored in "myCurrentLane" * @param[in] attrs The attributes to get the connection from @@ -158,6 +164,11 @@ */ void addProhibition(const SUMOSAXAttributes& attrs); + /** @brief Parses a roundabout and stores it in myEdgeCont. + * @param[in] attrs The attributes to get the roundabouts values from + */ + void addRoundabout(const SUMOSAXAttributes& attrs); + //@} @@ -198,7 +209,7 @@ /// @brief The width of this lane SUMOReal width; /// @brief This lane's offset from the intersection - SUMOReal offset; + SUMOReal endOffset; }; @@ -245,6 +256,26 @@ std::string prohibitedTo; }; + /** @struct Crossing + * @brief Describes a pedestrian crossing + */ + struct Crossing { + std::string laneID; + std::vector crossingEdges; + SUMOReal width; + bool priority; + }; + + /** @struct JunctionAttrs + * @brief Describes the values found in a junction + */ + struct JunctionAttrs { + NBNode* node; + // @the list of internal lanes corresponding to each link + std::vector intLanes; + // @brief the complete response definition for all links + std::vector response; + }; /// @brief Loaded edge definitions std::map myEdges; @@ -264,6 +295,9 @@ /// @brief The currently parsed edge's definition (to add loaded lanes to) EdgeAttrs* myCurrentEdge; + /// @brief The currently parsed junction definition to help in reconstructing crossings + JunctionAttrs myCurrentJunction; + /// @brief The currently parsed lanes's definition (to add the shape to) LaneAttrs* myCurrentLane; @@ -273,12 +307,21 @@ /// @brief The coordinate transformation which was used to build the loaded network. GeoConvHelper* myLocation; - /// @brief whether we suspect a net that was built with xml.keep-shape - bool mySuspectKeepShape; + /// @brief The pedestrian crossings found in the network + std::map > myPedestrianCrossings; /// @brief whether the loaded network contains internal lanes bool myHaveSeenInternalEdge; + /// @brief loaded roundabout edges + std::vector > myRoundabouts; + + /// @brief customLaneShape (cannot be added to the NBNode when parsed since the node doesn't yet exist + std::map myCustomShapeMaps; + + /// @brief list of node id with rail signals (no NBTrafficLightDefinition exists) + std::set myRailSignals; + /** @brief Parses lane index from lane ID an retrieve lane from EdgeAttrs * @param[in] edge The EdgeAttrs* which should contain the lane * @param[in] lane_id The ID of the lane diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_VISUM.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_VISUM.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_VISUM.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_VISUM.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Fri, 19 Jul 2002 -/// @version $Id: NIImporter_VISUM.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_VISUM.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A VISUM network importer /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -998,14 +998,14 @@ } // !!! the next is probably a hack if (fromLane - fromLaneOffset < 0) { - fromLaneOffset = 0; + //fromLaneOffset = 0; } else { - fromLane = fromEdge->getNumLanes() - (fromLane - fromLaneOffset) - 1; + fromLane = (int)fromEdge->getNumLanes() - (fromLane - fromLaneOffset) - 1; } if (toLane - toLaneOffset < 0) { - toLaneOffset = 0; + //toLaneOffset = 0; } else { - toLane = toEdge->getNumLanes() - (toLane - toLaneOffset) - 1; + toLane = (int)toEdge->getNumLanes() - (toLane - toLaneOffset) - 1; } // if ((int) fromEdge->getNumLanes() <= fromLane) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_VISUM.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_VISUM.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIImporter_VISUM.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIImporter_VISUM.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Fri, 19 Jul 2002 -/// @version $Id: NIImporter_VISUM.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_VISUM.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A VISUM network importer /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NILoader.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NILoader.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NILoader.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NILoader.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NILoader.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NILoader.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Perfoms network import /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -64,10 +64,7 @@ #include "NILoader.h" #include #include - -#ifdef HAVE_INTERNAL -#include -#endif +#include #ifdef CHECK_MEMORY_LEAKS #include @@ -91,9 +88,7 @@ new NIXMLTypesHandler(myNetBuilder.getTypeCont()); loadXMLType(handler, oc.getStringVector("type-files"), "types"); // try to load height data so it is ready for use by other importers -#ifdef HAVE_INTERNAL - HeightMapper::loadIfSet(oc); -#endif + NBHeightMapper::loadIfSet(oc); // try to load using different methods NIImporter_SUMO::loadNetwork(oc, myNetBuilder); NIImporter_RobocupRescue::loadNetwork(oc, myNetBuilder); @@ -106,7 +101,8 @@ NIImporter_MATSim::loadNetwork(oc, myNetBuilder); NIImporter_ITSUMO::loadNetwork(oc, myNetBuilder); if (oc.getBool("tls.discard-loaded") || oc.getBool("tls.discard-simple")) { - myNetBuilder.getNodeCont().discardTrafficLights(myNetBuilder.getTLLogicCont(), oc.getBool("tls.discard-simple")); + myNetBuilder.getNodeCont().discardTrafficLights(myNetBuilder.getTLLogicCont(), oc.getBool("tls.discard-simple"), + oc.getBool("tls.guess-signals")); size_t removed = myNetBuilder.getTLLogicCont().getNumExtracted(); if (removed > 0) { WRITE_MESSAGE(" Removed " + toString(removed) + " traffic lights before loading plain-XML"); @@ -156,8 +152,11 @@ myNetBuilder.getTLLogicCont(), oc), oc.getStringVector("edge-files"), "edges"); + if (!deprecatedVehicleClassesSeen.empty()) { + WRITE_WARNING("Deprecated vehicle class(es) '" + toString(deprecatedVehicleClassesSeen) + "' in input edge files."); + } // load the connections - loadXMLType(new NIXMLConnectionsHandler(myNetBuilder.getEdgeCont()), + loadXMLType(new NIXMLConnectionsHandler(myNetBuilder.getEdgeCont(), myNetBuilder.getNodeCont(), myNetBuilder.getTLLogicCont()), oc.getStringVector("connection-files"), "connections"); // load traffic lights (needs to come last, references loaded edges and connections) loadXMLType(new NIXMLTrafficLightsHandler( @@ -174,7 +173,7 @@ // start the parsing try { for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { - if (!FileHelpers::exists(*file)) { + if (!FileHelpers::isReadable(*file)) { WRITE_ERROR("Could not open " + type + "-file '" + *file + "'."); exceptMsg = "Process Error"; continue; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NILoader.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NILoader.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NILoader.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NILoader.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NILoader.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NILoader.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Perfoms network import /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NINavTeqHelper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NINavTeqHelper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NINavTeqHelper.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NINavTeqHelper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Jul 2006 -/// @version $Id: NINavTeqHelper.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NINavTeqHelper.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Some parser methods shared around several formats containing NavTeq-Nets /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -113,7 +113,7 @@ classS = classS.substr(classS.length() - 10); // 0: allow all vehicle types if (classS[0] == '1') { - e.setPermissions(SVCFreeForAll); + e.setPermissions(SVCAll); return; } // we have some restrictions. disallow all and then add classes indiviually @@ -129,24 +129,25 @@ } // Emergency Vehicle -- becomes SVC_PUBLIC_EMERGENCY if (classS[3] == '1') { - e.allowVehicleClass(-1, SVC_PUBLIC_EMERGENCY); + e.allowVehicleClass(-1, SVC_EMERGENCY); } // Taxi -- becomes SVC_TAXI if (classS[4] == '1') { e.allowVehicleClass(-1, SVC_TAXI); } - // Public Bus -- becomes SVC_BUS|SVC_PUBLIC_TRANSPORT + // Public Bus -- becomes SVC_BUS|SVC_COACH if (classS[5] == '1') { - e.allowVehicleClass(-1, SVC_PUBLIC_TRANSPORT); e.allowVehicleClass(-1, SVC_BUS); + e.allowVehicleClass(-1, SVC_COACH); } // Delivery Truck -- becomes SVC_DELIVERY if (classS[6] == '1') { e.allowVehicleClass(-1, SVC_DELIVERY); } - // Transport Truck -- becomes SVC_TRANSPORT + // Transport Truck -- becomes SVC_TRUCK|SVC_TRAILER if (classS[7] == '1') { - e.allowVehicleClass(-1, SVC_TRANSPORT); + e.allowVehicleClass(-1, SVC_TRUCK); + e.allowVehicleClass(-1, SVC_TRAILER); } // Bicycle -- becomes SVC_BICYCLE if (classS[8] == '1') { @@ -165,7 +166,7 @@ classS = classS.substr(classS.length() - 12); // 0: allow all vehicle types if (classS[0] == '1') { - e.setPermissions(SVCFreeForAll); + e.setPermissions(SVCAll); return; } // we have some restrictions. disallow all and then add classes indiviually @@ -185,24 +186,25 @@ } // Emergency Vehicle -- becomes SVC_PUBLIC_EMERGENCY if (classS[4] == '1') { - e.allowVehicleClass(-1, SVC_PUBLIC_EMERGENCY); + e.allowVehicleClass(-1, SVC_EMERGENCY); } // Taxi -- becomes SVC_TAXI if (classS[5] == '1') { e.allowVehicleClass(-1, SVC_TAXI); } - // Public Bus -- becomes SVC_BUS|SVC_PUBLIC_TRANSPORT + // Public Bus -- becomes SVC_BUS|SVC_COACH if (classS[6] == '1') { - e.allowVehicleClass(-1, SVC_PUBLIC_TRANSPORT); e.allowVehicleClass(-1, SVC_BUS); + e.allowVehicleClass(-1, SVC_COACH); } // Delivery Truck -- becomes SVC_DELIVERY if (classS[7] == '1') { e.allowVehicleClass(-1, SVC_DELIVERY); } - // Transport Truck -- becomes SVC_TRANSPORT + // Transport Truck -- becomes SVC_TRUCK|SVC_TRAILER if (classS[8] == '1') { - e.allowVehicleClass(-1, SVC_TRANSPORT); + e.allowVehicleClass(-1, SVC_TRUCK); + e.allowVehicleClass(-1, SVC_TRAILER); } // Motorcycle -- becomes SVC_MOTORCYCLE if (classS[9] == '1') { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NINavTeqHelper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NINavTeqHelper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NINavTeqHelper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NINavTeqHelper.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Jul 2006 -/// @version $Id: NINavTeqHelper.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NINavTeqHelper.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Some parser methods shared around several formats containing NavTeq-Nets /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIVisumTL.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIVisumTL.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIVisumTL.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIVisumTL.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file NIVisumTL.cpp /// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch /// @date Thr, 08 May 2003 -/// @version $Id: NIVisumTL.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVisumTL.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Intermediate class for storing visum traffic lights during their import /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -38,11 +40,6 @@ #include #endif // CHECK_MEMORY_LEAKS -// =========================================================================== -// used namespaces -// =========================================================================== -using namespace std; - // =========================================================================== // method definitions diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIVisumTL.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIVisumTL.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIVisumTL.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIVisumTL.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVisumTL.h /// @author Daniel Krajzewicz /// @date Wed, 07 May 2003 -/// @version $Id: NIVisumTL.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVisumTL.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Intermediate class for storing visum traffic lights during their import /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLConnectionsHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLConnectionsHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLConnectionsHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLConnectionsHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Thu, 17 Oct 2002 -/// @version $Id: NIXMLConnectionsHandler.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIXMLConnectionsHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for edge connections stored in XML /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -40,6 +40,8 @@ #include "NIXMLConnectionsHandler.h" #include #include +#include +#include #include #include #include @@ -58,9 +60,11 @@ // =========================================================================== // method definitions // =========================================================================== -NIXMLConnectionsHandler::NIXMLConnectionsHandler(NBEdgeCont& ec) : +NIXMLConnectionsHandler::NIXMLConnectionsHandler(NBEdgeCont& ec, NBNodeCont& nc, NBTrafficLightLogicCont& tlc) : SUMOSAXHandler("xml-connection-description"), myEdgeCont(ec), + myNodeCont(nc), + myTLLogicCont(tlc), myHaveWarnedAboutDeprecatedLanes(false), myErrorMsgHandler(OptionsCont::getOptions().getBool("ignore-errors.connections") ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()) {} @@ -133,6 +137,9 @@ myErrorMsgHandler->inform("The connection-destination edge '" + to + "' is not known."); return; } + // invalidate traffic light definition loaded from a SUMO network + // XXX it would be preferable to reconstruct the phase definitions heuristically + fromEdge->getToNode()->invalidateTLS(myTLLogicCont); // parse optional lane information if (attrs.hasAttribute(SUMO_ATTR_LANE) || attrs.hasAttribute(SUMO_ATTR_FROM_LANE) || attrs.hasAttribute(SUMO_ATTR_TO_LANE)) { parseLaneBound(attrs, fromEdge, toEdge); @@ -149,13 +156,19 @@ } NBConnection prohibitorC = parseConnection("prohibitor", prohibitor); NBConnection prohibitedC = parseConnection("prohibited", prohibited); - if (prohibitorC.getFrom() == 0 || prohibitedC.getFrom() == 0) { + if (prohibitorC == NBConnection::InvalidConnection || prohibitedC == NBConnection::InvalidConnection) { // something failed return; } NBNode* n = prohibitorC.getFrom()->getToNode(); n->addSortedLinkFoes(prohibitorC, prohibitedC); } + if (element == SUMO_TAG_CROSSING) { + addCrossing(attrs); + } + if (element == SUMO_TAG_CUSTOMSHAPE) { + addCustomShape(attrs); + } } @@ -165,7 +178,7 @@ size_t div = def.find("->"); if (div == std::string::npos) { myErrorMsgHandler->inform("Missing connection divider in " + defRole + " '" + def + "'"); - return NBConnection(0, 0); + return NBConnection::InvalidConnection; } std::string fromDef = def.substr(0, div); std::string toDef = def.substr(div + 2); @@ -184,11 +197,11 @@ // check if (fromE == 0) { myErrorMsgHandler->inform("Could not find edge '" + fromDef + "' in " + defRole + " '" + def + "'"); - return NBConnection(0, 0); + return NBConnection::InvalidConnection; } if (toE == 0) { myErrorMsgHandler->inform("Could not find edge '" + toDef + "' in " + defRole + " '" + def + "'"); - return NBConnection(0, 0); + return NBConnection::InvalidConnection; } return NBConnection(fromE, toE); } @@ -212,7 +225,16 @@ if (!parseLaneInfo(attrs, from, to, &fromLane, &toLane)) { return; } - if (!validateLaneInfo(false /* canLanesBeNegative */, from, to, fromLane, toLane)) { + if (fromLane < 0) { + myErrorMsgHandler->inform("Invalid value '" + toString(fromLane) + + "' for " + toString(SUMO_ATTR_FROM_LANE) + " in connection from '" + + from->getID() + "' to '" + to->getID() + "'."); + return; + } + if (toLane < 0) { + myErrorMsgHandler->inform("Invalid value '" + toString(toLane) + + "' for " + toString(SUMO_ATTR_TO_LANE) + " in connection from '" + + from->getID() + "' to '" + to->getID() + "'."); return; } if (from->hasConnectionTo(to, toLane)) { @@ -220,21 +242,13 @@ } if (!from->addLane2LaneConnection(fromLane, to, toLane, NBEdge::L2L_USER, true, mayDefinitelyPass)) { NBEdge* nFrom = from; - bool toNext = true; - do { - if (nFrom->getToNode()->getOutgoingEdges().size() != 1) { - toNext = false; - break; - } + while (nFrom->getToNode()->getOutgoingEdges().size() == 1) { NBEdge* t = nFrom->getToNode()->getOutgoingEdges()[0]; if (t->getID().substr(0, t->getID().find('/')) != nFrom->getID().substr(0, nFrom->getID().find('/'))) { - toNext = false; break; } - if (toNext) { - nFrom = t; - } - } while (toNext); + nFrom = t; + } if (nFrom == 0 || !nFrom->addLane2LaneConnection(fromLane, to, toLane, NBEdge::L2L_USER, false, mayDefinitelyPass)) { if (OptionsCont::getOptions().getBool("show-errors.connections-first-try")) { WRITE_WARNING("Could not set loaded connection from '" + from->getLaneID(fromLane) + "' to '" + to->getLaneID(toLane) + "'."); @@ -304,24 +318,69 @@ } -bool -NIXMLConnectionsHandler::validateLaneInfo(bool canLanesBeNegative, NBEdge* fromEdge, NBEdge* toEdge, int fromLane, int toLane) { - if ((!canLanesBeNegative && fromLane < 0) || - static_cast(fromLane) >= fromEdge->getNumLanes()) { - myErrorMsgHandler->inform("Invalid value '" + toString(fromLane) + - "' for " + toString(SUMO_ATTR_FROM_LANE) + " in connection from '" + - fromEdge->getID() + "' to '" + toEdge->getID() + "'."); - return false; - } - if ((!canLanesBeNegative && toLane < 0) || - static_cast(toLane) >= toEdge->getNumLanes()) { - myErrorMsgHandler->inform("Invalid value '" + toString(toLane) + - "' for " + toString(SUMO_ATTR_TO_LANE) + " in connection from '" + - fromEdge->getID() + "' to '" + toEdge->getID() + "'."); - return false; +void +NIXMLConnectionsHandler::addCrossing(const SUMOSAXAttributes& attrs) { + bool ok = true; + NBNode* node = 0; + EdgeVector edges; + const std::string nodeID = attrs.get(SUMO_ATTR_NODE, 0, ok); + const SUMOReal width = attrs.getOpt(SUMO_ATTR_WIDTH, nodeID.c_str(), ok, NBNode::DEFAULT_CROSSING_WIDTH, true); + std::vector edgeIDs; + SUMOSAXAttributes::parseStringVector(attrs.get(SUMO_ATTR_EDGES, 0, ok), edgeIDs); + if (!ok) { + return; + } + for (std::vector::const_iterator it = edgeIDs.begin(); it != edgeIDs.end(); ++it) { + NBEdge* edge = myEdgeCont.retrieve(*it); + if (edge == 0) { + WRITE_ERROR("Edge '" + (*it) + "' for crossing at node '" + nodeID + "' is not known."); + return; + } + if (node == 0) { + if (edge->getToNode()->getID() == nodeID) { + node = edge->getToNode(); + } else if (edge->getFromNode()->getID() == nodeID) { + node = edge->getFromNode(); + } else { + WRITE_ERROR("Edge '" + (*it) + "' does not touch node '" + nodeID + "'."); + return; + } + } else { + if (edge->getToNode() != node && edge->getFromNode() != node) { + WRITE_ERROR("Edge '" + (*it) + "' does not touch node '" + nodeID + "'."); + return; + } + } + edges.push_back(edge); + } + bool priority = attrs.getOpt(SUMO_ATTR_PRIORITY, nodeID.c_str(), ok, node->isTLControlled(), true); + if (node->isTLControlled() && !priority) { + // traffic_light nodes should always have priority crossings + WRITE_WARNING("Crossing at controlled node '" + nodeID + "' must be prioritized"); + priority = true; + } + node->addCrossing(edges, width, priority); +} + + +void +NIXMLConnectionsHandler::addCustomShape(const SUMOSAXAttributes& attrs) { + bool ok = true; + const std::string id = attrs.get(SUMO_ATTR_ID, 0, ok); + const PositionVector shape = attrs.get(SUMO_ATTR_SHAPE, id.c_str(), ok); + if (!ok) { + return; } - return true; + const std::string nodeID = NBNode::getNodeIDFromInternalLane(id); + NBNode* node = myNodeCont.retrieve(nodeID); + if (node == 0) { + WRITE_ERROR("Node '" + nodeID + "' in customShape is not known."); + return; + } + node->setCustomLaneShape(id, shape); } + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLConnectionsHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLConnectionsHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLConnectionsHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLConnectionsHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NIXMLConnectionsHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIXMLConnectionsHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for edge connections stored in XML /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -41,6 +41,8 @@ // =========================================================================== class NBEdge; class NBEdgeCont; +class NBNodeCont; +class NBTrafficLightLogicCont; class MsgHandler; @@ -59,7 +61,7 @@ /** @brief Constructor * @param[in] ec The edge container which includes the edges to change connections of */ - NIXMLConnectionsHandler(NBEdgeCont& ec); + NIXMLConnectionsHandler(NBEdgeCont& ec, NBNodeCont& nc, NBTrafficLightLogicCont& tlc); /// @brief Destructor @@ -130,21 +132,28 @@ */ inline bool parseLaneDefinition(const SUMOSAXAttributes& attributes, int* fromLane, int* toLane); - /** @brief Validates information about lane-2-lane connection. Returns true iff information represents - * a valid connection for the given edges. - * @param[in] canLanesBeNegative Whether negative lane indices are allowed (used when specifying resets) - * @param[in] fromEdge The originating edge - * @param[in] toEdge The target edge - * @param[in] fromLane The originating lane index - * @param[in] toLane The target lane index + + /** @brief Parses a crossing and updates the referenced node + * @param[in] attrs The attributes to get the crossings's values from */ - bool validateLaneInfo(bool canLanesBeNegative, NBEdge* fromEdge, NBEdge* toEdge, int fromLane, int toLane); + void addCrossing(const SUMOSAXAttributes& attrs); + /** @brief Parses a customShape and updates the referenced node + * @param[in] attrs The attributes to get the customShapes's values from + */ + void addCustomShape(const SUMOSAXAttributes& attrs); private: /// @brief The edge container to fill NBEdgeCont& myEdgeCont; + /// @brief The edge container to fill + NBNodeCont& myNodeCont; + + /** @brief The traffic lights container to add built tls to (when + * invalidating tls) */ + NBTrafficLightLogicCont& myTLLogicCont; + /// @brief Information whether we have a deprecated attribute bool myHaveWarnedAboutDeprecatedLanes; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLEdgesHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLEdgesHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLEdgesHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLEdgesHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Walter Bamberger /// @author Laura Bieker /// @date Tue, 20 Nov 2001 -/// @version $Id: NIXMLEdgesHandler.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NIXMLEdgesHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for network edges stored in XML /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -105,6 +105,9 @@ case SUMO_TAG_DELETE: deleteEdge(attrs); break; + case SUMO_TAG_ROUNDABOUT: + addRoundabout(attrs); + break; default: break; } @@ -126,18 +129,27 @@ myCurrentEdge = myEdgeCont.retrieve(myCurrentID); // check deprecated (unused) attributes // use default values, first - myCurrentSpeed = myTypeCont.getSpeed(""); myCurrentPriority = myTypeCont.getPriority(""); myCurrentLaneNo = myTypeCont.getNumLanes(""); - myPermissions = myTypeCont.getPermissions(""); - myCurrentWidth = myTypeCont.getWidth(""); - myCurrentOffset = NBEdge::UNSPECIFIED_OFFSET; + myCurrentEndOffset = NBEdge::UNSPECIFIED_OFFSET; + if (myCurrentEdge != 0) { + // update existing edge. only update lane-specific settings when explicitly requested + myCurrentSpeed = NBEdge::UNSPECIFIED_SPEED; + myPermissions = SVC_UNSPECIFIED; + myCurrentWidth = NBEdge::UNSPECIFIED_WIDTH; + } else { + // this is a completely new edge. get the type specific defaults + myCurrentSpeed = myTypeCont.getSpeed(""); + myPermissions = myTypeCont.getPermissions(""); + myCurrentWidth = myTypeCont.getWidth(""); + } myCurrentType = ""; myShape = PositionVector(); myLanesSpread = LANESPREAD_RIGHT; myLength = NBEdge::UNSPECIFIED_LOADED_LENGTH; myCurrentStreetName = ""; myReinitKeepEdgeShape = false; + mySidewalkWidth = NBEdge::UNSPECIFIED_WIDTH; // check whether a type's values shall be used if (attrs.hasAttribute(SUMO_ATTR_TYPE)) { myCurrentType = attrs.get(SUMO_ATTR_TYPE, myCurrentID.c_str(), ok); @@ -153,6 +165,7 @@ myCurrentLaneNo = myTypeCont.getNumLanes(myCurrentType); myPermissions = myTypeCont.getPermissions(myCurrentType); myCurrentWidth = myTypeCont.getWidth(myCurrentType); + mySidewalkWidth = myTypeCont.getSidewalkWidth(myCurrentType); } // use values from the edge to overwrite if existing, then if (myCurrentEdge != 0) { @@ -166,17 +179,13 @@ myCurrentEdge = 0; return; } - myCurrentSpeed = myCurrentEdge->getSpeed(); myCurrentPriority = myCurrentEdge->getPriority(); myCurrentLaneNo = myCurrentEdge->getNumLanes(); myCurrentType = myCurrentEdge->getTypeID(); - myPermissions = myCurrentEdge->getPermissions(); if (!myCurrentEdge->hasDefaultGeometry()) { myShape = myCurrentEdge->getGeometry(); myReinitKeepEdgeShape = true; } - myCurrentWidth = myCurrentEdge->getLaneWidth(); - myCurrentOffset = myCurrentEdge->getOffset(); myLanesSpread = myCurrentEdge->getLaneSpreadFunction(); if (myCurrentEdge->hasLoadedLength()) { myLength = myCurrentEdge->getLoadedLength(); @@ -188,7 +197,7 @@ if (attrs.hasAttribute(SUMO_ATTR_SPEED)) { myCurrentSpeed = attrs.get(SUMO_ATTR_SPEED, myCurrentID.c_str(), ok); } - if (myOptions.getBool("speed-in-kmh")) { + if (myOptions.getBool("speed-in-kmh") && myCurrentSpeed != NBEdge::UNSPECIFIED_SPEED) { myCurrentSpeed = myCurrentSpeed / (SUMOReal) 3.6; } // try to get the number of lanes @@ -203,9 +212,9 @@ if (attrs.hasAttribute(SUMO_ATTR_WIDTH)) { myCurrentWidth = attrs.get(SUMO_ATTR_WIDTH, myCurrentID.c_str(), ok); } - // try to get the width + // try to get the offset of the stop line from the intersection if (attrs.hasAttribute(SUMO_ATTR_ENDOFFSET)) { - myCurrentOffset = attrs.get(SUMO_ATTR_ENDOFFSET, myCurrentID.c_str(), ok); + myCurrentEndOffset = attrs.get(SUMO_ATTR_ENDOFFSET, myCurrentID.c_str(), ok); } // try to get the street name if (attrs.hasAttribute(SUMO_ATTR_NAME)) { @@ -233,6 +242,8 @@ myLanesSpread = tryGetLaneSpread(attrs); // try to get the length myLength = attrs.getOpt(SUMO_ATTR_LENGTH, myCurrentID.c_str(), ok, myLength); + // tro to get the sidewalkWidth + mySidewalkWidth = attrs.getOpt(SUMO_ATTR_SIDEWALKWIDTH, myCurrentID.c_str(), ok, mySidewalkWidth); // insert the parsed edge into the edges map if (!ok) { return; @@ -241,24 +252,26 @@ if (myCurrentEdge != 0) { myCurrentEdge->reinit(myFromNode, myToNode, myCurrentType, myCurrentSpeed, myCurrentLaneNo, myCurrentPriority, myShape, - myCurrentWidth, myCurrentOffset, + myCurrentWidth, myCurrentEndOffset, myCurrentStreetName, myLanesSpread, myReinitKeepEdgeShape); } else { // the edge must be allocated in dependence to whether a shape is given if (myShape.size() == 0) { myCurrentEdge = new NBEdge(myCurrentID, myFromNode, myToNode, myCurrentType, myCurrentSpeed, - myCurrentLaneNo, myCurrentPriority, myCurrentWidth, myCurrentOffset, + myCurrentLaneNo, myCurrentPriority, myCurrentWidth, myCurrentEndOffset, myCurrentStreetName, myLanesSpread); } else { myCurrentEdge = new NBEdge(myCurrentID, myFromNode, myToNode, myCurrentType, myCurrentSpeed, - myCurrentLaneNo, myCurrentPriority, myCurrentWidth, myCurrentOffset, + myCurrentLaneNo, myCurrentPriority, myCurrentWidth, myCurrentEndOffset, myShape, myCurrentStreetName, myLanesSpread, myKeepEdgeShape); } } myCurrentEdge->setLoadedLength(myLength); - myCurrentEdge->setPermissions(myPermissions); + if (myPermissions != SVC_UNSPECIFIED) { + myCurrentEdge->setPermissions(myPermissions); + } } @@ -302,7 +315,7 @@ } // try to get the end-offset (lane shortened due to pedestrian crossing etc..) if (attrs.hasAttribute(SUMO_ATTR_ENDOFFSET)) { - myCurrentEdge->setOffset(lane, attrs.get(SUMO_ATTR_ENDOFFSET, myCurrentID.c_str(), ok)); + myCurrentEdge->setEndOffset(lane, attrs.get(SUMO_ATTR_ENDOFFSET, myCurrentID.c_str(), ok)); } // try to get lane specific speed (should not occur for german networks) if (attrs.hasAttribute(SUMO_ATTR_SPEED)) { @@ -313,7 +326,9 @@ void NIXMLEdgesHandler::addSplit(const SUMOSAXAttributes& attrs) { if (myCurrentEdge == 0) { - WRITE_WARNING("Ignoring 'split' because it cannot be assigned to an edge"); + if (!OptionsCont::getOptions().isInStringVector("remove-edges.explicit", myCurrentID)) { + WRITE_WARNING("Ignoring 'split' because it cannot be assigned to an edge"); + } return; } bool ok = true; @@ -330,12 +345,6 @@ return; } e.nameid = (int)e.pos; - if (myCurrentEdge == 0) { - if (!OptionsCont::getOptions().isInStringVector("remove-edges.explicit", myCurrentID)) { - WRITE_ERROR("Additional lane information could not be set - the edge with id '" + myCurrentID + "' is not known."); - } - return; - } if (e.pos < 0) { e.pos += myCurrentEdge->getGeometry().length(); } @@ -356,6 +365,13 @@ e.lanes.push_back((int) l); } } + e.speed = attrs.getOpt(SUMO_ATTR_SPEED, 0, ok, myCurrentEdge->getSpeed()); + if (attrs.hasAttribute(SUMO_ATTR_SPEED) && myOptions.getBool("speed-in-kmh")) { + e.speed /= (SUMOReal) 3.6; + } + if (!ok) { + return; + } mySplits.push_back(e); } } @@ -457,6 +473,10 @@ void NIXMLEdgesHandler::myEndElement(int element) { if (element == SUMO_TAG_EDGE && myCurrentEdge != 0) { + // add sidewalk, wait until lanes are loaded to avoid building if it already exists + if (mySidewalkWidth != NBEdge::UNSPECIFIED_WIDTH) { + myCurrentEdge->addSidewalk(mySidewalkWidth); + } if (!myIsUpdate) { try { if (!myEdgeCont.insert(myCurrentEdge)) { @@ -481,16 +501,20 @@ sort((*i).lanes.begin(), (*i).lanes.end()); noLanesMax = MAX2(noLanesMax, (unsigned int)(*i).lanes.size()); } - // invalidate traffic light definitions loaded from a SUMO network - // XXX it would be preferable to reconstruct the phase definitions heuristically - e->getToNode()->invalidateTLS(myTLLogicCont); - e->invalidateConnections(true); - // split the edge std::vector currLanes; for (unsigned int l = 0; l < e->getNumLanes(); ++l) { currLanes.push_back(l); } + if (e->getNumLanes() != mySplits.back().lanes.size()) { + // invalidate traffic light definitions loaded from a SUMO network + // XXX it would be preferable to reconstruct the phase definitions heuristically + e->getToNode()->invalidateTLS(myTLLogicCont); + // if the number of lanes changes the connections should be + // recomputed + e->invalidateConnections(true); + } + std::string edgeid = e->getID(); SUMOReal seen = 0; for (i = mySplits.begin(); i != mySplits.end(); ++i) { @@ -504,7 +528,7 @@ std::string nid = myCurrentID + "." + toString(exp.nameid); std::string pid = e->getID(); myEdgeCont.splitAt(myDistrictCont, e, exp.pos - seen, rn, - pid, nid, e->getNumLanes(), (unsigned int) exp.lanes.size()); + pid, nid, e->getNumLanes(), (unsigned int) exp.lanes.size(), exp.speed); seen = exp.pos; std::vector newLanes = exp.lanes; NBEdge* pe = myEdgeCont.retrieve(pid); @@ -555,10 +579,16 @@ } // patch lane offsets e = myEdgeCont.retrieve(edgeid); - i = mySplits.begin(); - if ((*i).pos != 0) { - e = e->getToNode()->getOutgoingEdges()[0]; + if (mySplits.front().pos != 0) { + // add a dummy split at the beginning to ensure correct offset + Split start; + start.pos = 0; + for (int lane = 0; lane < (int)e->getNumLanes(); ++lane) { + start.lanes.push_back(lane); + } + mySplits.insert(mySplits.begin(), start); } + i = mySplits.begin(); for (; i != mySplits.end(); ++i) { unsigned int maxLeft = (*i).lanes.back(); SUMOReal offset = 0; @@ -586,5 +616,29 @@ } } + +void +NIXMLEdgesHandler::addRoundabout(const SUMOSAXAttributes& attrs) { + if (attrs.hasAttribute(SUMO_ATTR_EDGES)) { + std::vector edgeIDs = attrs.getStringVector(SUMO_ATTR_EDGES); + EdgeSet roundabout; + for (std::vector::iterator it = edgeIDs.begin(); it != edgeIDs.end(); ++it) { + NBEdge* edge = myEdgeCont.retrieve(*it); + if (edge == 0) { + if (!myEdgeCont.wasIgnored(*it)) { + WRITE_ERROR("Unknown edge '" + (*it) + "' in roundabout"); + } + } else { + roundabout.insert(edge); + } + } + myEdgeCont.addRoundabout(roundabout); + } else { + WRITE_ERROR("Empty edges in roundabout."); + } +} + + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLEdgesHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLEdgesHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLEdgesHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLEdgesHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NIXMLEdgesHandler.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NIXMLEdgesHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for network edges stored in XML /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -86,7 +86,6 @@ /// @brief Destructor ~NIXMLEdgesHandler(); - protected: /// @name inherited from GenericSAXHandler //@{ @@ -162,7 +161,7 @@ SUMOReal myCurrentWidth; /// @brief The current edge's offset till the destination node - SUMOReal myCurrentOffset; + SUMOReal myCurrentEndOffset; /// @brief The current edge's street name std::string myCurrentStreetName; @@ -188,6 +187,9 @@ /// @brief Whether the edge shape shall be kept at reinitilization bool myReinitKeepEdgeShape; + /// @brief The width of the sidewalk that shall be added to the current edge + SUMOReal mySidewalkWidth; + /// @} @@ -220,13 +222,15 @@ NBEdge* myCurrentEdge; /** @struct Split - * @brief A structure which describes changes of lane number along the road + * @brief A structure which describes changes of lane number or speed along the road */ struct Split { - /// @brief The lanes until this change + /// @brief The lanes after this change std::vector lanes; /// @brief The position of this change SUMOReal pos; + /// @brief The speed after this change + SUMOReal speed; /// @brief A numerical id int nameid; /// @brief A 2D-position (for the node to insert at this place) @@ -306,6 +310,12 @@ */ void addSplit(const SUMOSAXAttributes& attrs); + /** @brief Parses a roundabout and stores it in myEdgeCont. + * @param[in] attrs The attributes to get the roundabouts values from + */ + void addRoundabout(const SUMOSAXAttributes& attrs); + + private: /** @brief invalid copy constructor */ NIXMLEdgesHandler(const NIXMLEdgesHandler& s); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLNodesHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLNodesHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLNodesHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLNodesHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NIXMLNodesHandler.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NIXMLNodesHandler.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Importer for network nodes stored in XML /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -118,6 +118,8 @@ myPosition = node->getPosition(); xOk = yOk = true; needConversion = false; + } else { + myPosition.set(0, 0, 0); // better to reset than to reuse the previous (z)-value } if (attrs.hasAttribute(SUMO_ATTR_X)) { myPosition.set(attrs.get(SUMO_ATTR_X, myID.c_str(), ok), myPosition.y()); @@ -180,6 +182,19 @@ if (type == NODETYPE_TRAFFIC_LIGHT || type == NODETYPE_TRAFFIC_LIGHT_NOJUNCTION) { processTrafficLightDefinitions(attrs, node); } + // set optional shape + PositionVector shape; + if (attrs.hasAttribute(SUMO_ATTR_SHAPE)) { + shape = attrs.getOpt(SUMO_ATTR_SHAPE, myID.c_str(), ok, PositionVector()); + if (shape.size() > 2) { + shape.closePolygon(); + } + node->setCustomShape(shape); + } + // set optional radius + if (attrs.hasAttribute(SUMO_ATTR_RADIUS)) { + node->setRadius(attrs.get(SUMO_ATTR_RADIUS, myID.c_str(), ok)); + } } @@ -241,7 +256,7 @@ type = SUMOXMLDefinitions::TrafficLightTypes.get(typeS); } else { WRITE_ERROR("Unknown traffic light type '" + typeS + "' for node '" + myID + "'."); - ok = false; + return; } if (tlID != "" && myTLLogicCont.getPrograms(tlID).size() > 0) { // we already have definitions for this tlID diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLNodesHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLNodesHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLNodesHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLNodesHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NIXMLNodesHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIXMLNodesHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for network nodes stored in XML /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLTrafficLightsHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLTrafficLightsHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLTrafficLightsHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLTrafficLightsHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file NIXMLTrafficLightsHandler.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @author Jakob Erdmann /// @date 2011-10-05 -/// @version $Id: NIXMLTrafficLightsHandler.cpp 14489 2013-08-23 12:33:20Z behrisch $ +/// @version $Id: NIXMLTrafficLightsHandler.cpp 18169 2015-03-27 13:40:16Z behrisch $ /// // Importer for traffic lights stored in XML /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -107,10 +109,6 @@ if (!myCurrentTL) { WRITE_ERROR("Unmatched closing tag for tlLogic."); } else { - if (!myTLLCont.insert(myCurrentTL)) { - WRITE_MESSAGE("Updating program '" + myCurrentTL->getProgramID() + - "' for traffic light '" + myCurrentTL->getID() + "'"); - } myCurrentTL = 0; } break; @@ -144,36 +142,64 @@ // simply retrieve the loaded definitions and update them // 2) the tll.xml is loaded to define new traffic lights // nod.xml will have triggered building of NBOwnTLDef. Replace it with NBLoadedSUMOTLDef + // 3) the tll.xml is loaded to define new programs for a defined traffic light + // there should be a definition with the same id but different programID + const std::map& programs = myTLLCont.getPrograms(id); + if (programs.size() == 0) { + WRITE_ERROR("Cannot load traffic light program for unknown id '" + id + "', programID '" + programID + "'."); + return 0; + } + const std::string existingProgram = programs.begin()->first; // arbitrary for our purpose NBLoadedSUMOTLDef* loadedDef = dynamic_cast(myTLLCont.getDefinition(id, programID)); if (loadedDef == 0) { - // case 2 - NBTrafficLightDefinition* newDef = dynamic_cast(myTLLCont.getDefinition( - id, NBTrafficLightDefinition::DefaultProgramID)); - if (newDef == 0) { - // the default program may have already been replaced with a loaded program - newDef = dynamic_cast(myTLLCont.getDefinition( - id, NBTrafficLightDefinition::DefaultProgramID)); + NBLoadedSUMOTLDef* oldDef = dynamic_cast(myTLLCont.getDefinition(id, existingProgram)); + if (oldDef == 0) { + // case 2 + NBTrafficLightDefinition* newDef = dynamic_cast(myTLLCont.getDefinition( + id, NBTrafficLightDefinition::DefaultProgramID)); if (newDef == 0) { - WRITE_ERROR("Cannot load traffic light program for unknown id '" + id + "', programID '" + programID + "'."); - return 0; + // the default program may have already been replaced with a loaded program + newDef = dynamic_cast(myTLLCont.getDefinition( + id, NBTrafficLightDefinition::DefaultProgramID)); + if (newDef == 0) { + WRITE_ERROR("Cannot load traffic light program for unknown id '" + id + "', programID '" + programID + "'."); + return 0; + } } - } - assert(newDef != 0); - loadedDef = new NBLoadedSUMOTLDef(id, programID, offset, type); - // copy nodes - std::vector nodes = newDef->getControlledNodes(); - for (std::vector::iterator it = nodes.begin(); it != nodes.end(); it++) { - loadedDef->addNode(*it); - } - if (programID == NBTrafficLightDefinition::DefaultProgramID) { - // replace default Program - std::vector nodes = newDef->getControlledNodes(); + assert(newDef != 0); + loadedDef = new NBLoadedSUMOTLDef(id, programID, offset, type); + // copy nodes and controlled inner edges + std::vector nodes = newDef->getNodes(); for (std::vector::iterator it = nodes.begin(); it != nodes.end(); it++) { - (*it)->removeTrafficLight(newDef); + loadedDef->addNode(*it); } - myTLLCont.removeProgram(id, NBTrafficLightDefinition::DefaultProgramID); + loadedDef->addControlledInnerEdges(newDef->getControlledInnerEdges()); + if (programID == NBTrafficLightDefinition::DefaultProgramID) { + // replace default Program + std::vector nodes = newDef->getNodes(); + for (std::vector::iterator it = nodes.begin(); it != nodes.end(); it++) { + (*it)->removeTrafficLight(newDef); + } + myTLLCont.removeProgram(id, NBTrafficLightDefinition::DefaultProgramID); + } + myTLLCont.insert(loadedDef); + } else { + // case 3 + NBTrafficLightLogic* oldLogic = oldDef->getLogic(); + NBTrafficLightLogic* newLogic = new NBTrafficLightLogic(id, programID, + oldLogic->getNumLinks(), offset, type); + loadedDef = new NBLoadedSUMOTLDef(oldDef, newLogic); + // copy nodes + std::vector nodes = oldDef->getNodes(); + for (std::vector::iterator it = nodes.begin(); it != nodes.end(); it++) { + loadedDef->addNode(*it); + } + myTLLCont.insert(loadedDef); } - myTLLCont.insert(loadedDef); + } else { + // case 1 + loadedDef->setOffset(offset); + loadedDef->setType(type); } if (ok) { myResetPhases = true; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLTrafficLightsHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLTrafficLightsHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLTrafficLightsHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLTrafficLightsHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIXMLTrafficLightsHandler.h /// @author Jakob Erdmann /// @date 2011-10-05 -/// @version $Id: NIXMLTrafficLightsHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIXMLTrafficLightsHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for traffic lights stored in XML /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLTypesHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLTypesHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLTypesHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLTypesHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date Tue, 20 Nov 2001 -/// @version $Id: NIXMLTypesHandler.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIXMLTypesHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for edge type information stored in XML /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -80,12 +80,13 @@ bool oneway = attrs.getOpt(SUMO_ATTR_ONEWAY, id.c_str(), ok, false); bool discard = attrs.getOpt(SUMO_ATTR_DISCARD, id.c_str(), ok, false); SUMOReal width = attrs.getOpt(SUMO_ATTR_WIDTH, id.c_str(), ok, NBEdge::UNSPECIFIED_WIDTH); + SUMOReal sidewalkWidth = attrs.getOpt(SUMO_ATTR_SIDEWALKWIDTH, id.c_str(), ok, NBEdge::UNSPECIFIED_WIDTH); if (!ok) { return; } // build the type SVCPermissions permissions = parseVehicleClasses(allowS, disallowS); - if (!myTypeCont.insert(id, noLanes, speed, priority, permissions, width, oneway)) { + if (!myTypeCont.insert(id, noLanes, speed, priority, permissions, width, oneway, sidewalkWidth)) { WRITE_ERROR("Duplicate type occured. ID='" + id + "'"); } else { if (discard) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLTypesHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLTypesHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/NIXMLTypesHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/NIXMLTypesHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NIXMLTypesHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIXMLTypesHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for edge type information stored in XML /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/netimport/vissim -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,46 +92,110 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libvissimimport_a_AR = $(AR) $(ARFLAGS) libvissimimport_a_LIBADD = am_libvissimimport_a_OBJECTS = NIImporter_Vissim.$(OBJEXT) libvissimimport_a_OBJECTS = $(am_libvissimimport_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libvissimimport_a_SOURCES) DIST_SOURCES = $(libvissimimport_a_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -121,6 +230,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -147,9 +257,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -160,10 +274,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -299,10 +409,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libvissimimport.a: $(libvissimimport_a_OBJECTS) $(libvissimimport_a_DEPENDENCIES) - -rm -f libvissimimport.a - $(libvissimimport_a_AR) libvissimimport.a $(libvissimimport_a_OBJECTS) $(libvissimimport_a_LIBADD) - $(RANLIB) libvissimimport.a + +libvissimimport.a: $(libvissimimport_a_OBJECTS) $(libvissimimport_a_DEPENDENCIES) $(EXTRA_libvissimimport_a_DEPENDENCIES) + $(AM_V_at)-rm -f libvissimimport.a + $(AM_V_AR)$(libvissimimport_a_AR) libvissimimport.a $(libvissimimport_a_OBJECTS) $(libvissimimport_a_LIBADD) + $(AM_V_at)$(RANLIB) libvissimimport.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -313,25 +424,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIImporter_Vissim.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -340,22 +451,25 @@ -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -370,57 +484,12 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -436,12 +505,7 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -453,15 +517,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -470,6 +530,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -506,13 +581,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -547,10 +619,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -633,12 +710,11 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - clean-noinstLIBRARIES ctags ctags-recursive distclean \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ @@ -648,8 +724,8 @@ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/NIImporter_Vissim.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/NIImporter_Vissim.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/NIImporter_Vissim.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/NIImporter_Vissim.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIImporter_Vissim.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_Vissim.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/NIImporter_Vissim.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/NIImporter_Vissim.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/NIImporter_Vissim.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/NIImporter_Vissim.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIImporter_Vissim.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIImporter_Vissim.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Importer for networks stored in Vissim format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/NIVissimElements.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/NIVissimElements.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/NIVissimElements.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/NIVissimElements.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimElements.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimElements.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimElements.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/netimport/vissim/tempstructs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,6 +92,10 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libvissimtmpstr_a_AR = $(AR) $(ARFLAGS) libvissimtmpstr_a_LIBADD = am_libvissimtmpstr_a_OBJECTS = NIVissimAbstractEdge.$(OBJEXT) \ @@ -66,30 +115,86 @@ NIVissimVehTypeClass.$(OBJEXT) NIVissimVehicleClass.$(OBJEXT) \ NIVissimVehicleType.$(OBJEXT) libvissimtmpstr_a_OBJECTS = $(am_libvissimtmpstr_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libvissimtmpstr_a_SOURCES) DIST_SOURCES = $(libvissimtmpstr_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -98,6 +203,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -124,9 +230,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -137,10 +247,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -295,10 +401,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libvissimtmpstr.a: $(libvissimtmpstr_a_OBJECTS) $(libvissimtmpstr_a_DEPENDENCIES) - -rm -f libvissimtmpstr.a - $(libvissimtmpstr_a_AR) libvissimtmpstr.a $(libvissimtmpstr_a_OBJECTS) $(libvissimtmpstr_a_LIBADD) - $(RANLIB) libvissimtmpstr.a + +libvissimtmpstr.a: $(libvissimtmpstr_a_OBJECTS) $(libvissimtmpstr_a_DEPENDENCIES) $(EXTRA_libvissimtmpstr_a_DEPENDENCIES) + $(AM_V_at)-rm -f libvissimtmpstr.a + $(AM_V_AR)$(libvissimtmpstr_a_AR) libvissimtmpstr.a $(libvissimtmpstr_a_OBJECTS) $(libvissimtmpstr_a_LIBADD) + $(AM_V_at)$(RANLIB) libvissimtmpstr.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -330,25 +437,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimVehicleType.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -356,26 +463,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -387,15 +483,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -404,6 +496,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -452,10 +559,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -540,18 +652,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimAbstractEdge.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimAbstractEdge.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimAbstractEdge.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimAbstractEdge.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimAbstractEdge.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimBoundedClusterObject.cpp /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimBoundedClusterObject.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimBoundedClusterObject.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimBoundedClusterObject.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimBoundedClusterObject.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimBoundedClusterObject.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimBoundedClusterObject.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NIVissimClosedLaneDef.cpp /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimClosedLaneDef.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimClosedLaneDef.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,9 +37,8 @@ #endif // CHECK_MEMORY_LEAKS -NIVissimClosedLaneDef::NIVissimClosedLaneDef(int lane, - const std::vector& assignedVehicles) - : myLaneNo(lane), myAssignedVehicles(assignedVehicles) {} +NIVissimClosedLaneDef::NIVissimClosedLaneDef(const std::vector& assignedVehicles) + : myAssignedVehicles(assignedVehicles) {} NIVissimClosedLaneDef::~NIVissimClosedLaneDef() {} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosedLaneDef.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NIVissimClosedLaneDef.h /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimClosedLaneDef.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimClosedLaneDef.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -40,10 +41,9 @@ */ class NIVissimClosedLaneDef { public: - NIVissimClosedLaneDef(int lane, const std::vector& assignedVehicles); + NIVissimClosedLaneDef(const std::vector& assignedVehicles); ~NIVissimClosedLaneDef(); private: - int myLaneNo; std::vector myAssignedVehicles; }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosedLanesVector.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosedLanesVector.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosedLanesVector.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosedLanesVector.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimClosedLanesVector.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimClosedLanesVector.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimClosedLanesVector.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosures.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosures.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosures.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosures.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NIVissimClosures.cpp /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimClosures.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimClosures.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosures.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosures.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosures.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimClosures.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NIVissimClosures.h /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimClosures.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimClosures.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimConnectionCluster.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimConnectionCluster.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnectionCluster.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimConnectionCluster.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimConnectionCluster.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnection.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnection.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnection.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnection.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Sept 2002 -/// @version $Id: NIVissimConnection.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimConnection.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -70,15 +70,10 @@ NIVissimConnection::NIVissimConnection(int id, const std::string& name, const NIVissimExtendedEdgePoint& from_def, const NIVissimExtendedEdgePoint& to_def, - const PositionVector& geom, Direction direction, - SUMOReal dxnothalt, SUMOReal dxeinordnen, - SUMOReal zuschlag1, SUMOReal zuschlag2, SUMOReal /*seglength*/, + const PositionVector& geom, const std::vector& assignedVehicles, const NIVissimClosedLanesVector& clv) : NIVissimAbstractEdge(id, geom), myName(name), myFromDef(from_def), myToDef(to_def), - myDirection(direction), - myDXNothalt(dxnothalt), myDXEinordnen(dxeinordnen), - myZuschlag1(zuschlag1), myZuschlag2(zuschlag2), myAssignedVehicles(assignedVehicles), myClosedLanes(clv) {} @@ -91,32 +86,6 @@ bool -NIVissimConnection::dictionary(int id, const std::string& name, - const NIVissimExtendedEdgePoint& from_def, - const NIVissimExtendedEdgePoint& to_def, - const PositionVector& geom, - Direction direction, - SUMOReal dxnothalt, SUMOReal dxeinordnen, - SUMOReal zuschlag1, SUMOReal zuschlag2, - SUMOReal seglength, - const std::vector& assignedVehicles, - const NIVissimClosedLanesVector& clv) { - NIVissimConnection* o = new NIVissimConnection(id, name, from_def, to_def, - geom, direction, dxnothalt, dxeinordnen, zuschlag1, zuschlag2, - seglength, assignedVehicles, clv); - if (!dictionary(id, o)) { - delete o; - return false; - } - if (myMaxID < id) { - myMaxID = id; - } - return true; -} - - - -bool NIVissimConnection::dictionary(int id, NIVissimConnection* o) { DictType::iterator i = myDict.find(id); if (i == myDict.end()) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnection.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnection.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnection.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimConnection.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimConnection.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimConnection.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -54,18 +54,16 @@ : public NIVissimBoundedClusterObject, public NIVissimAbstractEdge { public: - enum Direction { + /* enum Direction { NIVC_DIR_RIGHT, NIVC_DIR_LEFT, NIVC_DIR_ALL - }; + }; */ NIVissimConnection(int id, const std::string& name, const NIVissimExtendedEdgePoint& from_def, const NIVissimExtendedEdgePoint& to_def, const PositionVector& geom, - Direction direction, SUMOReal dxnothalt, SUMOReal dxeinordnen, - SUMOReal zuschlag1, SUMOReal zuschlag2, SUMOReal seglength, const std::vector& assignedVehicles, const NIVissimClosedLanesVector& clv); virtual ~NIVissimConnection(); @@ -100,14 +98,6 @@ - static bool dictionary(int id, const std::string& name, - const NIVissimExtendedEdgePoint& from_def, - const NIVissimExtendedEdgePoint& to_def, - const PositionVector& geom, - Direction direction, SUMOReal dxnothalt, SUMOReal dxeinordnen, - SUMOReal zuschlag1, SUMOReal zuschlag2, SUMOReal seglength, - const std::vector& assignedVehicles, - const NIVissimClosedLanesVector& clv); static bool dictionary(int id, NIVissimConnection* o); static NIVissimConnection* dictionary(int id); static std::vector getWithin(const AbstractPoly& poly); @@ -120,9 +110,6 @@ private: std::string myName; NIVissimExtendedEdgePoint myFromDef, myToDef; - Direction myDirection; - SUMOReal myDXNothalt, myDXEinordnen; - SUMOReal myZuschlag1, myZuschlag2; std::vector myAssignedVehicles; NIVissimClosedLanesVector myClosedLanes; private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimDistrictConnection.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimDistrictConnection.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDistrictConnection.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date End of 2002 -/// @version $Id: NIVissimDistrictConnection.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimDistrictConnection.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An edge imported from Vissim together for a container for /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDisturbance.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDisturbance.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDisturbance.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDisturbance.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimDisturbance.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimDisturbance.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -51,26 +51,25 @@ #ifdef CHECK_MEMORY_LEAKS #include #endif // CHECK_MEMORY_LEAKS -// =========================================================================== -// used namespaces -// =========================================================================== -using namespace std; +// =========================================================================== +// static member variables +// =========================================================================== NIVissimDisturbance::DictType NIVissimDisturbance::myDict; int NIVissimDisturbance::myRunningID = 100000000; int NIVissimDisturbance::refusedProhibits = 0; +// =========================================================================== +// method definitions +// =========================================================================== NIVissimDisturbance::NIVissimDisturbance(int id, const std::string& name, const NIVissimExtendedEdgePoint& edge, - const NIVissimExtendedEdgePoint& by, - SUMOReal timegap, SUMOReal waygap, - SUMOReal vmax) - : myID(id), myNode(-1), myName(name), myEdge(edge), myDisturbance(by), - myTimeGap(timegap), myWayGap(waygap), myVMax(vmax) {} + const NIVissimExtendedEdgePoint& by) + : myID(id), myNode(-1), myName(name), myEdge(edge), myDisturbance(by) {} NIVissimDisturbance::~NIVissimDisturbance() {} @@ -78,15 +77,12 @@ bool -NIVissimDisturbance::dictionary(int id, - const std::string& name, +NIVissimDisturbance::dictionary(const std::string& name, const NIVissimExtendedEdgePoint& edge, - const NIVissimExtendedEdgePoint& by, - SUMOReal timegap, SUMOReal waygap, SUMOReal vmax) { - UNUSED_PARAMETER(id); + const NIVissimExtendedEdgePoint& by) { int nid = myRunningID++; NIVissimDisturbance* o = - new NIVissimDisturbance(nid, name, edge, by, timegap, waygap, vmax); + new NIVissimDisturbance(nid, name, edge, by); if (!dictionary(nid, o)) { delete o; } @@ -330,7 +326,7 @@ toString(c->getToEdgeID()), to); } else { WRITE_WARNING("NIVissimDisturbance: no connection"); - return NBConnection(0, 0); + return NBConnection::InvalidConnection; // throw 1; // !!! what to do? } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDisturbance.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDisturbance.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDisturbance.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimDisturbance.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NIVissimDisturbance.h /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimDisturbance.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimDisturbance.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -51,8 +52,7 @@ public: NIVissimDisturbance(int id, const std::string& name, const NIVissimExtendedEdgePoint& edge, - const NIVissimExtendedEdgePoint& by, - SUMOReal timegap, SUMOReal waygap, SUMOReal vmax); + const NIVissimExtendedEdgePoint& by); virtual ~NIVissimDisturbance(); void computeBounding(); bool addToNode(NBNode* node, NBDistrictCont& dc, @@ -66,10 +66,9 @@ NBConnection getConnection(NBNode* node, int aedgeid); public: - static bool dictionary(int id, const std::string& name, + static bool dictionary(const std::string& name, const NIVissimExtendedEdgePoint& edge, - const NIVissimExtendedEdgePoint& by, - SUMOReal timegap, SUMOReal waygap, SUMOReal vmax); + const NIVissimExtendedEdgePoint& by); static bool dictionary(int id, NIVissimDisturbance* o); static NIVissimDisturbance* dictionary(int id); static std::vector getWithin(const AbstractPoly& poly); @@ -83,7 +82,6 @@ std::string myName; NIVissimExtendedEdgePoint myEdge; NIVissimExtendedEdgePoint myDisturbance; - SUMOReal myTimeGap, myWayGap, myVMax; typedef std::map DictType; static DictType myDict; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdge.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdge.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdge.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdge.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimEdge.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimEdge.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A temporary storage for edges imported from Vissim /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdge.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdge.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdge.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdge.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date End of 2002 -/// @version $Id: NIVissimEdge.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimEdge.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A temporary storage for edges imported from Vissim /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimEdgePosMap.cpp /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimEdgePosMap.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimEdgePosMap.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimEdgePosMap.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimEdgePosMap.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimEdgePosMap.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimEdgePosMap.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimExtendedEdgePoint.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimExtendedEdgePoint.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePoint.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimExtendedEdgePoint.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimExtendedEdgePoint.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePointVector.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePointVector.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePointVector.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimExtendedEdgePointVector.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimExtendedEdgePointVector.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimExtendedEdgePointVector.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimExtendedEdgePointVector.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimNodeCluster.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimNodeCluster.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -47,17 +47,18 @@ #ifdef CHECK_MEMORY_LEAKS #include #endif // CHECK_MEMORY_LEAKS -// =========================================================================== -// used namespaces -// =========================================================================== -using namespace std; +// =========================================================================== +// static member variables +// =========================================================================== NIVissimNodeCluster::DictType NIVissimNodeCluster::myDict; int NIVissimNodeCluster::myCurrentID = 1; - +// =========================================================================== +// method definitions +// =========================================================================== NIVissimNodeCluster::NIVissimNodeCluster(int id, int nodeid, int tlid, const std::vector& connectors, const std::vector& disturbances, @@ -252,7 +253,7 @@ NIVissimNodeCluster::_debugOut(std::ostream& into) { for (DictType::iterator i = myDict.begin(); i != myDict.end(); i++) { NIVissimNodeCluster* c = (*i).second; - into << endl << c->myID << ":"; + into << std::endl << c->myID << ":"; for (std::vector::iterator j = c->myConnectors.begin(); j != c->myConnectors.end(); j++) { if (j != c->myConnectors.begin()) { into << ", "; @@ -260,7 +261,7 @@ into << (*j); } } - into << "=======================" << endl; + into << "=======================" << std::endl; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeCluster.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimNodeCluster.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimNodeCluster.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NIVissimNodeDef.cpp /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimNodeDef.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimNodeDef.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -39,15 +40,18 @@ #ifdef CHECK_MEMORY_LEAKS #include #endif // CHECK_MEMORY_LEAKS -// =========================================================================== -// used namespaces -// =========================================================================== -using namespace std; +// =========================================================================== +// static member variables +// =========================================================================== NIVissimNodeDef::DictType NIVissimNodeDef::myDict; int NIVissimNodeDef::myMaxID = 0; + +// =========================================================================== +// method definitions +// =========================================================================== NIVissimNodeDef::NIVissimNodeDef(int id, const std::string& name) : myID(id), myName(name) {} @@ -111,7 +115,7 @@ assert(myBoundary!=0&&myBoundary->xmax()>=myBoundary->xmin()); return myBoundary->partialWithin(p, off); } -*/ + void NIVissimNodeDef::dict_assignConnectionsToNodes() { @@ -119,6 +123,7 @@ (*i).second->searchAndSetConnections(); } } +*/ size_t diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimNodeDef_Edges.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimNodeDef_Edges.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -76,6 +76,7 @@ } +/* void NIVissimNodeDef_Edges::searchAndSetConnections() { std::vector connections; @@ -106,7 +107,7 @@ edge->myConnectionClusters.push_back(c); } } - +*/ SUMOReal diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Edges.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimNodeDef_Edges.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimNodeDef_Edges.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimNodeDef_Edges.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -46,7 +46,7 @@ static bool dictionary(int id, const std::string& name, const NIVissimNodeParticipatingEdgeVector& edges); // virtual void computeBounding(); - virtual void searchAndSetConnections(); +// virtual void searchAndSetConnections(); virtual SUMOReal getEdgePosition(int edgeid) const; /** diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NIVissimNodeDef.h /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimNodeDef.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimNodeDef.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -44,7 +45,7 @@ int buildNodeCluster(); // virtual void computeBounding() = 0; // bool partialWithin(const AbstractPoly &p, SUMOReal off=0.0) const; - virtual void searchAndSetConnections() = 0; +// virtual void searchAndSetConnections() = 0; virtual SUMOReal getEdgePosition(int edgeid) const = 0; public: @@ -52,7 +53,7 @@ static NIVissimNodeDef* dictionary(int id); // static std::vector getWithin(const AbstractPoly &p, SUMOReal off=0.0); // static void buildNodeClusters(); - static void dict_assignConnectionsToNodes(); +// static void dict_assignConnectionsToNodes(); static size_t dictSize(); static void clearDict(); static int getMaxID(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimNodeDef_Poly.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimNodeDef_Poly.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,12 +45,11 @@ #ifdef CHECK_MEMORY_LEAKS #include #endif // CHECK_MEMORY_LEAKS -// =========================================================================== -// used namespaces -// =========================================================================== -using namespace std; +// =========================================================================== +// method definitions +// =========================================================================== NIVissimNodeDef_Poly::NIVissimNodeDef_Poly(int id, const std::string& name, const PositionVector& poly) : NIVissimNodeDef_Edges(id, name, NIVissimNodeParticipatingEdgeVector()), @@ -91,7 +90,6 @@ Position(myBoundary->xmin(), myBoundary->ymin()), Position(myBoundary->xmax(), myBoundary->ymax())); } -*/ void @@ -120,7 +118,7 @@ edge->myConnectionClusters.push_back(c); } } - +*/ /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeDef_Poly.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimNodeDef_Poly.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimNodeDef_Poly.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -47,7 +47,7 @@ const PositionVector& poly); // virtual void computeBounding(); // SUMOReal getEdgePosition(int edgeid) const; - void searchAndSetConnections(SUMOReal offset); +// void searchAndSetConnections(SUMOReal offset); private: PositionVector myPoly; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimNodeParticipatingEdge.cpp /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimNodeParticipatingEdge.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimNodeParticipatingEdge.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdge.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimNodeParticipatingEdge.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimNodeParticipatingEdge.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdgeVector.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdgeVector.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdgeVector.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimNodeParticipatingEdgeVector.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimNodeParticipatingEdgeVector.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimNodeParticipatingEdgeVector.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimNodeParticipatingEdgeVector.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimSource.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimSource.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimSource.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimSource.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSource.cpp /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimSource.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSource.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -40,12 +40,8 @@ NIVissimSource::DictType NIVissimSource::myDict; NIVissimSource::NIVissimSource(const std::string& id, const std::string& name, - const std::string& edgeid, SUMOReal q, - bool exact, int vehicle_combination, - SUMOReal beg, SUMOReal end) - : myID(id), myName(name), myEdgeID(edgeid), myQ(q), myExact(exact), - myVehicleCombination(vehicle_combination), - myTimeBeg(beg), myTimeEnd(end) {} + const std::string& edgeid) + : myID(id), myName(name), myEdgeID(edgeid) {} NIVissimSource::~NIVissimSource() {} @@ -53,10 +49,8 @@ bool NIVissimSource::dictionary(const std::string& id, const std::string& name, - const std::string& edgeid, SUMOReal q, bool exact, - int vehicle_combination, SUMOReal beg, SUMOReal end) { - NIVissimSource* o = new NIVissimSource(id, name, edgeid, q, exact, - vehicle_combination, beg, end); + const std::string& edgeid) { + NIVissimSource* o = new NIVissimSource(id, name, edgeid); if (!dictionary(id, o)) { delete o; return false; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimSource.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimSource.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimSource.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimSource.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSource.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimSource.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSource.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -43,12 +43,10 @@ class NIVissimSource { public: NIVissimSource(const std::string& id, const std::string& name, - const std::string& edgeid, SUMOReal q, bool exact, - int vehicle_combination, SUMOReal beg, SUMOReal end); + const std::string& edgeid); ~NIVissimSource(); static bool dictionary(const std::string& id, const std::string& name, - const std::string& edgeid, SUMOReal q, bool exact, - int vehicle_combination, SUMOReal beg, SUMOReal end); + const std::string& edgeid); static bool dictionary(const std::string& id, NIVissimSource* o); static NIVissimSource* dictionary(const std::string& id); static void clearDict(); @@ -56,11 +54,6 @@ std::string myID; std::string myName; std::string myEdgeID; - SUMOReal myQ; - bool myExact; - int myVehicleCombination; - SUMOReal myTimeBeg; - SUMOReal myTimeEnd; private: typedef std::map DictType; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTL.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTL.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTL.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTL.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimTL.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimTL.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -51,23 +51,25 @@ #ifdef CHECK_MEMORY_LEAKS #include #endif // CHECK_MEMORY_LEAKS -// =========================================================================== -// used namespaces -// =========================================================================== - -using namespace std; +// =========================================================================== +// static member variables +// =========================================================================== NIVissimTL::SignalDictType NIVissimTL::NIVissimTLSignal::myDict; -NIVissimTL::NIVissimTLSignal::NIVissimTLSignal(int lsaid, int id, + +// =========================================================================== +// method definitions +// =========================================================================== +NIVissimTL::NIVissimTLSignal::NIVissimTLSignal(int id, const std::string& name, const std::vector& groupids, int edgeid, int laneno, SUMOReal position, const std::vector& vehicleTypes) - : myLSA(lsaid), myID(id), myName(name), myGroupIDs(groupids), + : myID(id), myName(name), myGroupIDs(groupids), myEdgeID(edgeid), myLane(laneno), myPosition(position), myVehicleTypes(vehicleTypes) {} @@ -208,11 +210,11 @@ NIVissimTL::GroupDictType NIVissimTL::NIVissimTLSignalGroup::myDict; NIVissimTL::NIVissimTLSignalGroup::NIVissimTLSignalGroup( - int lsaid, int id, + int id, const std::string& name, bool isGreenBegin, const std::vector& times, SUMOTime tredyellow, SUMOTime tyellow) - : myLSA(lsaid), myID(id), myName(name), myTimes(times), + : myID(id), myName(name), myTimes(times), myFirstIsRed(!isGreenBegin), myTRedYellow(tredyellow), myTYellow(tyellow) {} @@ -381,12 +383,12 @@ size_t no_groups = 0; for (DictType::iterator i = myDict.begin(); i != myDict.end(); i++) { NIVissimTL* tl = (*i).second; - /* if(tl->myType!="festzeit") { - cout << " Warning: The traffic light '" << tl->myID - << "' could not be assigned to a node." << endl; - ref++; - continue; - }*/ + /* if(tl->myType!="festzeit") { + cout << " Warning: The traffic light '" << tl->myID + << "' could not be assigned to a node." << endl; + ref++; + continue; + }*/ std::string id = toString(tl->myID); TrafficLightType type = ((tl->getType() == "festzeit" || tl->getType() == "festzeit_fake") ? TLTYPE_STATIC : TLTYPE_ACTUATED); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTL.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTL.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTL.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTL.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimTL.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimTL.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -40,16 +40,20 @@ #include -class NBTrafficLightLogicCont; - - - // =========================================================================== // class declarations // =========================================================================== +class NBTrafficLightLogicCont; class NBLoadedTLDef; class NBEdgeCont; + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class NIVissimTL + */ class NIVissimTL { public: NIVissimTL(int id, const std::string& type, const std::string& name, @@ -82,7 +86,7 @@ */ class NIVissimTLSignal { public: - NIVissimTLSignal(int lsaid, int id, const std::string& name, + NIVissimTLSignal(int id, const std::string& name, const std::vector& groupids, int edgeid, int laneno, SUMOReal position, const std::vector& assignedVehicleTypes); ~NIVissimTLSignal(); @@ -97,7 +101,6 @@ static SSignalDictType getSignalsFor(int tlid); protected: - int myLSA; int myID; std::string myName; std::vector myGroupIDs; @@ -110,7 +113,7 @@ class NIVissimTLSignalGroup { public: - NIVissimTLSignalGroup(int lsaid, int id, const std::string& name, + NIVissimTLSignalGroup(int id, const std::string& name, bool isGreenBegin, const std::vector& times, SUMOTime tredyellow, SUMOTime tyellow); ~NIVissimTLSignalGroup(); @@ -122,7 +125,6 @@ static SGroupDictType getGroupsFor(int tlid); private: - int myLSA; int myID; std::string myName; std::vector myTimes; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimTrafficDescription.cpp /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimTrafficDescription.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimTrafficDescription.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -49,9 +49,9 @@ // member method definitions // =========================================================================== NIVissimTrafficDescription::NIVissimTrafficDescription( - int id, const std::string& name, + const std::string& name, const NIVissimVehicleClassVector& vehicleTypes) - : myID(id), myName(name), myVehicleTypes(vehicleTypes) {} + : myName(name), myVehicleTypes(vehicleTypes) {} NIVissimTrafficDescription::~NIVissimTrafficDescription() { @@ -66,7 +66,7 @@ NIVissimTrafficDescription::dictionary(int id, const std::string& name, const NIVissimVehicleClassVector& vehicleTypes) { - NIVissimTrafficDescription* o = new NIVissimTrafficDescription(id, name, vehicleTypes); + NIVissimTrafficDescription* o = new NIVissimTrafficDescription(name, vehicleTypes); if (!dictionary(id, o)) { delete o; return false; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimTrafficDescription.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimTrafficDescription.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimTrafficDescription.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimTrafficDescription.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -43,7 +43,7 @@ */ class NIVissimTrafficDescription { public: - NIVissimTrafficDescription(int id, const std::string& name, + NIVissimTrafficDescription(const std::string& name, const NIVissimVehicleClassVector& vehicleTypes); ~NIVissimTrafficDescription(); static bool dictionary(int id, const std::string& name, @@ -54,7 +54,6 @@ static SUMOReal meanSpeed(int id); SUMOReal meanSpeed() const; private: - int myID; std::string myName; NIVissimVehicleClassVector myVehicleTypes; private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimVehicleClass.cpp /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimVehicleClass.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimVehicleClass.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,10 +35,8 @@ #include #endif // CHECK_MEMORY_LEAKS -NIVissimVehicleClass::NIVissimVehicleClass(int type, - SUMOReal percentage, - int vwish) - : myType(type), myPercentage(percentage), myVWish(vwish) {} +NIVissimVehicleClass::NIVissimVehicleClass(int vwish) + : myVWish(vwish) {} NIVissimVehicleClass::~NIVissimVehicleClass() {} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleClass.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimVehicleClass.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimVehicleClass.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimVehicleClass.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -39,12 +39,10 @@ */ class NIVissimVehicleClass { public: - NIVissimVehicleClass(int type, SUMOReal percentage, int vwish); + NIVissimVehicleClass(int vwish); ~NIVissimVehicleClass(); int getSpeed() const; private: - int myType; - SUMOReal myPercentage; int myVWish; }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleClassVector.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleClassVector.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleClassVector.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleClassVector.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimVehicleClassVector.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimVehicleClassVector.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimVehicleClassVector.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleType.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleType.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleType.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleType.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimVehicleType.cpp /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimVehicleType.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimVehicleType.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -37,11 +37,10 @@ NIVissimVehicleType::DictType NIVissimVehicleType::myDict; -NIVissimVehicleType::NIVissimVehicleType(int id, - const std::string& name, const std::string& category, SUMOReal length, - const RGBColor& color, SUMOReal amax, SUMOReal dmax) - : myID(id), myName(name), myCategory(category), myLength(length), - myColor(color), myAMax(amax), myDMax(dmax) {} +NIVissimVehicleType::NIVissimVehicleType(const std::string& name, + const std::string& category, const RGBColor& color) + : myName(name), myCategory(category), + myColor(color) {} NIVissimVehicleType::~NIVissimVehicleType() {} @@ -49,11 +48,9 @@ bool -NIVissimVehicleType::dictionary(int id, - const std::string& name, const std::string& category, SUMOReal length, - const RGBColor& color, SUMOReal amax, SUMOReal dmax) { - NIVissimVehicleType* o = new NIVissimVehicleType(id, name, category, - length, color, amax, dmax); +NIVissimVehicleType::dictionary(int id, const std::string& name, const std::string& category, + const RGBColor& color) { + NIVissimVehicleType* o = new NIVissimVehicleType(name, category, color); if (!dictionary(id, o)) { delete o; return false; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleType.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleType.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleType.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehicleType.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimVehicleType.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimVehicleType.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimVehicleType.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -43,24 +43,19 @@ */ class NIVissimVehicleType { public: - NIVissimVehicleType(int id, const std::string& name, - const std::string& category, SUMOReal length, const RGBColor& color, - SUMOReal amax, SUMOReal dmax); + NIVissimVehicleType(const std::string& name, + const std::string& category, const RGBColor& color); ~NIVissimVehicleType(); static bool dictionary(int id, const std::string& name, - const std::string& category, SUMOReal length, const RGBColor& color, - SUMOReal amax, SUMOReal dmax); + const std::string& category, const RGBColor& color); static bool dictionary(int id, NIVissimVehicleType* o); static NIVissimVehicleType* dictionary(int id); static void clearDict(); private: - int myID; std::string myName; std::string myCategory; - SUMOReal myLength; RGBColor myColor; - SUMOReal myAMax, myDMax; private: typedef std::map DictType; static DictType myDict; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NIVissimVehTypeClass.cpp /// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NIVissimVehTypeClass.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimVehTypeClass.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/tempstructs/NIVissimVehTypeClass.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NIVissimVehTypeClass.h +/// @author Michael Behrisch /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: NIVissimVehTypeClass.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimVehTypeClass.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/netimport/vissim/typeloader -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,6 +92,10 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libvissimtypeload_a_AR = $(AR) $(ARFLAGS) libvissimtypeload_a_LIBADD = am_libvissimtypeload_a_OBJECTS = \ @@ -106,30 +155,86 @@ NIVissimSingleTypeParser__XKurvedefinition.$(OBJEXT) \ NIVissimSingleTypeParser__XVerteilungsdefinition.$(OBJEXT) libvissimtypeload_a_OBJECTS = $(am_libvissimtypeload_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libvissimtypeload_a_SOURCES) DIST_SOURCES = $(libvissimtypeload_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -138,6 +243,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -164,9 +270,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -177,10 +287,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -423,10 +529,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libvissimtypeload.a: $(libvissimtypeload_a_OBJECTS) $(libvissimtypeload_a_DEPENDENCIES) - -rm -f libvissimtypeload.a - $(libvissimtypeload_a_AR) libvissimtypeload.a $(libvissimtypeload_a_OBJECTS) $(libvissimtypeload_a_LIBADD) - $(RANLIB) libvissimtypeload.a + +libvissimtypeload.a: $(libvissimtypeload_a_OBJECTS) $(libvissimtypeload_a_DEPENDENCIES) $(EXTRA_libvissimtypeload_a_DEPENDENCIES) + $(AM_V_at)-rm -f libvissimtypeload.a + $(AM_V_AR)$(libvissimtypeload_a_AR) libvissimtypeload.a $(libvissimtypeload_a_OBJECTS) $(libvissimtypeload_a_LIBADD) + $(AM_V_at)$(RANLIB) libvissimtypeload.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -491,25 +598,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NIVissimSingleTypeParser__XVerteilungsdefinition.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -517,26 +624,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -548,15 +644,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -565,6 +657,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -613,10 +720,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -701,18 +813,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Fri, 21 Mar 2003 -/// @version $Id: NIVissimSingleTypeParser_Auswertungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Auswertungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Auswertungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Auswertungsdefinition.h /// @author Daniel Krajzewicz /// @date Fri, 21 Mar 2003 -/// @version $Id: NIVissimSingleTypeParser_Auswertungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Auswertungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Detektordefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Detektordefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Detektordefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Detektordefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Detektordefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Detektordefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_DynUml.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_DynUml.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_DynUml.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_DynUml.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_DynUml.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_DynUml.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Einheitendefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Einheitendefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Einheitendefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Einheitendefinition.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Einheitendefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Einheitendefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Emission.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Emission.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Emission.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Emission.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Emission.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Emission.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Fahrtverlaufdateien.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Fahrtverlaufdateien.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrtverlaufdateien.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Fahrtverlaufdateien.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Fahrtverlaufdateien.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Fahrtverlaufdateien.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Fahrverhaltendefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Fahrverhaltendefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrverhaltendefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Fahrverhaltendefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Fahrverhaltendefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Fahrverhaltendefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Fahrzeugklassendefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Fahrzeugklassendefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugklassendefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Fahrzeugklassendefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Fahrzeugklassendefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Fahrzeugklassendefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Fahrzeugtypdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Fahrzeugtypdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -112,8 +112,7 @@ while (tag != "DATAEND") { tag = readEndSecure(from, "verlustzeit"); } - return NIVissimVehicleType::dictionary(id, name, - category, length, color, amax, dmax); + return NIVissimVehicleType::dictionary(id, name, category, color); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fahrzeugtypdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Fahrzeugtypdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Fahrzeugtypdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Fahrzeugtypdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Fri, 21 Mar 2003 -/// @version $Id: NIVissimSingleTypeParser_Fensterdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Fensterdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Fensterdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Fensterdefinition.h /// @author Daniel Krajzewicz /// @date Fri, 21 Mar 2003 -/// @version $Id: NIVissimSingleTypeParser_Fensterdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Fensterdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Gefahrwarnungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Gefahrwarnungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gefahrwarnungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Gefahrwarnungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Gefahrwarnungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Gefahrwarnungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Gelbverhaltendefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Gelbverhaltendefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Gelbverhaltendefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Gelbverhaltendefinition.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Gelbverhaltendefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Gelbverhaltendefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Haltestellendefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Haltestellendefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Haltestellendefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Haltestellendefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Haltestellendefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Haltestellendefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Kantensperrung.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Kantensperrung.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kantensperrung.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Kantensperrung.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Kantensperrung.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Kantensperrung.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Thu, 6 Mar 2003 -/// @version $Id: NIVissimSingleTypeParser_Kennungszeile.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Kennungszeile.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Kennungszeile.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Kennungszeile.h /// @author Daniel Krajzewicz /// @date Thu, 6 Mar 2003 -/// @version $Id: NIVissimSingleTypeParser_Kennungszeile.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Kennungszeile.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Knotendefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Knotendefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Knotendefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Knotendefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Knotendefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Knotendefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Laengenverteilungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Laengenverteilungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Laengenverteilungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Laengenverteilungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Laengenverteilungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Laengenverteilungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Langsamfahrbereichdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Langsamfahrbereichdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Langsamfahrbereichdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Langsamfahrbereichdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Langsamfahrbereichdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Langsamfahrbereichdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Lichtsignalanlagendefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Lichtsignalanlagendefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Lichtsignalanlagendefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Lichtsignalanlagendefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Lichtsignalanlagendefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Lichtsignalanlagendefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Liniendefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Liniendefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Liniendefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Liniendefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Liniendefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Liniendefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Linksverkehr.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Linksverkehr.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Linksverkehr.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Linksverkehr.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Linksverkehr.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Linksverkehr.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_LSAKopplungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_LSAKopplungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_LSAKopplungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_LSAKopplungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_LSAKopplungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_LSAKopplungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Messungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Messungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Messungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Messungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Messungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Messungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Netzobjektdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Netzobjektdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Netzobjektdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Netzobjektdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Netzobjektdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Netzobjektdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Parkplatzdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Parkplatzdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Parkplatzdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Parkplatzdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Parkplatzdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Parkplatzdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Querschnittsmessungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Querschnittsmessungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querschnittsmessungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Querschnittsmessungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Querschnittsmessungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Querschnittsmessungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -99,8 +99,7 @@ if (tag == "vmax") { from >> vmax; } - ok = NIVissimDisturbance::dictionary(-1, "", edge, by, - timegap, waygap, vmax); + ok = NIVissimDisturbance::dictionary("", edge, by); if (tag != "DATAEND") { tag = readEndSecure(from); } @@ -145,8 +144,7 @@ from >> vmax; } - ok = NIVissimDisturbance::dictionary(id, name, edge, by, - timegap, waygap, vmax); + ok = NIVissimDisturbance::dictionary(name, edge, by); if (tag != "DATAEND") { tag = readEndSecure(from); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Rautedefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Rautedefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Rautedefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Rautedefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Rautedefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Reisezeitmessungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Reisezeitmessungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Reisezeitmessungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Reisezeitmessungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Reisezeitmessungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Reisezeitmessungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Richtungsentscheidungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Richtungspfeildefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Richtungspfeildefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Richtungspfeildefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Richtungspfeildefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Richtungspfeildefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Richtungspfeildefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Routenentscheidungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Routenentscheidungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Routenentscheidungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Routenentscheidungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Routenentscheidungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Routenentscheidungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Signalgeberdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Signalgeberdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -101,7 +101,7 @@ from >> laneno; from >> tag; - int position; + SUMOReal position; from >> position; // while (tag != "fahrzeugklassen") { @@ -111,8 +111,8 @@ // NIVissimTL::dictionary(lsaid); // !!! check whether someting is really done here NIVissimTL::NIVissimTLSignal* signal = - new NIVissimTL::NIVissimTLSignal(lsaid, id, name, groupids, edgeid, - laneno, (SUMOReal) position, assignedVehicleTypes); + new NIVissimTL::NIVissimTLSignal(id, name, groupids, edgeid, + laneno, position, assignedVehicleTypes); if (!NIVissimTL::NIVissimTLSignal::dictionary(lsaid, id, signal)) { throw 1; // !!! } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgeberdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Signalgeberdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Signalgeberdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Signalgeberdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Signalgruppendefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Signalgruppendefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -141,7 +141,7 @@ from >> tyellow; NIVissimTL::NIVissimTLSignalGroup* group = new NIVissimTL::NIVissimTLSignalGroup( - lsaid, id, name, isGreenBegin, times, (SUMOTime) tredyellow, (SUMOTime) tyellow); + id, name, isGreenBegin, times, (SUMOTime) tredyellow, (SUMOTime) tyellow); if (!NIVissimTL::NIVissimTLSignalGroup::dictionary(lsaid, id, group)) { throw 1; // !!! } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Signalgruppendefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Signalgruppendefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Signalgruppendefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Signalgruppendefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Simdauer.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Simdauer.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Simdauer.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Simdauer.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Simdauer.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Simdauer.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_SimRate.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_SimRate.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_SimRate.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_SimRate.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_SimRate.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_SimRate.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Startuhrzeit.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Startuhrzeit.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startuhrzeit.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Startuhrzeit.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Startuhrzeit.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Startuhrzeit.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Startzufallszahl.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Startzufallszahl.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Startzufallszahl.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Startzufallszahl.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Startzufallszahl.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Startzufallszahl.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Stauparameterdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Stauparameterdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauparameterdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Stauparameterdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Stauparameterdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Stauparameterdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Stauzaehlerdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Stauzaehlerdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stauzaehlerdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Stauzaehlerdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Stauzaehlerdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Stauzaehlerdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Stopschilddefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Stopschilddefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Stopschilddefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Stopschilddefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Stopschilddefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Stopschilddefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Streckendefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Streckendefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -116,7 +116,7 @@ } else if (tag == "spur") { // get the lane number int laneNo; - from >> laneNo; // type-checking is missing! + from >> laneNo; // unused and type-checking is missing! // get the list of assigned car classes std::vector assignedVehicles; tag = myRead(from); @@ -127,7 +127,7 @@ tag = readEndSecure(from); } // build and add the definition - NIVissimClosedLaneDef* cld = new NIVissimClosedLaneDef(laneNo, assignedVehicles); + NIVissimClosedLaneDef* cld = new NIVissimClosedLaneDef(assignedVehicles); clv.push_back(cld); } else { tag = readEndSecure(from); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckendefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Streckendefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Streckendefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Streckendefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Thu, 6 Mar 2003 -/// @version $Id: NIVissimSingleTypeParser_Streckentypdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Streckentypdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Streckentypdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Streckentypdefinition.h /// @author Daniel Krajzewicz /// @date Thu, 6 Mar 2003 -/// @version $Id: NIVissimSingleTypeParser_Streckentypdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Streckentypdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_TEAPACDefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_TEAPACDefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_TEAPACDefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_TEAPACDefinition.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_TEAPACDefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_TEAPACDefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Verbindungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Verbindungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -94,14 +94,14 @@ zuschlag1 = zuschlag2 = 0; SUMOReal seglength = 0; tag = myRead(from); - NIVissimConnection::Direction direction = NIVissimConnection::NIVC_DIR_ALL; +// NIVissimConnection::Direction direction = NIVissimConnection::NIVC_DIR_ALL; while (tag != "fahrzeugklassen" && tag != "sperrung" && tag != "auswertung" && tag != "DATAEND") { if (tag == "rechts") { - direction = NIVissimConnection::NIVC_DIR_RIGHT; +// direction = NIVissimConnection::NIVC_DIR_RIGHT; } else if (tag == "links") { - direction = NIVissimConnection::NIVC_DIR_LEFT; +// direction = NIVissimConnection::NIVC_DIR_LEFT; } else if (tag == "alle") { - direction = NIVissimConnection::NIVC_DIR_ALL; +// direction = NIVissimConnection::NIVC_DIR_ALL; } else if (tag == "dxnothalt") { from >> dxnothalt; // type-checking is missing! } else if (tag == "dxeinordnen") { @@ -145,7 +145,7 @@ // get the lane number // from >> tag; int laneNo; - from >> laneNo; // type-checking is missing! + from >> laneNo; // unused and type-checking is missing! // get the list of assigned car classes std::vector assignedVehicles; tag = myRead(from); @@ -158,13 +158,12 @@ tag = readEndSecure(from); } // build and add the definition - NIVissimClosedLaneDef* cld = new NIVissimClosedLaneDef(laneNo, assignedVehicles); + NIVissimClosedLaneDef* cld = new NIVissimClosedLaneDef(assignedVehicles); clv.push_back(cld); } } while (tag != "DATAEND"); } NIVissimConnection* c = new NIVissimConnection(id, name, from_def, to_def, geom, - direction, dxnothalt, dxeinordnen, zuschlag1, zuschlag2, seglength, assignedVehicles, clv); if (!NIVissimConnection::dictionary(id, c)) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verbindungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Verbindungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Verbindungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Verbindungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -77,7 +77,7 @@ int vwish; from >> tag; from >> vwish; - assignedTypes.push_back(new NIVissimVehicleClass(type, percentage, vwish)); + assignedTypes.push_back(new NIVissimVehicleClass(vwish)); tag = readEndSecure(from, "Fahrzeugtyp"); } // diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Verkehrszusammensetzungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Verlustzeitmessungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_VWunschentscheidungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_VWunschentscheidungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_VWunschentscheidungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_VWunschentscheidungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_VWunschentscheidungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_VWunschentscheidungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser__XKurvedefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser__XKurvedefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XKurvedefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser__XKurvedefinition.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser__XKurvedefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser__XKurvedefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser__XVerteilungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser__XVerteilungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser__XVerteilungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser__XVerteilungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser__XVerteilungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser__XVerteilungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Zeitenverteilungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Zeitenverteilungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitenverteilungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Zeitenverteilungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Zeitenverteilungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Zeitenverteilungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Zeitschrittfaktor.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Zeitschrittfaktor.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zeitschrittfaktor.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Zeitschrittfaktor.h /// @author Daniel Krajzewicz /// @date Wed, 30 Apr 2003 -/// @version $Id: NIVissimSingleTypeParser_Zeitschrittfaktor.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Zeitschrittfaktor.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Zuflussdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Zuflussdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -65,14 +65,13 @@ } } // read q - bool exact = false; - SUMOReal q; + // bool exact = false; tag = myRead(from); if (tag == "exakt") { - exact = true; + // exact = true; tag = myRead(from); } - q = TplConvert::_2SUMOReal(tag.c_str()); + // SUMOReal q = TplConvert::_2SUMOReal(tag.c_str()); // read the vehicle types from >> tag; int vehicle_combination; @@ -88,8 +87,7 @@ from >> tag; from >> end; } - return NIVissimSource::dictionary(id, name, edgeid, q, exact, vehicle_combination, - beg, end); + return NIVissimSource::dictionary(id, name, edgeid); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zuflussdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Zuflussdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Zuflussdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Zuflussdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Zusammensetzungsdefinition.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Zusammensetzungsdefinition.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netimport/vissim/typeloader/NIVissimSingleTypeParser_Zusammensetzungsdefinition.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NIVissimSingleTypeParser_Zusammensetzungsdefinition.h /// @author Daniel Krajzewicz /// @date Wed, 18 Dec 2002 -/// @version $Id: NIVissimSingleTypeParser_Zusammensetzungsdefinition.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NIVissimSingleTypeParser_Zusammensetzungsdefinition.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/netload -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,6 +92,10 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libnetload_a_AR = $(AR) $(ARFLAGS) libnetload_a_LIBADD = am_libnetload_a_OBJECTS = NLDetectorBuilder.$(OBJEXT) \ @@ -55,30 +104,86 @@ NLJunctionControlBuilder.$(OBJEXT) NLBuilder.$(OBJEXT) \ NLHandler.$(OBJEXT) NLTriggerBuilder.$(OBJEXT) libnetload_a_OBJECTS = $(am_libnetload_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libnetload_a_SOURCES) DIST_SOURCES = $(libnetload_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -87,6 +192,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -113,9 +219,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -126,10 +236,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -269,10 +375,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libnetload.a: $(libnetload_a_OBJECTS) $(libnetload_a_DEPENDENCIES) - -rm -f libnetload.a - $(libnetload_a_AR) libnetload.a $(libnetload_a_OBJECTS) $(libnetload_a_LIBADD) - $(RANLIB) libnetload.a + +libnetload.a: $(libnetload_a_OBJECTS) $(libnetload_a_DEPENDENCIES) $(EXTRA_libnetload_a_DEPENDENCIES) + $(AM_V_at)-rm -f libnetload.a + $(AM_V_AR)$(libnetload_a_AR) libnetload.a $(libnetload_a_OBJECTS) $(libnetload_a_LIBADD) + $(AM_V_at)$(RANLIB) libnetload.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -289,25 +396,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NLTriggerBuilder.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -315,26 +422,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -346,15 +442,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -363,6 +455,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -411,10 +518,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -499,18 +611,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLBuilder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 9 Jul 2001 -/// @version $Id: NLBuilder.cpp 14477 2013-08-23 06:59:42Z namdre $ +/// @version $Id: NLBuilder.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // The main interface for loading a microsim /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -121,7 +121,7 @@ bool NLBuilder::build() { // try to build the net - if (!load("net-file")) { + if (!load("net-file", true)) { return false; } // check whether the loaded net agrees with the simulation options @@ -162,7 +162,7 @@ // the measure to use, then EdgeFloatTimeLineRetriever_EdgeEffort eRetriever(myNet); std::string measure = myOptions.getString("weight-attribute"); - if (measure != "traveltime") { + if (!myOptions.isDefault("weight-attribute")) { if (measure == "CO" || measure == "CO2" || measure == "HC" || measure == "PMx" || measure == "NOx" || measure == "fuel") { measure += "_perVeh"; } @@ -192,6 +192,11 @@ if (!load("additional-files")) { return false; } + // load shapes with separate handler + NLShapeHandler sh("", myNet.getShapeContainer()); + if (!ShapeHandler::loadFiles(myOptions.getStringVector("additional-files"), sh)) { + return false; + } } WRITE_MESSAGE("Loading done."); return true; @@ -227,7 +232,8 @@ stateDumpFiles.push_back(prefix + "_" + time2string(*i) + ".sbx"); } } - myNet.closeBuilding(edges, junctions, routeLoaders, tlc, stateDumpTimes, stateDumpFiles); + myNet.closeBuilding(edges, junctions, routeLoaders, tlc, stateDumpTimes, stateDumpFiles, + myXMLHandler.haveSeenInternalEdge()); } catch (IOError& e) { delete edges; delete junctions; @@ -245,7 +251,7 @@ bool -NLBuilder::load(const std::string& mmlWhat) { +NLBuilder::load(const std::string& mmlWhat, const bool isNet) { if (!OptionsCont::getOptions().isUsableFileList(mmlWhat)) { return false; } @@ -253,7 +259,7 @@ for (std::vector::const_iterator fileIt = files.begin(); fileIt != files.end(); ++fileIt) { PROGRESS_BEGIN_MESSAGE("Loading " + mmlWhat + " from '" + *fileIt + "'"); long before = SysUtils::getCurrentMillis(); - if (!XMLSubSys::runParser(myXMLHandler, *fileIt)) { + if (!XMLSubSys::runParser(myXMLHandler, *fileIt, isNet)) { WRITE_MESSAGE("Loading of " + mmlWhat + " failed."); return false; } @@ -271,8 +277,8 @@ if (oc.isSet("route-files") && string2time(oc.getString("route-steps")) > 0) { std::vector files = oc.getStringVector("route-files"); for (std::vector::const_iterator fileIt = files.begin(); fileIt != files.end(); ++fileIt) { - if (!FileHelpers::exists(*fileIt)) { - throw ProcessError("The route file '" + *fileIt + "' does not exist."); + if (!FileHelpers::isReadable(*fileIt)) { + throw ProcessError("The route file '" + *fileIt + "' is not accessible."); } } // open files for reading diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 9 Jul 2001 -/// @version $Id: NLBuilder.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NLBuilder.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The main interface for loading a microsim /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -107,9 +107,10 @@ * Assuming the given string to be an option name behind which a list of files * is stored, this method invokes an XML reader on all the files set for this option. * @param[in] mmlWhat The option to get the file list from + * @param[in] isNet whether a network gets loaded * @return Whether loading of all files was successfull */ - bool load(const std::string& mmlWhat); + bool load(const std::string& mmlWhat, const bool isNet = false); /** @brief Closes the net building process diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLDetectorBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLDetectorBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLDetectorBuilder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLDetectorBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,13 +5,14 @@ /// @author Clemens Honomichl /// @author Michael Behrisch /// @author Christian Roessel +/// @author Jakob Erdmann /// @date Mon, 15 Apr 2002 -/// @version $Id: NLDetectorBuilder.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NLDetectorBuilder.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Builds detectors for microsim /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -43,8 +44,9 @@ #include #include #include -#include +#include #include +#include #include #include #include @@ -150,7 +152,7 @@ // build the loop MSDetectorFileOutput* loop = createInstantInductLoop(id, clane, pos, device); // add the file output - myNet.getDetectorControl().add(SUMO_TAG_INDUCTION_LOOP, loop); + myNet.getDetectorControl().add(SUMO_TAG_INSTANT_INDUCTION_LOOP, loop); } @@ -362,7 +364,7 @@ const std::string& device) { checkSampleInterval(frequency, SUMO_TAG_ROUTEPROBE, id); MSEdge* e = getEdgeChecking(edge, SUMO_TAG_ROUTEPROBE, id); - MSRouteProbe* probe = new MSRouteProbe(id, e, begin); + MSRouteProbe* probe = new MSRouteProbe(id, e, id + "_" + toString(begin), id + "_" + toString(begin - frequency)); // add the file output myNet.getDetectorControl().add(SUMO_TAG_ROUTEPROBE, probe, device, frequency, begin); } @@ -496,16 +498,19 @@ MSMeanData* det = 0; if (type == "" || type == "performance" || type == "traffic") { det = new MSMeanData_Net(id, begin, end, useLanes, withEmpty, - printDefaults, withInternal, trackVehicles, - maxTravelTime, minSamples, haltSpeed, vt); - } else if (type == "hbefa") { - det = new MSMeanData_HBEFA(id, begin, end, useLanes, withEmpty, - printDefaults, withInternal, trackVehicles, - maxTravelTime, minSamples, vt); + printDefaults, withInternal, trackVehicles, maxTravelTime, minSamples, haltSpeed, vt); + } else if (type == "emissions" || type == "hbefa") { + if (type == "hbefa") { + WRITE_WARNING("The netstate type 'hbefa' is deprecated. Please use the type 'emissions' instead."); + } + det = new MSMeanData_Emissions(id, begin, end, useLanes, withEmpty, + printDefaults, withInternal, trackVehicles, maxTravelTime, minSamples, vt); } else if (type == "harmonoise") { det = new MSMeanData_Harmonoise(id, begin, end, useLanes, withEmpty, - printDefaults, withInternal, trackVehicles, - maxTravelTime, minSamples, vt); + printDefaults, withInternal, trackVehicles, maxTravelTime, minSamples, vt); + } else if (type == "amitran") { + det = new MSMeanData_Amitran(id, begin, end, useLanes, withEmpty, + printDefaults, withInternal, trackVehicles, maxTravelTime, minSamples, haltSpeed, vt); } else { throw InvalidArgument("Invalid type '" + type + "' for meandata dump '" + id + "'."); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLDetectorBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLDetectorBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLDetectorBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLDetectorBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Christian Roessel /// @author Michael Behrisch /// @date Mon, 15 Apr 2002 -/// @version $Id: NLDetectorBuilder.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NLDetectorBuilder.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Builds detectors for microsim /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLDiscreteEventBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLDiscreteEventBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLDiscreteEventBuilder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLDiscreteEventBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Sep, 2003 -/// @version $Id: NLDiscreteEventBuilder.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NLDiscreteEventBuilder.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // } /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLDiscreteEventBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLDiscreteEventBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLDiscreteEventBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLDiscreteEventBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sep, 2003 -/// @version $Id: NLDiscreteEventBuilder.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NLDiscreteEventBuilder.h 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLEdgeControlBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLEdgeControlBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLEdgeControlBuilder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLEdgeControlBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 9 Jul 2001 -/// @version $Id: NLEdgeControlBuilder.cpp 14435 2013-08-19 08:45:10Z namdre $ +/// @version $Id: NLEdgeControlBuilder.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Interface for building edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -72,8 +73,10 @@ void NLEdgeControlBuilder::beginEdgeParsing( const std::string& id, const MSEdge::EdgeBasicFunction function, - const std::string& streetName) { - myActiveEdge = buildEdge(id, function, streetName); + const std::string& streetName, + const std::string& edgeType, + int priority) { + myActiveEdge = buildEdge(id, function, streetName, edgeType, priority); if (MSEdge::dictionary(id) != 0) { throw InvalidArgument("Another edge with the id '" + id + "' exists."); } @@ -105,7 +108,7 @@ MSEdgeControl* NLEdgeControlBuilder::build() { - for (EdgeCont::iterator i1 = myEdges.begin(); i1 != myEdges.end(); i1++) { + for (MSEdgeVector::iterator i1 = myEdges.begin(); i1 != myEdges.end(); i1++) { (*i1)->closeBuilding(); #ifdef HAVE_INTERNAL if (MSGlobals::gUseMesoSim) { @@ -113,13 +116,32 @@ } #endif } + // mark internal edges belonging to a roundabout (after all edges are build) + if (MSGlobals::gUsingInternalLanes) { + for (MSEdgeVector::iterator i1 = myEdges.begin(); i1 != myEdges.end(); i1++) { + MSEdge* edge = *i1; + if (edge->isInternal()) { + if (edge->getNumSuccessors() != 1 || edge->getIncomingEdges().size() != 1) { + throw ProcessError("Internal edge '" + edge->getID() + "' is not properly connected (probably a manually modified net.xml)."); + } + if (edge->getSuccessors()[0]->isRoundabout() || edge->getIncomingEdges()[0]->isRoundabout()) { + edge->markAsRoundabout(); + } + } + } + } + if (!deprecatedVehicleClassesSeen.empty()) { + WRITE_WARNING("Deprecated vehicle classes '" + toString(deprecatedVehicleClassesSeen) + "' in input network."); + deprecatedVehicleClassesSeen.clear(); + } return new MSEdgeControl(myEdges); } MSEdge* -NLEdgeControlBuilder::buildEdge(const std::string& id, const MSEdge::EdgeBasicFunction function, const std::string& streetName) { - return new MSEdge(id, myCurrentNumericalEdgeID++, function, streetName); +NLEdgeControlBuilder::buildEdge(const std::string& id, const MSEdge::EdgeBasicFunction function, + const std::string& streetName, const std::string& edgeType, const int priority) { + return new MSEdge(id, myCurrentNumericalEdgeID++, function, streetName, edgeType, priority); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLEdgeControlBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLEdgeControlBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLEdgeControlBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLEdgeControlBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 9 Jul 2001 -/// @version $Id: NLEdgeControlBuilder.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NLEdgeControlBuilder.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Interface for building edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -62,9 +62,6 @@ * @todo Assignment of lanes is not really well. Should be reworked after shapes are given as params. */ class NLEdgeControlBuilder { -public: - /// @brief definition of the used storage for edges - typedef std::vector EdgeCont; public: /// @brief Constructor @@ -88,7 +85,7 @@ * @exception InvalidArgument If an edge with the same name was already built */ void beginEdgeParsing(const std::string& id, const MSEdge::EdgeBasicFunction function, - const std::string& streetName); + const std::string& streetName, const std::string& edgeType, int priority); /** @brief Adds a lane to the current edge; @@ -128,7 +125,8 @@ * @param[in] id The id of the edge to build * @param[in] streetName The street name of the edge to build */ - virtual MSEdge* buildEdge(const std::string& id, const MSEdge::EdgeBasicFunction function, const std::string& streetName = ""); + virtual MSEdge* buildEdge(const std::string& id, const MSEdge::EdgeBasicFunction function, + const std::string& streetName, const std::string& edgeType, const int priority); protected: @@ -139,7 +137,7 @@ unsigned int myCurrentNumericalEdgeID; /// @brief Temporary, internal storage for built edges - EdgeCont myEdges; + MSEdgeVector myEdges; /// @brief pointer to the currently chosen edge MSEdge* myActiveEdge; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -7,12 +7,12 @@ /// @author Michael Behrisch /// @author Felix Brack /// @date Mon, 9 Jul 2001 -/// @version $Id: NLHandler.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NLHandler.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // The XML-Handler for network loading /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -47,10 +47,9 @@ #include #include #include -#include +#include #include #include -#include #include #include #include @@ -70,16 +69,18 @@ NLDetectorBuilder& detBuilder, NLTriggerBuilder& triggerBuilder, NLEdgeControlBuilder& edgeBuilder, - NLJunctionControlBuilder& junctionBuilder) - : MSRouteHandler(file, true), - myNet(net), myActionBuilder(net), - myCurrentIsInternalToSkip(false), - myDetectorBuilder(detBuilder), myTriggerBuilder(triggerBuilder), - myEdgeControlBuilder(edgeBuilder), myJunctionControlBuilder(junctionBuilder), - myAmInTLLogicMode(false), myCurrentIsBroken(false), - myHaveWarnedAboutDeprecatedLanes(false), - myLastParameterised(0), - myHaveSeenInternalEdge(false) {} + NLJunctionControlBuilder& junctionBuilder) : + MSRouteHandler(file, true), + myNet(net), myActionBuilder(net), + myCurrentIsInternalToSkip(false), + myDetectorBuilder(detBuilder), myTriggerBuilder(triggerBuilder), + myEdgeControlBuilder(edgeBuilder), myJunctionControlBuilder(junctionBuilder), + myAmInTLLogicMode(false), myCurrentIsBroken(false), + myHaveWarnedAboutDeprecatedLanes(false), + myLastParameterised(0), + myHaveSeenInternalEdge(false), + myNetIsLoaded(false) +{} NLHandler::~NLHandler() {} @@ -96,12 +97,6 @@ case SUMO_TAG_LANE: addLane(attrs); break; - case SUMO_TAG_POLY: - addPoly(attrs); - break; - case SUMO_TAG_POI: - addPOI(attrs); - break; case SUMO_TAG_JUNCTION: openJunction(attrs); initJunctionLogic(attrs); @@ -160,6 +155,9 @@ case SUMO_TAG_BUS_STOP: myTriggerBuilder.parseAndBuildBusStop(myNet, attrs); break; + case SUMO_TAG_CONTAINER_STOP: + myTriggerBuilder.parseAndBuildContainerStop(myNet, attrs); + break; case SUMO_TAG_VTYPEPROBE: addVTypeProbeDetector(attrs); break; @@ -190,6 +188,9 @@ case SUMO_TAG_TAZSINK: addDistrictEdge(attrs, false); break; + case SUMO_TAG_ROUNDABOUT: + addRoundabout(attrs); + break; default: break; } @@ -235,7 +236,20 @@ endE3Detector(); break; case SUMO_TAG_NET: + // build junction graph + for (JunctionGraph::iterator it = myJunctionGraph.begin(); it != myJunctionGraph.end(); ++it) { + MSEdge* edge = MSEdge::dictionary(it->first); + MSJunction* from = myJunctionControlBuilder.retrieve(it->second.first); + MSJunction* to = myJunctionControlBuilder.retrieve(it->second.second); + if (edge != 0 && from != 0 && to != 0) { + edge->setJunctions(from, to); + from->addOutgoing(edge); + to->addIncoming(edge); + } + } + //initialise traffic lights myJunctionControlBuilder.postLoadInitialization(); + myNetIsLoaded = true; break; default: break; @@ -260,10 +274,21 @@ return; } // omit internal edges if not wished - if (!MSGlobals::gUsingInternalLanes && id[0] == ':') { + if (id[0] == ':') { myHaveSeenInternalEdge = true; - myCurrentIsInternalToSkip = true; - return; + if (!MSGlobals::gUsingInternalLanes) { + myCurrentIsInternalToSkip = true; + return; + } + } + if (attrs.hasAttribute(SUMO_ATTR_FROM)) { + myJunctionGraph[id] = std::make_pair( + attrs.get(SUMO_ATTR_FROM, 0, ok), + attrs.get(SUMO_ATTR_TO, 0, ok)); + } else { + // must be an internal edge + std::string junctionID = SUMOXMLDefinitions::getJunctionIDFromInternalEdge(id); + myJunctionGraph[id] = std::make_pair(junctionID, junctionID); } myCurrentIsInternalToSkip = false; // parse the function @@ -287,16 +312,26 @@ case EDGEFUNC_INTERNAL: funcEnum = MSEdge::EDGEFUNCTION_INTERNAL; break; + case EDGEFUNC_CROSSING: + funcEnum = MSEdge::EDGEFUNCTION_CROSSING; + break; + case EDGEFUNC_WALKINGAREA: + funcEnum = MSEdge::EDGEFUNCTION_WALKINGAREA; + break; } // get the street name - std::string streetName = attrs.getOpt(SUMO_ATTR_NAME, id.c_str(), ok, ""); + const std::string streetName = attrs.getOpt(SUMO_ATTR_NAME, id.c_str(), ok, ""); + // get the edge type (only for visualization) + const std::string edgeType = attrs.getOpt(SUMO_ATTR_TYPE, id.c_str(), ok, ""); + // get the edge priority (only for visualization) + const int priority = attrs.getOpt(SUMO_ATTR_PRIORITY, id.c_str(), ok, -1); // default taken from netbuild/NBFrame option 'default.priority' if (!ok) { myCurrentIsBroken = true; return; } // try { - myEdgeControlBuilder.beginEdgeParsing(id, funcEnum, streetName); + myEdgeControlBuilder.beginEdgeParsing(id, funcEnum, streetName, edgeType, priority); } catch (InvalidArgument& e) { WRITE_ERROR(e.what()); myCurrentIsBroken = true; @@ -333,24 +368,21 @@ myCurrentIsBroken = true; return; } - SUMOReal maxSpeed = attrs.get(SUMO_ATTR_SPEED, id.c_str(), ok); - SUMOReal length = attrs.get(SUMO_ATTR_LENGTH, id.c_str(), ok); - std::string allow; - try { - bool dummy; - allow = attrs.getOpt(SUMO_ATTR_ALLOW, id.c_str(), dummy, "", false); - } catch (EmptyData e) { - // !!! deprecated - } - std::string disallow = attrs.getOpt(SUMO_ATTR_DISALLOW, id.c_str(), ok, ""); - SUMOReal width = attrs.getOpt(SUMO_ATTR_WIDTH, id.c_str(), ok, SUMO_const_laneWidth); - PositionVector shape = attrs.get(SUMO_ATTR_SHAPE, id.c_str(), ok); + const SUMOReal maxSpeed = attrs.get(SUMO_ATTR_SPEED, id.c_str(), ok); + const SUMOReal length = attrs.get(SUMO_ATTR_LENGTH, id.c_str(), ok); + const std::string allow = attrs.getOpt(SUMO_ATTR_ALLOW, id.c_str(), ok, "", false); + const std::string disallow = attrs.getOpt(SUMO_ATTR_DISALLOW, id.c_str(), ok, ""); + const SUMOReal width = attrs.getOpt(SUMO_ATTR_WIDTH, id.c_str(), ok, SUMO_const_laneWidth); + const PositionVector shape = attrs.get(SUMO_ATTR_SHAPE, id.c_str(), ok); if (shape.size() < 2) { WRITE_ERROR("Shape of lane '" + id + "' is broken.\n Can not build according edge."); myCurrentIsBroken = true; return; } - SVCPermissions permissions = parseVehicleClasses(allow, disallow); + const SVCPermissions permissions = parseVehicleClasses(allow, disallow); + if (permissions != SVCAll) { + myNet.setRestrictionFound(); + } myCurrentIsBroken |= !ok; if (!myCurrentIsBroken) { try { @@ -384,6 +416,9 @@ if (attrs.hasAttribute(SUMO_ATTR_SHAPE)) { // inner junctions have no shape shape = attrs.getOpt(SUMO_ATTR_SHAPE, id.c_str(), ok, PositionVector()); + if (shape.size() > 2) { + shape.closePolygon(); + } } SUMOReal x = attrs.get(SUMO_ATTR_X, id.c_str(), ok); SUMOReal y = attrs.get(SUMO_ATTR_Y, id.c_str(), ok); @@ -521,94 +556,6 @@ } - - - - - -void -NLHandler::addPOI(const SUMOSAXAttributes& attrs) { - bool ok = true; - const SUMOReal INVALID_POSITION(-1000000); - std::string id = attrs.get(SUMO_ATTR_ID, 0, ok); - SUMOReal x = attrs.getOpt(SUMO_ATTR_X, id.c_str(), ok, INVALID_POSITION); - SUMOReal y = attrs.getOpt(SUMO_ATTR_Y, id.c_str(), ok, INVALID_POSITION); - SUMOReal lon = attrs.getOpt(SUMO_ATTR_LON, id.c_str(), ok, INVALID_POSITION); - SUMOReal lat = attrs.getOpt(SUMO_ATTR_LAT, id.c_str(), ok, INVALID_POSITION); - SUMOReal lanePos = attrs.getOpt(SUMO_ATTR_POSITION, id.c_str(), ok, INVALID_POSITION); - SUMOReal layer = attrs.getOpt(SUMO_ATTR_LAYER, id.c_str(), ok, (SUMOReal)GLO_POI); - std::string type = attrs.getOpt(SUMO_ATTR_TYPE, id.c_str(), ok, ""); - std::string laneID = attrs.getOpt(SUMO_ATTR_LANE, id.c_str(), ok, ""); - RGBColor color = attrs.hasAttribute(SUMO_ATTR_COLOR) ? attrs.get(SUMO_ATTR_COLOR, id.c_str(), ok) : RGBColor::RED; - SUMOReal angle = attrs.getOpt(SUMO_ATTR_ANGLE, id.c_str(), ok, Shape::DEFAULT_ANGLE); - std::string imgFile = attrs.getOpt(SUMO_ATTR_IMGFILE, id.c_str(), ok, Shape::DEFAULT_IMG_FILE); - if (imgFile != "" && !FileHelpers::isAbsolute(imgFile)) { - imgFile = FileHelpers::getConfigurationRelative(getFileName(), imgFile); - } - SUMOReal width = attrs.getOpt(SUMO_ATTR_WIDTH, id.c_str(), ok, Shape::DEFAULT_IMG_WIDTH); - SUMOReal height = attrs.getOpt(SUMO_ATTR_HEIGHT, id.c_str(), ok, Shape::DEFAULT_IMG_HEIGHT); - if (!ok) { - return; - } - Position pos(x, y); - if (x == INVALID_POSITION || y == INVALID_POSITION) { - // try computing x,y from lane,pos - if (laneID != "") { - MSLane* lane = MSLane::dictionary(laneID); - if (lane == 0) { - WRITE_ERROR("Lane '" + laneID + "' to place a poi '" + id + "'on is not known."); - return; - } - if (lanePos < 0) { - lanePos = lane->getLength() + lanePos; - } - pos = lane->geometryPositionAtOffset(lanePos); - } else { - // try computing x,y from lon,lat - if (lat == INVALID_POSITION || lon == INVALID_POSITION) { - WRITE_ERROR("Either (x,y), (lon,lat) or (lane,pos) must be specified for poi '" + id + "'."); - return; - } else if (!GeoConvHelper::getFinal().usingGeoProjection()) { - WRITE_ERROR("(lon, lat) is specified for poi '" + id + "' but no geo-conversion is specified for the network."); - return; - } - pos.set(lon, lat); - GeoConvHelper::getFinal().x2cartesian_const(pos); - } - } - if (!myNet.getShapeContainer().addPOI(id, type, color, layer, angle, imgFile, pos, width, height)) { - WRITE_ERROR("PoI '" + id + "' already exists."); - } -} - - -void -NLHandler::addPoly(const SUMOSAXAttributes& attrs) { - bool ok = true; - std::string id = attrs.get(SUMO_ATTR_ID, 0, ok); - // get the id, report an error if not given or empty... - if (!ok) { - return; - } - SUMOReal layer = attrs.getOpt(SUMO_ATTR_LAYER, id.c_str(), ok, (SUMOReal)GLO_POLYGON); - bool fill = attrs.getOpt(SUMO_ATTR_FILL, id.c_str(), ok, false); - std::string type = attrs.getOpt(SUMO_ATTR_TYPE, id.c_str(), ok, ""); - std::string colorStr = attrs.get(SUMO_ATTR_COLOR, id.c_str(), ok); - RGBColor color = attrs.get(SUMO_ATTR_COLOR, id.c_str(), ok); - PositionVector shape = attrs.get(SUMO_ATTR_SHAPE, id.c_str(), ok); - SUMOReal angle = attrs.getOpt(SUMO_ATTR_ANGLE, id.c_str(), ok, Shape::DEFAULT_ANGLE); - std::string imgFile = attrs.getOpt(SUMO_ATTR_IMGFILE, id.c_str(), ok, Shape::DEFAULT_IMG_FILE); - if (imgFile != "" && !FileHelpers::isAbsolute(imgFile)) { - imgFile = FileHelpers::getConfigurationRelative(getFileName(), imgFile); - } - if (shape.size() != 0) { - if (!myNet.getShapeContainer().addPolygon(id, type, color, layer, angle, imgFile, shape, fill)) { - WRITE_ERROR("Polygon '" + id + "' already exists."); - } - } -} - - void NLHandler::addRequest(const SUMOSAXAttributes& attrs) { if (myCurrentIsBroken) { @@ -684,7 +631,9 @@ // try to get the phase duration SUMOTime duration = attrs.getSUMOTimeReporting(SUMO_ATTR_DURATION, myJunctionControlBuilder.getActiveKey().c_str(), ok); if (duration == 0) { - WRITE_ERROR("Duration of tls-logic '" + myJunctionControlBuilder.getActiveKey() + "/" + myJunctionControlBuilder.getActiveSubKey() + "' is zero."); + WRITE_ERROR("Duration of phase " + toString(myJunctionControlBuilder.getNumberOfLoadedPhases()) + + " for tlLogic '" + myJunctionControlBuilder.getActiveKey() + + "' program '" + myJunctionControlBuilder.getActiveSubKey() + "' is zero."); return; } // if the traffic light is an actuated traffic light, try to get @@ -976,7 +925,8 @@ tlLinkIdx = attrs.get(SUMO_ATTR_TLLINKINDEX, 0, ok); // make sure that the index is in range MSTrafficLightLogic* logic = myJunctionControlBuilder.getTLLogic(tlID).getActive(); - if (tlLinkIdx < 0 || tlLinkIdx >= (int)logic->getCurrentPhaseDef().getState().size()) { + if ((tlLinkIdx < 0 || tlLinkIdx >= (int)logic->getCurrentPhaseDef().getState().size()) + && logic->getLogicType() != "railSignal") { WRITE_ERROR("Invalid " + toString(SUMO_ATTR_TLLINKINDEX) + " '" + toString(tlLinkIdx) + "' in connection controlled by '" + tlID + "'"); return; @@ -1054,6 +1004,10 @@ // ---------------------------------- void NLHandler::setLocation(const SUMOSAXAttributes& attrs) { + if (myNetIsLoaded) { + //WRITE_WARNING("POIs and Polygons should be loaded using option --po-files") + return; + } bool ok = true; PositionVector s = attrs.get(SUMO_ATTR_NET_OFFSET, 0, ok); Boundary convBoundary = attrs.get(SUMO_ATTR_CONV_BOUNDARY, 0, ok); @@ -1080,13 +1034,13 @@ return; } try { - MSEdge* sink = myEdgeControlBuilder.buildEdge(myCurrentDistrictID + "-sink", MSEdge::EDGEFUNCTION_DISTRICT); + MSEdge* sink = myEdgeControlBuilder.buildEdge(myCurrentDistrictID + "-sink", MSEdge::EDGEFUNCTION_DISTRICT, "", "", -1); if (!MSEdge::dictionary(myCurrentDistrictID + "-sink", sink)) { delete sink; throw InvalidArgument("Another edge with the id '" + myCurrentDistrictID + "-sink' exists."); } sink->initialize(new std::vector()); - MSEdge* source = myEdgeControlBuilder.buildEdge(myCurrentDistrictID + "-source", MSEdge::EDGEFUNCTION_DISTRICT); + MSEdge* source = myEdgeControlBuilder.buildEdge(myCurrentDistrictID + "-source", MSEdge::EDGEFUNCTION_DISTRICT, "", "", -1); if (!MSEdge::dictionary(myCurrentDistrictID + "-source", source)) { delete source; throw InvalidArgument("Another edge with the id '" + myCurrentDistrictID + "-source' exists."); @@ -1100,8 +1054,16 @@ if (edge == 0) { throw InvalidArgument("The edge '" + *i + "' within district '" + myCurrentDistrictID + "' is not known."); } - source->addFollower(edge); - edge->addFollower(sink); + source->addSuccessor(edge); + edge->addSuccessor(sink); + } + } + if (attrs.hasAttribute(SUMO_ATTR_SHAPE)) { + PositionVector shape = attrs.get(SUMO_ATTR_SHAPE, myCurrentDistrictID.c_str(), ok); + if (shape.size() != 0) { + if (!myNet.getShapeContainer().addPolygon(myCurrentDistrictID, "taz", RGBColor::parseColor("1.0,.33,.33"), 0, 0, "", shape, false)) { + WRITE_WARNING("Skipping visualization of taz '" + myCurrentDistrictID + "', polygon already exists."); + } } } } catch (InvalidArgument& e) { @@ -1123,9 +1085,9 @@ if (succ != 0) { // connect edge if (isSource) { - MSEdge::dictionary(myCurrentDistrictID + "-source")->addFollower(succ); + MSEdge::dictionary(myCurrentDistrictID + "-source")->addSuccessor(succ); } else { - succ->addFollower(MSEdge::dictionary(myCurrentDistrictID + "-sink")); + succ->addSuccessor(MSEdge::dictionary(myCurrentDistrictID + "-sink")); } } else { WRITE_ERROR("At district '" + myCurrentDistrictID + "': succeeding edge '" + id + "' does not exist."); @@ -1133,6 +1095,24 @@ } +void +NLHandler::addRoundabout(const SUMOSAXAttributes& attrs) { + if (attrs.hasAttribute(SUMO_ATTR_EDGES)) { + std::vector edgeIDs = attrs.getStringVector(SUMO_ATTR_EDGES); + for (std::vector::iterator it = edgeIDs.begin(); it != edgeIDs.end(); ++it) { + MSEdge* edge = MSEdge::dictionary(*it); + if (edge == 0) { + WRITE_ERROR("Unknown edge '" + (*it) + "' in roundabout"); + } else { + edge->markAsRoundabout(); + } + } + } else { + WRITE_ERROR("Empty edges in roundabout."); + } +} + + // ---------------------------------- void NLHandler::endE3Detector() { @@ -1158,4 +1138,16 @@ } +Position +NLShapeHandler::getLanePos(const std::string& poiID, const std::string& laneID, SUMOReal lanePos) { + MSLane* lane = MSLane::dictionary(laneID); + if (lane == 0) { + WRITE_ERROR("Lane '" + laneID + "' to place poi '" + poiID + "' on is not known."); + return Position::INVALID; + } + if (lanePos < 0) { + lanePos = lane->getLength() + lanePos; + } + return lane->geometryPositionAtOffset(lanePos); +} /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Clemens Honomichl /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: NLHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NLHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The XML-Handler for network loading /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -48,6 +49,7 @@ #include "NLDiscreteEventBuilder.h" + // =========================================================================== // class declarations // =========================================================================== @@ -60,8 +62,28 @@ // =========================================================================== // class definitions // =========================================================================== + + /** - * @class NLNetHandler + * @class NLShapeHandler + * @brief The XML-Handler for shapes loading network loading + * + * This subclasses ShapeHandler with MSLane specific function + */ +class NLShapeHandler : public ShapeHandler { +public: + NLShapeHandler(const std::string& file, ShapeContainer& sc) : + ShapeHandler(file, sc) {} + + /// @brief Destructor + virtual ~NLShapeHandler() {} + + Position getLanePos(const std::string& poiID, const std::string& laneID, SUMOReal lanePos); +}; + + +/** + * @class NLHandler * @brief The XML-Handler for network loading * * The SAX2-handler responsible for parsing networks and routes to load. @@ -249,6 +271,11 @@ */ void addDistrictEdge(const SUMOSAXAttributes& attrs, bool isSource); + /** @begin Parses a roundabout and sets flags for the edges + * @param[in] attrs The attributes to parse + */ + void addRoundabout(const SUMOSAXAttributes& attrs); + void closeWAUT(); @@ -303,6 +330,12 @@ /// @brief whether the loaded network contains internal lanes bool myHaveSeenInternalEdge; + /// @brief whether the location element was already loadee + bool myNetIsLoaded; + + /// @brief temporary data for building the junction graph after network parsing is finished + typedef std::map > JunctionGraph; + JunctionGraph myJunctionGraph; private: /** invalid copy constructor */ @@ -314,6 +347,8 @@ }; + + #endif /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLJunctionControlBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLJunctionControlBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLJunctionControlBuilder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLJunctionControlBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Mon, 9 Jul 2001 -/// @version $Id: NLJunctionControlBuilder.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NLJunctionControlBuilder.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Builder of microsim-junctions and tls /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -43,9 +43,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -135,6 +135,14 @@ } #endif break; + case NODETYPE_RAIL_SIGNAL: + myOffset = 0; + myActiveKey = myActiveID; + myActiveProgram = "0"; + myLogicType = TLTYPE_RAIL; + closeTrafficLightLogic(); + junction = buildLogicJunction(); + break; default: throw InvalidArgument("False junction logic type."); } @@ -156,7 +164,7 @@ MSJunction* NLJunctionControlBuilder::buildNoLogicJunction() { - return new MSNoLogicJunction(myActiveID, myPosition, myShape, myActiveIncomingLanes + return new MSNoLogicJunction(myActiveID, myType, myPosition, myShape, myActiveIncomingLanes #ifdef HAVE_INTERNAL_LANES , myActiveInternalLanes #endif @@ -168,7 +176,7 @@ NLJunctionControlBuilder::buildLogicJunction() { MSJunctionLogic* jtype = getJunctionLogicSecure(); // build the junction - return new MSRightOfWayJunction(myActiveID, myPosition, myShape, myActiveIncomingLanes, + return new MSRightOfWayJunction(myActiveID, myType, myPosition, myShape, myActiveIncomingLanes, #ifdef HAVE_INTERNAL_LANES myActiveInternalLanes, #endif @@ -180,7 +188,7 @@ MSJunction* NLJunctionControlBuilder::buildInternalJunction() { // build the junction - return new MSInternalJunction(myActiveID, myPosition, myShape, myActiveIncomingLanes, + return new MSInternalJunction(myActiveID, myType, myPosition, myShape, myActiveIncomingLanes, myActiveInternalLanes); } #endif @@ -214,29 +222,30 @@ } return; } - if (myAbsDuration == 0) { - throw InvalidArgument("TLS program '" + myActiveProgram + "' for TLS '" + myActiveKey + "' has a duration of 0."); - } - // compute the initial step and first switch time of the tls-logic - // a positive offset delays all phases by x (advance by absDuration - x) while a negative offset advances all phases by x seconds - // @note The implementation of % for negative values is implementation defined in ISO1998 - SUMOTime offset; // the time to run the traffic light in advance - if (myOffset >= 0) { - offset = (myNet.getCurrentTimeStep() + myAbsDuration - (myOffset % myAbsDuration)) % myAbsDuration; - } else { - offset = (myNet.getCurrentTimeStep() + ((-myOffset) % myAbsDuration)) % myAbsDuration; - } - unsigned int step = 0; SUMOTime firstEventOffset = 0; + unsigned int step = 0; MSSimpleTrafficLightLogic::Phases::const_iterator i = myActivePhases.begin(); - while (offset >= (*i)->duration) { - step++; - offset -= (*i)->duration; - ++i; + if (myLogicType != TLTYPE_RAIL) { + if (myAbsDuration == 0) { + throw InvalidArgument("TLS program '" + myActiveProgram + "' for TLS '" + myActiveKey + "' has a duration of 0."); + } + // compute the initial step and first switch time of the tls-logic + // a positive offset delays all phases by x (advance by absDuration - x) while a negative offset advances all phases by x seconds + // @note The implementation of % for negative values is implementation defined in ISO1998 + SUMOTime offset; // the time to run the traffic light in advance + if (myOffset >= 0) { + offset = (myNet.getCurrentTimeStep() + myAbsDuration - (myOffset % myAbsDuration)) % myAbsDuration; + } else { + offset = (myNet.getCurrentTimeStep() + ((-myOffset) % myAbsDuration)) % myAbsDuration; + } + while (offset >= (*i)->duration) { + step++; + offset -= (*i)->duration; + ++i; + } + firstEventOffset = (*i)->duration - offset + myNet.getCurrentTimeStep(); } - firstEventOffset = (*i)->duration - offset + myNet.getCurrentTimeStep(); - // if (myActiveProgram == "") { myActiveProgram = "default"; } @@ -244,15 +253,11 @@ // build the tls-logic in dependance to its type switch (myLogicType) { case TLTYPE_ACTUATED: + // @note it is unclear how to apply the given offset in the context + // of variable-length phases tlLogic = new MSActuatedTrafficLightLogic(getTLLogicControlToUse(), myActiveKey, myActiveProgram, - myActivePhases, step, firstEventOffset, - myAdditionalParameter); - break; - case TLTYPE_AGENT: - tlLogic = new MSAgentbasedTrafficLightLogic(getTLLogicControlToUse(), - myActiveKey, myActiveProgram, - myActivePhases, step, firstEventOffset, + myActivePhases, step, (*i)->minDuration + myNet.getCurrentTimeStep(), myAdditionalParameter); break; case TLTYPE_STATIC: @@ -262,6 +267,11 @@ myActivePhases, step, firstEventOffset, myAdditionalParameter); break; + case TLTYPE_RAIL: + tlLogic = new MSRailSignal(getTLLogicControlToUse(), + myActiveKey, myActiveProgram, + myAdditionalParameter); + break; } myActivePhases.clear(); if (tlLogic != 0) { @@ -430,4 +440,14 @@ myNetIsLoaded = true; } + +MSJunction* +NLJunctionControlBuilder::retrieve(const std::string id) { + if (myJunctions != 0) { + return myJunctions->get(id); + } else { + return 0; + } +} + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLJunctionControlBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLJunctionControlBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLJunctionControlBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLJunctionControlBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 9 Jul 2001 -/// @version $Id: NLJunctionControlBuilder.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NLJunctionControlBuilder.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Builder of microsim-junctions and tls /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -262,6 +263,14 @@ /// @brief initialize junctions after all connections have been loaded void postLoadInitialization(); + /// @brief try to retrieve junction by id + MSJunction* retrieve(const std::string id); + + /// @brief return the number of phases loaded so far (for error reporting) + size_t getNumberOfLoadedPhases() const { + return myActivePhases.size(); + } + protected: /** @brief Returns the current junction logic diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLTriggerBuilder.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLTriggerBuilder.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLTriggerBuilder.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLTriggerBuilder.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -7,12 +7,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Thu, 17 Oct 2002 -/// @version $Id: NLTriggerBuilder.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NLTriggerBuilder.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Builds trigger objects for microsim /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -38,10 +38,13 @@ #include #include #include +#include +#include #include #include #include #include +#include #include #include #include @@ -49,9 +52,11 @@ #include "NLHandler.h" #include "NLTriggerBuilder.h" #include +#include #ifdef HAVE_INTERNAL +#include #include #endif @@ -103,9 +108,9 @@ } if (end >= string2time(OptionsCont::getOptions().getString("begin"))) { Command* cb = new WrappingCommand< MSEdge >(e, &MSEdge::incVaporization); - MSNet::getInstance()->getBeginOfTimestepEvents().addEvent(cb, begin, MSEventControl::ADAPT_AFTER_EXECUTION); + MSNet::getInstance()->getBeginOfTimestepEvents()->addEvent(cb, begin, MSEventControl::ADAPT_AFTER_EXECUTION); Command* ce = new WrappingCommand< MSEdge >(e, &MSEdge::decVaporization); - MSNet::getInstance()->getBeginOfTimestepEvents().addEvent(ce, end, MSEventControl::ADAPT_AFTER_EXECUTION); + MSNet::getInstance()->getBeginOfTimestepEvents()->addEvent(ce, end, MSEventControl::ADAPT_AFTER_EXECUTION); } } @@ -175,6 +180,29 @@ buildBusStop(net, id, lines, lane, frompos, topos); } +void +NLTriggerBuilder::parseAndBuildContainerStop(MSNet& net, const SUMOSAXAttributes& attrs) { + bool ok = true; + // get the id, throw if not given or empty... + std::string id = attrs.get(SUMO_ATTR_ID, 0, ok); + if (!ok) { + throw ProcessError(); + } + // get the lane + MSLane* lane = getLane(attrs, "containerStop", id); + // get the positions + SUMOReal frompos = attrs.getOpt(SUMO_ATTR_STARTPOS, id.c_str(), ok, 0); + SUMOReal topos = attrs.getOpt(SUMO_ATTR_ENDPOS, id.c_str(), ok, lane->getLength()); + const bool friendlyPos = attrs.getOpt(SUMO_ATTR_FRIENDLY_POS, id.c_str(), ok, false); + if (!ok || !myHandler->checkStopPos(frompos, topos, lane->getLength(), POSITION_EPS, friendlyPos)) { + throw InvalidArgument("Invalid position for container stop '" + id + "'."); + } + // get the lines + std::vector lines; + SUMOSAXAttributes::parseStringVector(attrs.getOpt(SUMO_ATTR_LINES, id.c_str(), ok, "", false), lines); + // build the container stop + buildContainerStop(net, id, lines, lane, frompos, topos); +} void NLTriggerBuilder::parseAndBuildCalibrator(MSNet& net, const SUMOSAXAttributes& attrs, @@ -190,16 +218,21 @@ const SUMOReal pos = getPosition(attrs, lane, "calibrator", id); const SUMOTime freq = attrs.getOptSUMOTimeReporting(SUMO_ATTR_FREQUENCY, id.c_str(), ok, DELTA_T); // !!! no error handling std::string file = getFileName(attrs, base, true); - std::string outfile = attrs.getOpt(SUMO_ATTR_OUTPUT, 0, ok, ""); + std::string outfile = attrs.getOpt(SUMO_ATTR_OUTPUT, id.c_str(), ok, ""); + std::string routeProbe = attrs.getOpt(SUMO_ATTR_ROUTEPROBE, id.c_str(), ok, ""); + MSRouteProbe* probe = 0; + if (routeProbe != "") { + probe = dynamic_cast(net.getDetectorControl().getTypedDetectors(SUMO_TAG_ROUTEPROBE).get(routeProbe)); + } if (MSGlobals::gUseMesoSim) { #ifdef HAVE_INTERNAL - METriggeredCalibrator* trigger = buildMECalibrator(net, id, &lane->getEdge(), pos, file, outfile, freq); + METriggeredCalibrator* trigger = buildMECalibrator(net, id, &lane->getEdge(), pos, file, outfile, freq, probe); if (file == "") { trigger->registerParent(SUMO_TAG_CALIBRATOR, myHandler); } #endif } else { - MSCalibrator* trigger = buildCalibrator(net, id, &lane->getEdge(), pos, file, outfile, freq); + MSCalibrator* trigger = buildCalibrator(net, id, &lane->getEdge(), pos, file, outfile, freq, probe); if (file == "") { trigger->registerParent(SUMO_TAG_CALIBRATOR, myHandler); } @@ -222,7 +255,7 @@ if (!ok) { throw InvalidArgument("The edge to use within MSTriggeredRerouter '" + id + "' is not known."); } - std::vector edges; + MSEdgeVector edges; std::vector edgeIDs; SUMOSAXAttributes::parseStringVector(objectid, edgeIDs); for (std::vector::iterator i = edgeIDs.begin(); i != edgeIDs.end(); ++i) { @@ -241,8 +274,11 @@ throw InvalidArgument("Could not parse MSTriggeredRerouter '" + id + "'."); } MSTriggeredRerouter* trigger = buildRerouter(net, id, edges, prob, file, off); + // read in the trigger description if (file == "") { trigger->registerParent(SUMO_TAG_REROUTER, myHandler); + } else if (!XMLSubSys::runParser(*trigger, file)) { + throw ProcessError(); } } @@ -264,8 +300,8 @@ const MSEdge* edge, SUMOReal pos, const std::string& file, const std::string& outfile, - const SUMOTime freq) { - return new METriggeredCalibrator(id, edge, pos, file, outfile, freq); + const SUMOTime freq, MSRouteProbe* probe) { + return new METriggeredCalibrator(id, edge, pos, file, outfile, freq, MSGlobals::gMesoNet->getSegmentForEdge(*edge, pos)->getLength(), probe); } #endif @@ -275,14 +311,14 @@ MSEdge* edge, SUMOReal pos, const std::string& file, const std::string& outfile, - const SUMOTime freq) { - return new MSCalibrator(id, edge, pos, file, outfile, freq); + const SUMOTime freq, const MSRouteProbe* probe) { + return new MSCalibrator(id, edge, pos, file, outfile, freq, edge->getLength(), probe); } MSTriggeredRerouter* NLTriggerBuilder::buildRerouter(MSNet&, const std::string& id, - std::vector& edges, + MSEdgeVector& edges, SUMOReal prob, const std::string& file, bool off) { return new MSTriggeredRerouter(id, edges, prob, file, off); } @@ -299,6 +335,18 @@ } } + +void +NLTriggerBuilder::buildContainerStop(MSNet& net, const std::string& id, + const std::vector& lines, + MSLane* lane, SUMOReal frompos, SUMOReal topos) { + MSContainerStop* stop = new MSContainerStop(id, lines, *lane, frompos, topos); + if (!net.addContainerStop(stop)) { + delete stop; + throw InvalidArgument("Could not build container stop '" + id + "'; probably declared twice."); + } +} + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLTriggerBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLTriggerBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netload/NLTriggerBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netload/NLTriggerBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,14 @@ /// @author Tino Morenz /// @author Eric Nicolay /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Thu, 17 Oct 2002 -/// @version $Id: NLTriggerBuilder.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NLTriggerBuilder.h 18096 2015-03-17 09:50:59Z behrisch $ /// // Builds trigger objects for microsim /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -49,6 +50,7 @@ class MSEdge; class MSBusStop; class MSCalibrator; +class MSRouteProbe; #ifdef HAVE_INTERNAL class METriggeredCalibrator; @@ -139,6 +141,15 @@ void parseAndBuildBusStop(MSNet& net, const SUMOSAXAttributes& attrs); + /** @brief Parses his values and builds a container stop + * + * @param[in] net The network the container stop belongs to + * @param[in] attrs SAX-attributes which define the trigger + * @exception InvalidArgument If a parameter (lane/position) is not valid + */ + void parseAndBuildContainerStop(MSNet& net, const SUMOSAXAttributes& attrs); + + /** @brief Parses his values and builds a mesoscopic or microscopic calibrator * * @param[in] net The network the calibrator belongs to @@ -195,6 +206,23 @@ MSLane* lane, SUMOReal frompos, SUMOReal topos); + /** @brief Builds a container stop + * + * Simply calls the MSContainerStop constructor. + * + * @param[in] net The net the container stop belongs to + * @param[in] id The id of the container stop + * @param[in] lines Names of the lines that halt on this container stop + * @param[in] lane The lane the container stop is placed on + * @param[in] frompos Begin position of the container stop on the lane + * @param[in] topos End position of the container stop on the lane + * @exception InvalidArgument If the container stop can not be added to the net (is duplicate) + */ + virtual void buildContainerStop(MSNet& net, + const std::string& id, const std::vector& lines, + MSLane* lane, SUMOReal frompos, SUMOReal topos); + + /** @brief builds a microscopic calibrator * * Simply calls the MSCalibrator constructor. @@ -209,7 +237,7 @@ virtual MSCalibrator* buildCalibrator(MSNet& net, const std::string& id, MSEdge* edge, SUMOReal pos, const std::string& file, const std::string& outfile, - const SUMOTime freq); + const SUMOTime freq, const MSRouteProbe* probe); #ifdef HAVE_INTERNAL /** @brief builds a mesoscopic calibrator * @@ -225,7 +253,7 @@ virtual METriggeredCalibrator* buildMECalibrator(MSNet& net, const std::string& id, const MSEdge* edge, SUMOReal pos, const std::string& file, const std::string& outfile, - const SUMOTime freq); + const SUMOTime freq, MSRouteProbe* probe); #endif @@ -240,7 +268,7 @@ * @param[in] file The file to read the reroute definitions from */ virtual MSTriggeredRerouter* buildRerouter(MSNet& net, - const std::string& id, std::vector& edges, + const std::string& id, MSEdgeVector& edges, SUMOReal prob, const std::string& file, bool off); //@} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,7 @@ noinst_LIBRARIES = libnetwrite.a libnetwrite_a_SOURCES = NWFrame.cpp NWFrame.h \ +NWWriter_Amitran.cpp NWWriter_Amitran.h \ NWWriter_MATSim.cpp NWWriter_MATSim.h \ NWWriter_OpenDrive.cpp NWWriter_OpenDrive.h \ NWWriter_DlrNavteq.cpp NWWriter_DlrNavteq.h \ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/netwrite -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,36 +92,97 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libnetwrite_a_AR = $(AR) $(ARFLAGS) libnetwrite_a_LIBADD = -am_libnetwrite_a_OBJECTS = NWFrame.$(OBJEXT) NWWriter_MATSim.$(OBJEXT) \ +am_libnetwrite_a_OBJECTS = NWFrame.$(OBJEXT) \ + NWWriter_Amitran.$(OBJEXT) NWWriter_MATSim.$(OBJEXT) \ NWWriter_OpenDrive.$(OBJEXT) NWWriter_DlrNavteq.$(OBJEXT) \ NWWriter_SUMO.$(OBJEXT) NWWriter_XML.$(OBJEXT) libnetwrite_a_OBJECTS = $(am_libnetwrite_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libnetwrite_a_SOURCES) DIST_SOURCES = $(libnetwrite_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -85,6 +191,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -111,9 +218,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -124,10 +235,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -223,6 +330,7 @@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libnetwrite.a libnetwrite_a_SOURCES = NWFrame.cpp NWFrame.h \ +NWWriter_Amitran.cpp NWWriter_Amitran.h \ NWWriter_MATSim.cpp NWWriter_MATSim.h \ NWWriter_OpenDrive.cpp NWWriter_OpenDrive.h \ NWWriter_DlrNavteq.cpp NWWriter_DlrNavteq.h \ @@ -266,10 +374,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libnetwrite.a: $(libnetwrite_a_OBJECTS) $(libnetwrite_a_DEPENDENCIES) - -rm -f libnetwrite.a - $(libnetwrite_a_AR) libnetwrite.a $(libnetwrite_a_OBJECTS) $(libnetwrite_a_LIBADD) - $(RANLIB) libnetwrite.a + +libnetwrite.a: $(libnetwrite_a_OBJECTS) $(libnetwrite_a_DEPENDENCIES) $(EXTRA_libnetwrite_a_DEPENDENCIES) + $(AM_V_at)-rm -f libnetwrite.a + $(AM_V_AR)$(libnetwrite_a_AR) libnetwrite.a $(libnetwrite_a_OBJECTS) $(libnetwrite_a_LIBADD) + $(AM_V_at)$(RANLIB) libnetwrite.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -278,6 +387,7 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NWFrame.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NWWriter_Amitran.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NWWriter_DlrNavteq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NWWriter_MATSim.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NWWriter_OpenDrive.Po@am__quote@ @@ -285,25 +395,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NWWriter_XML.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -311,26 +421,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -342,15 +441,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -359,6 +454,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -407,10 +517,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -495,18 +610,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWFrame.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWFrame.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWFrame.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWFrame.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NWFrame.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NWFrame.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for netwrite /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -39,6 +39,7 @@ #include #include "NWFrame.h" #include "NWWriter_SUMO.h" +#include "NWWriter_Amitran.h" #include "NWWriter_MATSim.h" #include "NWWriter_XML.h" #include "NWWriter_OpenDrive.h" @@ -82,26 +83,26 @@ } #endif // HAVE_PROJ - oc.doRegister("map-output", 'M', new Option_FileName()); - oc.addDescription("map-output", "Output", "Writes joined edges information to FILE"); + oc.doRegister("amitran-output", new Option_FileName()); + oc.addDescription("amitran-output", "Output", "The generated net will be written to FILE using Amitran format"); oc.doRegister("matsim-output", new Option_FileName()); - oc.addDescription("matsim-output", "Output", "The generated net will be written to FILE using MATsim format."); + oc.addDescription("matsim-output", "Output", "The generated net will be written to FILE using MATsim format"); oc.doRegister("opendrive-output", new Option_FileName()); - oc.addDescription("opendrive-output", "Output", "The generated net will be written to FILE using openDRIVE format."); + oc.addDescription("opendrive-output", "Output", "The generated net will be written to FILE using OpenDRIVE format"); oc.doRegister("dlr-navteq-output", new Option_FileName()); - oc.addDescription("dlr-navteq-output", "Output", "The generated net will be written to dlr-navteq files with the given PREFIX."); + oc.addDescription("dlr-navteq-output", "Output", "The generated net will be written to dlr-navteq files with the given PREFIX"); oc.doRegister("output.street-names", new Option_Bool(false)); - oc.addDescription("output.street-names", "Output", "Street names will be included in the output (if available)."); + oc.addDescription("output.street-names", "Output", "Street names will be included in the output (if available)"); oc.doRegister("output.original-names", new Option_Bool(false)); - oc.addDescription("output.original-names", "Output", "Writes original names, if given, as parameter."); + oc.addDescription("output.original-names", "Output", "Writes original names, if given, as parameter"); oc.doRegister("street-sign-output", new Option_FileName()); - oc.addDescription("street-sign-output", "Output", "Writes street signs as POIs to FILE."); + oc.addDescription("street-sign-output", "Output", "Writes street signs as POIs to FILE"); } @@ -112,6 +113,7 @@ // check whether the output is valid and can be build if (!oc.isSet("output-file") && !oc.isSet("plain-output-prefix") + && !oc.isSet("amitran-output") && !oc.isSet("matsim-output") && !oc.isSet("opendrive-output") && !oc.isSet("dlr-navteq-output")) { @@ -119,7 +121,7 @@ } // some outputs need internal lanes if (oc.isSet("opendrive-output") && oc.getBool("no-internal-links")) { - WRITE_ERROR("openDRIVE export needs internal links computation."); + WRITE_ERROR("OpenDRIVE export needs internal links computation."); ok = false; } return ok; @@ -129,16 +131,11 @@ void NWFrame::writeNetwork(const OptionsCont& oc, NBNetBuilder& nb) { NWWriter_SUMO::writeNetwork(oc, nb); + NWWriter_Amitran::writeNetwork(oc, nb); NWWriter_MATSim::writeNetwork(oc, nb); NWWriter_OpenDrive::writeNetwork(oc, nb); NWWriter_DlrNavteq::writeNetwork(oc, nb); NWWriter_XML::writeNetwork(oc, nb); - // save the mapping information when wished - if (oc.isSet("map-output")) { - OutputDevice& mdevice = OutputDevice::getDevice(oc.getString("map-output")); - mdevice << nb.getJoinedEdgesMap(); - mdevice.close(); - } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWFrame.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWFrame.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWFrame.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWFrame.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: NWFrame.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NWFrame.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for netwrite /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_Amitran.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_Amitran.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_Amitran.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_Amitran.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,141 @@ +/****************************************************************************/ +/// @file NWWriter_Amitran.cpp +/// @author Michael Behrisch +/// @date 13.03.2014 +/// @version $Id: NWWriter_Amitran.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Exporter writing networks using the Amitran format +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include "NWWriter_DlrNavteq.h" +#include "NWWriter_Amitran.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + + +// =========================================================================== +// method definitions +// =========================================================================== +// --------------------------------------------------------------------------- +// static methods +// --------------------------------------------------------------------------- +void +NWWriter_Amitran::writeNetwork(const OptionsCont& oc, NBNetBuilder& nb) { + // check whether an amitran-file shall be generated + if (!oc.isSet("amitran-output")) { + return; + } + NBEdgeCont& ec = nb.getEdgeCont(); + OutputDevice& device = OutputDevice::getDevice(oc.getString("amitran-output")); + device << "\n"; + device << "\n"; + // write nodes + int index = 0; + NBNodeCont& nc = nb.getNodeCont(); + std::set singleRoundaboutNodes; + std::set multiRoundaboutNodes; + const std::set& roundabouts = ec.getRoundabouts(); + for (std::set::const_iterator i = roundabouts.begin(); i != roundabouts.end(); ++i) { + for (EdgeSet::const_iterator j = (*i).begin(); j != (*i).end(); ++j) { + if ((*j)->getNumLanes() > 1) { + multiRoundaboutNodes.insert((*j)->getFromNode()); + } else { + singleRoundaboutNodes.insert((*j)->getFromNode()); + } + } + } + std::map nodeIds; + for (std::map::const_iterator i = nc.begin(); i != nc.end(); ++i) { + device << " second] = index++; + if (singleRoundaboutNodes.count(i->second) > 0) { + device << "\" type=\"roundaboutSingle\"/>\n"; + continue; + } + if (multiRoundaboutNodes.count(i->second) > 0) { + device << "\" type=\"roundaboutMulti\"/>\n"; + continue; + } + switch (i->second->getType()) { + case NODETYPE_TRAFFIC_LIGHT: + case NODETYPE_TRAFFIC_LIGHT_NOJUNCTION: + device << "\" type=\"trafficLight"; + break; + case NODETYPE_PRIORITY: + device << "\" type=\"priority"; + break; + case NODETYPE_PRIORITY_STOP: + device << "\" type=\"priorityStop"; + break; + case NODETYPE_RIGHT_BEFORE_LEFT: + device << "\" type=\"rightBeforeLeft"; + break; + case NODETYPE_ALLWAY_STOP: + device << "\" type=\"allwayStop"; + break; + case NODETYPE_RAIL_SIGNAL: + device << "\" type=\"railSignal"; + break; + case NODETYPE_DEAD_END: + case NODETYPE_DEAD_END_DEPRECATED: + device << "\" type=\"deadEnd"; + break; + case NODETYPE_DISTRICT: + case NODETYPE_NOJUNCTION: + case NODETYPE_INTERNAL: + case NODETYPE_UNKNOWN: + break; + } + device << "\"/>\n"; + } + // write edges + index = 0; + for (std::map::const_iterator i = ec.begin(); i != ec.end(); ++i) { + device << " second->getFromNode()] + << "\" to=\"" << nodeIds[i->second->getToNode()] + << "\" roadClass=\"" << NWWriter_DlrNavteq::getRoadClass((*i).second) + << "\" length=\"" << int(1000 * i->second->getLoadedLength()) + << "\" speedLimitKmh=\"" << int(3.6 * (*i).second->getSpeed() + 0.5) + << "\" laneNr=\"" << (*i).second->getNumLanes() + << "\"/>\n"; + } + device << "\n"; + device.close(); +} + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_Amitran.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_Amitran.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_Amitran.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_Amitran.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,64 @@ +/****************************************************************************/ +/// @file NWWriter_Amitran.h +/// @author Michael Behrisch +/// @date 13.03.2014 +/// @version $Id: NWWriter_Amitran.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Exporter writing networks using the Amitran format +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef NWWriter_Amitran_h +#define NWWriter_Amitran_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + + +// =========================================================================== +// class declarations +// =========================================================================== +class NBNetBuilder; +class OptionsCont; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class NWWriter_Amitran + * @brief Exporter writing networks using the Amitran format + * + */ +class NWWriter_Amitran { +public: + /** @brief Writes the network into a Amitran-file + * + * @param[in] oc The options to use + * @param[in] nb The network builder to fill + */ + static void writeNetwork(const OptionsCont& oc, NBNetBuilder& nb); + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_DlrNavteq.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_DlrNavteq.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_DlrNavteq.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_DlrNavteq.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NWWriter_DlrNavteq.h /// @author Jakob Erdmann +/// @author Michael Behrisch /// @date 26.10.2012 -/// @version $Id: NWWriter_DlrNavteq.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NWWriter_DlrNavteq.cpp 18102 2015-03-18 11:55:16Z behrisch $ /// // Exporter writing networks using DlrNavteq (Elmar) format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -118,11 +119,13 @@ NBEdge* e = (*i).second; const PositionVector& geom = e->getGeometry(); if (geom.size() > 2) { - if (e->getID() == UNDEFINED) { - WRITE_WARNING("Edge id '" + UNDEFINED + - "' clashes with the magic value for NO_BETWEEN_NODE. Internal geometry for this edge will be lost."); + std::string internalNodeID = e->getID(); + if (internalNodeID == UNDEFINED || + (nc.retrieve(internalNodeID) != 0)) { + // need to invent a new name to avoid clashing with the id of a 'real' node or a reserved name + internalNodeID += "_geometry"; } - device << e->getID() << "\t1\t" << geom.size() - 2; + device << internalNodeID << "\t1\t" << geom.size() - 2; for (size_t ii = 1; ii < geom.size() - 1; ++ii) { Position pos = geom[(int)ii]; gch.cartesian2geo(pos); @@ -138,6 +141,7 @@ void NWWriter_DlrNavteq::writeLinksUnsplitted(const OptionsCont& oc, NBEdgeCont& ec) { + std::map nameIDs; OutputDevice& device = OutputDevice::getDevice(oc.getString("dlr-navteq-output") + "_links_unsplitted.txt"); writeHeader(device, oc); // write format specifier @@ -147,6 +151,14 @@ NBEdge* e = (*i).second; const int kph = speedInKph(e->getSpeed()); const std::string& betweenNodeID = (e->getGeometry().size() > 2) ? e->getID() : UNDEFINED; + std::string nameID = UNDEFINED; + if (oc.getBool("output.street-names")) { + const std::string& name = i->second->getStreetName(); + if (name != "" && nameIDs.count(name) == 0) { + nameID = toString(nameIDs.size()); + nameIDs[name] = nameID; + } + } device << e->getID() << "\t" << e->getFromNode()->getID() << "\t" << e->getToNode()->getID() << "\t" @@ -160,7 +172,7 @@ << getNavteqLaneCode(e->getNumLanes()) << "\t" << getSpeedCategoryUpperBound(kph) << "\t" << kph << "\t" - << UNDEFINED << "\t" // NAME_ID1_REGIONAL XXX + << nameID << "\t" // NAME_ID1_REGIONAL XXX << UNDEFINED << "\t" // NAME_ID2_LOCAL XXX << UNDEFINED << "\t" // housenumbers_right << UNDEFINED << "\t" // housenumbers_left @@ -174,27 +186,36 @@ << "0\t" // connection (between nodes always in order) << "\n"; } + if (oc.getBool("output.street-names")) { + OutputDevice& namesDevice = OutputDevice::getDevice(oc.getString("dlr-navteq-output") + "_names.txt"); + writeHeader(namesDevice, oc); + // write format specifier + namesDevice << "# NAME_ID\tName\n" << nameIDs.size() << "\n"; + for (std::map::const_iterator i = nameIDs.begin(); i != nameIDs.end(); ++i) { + namesDevice << i->second << "\t" << i->first << "\n"; + } + } } std::string NWWriter_DlrNavteq::getAllowedTypes(SVCPermissions permissions) { - if (permissions == SVCFreeForAll) { + if (permissions == SVCAll) { return "100000000000"; } std::ostringstream oss; oss << "0"; - oss << ((permissions & SVC_PASSENGER) > 0 ? 1 : 0); - oss << ((permissions & SVC_PASSENGER) > 0 ? 1 : 0); // residential - oss << ((permissions & SVC_HOV) > 0 ? 1 : 0); - oss << ((permissions & SVC_PUBLIC_EMERGENCY) > 0 ? 1 : 0); - oss << ((permissions & SVC_TAXI) > 0 ? 1 : 0); - oss << ((permissions & (SVC_PUBLIC_TRANSPORT | SVC_BUS)) > 0 ? 1 : 0); - oss << ((permissions & SVC_DELIVERY) > 0 ? 1 : 0); - oss << ((permissions & SVC_TRANSPORT) > 0 ? 1 : 0); - oss << ((permissions & SVC_MOTORCYCLE) > 0 ? 1 : 0); - oss << ((permissions & SVC_BICYCLE) > 0 ? 1 : 0); - oss << ((permissions & SVC_PEDESTRIAN) > 0 ? 1 : 0); + oss << ((permissions & SVC_PASSENGER) > 0 ? 1 : 0); + oss << ((permissions & SVC_PASSENGER) > 0 ? 1 : 0); // residential + oss << ((permissions & SVC_HOV) > 0 ? 1 : 0); + oss << ((permissions & SVC_EMERGENCY) > 0 ? 1 : 0); + oss << ((permissions & SVC_TAXI) > 0 ? 1 : 0); + oss << ((permissions & (SVC_BUS | SVC_COACH)) > 0 ? 1 : 0); + oss << ((permissions & SVC_DELIVERY) > 0 ? 1 : 0); + oss << ((permissions & (SVC_TRUCK | SVC_TRAILER)) > 0 ? 1 : 0); + oss << ((permissions & SVC_MOTORCYCLE) > 0 ? 1 : 0); + oss << ((permissions & SVC_BICYCLE) > 0 ? 1 : 0); + oss << ((permissions & SVC_PEDESTRIAN) > 0 ? 1 : 0); return oss.str(); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_DlrNavteq.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_DlrNavteq.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_DlrNavteq.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_DlrNavteq.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NWWriter_DlrNavteq.h /// @author Jakob Erdmann +/// @author Michael Behrisch /// @date 26.10.2012 -/// @version $Id: NWWriter_DlrNavteq.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NWWriter_DlrNavteq.h 18102 2015-03-18 11:55:16Z behrisch $ /// // Exporter writing networks using DlrNavteq (Elmar) format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -66,6 +67,9 @@ */ static void writeNetwork(const OptionsCont& oc, NBNetBuilder& nb); + /// @brief get the navteq road class + static int getRoadClass(NBEdge* edge); + private: /** @brief Writes the nodes_unsplitted file * @param[in] oc The options to use @@ -76,7 +80,6 @@ /** @brief Writes the links_unsplitted file * @param[in] oc The options to use - * @param[in] nc The node-container from which to read data * @param[in] ec The edge-container from which to read data */ static void writeLinksUnsplitted(const OptionsCont& oc, NBEdgeCont& ec); @@ -94,9 +97,6 @@ /// @brief build the ascii-bit-vector for column vehicle_type static std::string getAllowedTypes(SVCPermissions permissions); - /// @brief get the navteq road class - static int getRoadClass(NBEdge* edge); - /// @brief get the navteq speed class based on the speed in km/h static int getSpeedCategory(int kph); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_MATSim.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_MATSim.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_MATSim.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_MATSim.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Tue, 04.05.2011 -/// @version $Id: NWWriter_MATSim.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NWWriter_MATSim.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Exporter writing networks using the MATSim format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_MATSim.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_MATSim.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_MATSim.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_MATSim.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Tue, 04.05.2011 -/// @version $Id: NWWriter_MATSim.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NWWriter_MATSim.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Exporter writing networks using the MATSim format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_OpenDrive.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_OpenDrive.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_OpenDrive.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_OpenDrive.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file NWWriter_OpenDrive.cpp /// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @date Tue, 04.05.2011 -/// @version $Id: NWWriter_OpenDrive.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NWWriter_OpenDrive.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Exporter writing networks using the openDRIVE format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -114,6 +115,7 @@ markType = "solid"; } device << " \n"; + device << " \n"; device << " \n"; } device << " \n"; @@ -147,7 +149,7 @@ } catch (InvalidArgument&) { // we do not write anything, maybe we should } - device << " getID(), nodeMap, nodeID) << "\">\n"; + device << " getID(), nodeMap, nodeID) << "\">\n"; device << " \n"; device << " getID(), edgeMap, edgeID) << "\"/>\n"; device << " getID(), edgeMap, edgeID) << "\"/>\n"; @@ -191,7 +193,7 @@ continue; } device << " getID(), edgeMap, edgeID) - << "\" connectingRoad=\"" << getID((*k).id, edgeMap, edgeID) << "\" contactPoint=\"start\"/>\n"; + << "\" connectingRoad=\"" << getID((*k).getInternalLaneID(), edgeMap, edgeID) << "\" contactPoint=\"start\"/>\n"; ++index; } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_OpenDrive.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_OpenDrive.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_OpenDrive.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_OpenDrive.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file NWWriter_OpenDrive.h /// @author Daniel Krajzewicz /// @date Tue, 04.05.2011 -/// @version $Id: NWWriter_OpenDrive.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NWWriter_OpenDrive.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Exporter writing networks using the openDRIVE format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_SUMO.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_SUMO.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_SUMO.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_SUMO.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 04.05.2011 -/// @version $Id: NWWriter_SUMO.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NWWriter_SUMO.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Exporter writing networks using the SUMO format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -66,7 +67,7 @@ return; } OutputDevice& device = OutputDevice::getDevice(oc.getString("output-file")); - device.writeXMLHeader("net", NWFrame::MAJOR_VERSION + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/net_file.xsd\""); // street names may contain non-ascii chars + device.writeXMLHeader("net", NWFrame::MAJOR_VERSION + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/net_file.xsd\""); // street names may contain non-ascii chars device.lf(); // get involved container const NBNodeCont& nc = nb.getNodeCont(); @@ -74,7 +75,7 @@ const NBDistrictCont& dc = nb.getDistrictCont(); // write network offsets and projection - writeLocation(device); + GeoConvHelper::writeLocation(device); // write inner lanes bool origNames = oc.getBool("output.original-names"); @@ -103,9 +104,9 @@ const bool checkLaneFoesAll = oc.getBool("check-lane-foes.all"); const bool checkLaneFoesRoundabout = !checkLaneFoesAll && oc.getBool("check-lane-foes.roundabout"); if (checkLaneFoesRoundabout) { - const std::vector& roundabouts = nb.getRoundabouts(); - for (std::vector::const_iterator i = roundabouts.begin(); i != roundabouts.end(); ++i) { - for (EdgeVector::const_iterator j = (*i).begin(); j != (*i).end(); ++j) { + const std::set& roundabouts = ec.getRoundabouts(); + for (std::set::const_iterator i = roundabouts.begin(); i != roundabouts.end(); ++i) { + for (EdgeSet::const_iterator j = (*i).begin(); j != (*i).end(); ++j) { roundaboutNodes.insert((*j)->getToNode()); } } @@ -151,31 +152,50 @@ device.lf(); } } + for (std::map::const_iterator i = nc.begin(); i != nc.end(); ++i) { + NBNode* node = (*i).second; + // write connections from pedestrian crossings + const std::vector& crossings = node->getCrossings(); + for (std::vector::const_iterator it = crossings.begin(); it != crossings.end(); it++) { + NWWriter_SUMO::writeInternalConnection(device, (*it).id, (*it).nextWalkingArea, 0, 0, ""); + } + // write connections from pedestrian walking areas + const std::vector& WalkingAreas = node->getWalkingAreas(); + for (std::vector::const_iterator it = WalkingAreas.begin(); it != WalkingAreas.end(); it++) { + if ((*it).nextCrossing != "") { + const NBNode::Crossing& nextCrossing = node->getCrossing((*it).nextCrossing); + // connection to next crossing (may be tls-controlled) + device.openTag(SUMO_TAG_CONNECTION); + device.writeAttr(SUMO_ATTR_FROM, (*it).id); + device.writeAttr(SUMO_ATTR_TO, (*it).nextCrossing); + device.writeAttr(SUMO_ATTR_FROM_LANE, 0); + device.writeAttr(SUMO_ATTR_TO_LANE, 0); + if ((*it).tlID != "") { + device.writeAttr(SUMO_ATTR_TLID, (*it).tlID); + assert(nextCrossing.tlLinkNo >= 0); + device.writeAttr(SUMO_ATTR_TLLINKINDEX, nextCrossing.tlLinkNo); + } + device.writeAttr(SUMO_ATTR_DIR, LINKDIR_STRAIGHT); + device.writeAttr(SUMO_ATTR_STATE, nextCrossing.priority ? LINKSTATE_MAJOR : LINKSTATE_MINOR); + device.closeTag(); + } + // optional connections from/to sidewalk + for (std::vector::const_iterator it_sw = (*it).nextSidewalks.begin(); it_sw != (*it).nextSidewalks.end(); ++it_sw) { + NWWriter_SUMO::writeInternalConnection(device, (*it).id, (*it_sw), 0, 0, ""); + } + for (std::vector::const_iterator it_sw = (*it).prevSidewalks.begin(); it_sw != (*it).prevSidewalks.end(); ++it_sw) { + NWWriter_SUMO::writeInternalConnection(device, (*it_sw), (*it).id, 0, 0, ""); + } + } + } + // write loaded prohibitions for (std::map::const_iterator i = nc.begin(); i != nc.end(); ++i) { writeProhibitions(device, i->second->getProhibitions()); } // write roundabout information - const std::vector& roundabouts = nb.getRoundabouts(); - // make output deterministic - std::vector > edgeIDs; - for (std::vector::const_iterator i = roundabouts.begin(); i != roundabouts.end(); ++i) { - std::vector tEdgeIDs; - for (EdgeVector::const_iterator j = (*i).begin(); j != (*i).end(); ++j) { - tEdgeIDs.push_back((*j)->getID()); - } - std::sort(tEdgeIDs.begin(), tEdgeIDs.end()); - edgeIDs.push_back(tEdgeIDs); - } - std::sort(edgeIDs.begin(), edgeIDs.end()); - // write - for (std::vector >::const_iterator i = edgeIDs.begin(); i != edgeIDs.end(); ++i) { - writeRoundabout(device, *i, ec); - } - if (roundabouts.size() != 0) { - device.lf(); - } + writeRoundabouts(device, ec.getRoundabouts(), ec); // write the districts for (std::map::const_iterator i = dc.begin(); i != dc.end(); i++) { @@ -194,45 +214,96 @@ const EdgeVector& incoming = n.getIncomingEdges(); for (EdgeVector::const_iterator i = incoming.begin(); i != incoming.end(); i++) { const std::vector& elv = (*i)->getConnections(); - for (std::vector::const_iterator k = elv.begin(); k != elv.end(); ++k) { - if ((*k).toEdge == 0) { - continue; + if (elv.size() > 0) { + bool haveVia = false; + NBEdge* toEdge = 0; + std::string internalEdgeID = ""; + // first pass: compute average lengths of non-via edges + std::map lengthSum; + std::map numLanes; + for (std::vector::const_iterator k = elv.begin(); k != elv.end(); ++k) { + lengthSum[(*k).toEdge] += MAX2((*k).shape.length(), POSITION_EPS); + numLanes[(*k).toEdge] += 1; } - std::string origID = origNames ? (*k).origID : ""; - writeInternalEdge(into, (*k).id, (*k).vmax, (*k).shape, origID); - if ((*k).haveVia) { - writeInternalEdge(into, (*k).viaID, (*k).viaVmax, (*k).viaShape, origID); + // second pass: write non-via edges + for (std::vector::const_iterator k = elv.begin(); k != elv.end(); ++k) { + if ((*k).toEdge == 0) { + assert(false); // should never happen. tell me when it does + continue; + } + if (toEdge != (*k).toEdge) { + internalEdgeID = (*k).id; + if (toEdge != 0) { + // close the previous edge + into.closeTag(); + } + toEdge = (*k).toEdge; + into.openTag(SUMO_TAG_EDGE); + into.writeAttr(SUMO_ATTR_ID, internalEdgeID); + into.writeAttr(SUMO_ATTR_FUNCTION, EDGEFUNC_INTERNAL); + // open a new edge + } + // to avoid changing to an internal lane which has a successor + // with the wrong permissions we need to inherit them from the successor + const NBEdge::Lane& successor = (*k).toEdge->getLanes()[(*k).toLane]; + const SUMOReal length = lengthSum[toEdge] / numLanes[toEdge]; + // @note the actual length should be used once sumo supports lanes of + // varying length within the same edge + //const SUMOReal length = MAX2((*k).shape.length(), POSITION_EPS); + writeLane(into, internalEdgeID, (*k).getInternalLaneID(), (*k).vmax, + successor.permissions, successor.preferred, + NBEdge::UNSPECIFIED_OFFSET, successor.width, (*k).shape, (*k).origID, + length, (*k).internalLaneIndex, origNames, &n); + haveVia = haveVia || (*k).haveVia; } ret = true; + into.closeTag(); // close the last edge + // third pass: write via edges + if (haveVia) { + for (std::vector::const_iterator k = elv.begin(); k != elv.end(); ++k) { + if (!(*k).haveVia) { + continue; + } + if ((*k).toEdge == 0) { + assert(false); // should never happen. tell me when it does + continue; + } + const NBEdge::Lane& successor = (*k).toEdge->getLanes()[(*k).toLane]; + into.openTag(SUMO_TAG_EDGE); + into.writeAttr(SUMO_ATTR_ID, (*k).viaID); + into.writeAttr(SUMO_ATTR_FUNCTION, EDGEFUNC_INTERNAL); + writeLane(into, (*k).viaID, (*k).viaID + "_0", (*k).viaVmax, SVCAll, SVCAll, + NBEdge::UNSPECIFIED_OFFSET, successor.width, (*k).viaShape, (*k).origID, + MAX2((*k).viaShape.length(), POSITION_EPS), // microsim needs positive length + 0, origNames, &n); + into.closeTag(); + } + } } } - return ret; -} - - -void -NWWriter_SUMO::writeInternalEdge(OutputDevice& into, const std::string& id, SUMOReal vmax, const PositionVector& shape, - const std::string& origID) { - SUMOReal length = MAX2(shape.length(), (SUMOReal)POSITION_EPS); // microsim needs positive length - into.openTag(SUMO_TAG_EDGE); - into.writeAttr(SUMO_ATTR_ID, id); - into.writeAttr(SUMO_ATTR_FUNCTION, EDGEFUNC_INTERNAL); - into.openTag(SUMO_TAG_LANE); - into.writeAttr(SUMO_ATTR_ID, id + "_0"); - into.writeAttr(SUMO_ATTR_INDEX, 0); - into.writeAttr(SUMO_ATTR_SPEED, vmax); - into.writeAttr(SUMO_ATTR_LENGTH, length); - into.writeAttr(SUMO_ATTR_SHAPE, shape); - if (origID != "") { - into.openTag(SUMO_TAG_PARAM); - into.writeAttr(SUMO_ATTR_KEY, "origId"); - into.writeAttr(SUMO_ATTR_VALUE, origID); - into.closeTag(); - into.closeTag(); - } else { + // write pedestrian crossings + const std::vector& crossings = n.getCrossings(); + for (std::vector::const_iterator it = crossings.begin(); it != crossings.end(); it++) { + into.openTag(SUMO_TAG_EDGE); + into.writeAttr(SUMO_ATTR_ID, (*it).id); + into.writeAttr(SUMO_ATTR_FUNCTION, EDGEFUNC_CROSSING); + into.writeAttr(SUMO_ATTR_CROSSING_EDGES, (*it).edges); + writeLane(into, (*it).id, (*it).id + "_0", 1, SVC_PEDESTRIAN, 0, + NBEdge::UNSPECIFIED_OFFSET, (*it).width, (*it).shape, "", (*it).shape.length(), 0, false, &n); + into.closeTag(); + } + // write pedestrian walking areas + const std::vector& WalkingAreas = n.getWalkingAreas(); + for (std::vector::const_iterator it = WalkingAreas.begin(); it != WalkingAreas.end(); it++) { + const NBNode::WalkingArea& wa = *it; + into.openTag(SUMO_TAG_EDGE); + into.writeAttr(SUMO_ATTR_ID, wa.id); + into.writeAttr(SUMO_ATTR_FUNCTION, EDGEFUNC_WALKINGAREA); + writeLane(into, wa.id, wa.id + "_0", 1, SVC_PEDESTRIAN, 0, + NBEdge::UNSPECIFIED_OFFSET, wa.width, wa.shape, "", wa.length, 0, false, &n); into.closeTag(); } - into.closeTag(); + return ret; } @@ -274,10 +345,13 @@ length = geom.length(); } if (length <= 0) { - length = (SUMOReal)POSITION_EPS; + length = POSITION_EPS; } for (unsigned int i = 0; i < (unsigned int) lanes.size(); i++) { - writeLane(into, e.getID(), e.getLaneID(i), lanes[i], length, i, origNames); + const NBEdge::Lane& l = lanes[i]; + writeLane(into, e.getID(), e.getLaneID(i), l.speed, + l.permissions, l.preferred, l.endOffset, l.width, l.shape, l.origID, + length, i, origNames); } // close the edge into.closeTag(); @@ -285,41 +359,49 @@ void -NWWriter_SUMO::writeLane(OutputDevice& into, const std::string& eID, const std::string& lID, const NBEdge::Lane& lane, - SUMOReal length, unsigned int index, bool origNames) { +NWWriter_SUMO::writeLane(OutputDevice& into, const std::string& eID, const std::string& lID, + SUMOReal speed, SVCPermissions permissions, SVCPermissions preferred, + SUMOReal endOffset, SUMOReal width, PositionVector shape, + const std::string& origID, SUMOReal length, unsigned int index, bool origNames, + const NBNode* node) { // output the lane's attributes into.openTag(SUMO_TAG_LANE).writeAttr(SUMO_ATTR_ID, lID); // the first lane of an edge will be the depart lane into.writeAttr(SUMO_ATTR_INDEX, index); // write the list of allowed/disallowed vehicle classes - writePermissions(into, lane.permissions); - writePreferences(into, lane.preferred); + writePermissions(into, permissions); + writePreferences(into, preferred); // some further information - if (lane.speed == 0) { + if (speed == 0) { WRITE_WARNING("Lane #" + toString(index) + " of edge '" + eID + "' has a maximum velocity of 0."); - } else if (lane.speed < 0) { - throw ProcessError("Negative velocity (" + toString(lane.speed) + " on edge '" + eID + "' lane#" + toString(index) + "."); + } else if (speed < 0) { + throw ProcessError("Negative velocity (" + toString(speed) + " on edge '" + eID + "' lane#" + toString(index) + "."); } - if (lane.offset > 0) { - length = length - lane.offset; + if (endOffset > 0) { + length = length - endOffset; } - into.writeAttr(SUMO_ATTR_SPEED, lane.speed); + into.writeAttr(SUMO_ATTR_SPEED, speed); into.writeAttr(SUMO_ATTR_LENGTH, length); - if (lane.offset != NBEdge::UNSPECIFIED_OFFSET) { - into.writeAttr(SUMO_ATTR_ENDOFFSET, lane.offset); - } - if (lane.width != NBEdge::UNSPECIFIED_WIDTH) { - into.writeAttr(SUMO_ATTR_WIDTH, lane.width); + if (endOffset != NBEdge::UNSPECIFIED_OFFSET) { + into.writeAttr(SUMO_ATTR_ENDOFFSET, endOffset); } - PositionVector shape = lane.shape; - if (lane.offset > 0) { - shape = shape.getSubpart(0, shape.length() - lane.offset); + if (width != NBEdge::UNSPECIFIED_WIDTH) { + into.writeAttr(SUMO_ATTR_WIDTH, width); } - into.writeAttr(SUMO_ATTR_SHAPE, shape); - if (origNames && lane.origID != "") { + if (node != 0) { + const NBNode::CustomShapeMap& cs = node->getCustomLaneShapes(); + NBNode::CustomShapeMap::const_iterator it = cs.find(lID); + if (it != cs.end()) { + shape = it->second; + into.writeAttr(SUMO_ATTR_CUSTOMSHAPE, true); + } + } + into.writeAttr(SUMO_ATTR_SHAPE, endOffset > 0 ? + shape.getSubpart(0, shape.length() - endOffset) : shape); + if (origNames && origID != "") { into.openTag(SUMO_TAG_PARAM); into.writeAttr(SUMO_ATTR_KEY, "origId"); - into.writeAttr(SUMO_ATTR_VALUE, lane.origID); + into.writeAttr(SUMO_ATTR_VALUE, origID); into.closeTag(); into.closeTag(); } else { @@ -346,6 +428,10 @@ } } } + const std::vector& crossings = n.getCrossings(); + for (std::vector::const_iterator it = crossings.begin(); it != crossings.end(); it++) { + incLanes += ' ' + (*it).prevWalkingArea + "_0"; + } into.writeAttr(SUMO_ATTR_INCLANES, incLanes); // write the internal lanes std::string intLanes; @@ -361,7 +447,7 @@ intLanes += ' '; } if (!(*k).haveVia) { - intLanes += (*k).id + "_0"; + intLanes += (*k).getInternalLaneID(); } else { intLanes += (*k).viaID + "_0"; } @@ -369,9 +455,22 @@ } } } + if (n.getType() != NODETYPE_DEAD_END && n.getType() != NODETYPE_NOJUNCTION) { + for (std::vector::const_iterator it = crossings.begin(); it != crossings.end(); it++) { + intLanes += ' ' + (*it).id + "_0"; + } + } into.writeAttr(SUMO_ATTR_INTLANES, intLanes); // close writing into.writeAttr(SUMO_ATTR_SHAPE, n.getShape()); + // write optional radius + if (n.getRadius() != NBNode::UNSPECIFIED_RADIUS) { + into.writeAttr(SUMO_ATTR_RADIUS, n.getRadius()); + } + // specify whether a custom shape was used + if (n.hasCustomShape()) { + into.writeAttr(SUMO_ATTR_CUSTOMSHAPE, true); + } if (n.getType() == NODETYPE_DEAD_END) { into.closeTag(); } else { @@ -386,6 +485,21 @@ NWWriter_SUMO::writeInternalNodes(OutputDevice& into, const NBNode& n) { bool ret = false; const std::vector& incoming = n.getIncomingEdges(); + // build the list of internal lane ids + std::vector internalLaneIDs; + for (EdgeVector::const_iterator i = incoming.begin(); i != incoming.end(); i++) { + const std::vector& elv = (*i)->getConnections(); + for (std::vector::const_iterator k = elv.begin(); k != elv.end(); ++k) { + if ((*k).toEdge != 0) { + internalLaneIDs.push_back((*k).getInternalLaneID()); + } + } + } + const std::vector& crossings = n.getCrossings(); + for (std::vector::const_iterator it_c = crossings.begin(); it_c != crossings.end(); ++it_c) { + internalLaneIDs.push_back((*it_c).id + "_0"); + } + // write the internal nodes for (std::vector::const_iterator i = incoming.begin(); i != incoming.end(); i++) { const std::vector& elv = (*i)->getConnections(); for (std::vector::const_iterator k = elv.begin(); k != elv.end(); ++k) { @@ -396,12 +510,17 @@ into.openTag(SUMO_TAG_JUNCTION).writeAttr(SUMO_ATTR_ID, (*k).viaID + "_0"); into.writeAttr(SUMO_ATTR_TYPE, NODETYPE_INTERNAL); NWFrame::writePositionLong(pos, into); - std::string incLanes = (*k).id + "_0"; + std::string incLanes = (*k).getInternalLaneID(); if ((*k).foeIncomingLanes.length() != 0) { incLanes += " " + (*k).foeIncomingLanes; } into.writeAttr(SUMO_ATTR_INCLANES, incLanes); - into.writeAttr(SUMO_ATTR_INTLANES, (*k).foeInternalLanes); + const std::vector& foes = (*k).foeInternalLinks; + std::vector foeIDs; + for (std::vector::const_iterator it = foes.begin(); it != foes.end(); ++it) { + foeIDs.push_back(internalLaneIDs[*it]); + } + into.writeAttr(SUMO_ATTR_INTLANES, joinToString(foeIDs, " ")); into.closeTag(); ret = true; } @@ -419,12 +538,12 @@ into.writeAttr(SUMO_ATTR_TO, c.toEdge->getID()); into.writeAttr(SUMO_ATTR_FROM_LANE, c.fromLane); into.writeAttr(SUMO_ATTR_TO_LANE, c.toLane); - if (c.mayDefinitelyPass) { + if (c.mayDefinitelyPass && style != TLL) { into.writeAttr(SUMO_ATTR_PASS, c.mayDefinitelyPass); } if (style != PLAIN) { if (includeInternal) { - into.writeAttr(SUMO_ATTR_VIA, c.id + "_0"); + into.writeAttr(SUMO_ATTR_VIA, c.getInternalLaneID()); } // set information about the controlling tl if any if (c.tlID != "") { @@ -438,7 +557,7 @@ into.writeAttr(SUMO_ATTR_DIR, toString(dir)); // write the state information const LinkState linkState = from.getToNode()->getLinkState( - &from, c.toEdge, c.toLane, c.mayDefinitelyPass, c.tlID); + &from, c.toEdge, c.fromLane, c.mayDefinitelyPass, c.tlID); into.writeAttr(SUMO_ATTR_STATE, linkState); } } @@ -458,11 +577,11 @@ assert(c.toEdge != 0); if (c.haveVia) { // internal split - writeInternalConnection(into, c.id, c.toEdge->getID(), c.toLane, c.viaID + "_0"); - writeInternalConnection(into, c.viaID, c.toEdge->getID(), c.toLane, ""); + writeInternalConnection(into, c.id, c.toEdge->getID(), c.internalLaneIndex, c.toLane, c.viaID + "_0"); + writeInternalConnection(into, c.viaID, c.toEdge->getID(), 0, c.toLane, ""); } else { // no internal split - writeInternalConnection(into, c.id, c.toEdge->getID(), c.toLane, ""); + writeInternalConnection(into, c.id, c.toEdge->getID(), c.internalLaneIndex, c.toLane, ""); } ret = true; } @@ -473,33 +592,72 @@ void NWWriter_SUMO::writeInternalConnection(OutputDevice& into, - const std::string& from, const std::string& to, int toLane, const std::string& via) { + const std::string& from, const std::string& to, + int fromLane, int toLane, const std::string& via) { into.openTag(SUMO_TAG_CONNECTION); into.writeAttr(SUMO_ATTR_FROM, from); into.writeAttr(SUMO_ATTR_TO, to); - into.writeAttr(SUMO_ATTR_FROM_LANE, 0); + into.writeAttr(SUMO_ATTR_FROM_LANE, fromLane); into.writeAttr(SUMO_ATTR_TO_LANE, toLane); if (via != "") { into.writeAttr(SUMO_ATTR_VIA, via); } into.writeAttr(SUMO_ATTR_DIR, "s"); - into.writeAttr(SUMO_ATTR_STATE, "M"); + into.writeAttr(SUMO_ATTR_STATE, (via != "" ? "m" : "M")); into.closeTag(); } void +NWWriter_SUMO::writeRoundabouts(OutputDevice& into, const std::set& roundabouts, + const NBEdgeCont& ec) { + // make output deterministic + std::vector > edgeIDs; + for (std::set::const_iterator i = roundabouts.begin(); i != roundabouts.end(); ++i) { + std::vector tEdgeIDs; + for (EdgeSet::const_iterator j = (*i).begin(); j != (*i).end(); ++j) { + tEdgeIDs.push_back((*j)->getID()); + } + std::sort(tEdgeIDs.begin(), tEdgeIDs.end()); + edgeIDs.push_back(tEdgeIDs); + } + std::sort(edgeIDs.begin(), edgeIDs.end()); + // write + for (std::vector >::const_iterator i = edgeIDs.begin(); i != edgeIDs.end(); ++i) { + writeRoundabout(into, *i, ec); + } + if (roundabouts.size() != 0) { + into.lf(); + } +} + + +void NWWriter_SUMO::writeRoundabout(OutputDevice& into, const std::vector& edgeIDs, const NBEdgeCont& ec) { + std::vector validEdgeIDs; + std::vector invalidEdgeIDs; std::vector nodeIDs; for (std::vector::const_iterator i = edgeIDs.begin(); i != edgeIDs.end(); ++i) { - nodeIDs.push_back(ec.retrieve(*i)->getToNode()->getID()); + const NBEdge* edge = ec.retrieve(*i); + if (edge != 0) { + nodeIDs.push_back(edge->getToNode()->getID()); + validEdgeIDs.push_back(edge->getID()); + } else { + invalidEdgeIDs.push_back(*i); + } } std::sort(nodeIDs.begin(), nodeIDs.end()); - into.openTag(SUMO_TAG_ROUNDABOUT); - into.writeAttr(SUMO_ATTR_NODES, joinToString(nodeIDs, " ")); - into.writeAttr(SUMO_ATTR_EDGES, joinToString(edgeIDs, " ")); - into.closeTag(); + if (validEdgeIDs.size() > 0) { + into.openTag(SUMO_TAG_ROUNDABOUT); + into.writeAttr(SUMO_ATTR_NODES, joinToString(nodeIDs, " ")); + into.writeAttr(SUMO_ATTR_EDGES, joinToString(validEdgeIDs, " ")); + into.closeTag(); + if (invalidEdgeIDs.size() > 0) { + WRITE_WARNING("Writing incomplete roundabout. Edges: '" + + joinToString(invalidEdgeIDs, " ") + "' no longer exist'"); + } + } } @@ -576,6 +734,14 @@ into.writeAttr(SUMO_ATTR_TYPE, (*it)->getType()); into.writeAttr(SUMO_ATTR_PROGRAMID, (*it)->getProgramID()); into.writeAttr(SUMO_ATTR_OFFSET, writeSUMOTime((*it)->getOffset())); + // write params + const std::map& params = (*it)->getMap(); + for (std::map::const_iterator i = params.begin(); i != params.end(); ++i) { + into.openTag(SUMO_TAG_PARAM); + into.writeAttr(SUMO_ATTR_KEY, (*i).first); + into.writeAttr(SUMO_ATTR_VALUE, (*i).second); + into.closeTag(); + } // write the phases const std::vector& phases = (*it)->getPhases(); for (std::vector::const_iterator j = phases.begin(); j != phases.end(); ++j) { @@ -593,38 +759,23 @@ void -NWWriter_SUMO::writeLocation(OutputDevice& into) { - const GeoConvHelper& geoConvHelper = GeoConvHelper::getFinal(); - into.openTag(SUMO_TAG_LOCATION); - into.writeAttr(SUMO_ATTR_NET_OFFSET, geoConvHelper.getOffsetBase()); - into.writeAttr(SUMO_ATTR_CONV_BOUNDARY, geoConvHelper.getConvBoundary()); - if (geoConvHelper.usingGeoProjection()) { - into.setPrecision(GEO_OUTPUT_ACCURACY); - } - into.writeAttr(SUMO_ATTR_ORIG_BOUNDARY, geoConvHelper.getOrigBoundary()); - if (geoConvHelper.usingGeoProjection()) { - into.setPrecision(); - } - into.writeAttr(SUMO_ATTR_ORIG_PROJ, geoConvHelper.getProjString()); - into.closeTag(); - into.lf(); -} - - -void NWWriter_SUMO::writePermissions(OutputDevice& into, SVCPermissions permissions) { - if (permissions == SVCFreeForAll) { + if (permissions == SVCAll) { return; } else if (permissions == 0) { - // special case: since all-empty encodes FreeForAll we must list all disallowed - into.writeAttr(SUMO_ATTR_DISALLOW, getAllowedVehicleClassNames(SVCFreeForAll)); + into.writeAttr(SUMO_ATTR_DISALLOW, "all"); return; } else { - std::pair encoding = getPermissionEncoding(permissions); - if (encoding.second) { - into.writeAttr(SUMO_ATTR_ALLOW, encoding.first); + size_t num_allowed = 0; + for (int mask = 1; mask <= SUMOVehicleClass_MAX; mask = mask << 1) { + if ((mask & permissions) == mask) { + ++num_allowed; + } + } + if (num_allowed <= (SumoVehicleClassStrings.size() - num_allowed) && num_allowed > 0) { + into.writeAttr(SUMO_ATTR_ALLOW, getVehicleClassNames(permissions)); } else { - into.writeAttr(SUMO_ATTR_DISALLOW, encoding.first); + into.writeAttr(SUMO_ATTR_DISALLOW, getVehicleClassNames(~permissions)); } } } @@ -632,10 +783,10 @@ void NWWriter_SUMO::writePreferences(OutputDevice& into, SVCPermissions preferred) { - if (preferred == SVCFreeForAll || preferred == 0) { + if (preferred == SVCAll || preferred == 0) { return; } else { - into.writeAttr(SUMO_ATTR_PREFER, getAllowedVehicleClassNames(preferred)); + into.writeAttr(SUMO_ATTR_PREFER, getVehicleClassNames(preferred)); } } /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_SUMO.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_SUMO.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_SUMO.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_SUMO.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 04.05.2011 -/// @version $Id: NWWriter_SUMO.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: NWWriter_SUMO.h 18096 2015-03-17 09:50:59Z behrisch $ /// // Exporter writing networks using the SUMO format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -93,15 +93,20 @@ /// @brief writes the traffic light logics to the given device static void writeTrafficLights(OutputDevice& into, const NBTrafficLightLogicCont& tllCont); - /// @brief writes the location element - static void writeLocation(OutputDevice& into); - /// @brief writes allowed disallowed attributes if needed; static void writePermissions(OutputDevice& into, SVCPermissions permissions); /// @brief writes allowed disallowed attributes if needed; static void writePreferences(OutputDevice& into, SVCPermissions preferred); + /** @brief Writes roundabouts + * @param[in] into The device to write the edge into + * @param[in] roundaboutes The roundabouts to write + * @param[in] ec The edge control to retrieve named edges from + */ + static void writeRoundabouts(OutputDevice& into, const std::set& roundabouts, + const NBEdgeCont& ec); + protected: /// @name Methods for writing network parts /// @{ @@ -127,17 +132,18 @@ /** @brief Writes a lane (& r, - const NBEdgeCont& ec); - - /** @brief Writes a district * @param[in] into The device to write the edge into * @param[in] d The district */ static void writeDistrict(OutputDevice& into, const NBDistrict& d); - private: - /** @brief Writes a single internal edge - * @param[in] into The device to write the edges into - * @param[in] id The id of the edge - * @param[in] vmax The maximum speed of the edge - * @param[in] shape The shape of the edge - */ - static void writeInternalEdge(OutputDevice& into, const std::string& id, SUMOReal vmax, const PositionVector& shape, - const std::string& origID); - /** @brief Writes a single internal connection * @param[in] from The id of the from-edge * @param[in] to The id of the to-edge @@ -195,7 +182,8 @@ * @param[in] via The (optional) via edge */ static void writeInternalConnection(OutputDevice& into, - const std::string& from, const std::string& to, int toLane, const std::string& via); + const std::string& from, const std::string& to, + int fromLane, int toLane, const std::string& via); /// @brief writes a SUMOTime as int if possible, otherwise as a float static std::string writeSUMOTime(SUMOTime time); @@ -203,6 +191,16 @@ /// @brief the attribute value for a prohibition static std::string prohibitionConnection(const NBConnection& c); + + /** @brief Writes a roundabout + * @param[in] into The device to write the edge into + * @param[in] r The roundabout to write + * @param[in] ec The edge control to retrieve named edges from + */ + static void writeRoundabout(OutputDevice& into, const std::vector& r, + const NBEdgeCont& ec); + + }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_XML.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_XML.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_XML.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_XML.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 11.05.2011 -/// @version $Id: NWWriter_XML.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NWWriter_XML.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Exporter writing networks using XML (native input) format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -85,11 +85,11 @@ const bool geoAccuracy = useGeo || gch.usingInverseGeoProjection(); OutputDevice& device = OutputDevice::getDevice(oc.getString("plain-output-prefix") + ".nod.xml"); - device.writeXMLHeader("nodes", NWFrame::MAJOR_VERSION + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/nodes_file.xsd\""); + device.writeXMLHeader("nodes", NWFrame::MAJOR_VERSION + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/nodes_file.xsd\""); // write network offsets and projection to allow reconstruction of original coordinates if (!useGeo) { - NWWriter_SUMO::writeLocation(device); + GeoConvHelper::writeLocation(device); } // write nodes @@ -116,12 +116,26 @@ // set may contain multiple programs for the same id. // make sure ids are unique and sorted std::set tlsIDs; + std::set controlledInnerEdges; for (std::set::const_iterator it_tl = tlss.begin(); it_tl != tlss.end(); it_tl++) { tlsIDs.insert((*it_tl)->getID()); + std::vector cie = (*it_tl)->getControlledInnerEdges(); + controlledInnerEdges.insert(cie.begin(), cie.end()); } std::vector sortedIDs(tlsIDs.begin(), tlsIDs.end()); sort(sortedIDs.begin(), sortedIDs.end()); device.writeAttr(SUMO_ATTR_TLID, sortedIDs); + if (controlledInnerEdges.size() > 0) { + std::vector sortedCIEs(controlledInnerEdges.begin(), controlledInnerEdges.end()); + sort(sortedCIEs.begin(), sortedCIEs.end()); + device.writeAttr(SUMO_ATTR_CONTROLLED_INNER, joinToString(sortedCIEs, " ")); + } + } + if (n->hasCustomShape()) { + device.writeAttr(SUMO_ATTR_SHAPE, n->getShape()); + } + if (n->getRadius() != NBNode::UNSPECIFIED_RADIUS) { + device.writeAttr(SUMO_ATTR_RADIUS, n->getRadius()); } device.closeTag(); } @@ -136,9 +150,9 @@ const bool geoAccuracy = useGeo || gch.usingInverseGeoProjection(); OutputDevice& edevice = OutputDevice::getDevice(oc.getString("plain-output-prefix") + ".edg.xml"); - edevice.writeXMLHeader("edges", NWFrame::MAJOR_VERSION + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/edges_file.xsd\""); + edevice.writeXMLHeader("edges", NWFrame::MAJOR_VERSION + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/edges_file.xsd\""); OutputDevice& cdevice = OutputDevice::getDevice(oc.getString("plain-output-prefix") + ".con.xml"); - cdevice.writeXMLHeader("connections", NWFrame::MAJOR_VERSION + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/connections_file.xsd\""); + cdevice.writeXMLHeader("connections", NWFrame::MAJOR_VERSION + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/connections_file.xsd\""); bool noNames = !oc.getBool("output.street-names"); for (std::map::const_iterator i = ec.begin(); i != ec.end(); ++i) { // write the edge itself to the edges-files @@ -187,8 +201,8 @@ if (e->getLaneWidth() != NBEdge::UNSPECIFIED_WIDTH && !e->hasLaneSpecificWidth()) { edevice.writeAttr(SUMO_ATTR_WIDTH, e->getLaneWidth()); } - if (e->getOffset() != NBEdge::UNSPECIFIED_OFFSET && !e->hasLaneSpecificOffset()) { - edevice.writeAttr(SUMO_ATTR_OFFSET, e->getOffset()); + if (e->getEndOffset() != NBEdge::UNSPECIFIED_OFFSET && !e->hasLaneSpecificEndOffset()) { + edevice.writeAttr(SUMO_ATTR_ENDOFFSET, e->getEndOffset()); } if (!e->needsLaneSpecificOutput()) { edevice.closeTag(); @@ -204,8 +218,8 @@ if (lane.width != NBEdge::UNSPECIFIED_WIDTH && e->hasLaneSpecificWidth()) { edevice.writeAttr(SUMO_ATTR_WIDTH, lane.width); } - if (lane.offset != NBEdge::UNSPECIFIED_OFFSET && e->hasLaneSpecificOffset()) { - edevice.writeAttr(SUMO_ATTR_OFFSET, lane.offset); + if (lane.endOffset != NBEdge::UNSPECIFIED_OFFSET && e->hasLaneSpecificEndOffset()) { + edevice.writeAttr(SUMO_ATTR_ENDOFFSET, lane.endOffset); } if (e->hasLaneSpecificSpeed()) { edevice.writeAttr(SUMO_ATTR_SPEED, lane.speed); @@ -224,11 +238,41 @@ cdevice << "\n"; } } + // write roundabout information to the edges-files + if (ec.getRoundabouts().size() > 0) { + edevice.lf(); + NWWriter_SUMO::writeRoundabouts(edevice, ec.getRoundabouts(), ec); + } // write loaded prohibitions to the connections-file for (std::map::const_iterator i = nc.begin(); i != nc.end(); ++i) { NWWriter_SUMO::writeProhibitions(cdevice, i->second->getProhibitions()); } + // write pedestrian crossings to the connections-file + for (std::map::const_iterator it_node = nc.begin(); it_node != nc.end(); ++it_node) { + const std::vector& crossings = (*it_node).second->getCrossings(); + for (std::vector::const_iterator it = crossings.begin(); it != crossings.end(); it++) { + cdevice.openTag(SUMO_TAG_CROSSING); + cdevice.writeAttr(SUMO_ATTR_NODE, (*it_node).second->getID()); + cdevice.writeAttr(SUMO_ATTR_EDGES, (*it).edges); + cdevice.writeAttr(SUMO_ATTR_PRIORITY, (*it).priority); + if ((*it).width != NBNode::DEFAULT_CROSSING_WIDTH) { + cdevice.writeAttr(SUMO_ATTR_WIDTH, (*it).width); + } + cdevice.closeTag(); + } + } + // write customShapes to the connection-file + for (std::map::const_iterator it_node = nc.begin(); it_node != nc.end(); ++it_node) { + NBNode::CustomShapeMap customShapes = (*it_node).second->getCustomLaneShapes(); + for (NBNode::CustomShapeMap::const_iterator it = customShapes.begin(); it != customShapes.end(); ++it) { + cdevice.openTag(SUMO_TAG_CUSTOMSHAPE); + cdevice.writeAttr(SUMO_ATTR_ID, (*it).first); + cdevice.writeAttr(SUMO_ATTR_SHAPE, (*it).second); + cdevice.closeTag(); + } + } + edevice.close(); cdevice.close(); } @@ -237,7 +281,7 @@ void NWWriter_XML::writeTrafficLights(const OptionsCont& oc, NBTrafficLightLogicCont& tc, NBEdgeCont& ec) { OutputDevice& device = OutputDevice::getDevice(oc.getString("plain-output-prefix") + ".tll.xml"); - device.writeXMLHeader("tlLogics", NWFrame::MAJOR_VERSION + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/tllogic_file.xsd\""); + device.writeXMLHeader("tlLogics", NWFrame::MAJOR_VERSION + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/tllogic_file.xsd\""); NWWriter_SUMO::writeTrafficLights(device, tc); // we also need to remember the associations between tlLogics and connections // since the information in con.xml is insufficient @@ -258,7 +302,7 @@ void NWWriter_XML::writeJoinedJunctions(const OptionsCont& oc, NBNodeCont& nc) { OutputDevice& device = OutputDevice::getDevice(oc.getString("junctions.join-output")); - device.writeXMLHeader("nodes", NWFrame::MAJOR_VERSION + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/nodes_file.xsd\""); + device.writeXMLHeader("nodes", NWFrame::MAJOR_VERSION + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/nodes_file.xsd\""); const std::vector >& clusters = nc.getJoinedClusters(); for (std::vector >::const_iterator it = clusters.begin(); it != clusters.end(); it++) { assert((*it).size() > 0); @@ -280,7 +324,7 @@ void NWWriter_XML::writeStreetSigns(const OptionsCont& oc, NBEdgeCont& ec) { OutputDevice& device = OutputDevice::getDevice(oc.getString("street-sign-output")); - device.writeXMLHeader("pois", NWFrame::MAJOR_VERSION + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/poi_file.xsd\""); + device.writeXMLHeader("pois", NWFrame::MAJOR_VERSION + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/additional_file.xsd\""); for (std::map::const_iterator i = ec.begin(); i != ec.end(); ++i) { NBEdge* e = (*i).second; const std::vector& signs = e->getSigns(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_XML.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_XML.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/netwrite/NWWriter_XML.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/netwrite/NWWriter_XML.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 11.05.2011 -/// @version $Id: NWWriter_XML.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NWWriter_XML.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Exporter writing networks using XML (native input) format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -89,8 +89,7 @@ /** @brief Writes the edges and connections files * @param[in] oc The options to use - * @param[in] nc The node-container from which to read data - * @param[in] ec The edge-container from which to read data + * @param[in] nb The network build from which to read data */ static void writeEdgesAndConnections(const OptionsCont& oc, NBNodeCont& nc, NBEdgeCont& ec); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,7 @@ +noinst_LIBRARIES = libod.a + +libod_a_SOURCES = ODDistrict.cpp ODDistrict.h \ +ODDistrictCont.cpp ODDistrictCont.h \ +ODAmitranHandler.cpp ODAmitranHandler.h \ +ODDistrictHandler.cpp ODDistrictHandler.h \ +ODCell.h ODMatrix.h ODMatrix.cpp diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,625 @@ +# Makefile.in generated by automake 1.13.4 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/od +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libod_a_AR = $(AR) $(ARFLAGS) +libod_a_LIBADD = +am_libod_a_OBJECTS = ODDistrict.$(OBJEXT) ODDistrictCont.$(OBJEXT) \ + ODAmitranHandler.$(OBJEXT) ODDistrictHandler.$(OBJEXT) \ + ODMatrix.$(OBJEXT) +libod_a_OBJECTS = $(am_libod_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libod_a_SOURCES) +DIST_SOURCES = $(libod_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_CPPFLAGS = @AM_CPPFLAGS@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ +FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ +GDAL_LDFLAGS = @GDAL_LDFLAGS@ +GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_XERCES = @LIB_XERCES@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OSG_LIBS = @OSG_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJ_LDFLAGS = @PROJ_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XERCES_CFLAGS = @XERCES_CFLAGS@ +XERCES_LDFLAGS = @XERCES_LDFLAGS@ +XERCES_LIBS = @XERCES_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LIBRARIES = libod.a +libod_a_SOURCES = ODDistrict.cpp ODDistrict.h \ +ODDistrictCont.cpp ODDistrictCont.h \ +ODAmitranHandler.cpp ODAmitranHandler.h \ +ODDistrictHandler.cpp ODDistrictHandler.h \ +ODCell.h ODMatrix.h ODMatrix.cpp + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/od/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/od/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +libod.a: $(libod_a_OBJECTS) $(libod_a_DEPENDENCIES) $(EXTRA_libod_a_DEPENDENCIES) + $(AM_V_at)-rm -f libod.a + $(AM_V_AR)$(libod_a_AR) libod.a $(libod_a_OBJECTS) $(libod_a_LIBADD) + $(AM_V_at)$(RANLIB) libod.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODAmitranHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODDistrict.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODDistrictCont.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODDistrictHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODMatrix.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODAmitranHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODAmitranHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODAmitranHandler.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODAmitranHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,75 @@ +/****************************************************************************/ +/// @file ODAmitranHandler.cpp +/// @author Michael Behrisch +/// @date 27.03.2014 +/// @version $Id: ODAmitranHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// An XML-Handler for Amitran OD matrices +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include "ODMatrix.h" +#include "ODAmitranHandler.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +ODAmitranHandler::ODAmitranHandler(ODMatrix& matrix, const std::string& file) + : SUMOSAXHandler(file), myMatrix(matrix) {} + + +ODAmitranHandler::~ODAmitranHandler() {} + + +void +ODAmitranHandler::myStartElement(int element, const SUMOSAXAttributes& attrs) { + bool ok = true; + switch (element) { + case SUMO_TAG_ACTORCONFIG: + myVehicleType = attrs.get(SUMO_ATTR_ID, 0, ok); + break; + case SUMO_TAG_TIMESLICE: + myBegin = attrs.get(SUMO_ATTR_STARTTIME, myVehicleType.c_str(), ok); + myEnd = myBegin + attrs.get(SUMO_ATTR_DURATION, myVehicleType.c_str(), ok); + if (myBegin >= myEnd) { + WRITE_ERROR("Invalid duration for timeSlice starting " + toString(myBegin) + "."); + } + break; + case SUMO_TAG_OD_PAIR: + myMatrix.add(attrs.get(SUMO_ATTR_AMOUNT, myVehicleType.c_str(), ok), + myBegin, myEnd, attrs.get(SUMO_ATTR_ORIGIN, myVehicleType.c_str(), ok), + attrs.get(SUMO_ATTR_DESTINATION, myVehicleType.c_str(), ok), myVehicleType); + break; + default: + break; + } +} + + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODAmitranHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODAmitranHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODAmitranHandler.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODAmitranHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,108 @@ +/****************************************************************************/ +/// @file ODAmitranHandler.h +/// @author Michael Behrisch +/// @date 27.03.2014 +/// @version $Id: ODAmitranHandler.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// An XML-Handler for Amitran OD matrices +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef ODAmitranHandler_h +#define ODAmitranHandler_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class ODMatrix; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class ODAmitranHandler + * @brief An XML-Handler for districts + * + * This SUMOSAXHandler parses OD matrices in the Amitran format. + */ +class ODAmitranHandler : public SUMOSAXHandler { +public: + /** @brief Constructor + * + * Saves the given matrix in order to fill it. + * @param[in] cont The matrix to fill + * @param[in] file The file that will be processed + */ + ODAmitranHandler(ODMatrix& matrix, const std::string& file); + + + /// @brief Destructor + ~ODAmitranHandler(); + + +protected: + /// @name inherited from GenericSAXHandler + //@{ + + /** @brief Called when an opening-tag occurs + * + * Processes district elements via openDistrict, their sinks (via + * addSink) and sources (via addSource). + * + * @param[in] element The enum of the currently opened element + * @param[in] attrs Attributes of the currently opened element + * @exception ProcessError If an error within the parsed file occurs + * @see GenericSAXHandler::myStartElement + */ + void myStartElement(int element, + const SUMOSAXAttributes& attrs); + //@} + + +private: + /// The matrix to add demand to + ODMatrix& myMatrix; + + std::string myVehicleType; + + SUMOTime myBegin; + SUMOTime myEnd; +private: + /// @brief invalidated copy constructor + ODAmitranHandler(const ODAmitranHandler& s); + + /// @brief invalidated assignment operator + ODAmitranHandler& operator=(const ODAmitranHandler& s); + + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODCell.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODCell.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODCell.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODCell.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,83 @@ +/****************************************************************************/ +/// @file ODCell.h +/// @author Peter Mieth +/// @author Daniel Krajzewicz +/// @author Yun-Pang Floetteroed +/// @date Sept 2002 +/// @version $Id: ODCell.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A single O/D-matrix cell +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef ODCell_h +#define ODCell_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + + +// =========================================================================== +// class declarations +// =========================================================================== +class RORoute; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @struct ODCell + * @brief A single O/D-matrix cell + * + * A single cell within an O/D-matrix. Contains the information about the origin + * and destination via string-ids of the district, the begin and the end time + * for which this cell is valid, the id of the vehicle type to use, and the + * amount of vehicles to insert during the described interval. + * + * @todo Check whether the vehicle type is used and makes sense herein + */ +struct ODCell { + /// @brief The number of vehicles + SUMOReal vehicleNumber; + + /// @brief The begin time this cell describes + SUMOTime begin; + + /// @brief The end time this cell describes + SUMOTime end; + + /// @brief Name of the origin district + std::string origin; + + /// @brief Name of the destination district + std::string destination; + + /// @brief Name of the vehicle type + std::string vehicleType; + + /// @brief the list of paths / routes + std::vector pathsVector; // path_id, string of edges? +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODDistrictCont.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODDistrictCont.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODDistrictCont.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODDistrictCont.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,113 @@ +/****************************************************************************/ +/// @file ODDistrictCont.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Yun-Pang Floetteroed +/// @date Sept 2002 +/// @version $Id: ODDistrictCont.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A container for districts +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include "ODDistrict.h" +#include "ODDistrictHandler.h" +#include "ODDistrictCont.h" + + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +ODDistrictCont::ODDistrictCont() {} + + +ODDistrictCont::~ODDistrictCont() {} + + +std::string +ODDistrictCont::getRandomSourceFromDistrict(const std::string& name) const { + ODDistrict* district = get(name); + if (district == 0) { + throw InvalidArgument("There is no district '" + name + "'."); + } + return district->getRandomSource(); +} + + +std::string +ODDistrictCont::getRandomSinkFromDistrict(const std::string& name) const { + ODDistrict* district = get(name); + if (district == 0) { + throw InvalidArgument("There is no district '" + name + "'."); + } + return district->getRandomSink(); +} + + +void +ODDistrictCont::loadDistricts(std::string districtfile) { + if (!FileHelpers::isReadable(districtfile)) { + throw ProcessError("Could not access network file '" + districtfile + "' to load."); + } + PROGRESS_BEGIN_MESSAGE("Loading districts from '" + districtfile + "'"); + // build the xml-parser and handler + ODDistrictHandler handler(*this, districtfile); + if (!XMLSubSys::runParser(handler, districtfile, true)) { + PROGRESS_FAILED_MESSAGE(); + } else { + PROGRESS_DONE_MESSAGE(); + } +} + + +void +ODDistrictCont::makeDistricts(const std::map, std::vector > >& districts) { + for (std::map, std::vector > >::const_iterator it = districts.begin(); it != districts.end(); ++it) { + ODDistrict* current = new ODDistrict(it->first); + const std::vector& sources = it->second.first; + for (std::vector::const_iterator i = sources.begin(); i != sources.end(); ++i) { + current->addSource(*i, 1.); + } + const std::vector& sinks = it->second.second; + for (std::vector::const_iterator i = sinks.begin(); i != sinks.end(); ++i) { + current->addSink(*i, 1.); + } + add(current->getID(), current); + } +} + + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODDistrictCont.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODDistrictCont.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODDistrictCont.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODDistrictCont.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,112 @@ +/****************************************************************************/ +/// @file ODDistrictCont.h +/// @author Daniel Krajzewicz +/// @author Yun-Pang Floetteroed +/// @author Michael Behrisch +/// @date Sept 2002 +/// @version $Id: ODDistrictCont.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A container for districts +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef ODDistrictCont_h +#define ODDistrictCont_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include "ODDistrict.h" +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class ODDistrictCont + * @brief A container for districts + * + * Besides the inherited methods for adding/removing districts, this container + * allows to retrieve a random source or sink from a named district. + */ +class ODDistrictCont : public NamedObjectCont { +public: + /// Constructor + ODDistrictCont(); + + + /// Destructor + ~ODDistrictCont(); + + + /** @brief Returns the id of a random source from the named district + * + * At first, the named district is retrieved. If this fails, an + * InvalidArgument-exception is thrown. Otherwise, a source (edge) + * is chosen randomly from this district using this district's + * getRandomSource-method which throws an OutOfBoundsException-exception + * if this district does not contain a source. + * + * @param[in] name The id of the district to get a random source from + * @return The id of a randomly chosen source + * @exception InvalidArgument If the named district is not known + * @exception OutOfBoundsException If the named district has no sources + * @see ODDistrict::getRandomSource + */ + std::string getRandomSourceFromDistrict(const std::string& name) const; + + + /** @brief Returns the id of a random sink from the named district + * + * At first, the named district is retrieved. If this fails, an + * InvalidArgument-exception is thrown. Otherwise, a sink (edge) + * is chosen randomly from this district using this district's + * getRandomSink-method which throws an OutOfBoundsException-exception + * if this district does not contain a sink. + * + * @param[in] name The id of the district to get a random sink from + * @return The id of a randomly chosen sink + * @exception InvalidArgument If the named district is not known + * @exception OutOfBoundsException If the named district has no sinks + * @see ODDistrict::getRandomSink + */ + std::string getRandomSinkFromDistrict(const std::string& name) const; + + /// @brief load districts from FILE + void loadDistricts(std::string districtfile); + + /// @brief create districts from description + void makeDistricts(const std::map, std::vector > >& districts); + +private: + /// @brief invalidated copy constructor + ODDistrictCont(const ODDistrictCont& s); + + /// @brief invalidated assignment operator + ODDistrictCont& operator=(const ODDistrictCont& s); + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODDistrict.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODDistrict.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODDistrict.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODDistrict.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,95 @@ +/****************************************************************************/ +/// @file ODDistrict.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Yun-Pang Floetteroed +/// @date Sept 2002 +/// @version $Id: ODDistrict.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A district (origin/destination) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include "ODDistrict.h" + + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +ODDistrict::ODDistrict(const std::string& id) + : Named(id) {} + + +ODDistrict::~ODDistrict() {} + + +void +ODDistrict::addSource(const std::string& id, SUMOReal weight) { + mySources.add(weight, id); +} + + +void +ODDistrict::addSink(const std::string& id, SUMOReal weight) { + mySinks.add(weight, id); +} + + +std::string +ODDistrict::getRandomSource() const { + return mySources.get(); +} + + +std::string +ODDistrict::getRandomSink() const { + return mySinks.get(); +} + + +unsigned int +ODDistrict::sinkNumber() const { + return (unsigned int) mySinks.getVals().size(); +} + + +unsigned int +ODDistrict::sourceNumber() const { + return (unsigned int) mySources.getVals().size(); +} + + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODDistrict.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODDistrict.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODDistrict.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODDistrict.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,155 @@ +/****************************************************************************/ +/// @file ODDistrict.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Sept 2002 +/// @version $Id: ODDistrict.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A district (origin/destination) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef ODDistrict_h +#define ODDistrict_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class ODDistrict + * @brief A district (origin/destination) + * + * Class representing a district which has some ingoing and outgoing connections + * to the road network which may be weighted. + */ +class ODDistrict : public Named { +public: + /** @brief Constructor + * + * @param[in] id The id of the district + */ + ODDistrict(const std::string& id); + + + /// @brief Destructor + ~ODDistrict(); + + + /** @brief Adds a source connection + * + * A source is an edge where vehicles leave the district from to reach + * the network. The weight is used when a random source shall be + * chosen. + * + * BTW, it is possible to add a source twice. In this case it will occure + * twice within the distribution so that the behaviour is as adding + * both given probabilities. + * + * @param[in] id The id of the source + * @param[in] weight The weight (probability to be chosen) of the source + */ + void addSource(const std::string& id, SUMOReal weight); + + + /** @brief Adds a sink connection + * + * A sink connection is an edge which is used by vehicles to leave the + * network and reach the district. The weight is used when a random + * sink shall be chosen. + * + * BTW, it is possible to add a sink twice. In this case it will occure + * twice within the distribution so that the behaviour is as adding + * both given probabilities. + * + * @param[in] id The id of the sink + * @param[in] weight The weight (probability to be chosen) of the sink + */ + void addSink(const std::string& id, SUMOReal weight); + + + /** @brief Returns the id of a source to use + * + * If the list of this district's sources is empty, an OutOfBoundsException + * -exception is thrown. + * + * @return One of this district's sources chosen randomly regarding their weights + * @exception OutOfBoundsException If this district has no sources + */ + std::string getRandomSource() const; + + + /** @brief Returns the id of a sink to use + * + * If the list of this district's sinks is empty, an OutOfBoundsException + * -exception is thrown. + * + * @return One of this district's sinks chosen randomly regarding their weights + * @exception OutOfBoundsException If this district has no sinks + */ + std::string getRandomSink() const; + + + /** @brief Returns the number of sinks + * + * @return The number of known sinks + */ + unsigned int sinkNumber() const; + + + /** @brief Returns the number of sources + * + * @return The number of known sources + */ + unsigned int sourceNumber() const; + + +private: + /// @brief Container of weighted sources + RandomDistributor mySources; + + /// @brief Container of weighted sinks + RandomDistributor mySinks; + + +private: + /// @brief invalidated copy constructor + ODDistrict(const ODDistrict& s); + + /// @brief invalidated assignment operator + ODDistrict& operator=(const ODDistrict& s); + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODDistrictHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODDistrictHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODDistrictHandler.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODDistrictHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,162 @@ +/****************************************************************************/ +/// @file ODDistrictHandler.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date Sept 2002 +/// @version $Id: ODDistrictHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// An XML-Handler for districts +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include "ODDistrict.h" +#include "ODDistrictCont.h" +#include "ODDistrictHandler.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +ODDistrictHandler::ODDistrictHandler(ODDistrictCont& cont, + const std::string& file) + : SUMOSAXHandler(file), myContainer(cont), myCurrentDistrict(0) {} + + +ODDistrictHandler::~ODDistrictHandler() {} + + +void +ODDistrictHandler::myStartElement(int element, + const SUMOSAXAttributes& attrs) { + switch (element) { + case SUMO_TAG_TAZ: + openDistrict(attrs); + break; + case SUMO_TAG_TAZSOURCE: + addSource(attrs); + break; + case SUMO_TAG_TAZSINK: + addSink(attrs); + break; + default: + break; + } +} + + +void +ODDistrictHandler::myEndElement(int element) { + if (element == SUMO_TAG_TAZ) { + closeDistrict(); + } +} + + +void +ODDistrictHandler::openDistrict(const SUMOSAXAttributes& attrs) { + myCurrentDistrict = 0; + // get the id, report an error if not given or empty... + bool ok = true; + std::string id = attrs.get(SUMO_ATTR_ID, 0, ok); + if (!ok) { + return; + } + myCurrentDistrict = new ODDistrict(id); + if (attrs.hasAttribute(SUMO_ATTR_EDGES)) { + std::vector desc = attrs.getStringVector(SUMO_ATTR_EDGES); + for (std::vector::const_iterator i = desc.begin(); i != desc.end(); ++i) { + myCurrentDistrict->addSource(*i, 1.); + myCurrentDistrict->addSink(*i, 1.); + } + } +} + + +void +ODDistrictHandler::addSource(const SUMOSAXAttributes& attrs) { + std::pair vals = parseTAZ(attrs); + if (vals.second >= 0) { + myCurrentDistrict->addSource(vals.first, vals.second); + } +} + + +void +ODDistrictHandler::addSink(const SUMOSAXAttributes& attrs) { + std::pair vals = parseTAZ(attrs); + if (vals.second >= 0) { + myCurrentDistrict->addSink(vals.first, vals.second); + } +} + + + +std::pair +ODDistrictHandler::parseTAZ(const SUMOSAXAttributes& attrs) { + // check the current district first + if (myCurrentDistrict == 0) { + return std::pair("", -1); + } + // get the id, report an error if not given or empty... + bool ok = true; + std::string id = attrs.get(SUMO_ATTR_ID, 0, ok); + if (!ok) { + return std::pair("", -1); + } + // get the weight + SUMOReal weight = attrs.get(SUMO_ATTR_WEIGHT, id.c_str(), ok); + if (ok) { + if (weight < 0) { + WRITE_ERROR("'probability' must be positive (in definition of " + attrs.getObjectType() + " '" + id + "')."); + } else { + return std::pair(id, weight); + } + } + return std::pair("", -1); +} + + +void +ODDistrictHandler::closeDistrict() { + if (myCurrentDistrict != 0) { + myContainer.add(myCurrentDistrict->getID(), myCurrentDistrict); + } +} + + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODDistrictHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODDistrictHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODDistrictHandler.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODDistrictHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,187 @@ +/****************************************************************************/ +/// @file ODDistrictHandler.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date Sept 2002 +/// @version $Id: ODDistrictHandler.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// An XML-Handler for districts +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef ODDistrictHandler_h +#define ODDistrictHandler_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class ODDistrict; +class ODDistrictCont; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class ODDistrictHandler + * @brief An XML-Handler for districts + * + * This SUMOSAXHandler parses districts and their sinks and sources from + * and stores them into a the district container given at initialisation. + */ +class ODDistrictHandler : public SUMOSAXHandler { +public: + /** @brief Constructor + * + * Saves the given district containe in order to fill it. + * @param[in] cont The container of districts to fill + * @param[in] file The file that will be processed + */ + ODDistrictHandler(ODDistrictCont& cont, const std::string& file); + + + /// @brief Destructor + ~ODDistrictHandler(); + + +protected: + /// @name inherited from GenericSAXHandler + //@{ + + /** @brief Called when an opening-tag occurs + * + * Processes district elements via openDistrict, their sinks (via + * addSink) and sources (via addSource). + * + * @param[in] element The enum of the currently opened element + * @param[in] attrs Attributes of the currently opened element + * @exception ProcessError If an error within the parsed file occurs + * @see GenericSAXHandler::myStartElement + */ + void myStartElement(int element, + const SUMOSAXAttributes& attrs); + + + /** @brief Called when a closing tag occurs + * + * Processes district elements via closeDistrict. + * + * @param[in] element ID of the currently opened element + * @exception ProcessError If an error within the parsed file occurs + */ + void myEndElement(int element); + //@} + + +private: + /** @brief Begins the parsing of a district + * + * Tries to retrieve the id of a district, adds a message to the + * error handler if this fails. Otherwise builds a new district + * with this id at myCurrentDistrict. + * + * @param[in] attrs Attributes of the currently opened element + */ + void openDistrict(const SUMOSAXAttributes& attrs); + + + /** @brief Adds a read source to the current district + * + * Tries to get the id and the weight of the currently parsed source + * from the attributes using getValues. If the retrieval could be + * done without errors (weight>=0), the so retrieved weighted source + * is added to myCurrentDistrict using addSource. (getValues checks + * whether myCurrentDistrict is valid) + * + * @param[in] attrs Attributes of the currently opened element + * @todo Checking whether myCurrentDistrict is valid through getValues is not quite nice + */ + void addSource(const SUMOSAXAttributes& attrs); + + + /** @brief Adds a read sink to the current district + * + * Tries to get the id and the weight of the currently parsed sink + * from the attributes using getValues. If the retrieval could be + * done without errors (weight>=0), the so retrieved weighted sink + * is added to myCurrentDistrict using addSink. (getValues checks + * whether myCurrentDistrict is valid) + * + * @param[in] attrs Attributes of the currently opened element + * @todo Checking whether myCurrentDistrict is valid through getValues is not quite nice + */ + void addSink(const SUMOSAXAttributes& attrs); + + + /** @brief Closes the processing of the current district + * + * Adds myCurrentDistrict to myContainer. + */ + void closeDistrict(); + + + /** @brief Returns the id and weight for a taz/tazSink/tazSource + * + * Checks whether myCurrentDistrict (the currently processed + * district) is !=0; in this case, both the id and the weight + * are parsed. If one of them is missing or the weight is not numerical, + * an error is generated and reported to MsgHandler. The "type"-parameter + * is used in order to inform the user whether a source or a sink was + * processed. In the case of an error, the returned weight is -1. + * + * If no error occurs, the correct id and weight are returned. + * + * @param[in] attrs Attributes of the currently opened element + * @param[in] type The type of the currntly processed connection (sink/source) + * @return The id and the weight of a taz + */ + std::pair parseTAZ(const SUMOSAXAttributes& attrs); + +private: + /// The container to add read districts to + ODDistrictCont& myContainer; + + /// The currently parsed district + ODDistrict* myCurrentDistrict; + + +private: + /// @brief invalidated copy constructor + ODDistrictHandler(const ODDistrictHandler& s); + + /// @brief invalidated assignment operator + ODDistrictHandler& operator=(const ODDistrictHandler& s); + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODMatrix.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODMatrix.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODMatrix.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODMatrix.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,551 @@ +/****************************************************************************/ +/// @file ODMatrix.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @author Yun-Pang Floetteroed +/// @date 05 Apr. 2006 +/// @version $Id: ODMatrix.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// An O/D (origin/destination) matrix +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "ODAmitranHandler.h" +#include "ODMatrix.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +ODMatrix::ODMatrix(const ODDistrictCont& dc) + : myDistricts(dc), myNoLoaded(0), myNoWritten(0), myNoDiscarded(0) {} + + +ODMatrix::~ODMatrix() { + for (std::vector::iterator i = myContainer.begin(); i != myContainer.end(); ++i) { + delete *i; + } + myContainer.clear(); +} + + +void +ODMatrix::add(SUMOReal vehicleNumber, SUMOTime begin, + SUMOTime end, const std::string& origin, const std::string& destination, + const std::string& vehicleType) { + myNoLoaded += vehicleNumber; + if (myDistricts.get(origin) == 0 && myDistricts.get(destination) == 0) { + WRITE_WARNING("Missing origin '" + origin + "' and destination '" + destination + "' (" + toString(vehicleNumber) + " vehicles)."); + } else if (myDistricts.get(origin) == 0 && vehicleNumber > 0) { + WRITE_ERROR("Missing origin '" + origin + "' (" + toString(vehicleNumber) + " vehicles)."); + myNoDiscarded += vehicleNumber; + } else if (myDistricts.get(destination) == 0 && vehicleNumber > 0) { + WRITE_ERROR("Missing destination '" + destination + "' (" + toString(vehicleNumber) + " vehicles)."); + myNoDiscarded += vehicleNumber; + } else { + if (myDistricts.get(origin)->sourceNumber() == 0) { + WRITE_ERROR("District '" + origin + "' has no source."); + myNoDiscarded += vehicleNumber; + } else if (myDistricts.get(destination)->sinkNumber() == 0) { + WRITE_ERROR("District '" + destination + "' has no sink."); + myNoDiscarded += vehicleNumber; + } else { + ODCell* cell = new ODCell(); + cell->begin = begin; + cell->end = end; + cell->origin = origin; + cell->destination = destination; + cell->vehicleType = vehicleType; + cell->vehicleNumber = vehicleNumber; + myContainer.push_back(cell); + } + } +} + + +SUMOReal +ODMatrix::computeDeparts(ODCell* cell, + size_t& vehName, std::vector& into, + bool uniform, const std::string& prefix) { + int vehicles2insert = (int) cell->vehicleNumber; + // compute whether the fraction forces an additional vehicle insertion + if (RandHelper::rand() < cell->vehicleNumber - (SUMOReal)vehicles2insert) { + vehicles2insert++; + } + if (vehicles2insert == 0) { + return cell->vehicleNumber; + } + + const SUMOReal offset = (SUMOReal)(cell->end - cell->begin) / (SUMOReal) vehicles2insert / (SUMOReal) 2.; + for (int i = 0; i < vehicles2insert; ++i) { + ODVehicle veh; + veh.id = prefix + toString(vehName++); + + if (uniform) { + veh.depart = (SUMOTime)(offset + cell->begin + ((SUMOReal)(cell->end - cell->begin) * (SUMOReal) i / (SUMOReal) vehicles2insert)); + } else { + veh.depart = (SUMOTime)RandHelper::rand(cell->begin, cell->end); + } + + veh.from = myDistricts.getRandomSourceFromDistrict(cell->origin); + veh.to = myDistricts.getRandomSinkFromDistrict(cell->destination); + veh.cell = cell; + into.push_back(veh); + } + return cell->vehicleNumber - vehicles2insert; +} + + +void +ODMatrix::writeDefaultAttrs(OutputDevice& dev, const bool noVtype, + const ODCell* const cell) { + const OptionsCont& oc = OptionsCont::getOptions(); + if (!noVtype && cell->vehicleType != "") { + dev.writeAttr(SUMO_ATTR_TYPE, cell->vehicleType); + } + dev.writeAttr(SUMO_ATTR_FROM_TAZ, cell->origin).writeAttr(SUMO_ATTR_TO_TAZ, cell->destination); + if (oc.isSet("departlane") && oc.getString("departlane") != "default") { + dev.writeAttr(SUMO_ATTR_DEPARTLANE, oc.getString("departlane")); + } + if (oc.isSet("departpos")) { + dev.writeAttr(SUMO_ATTR_DEPARTPOS, oc.getString("departpos")); + } + if (oc.isSet("departspeed") && oc.getString("departspeed") != "default") { + dev.writeAttr(SUMO_ATTR_DEPARTSPEED, oc.getString("departspeed")); + } + if (oc.isSet("arrivallane")) { + dev.writeAttr(SUMO_ATTR_ARRIVALLANE, oc.getString("arrivallane")); + } + if (oc.isSet("arrivalpos")) { + dev.writeAttr(SUMO_ATTR_ARRIVALPOS, oc.getString("arrivalpos")); + } + if (oc.isSet("arrivalspeed")) { + dev.writeAttr(SUMO_ATTR_ARRIVALSPEED, oc.getString("arrivalspeed")); + } +} + + +void +ODMatrix::write(SUMOTime begin, const SUMOTime end, + OutputDevice& dev, const bool uniform, const bool noVtype, + const std::string& prefix, const bool stepLog) { + if (myContainer.size() == 0) { + return; + } + std::map, SUMOReal> fractionLeft; + size_t vehName = 0; + sort(myContainer.begin(), myContainer.end(), cell_by_begin_sorter()); + // recheck begin time + begin = MAX2(begin, myContainer.front()->begin); + std::vector::iterator next = myContainer.begin(); + std::vector vehicles; + SUMOTime lastOut = -DELTA_T; + // go through the time steps + for (SUMOTime t = begin; t != end;) { + if (stepLog && t - lastOut >= DELTA_T) { + std::cout << "Parsing time " + time2string(t) << '\r'; + lastOut = t; + } + // recheck whether a new cell got valid + bool changed = false; + while (next != myContainer.end() && (*next)->begin <= t && (*next)->end > t) { + std::pair odID = std::make_pair((*next)->origin, (*next)->destination); + // check whether the current cell must be extended by the last fraction + if (fractionLeft.find(odID) != fractionLeft.end()) { + (*next)->vehicleNumber += fractionLeft[odID]; + fractionLeft[odID] = 0; + } + // get the new departures (into tmp) + const size_t oldSize = vehicles.size(); + const SUMOReal fraction = computeDeparts(*next, vehName, vehicles, uniform, prefix); + if (oldSize != vehicles.size()) { + changed = true; + } + if (fraction != 0) { + fractionLeft[odID] = fraction; + } + ++next; + } + if (changed) { + sort(vehicles.begin(), vehicles.end(), descending_departure_comperator()); + } + for (std::vector::reverse_iterator i = vehicles.rbegin(); i != vehicles.rend() && (*i).depart == t; ++i) { + myNoWritten++; + dev.openTag(SUMO_TAG_TRIP).writeAttr(SUMO_ATTR_ID, (*i).id).writeAttr(SUMO_ATTR_DEPART, time2string(t)); + dev.writeAttr(SUMO_ATTR_FROM, (*i).from).writeAttr(SUMO_ATTR_TO, (*i).to); + writeDefaultAttrs(dev, noVtype, i->cell); + dev.closeTag(); + } + while (vehicles.size() != 0 && vehicles.back().depart == t) { + vehicles.pop_back(); + } + if (!vehicles.empty()) { + t = vehicles.back().depart; + } + if (next != myContainer.end() && (t > (*next)->begin || vehicles.empty())) { + t = (*next)->begin; + } + if (next == myContainer.end() && vehicles.empty()) { + break; + } + } +} + + +void +ODMatrix::writeFlows(const SUMOTime begin, const SUMOTime end, + OutputDevice& dev, bool noVtype, + const std::string& prefix) { + if (myContainer.size() == 0) { + return; + } + size_t flowName = 0; + sort(myContainer.begin(), myContainer.end(), cell_by_begin_sorter()); + // recheck begin time + for (std::vector::const_iterator i = myContainer.begin(); i != myContainer.end(); ++i) { + const ODCell* const c = *i; + if (c->end > begin && c->begin < end) { + dev.openTag(SUMO_TAG_FLOW).writeAttr(SUMO_ATTR_ID, prefix + toString(flowName++)); + dev.writeAttr(SUMO_ATTR_BEGIN, time2string(c->begin)); + dev.writeAttr(SUMO_ATTR_END, time2string(c->end)).writeAttr(SUMO_ATTR_NUMBER, int(c->vehicleNumber)); + writeDefaultAttrs(dev, noVtype, *i); + dev.closeTag(); + } + } +} + + +std::string +ODMatrix::getNextNonCommentLine(LineReader& lr) { + std::string line; + do { + line = lr.readLine(); + if (line[0] != '*') { + return StringUtils::prune(line); + } + } while (lr.good() && lr.hasMore()); + throw ProcessError(); +} + + +SUMOTime +ODMatrix::parseSingleTime(const std::string& time) { + if (time.find('.') == std::string::npos) { + throw OutOfBoundsException(); + } + std::string hours = time.substr(0, time.find('.')); + std::string minutes = time.substr(time.find('.') + 1); + return TIME2STEPS(TplConvert::_2int(hours.c_str()) * 3600 + TplConvert::_2int(minutes.c_str()) * 60); +} + + +std::pair +ODMatrix::readTime(LineReader& lr) { + std::string line = getNextNonCommentLine(lr); + try { + StringTokenizer st(line, StringTokenizer::WHITECHARS); + SUMOTime begin = parseSingleTime(st.next()); + SUMOTime end = parseSingleTime(st.next()); + if (begin >= end) { + throw ProcessError("Begin time is larger than end time."); + } + return std::make_pair(begin, end); + } catch (OutOfBoundsException&) { + throw ProcessError("Broken period definition '" + line + "'."); + } catch (NumberFormatException&) { + throw ProcessError("Broken period definition '" + line + "'."); + } +} + +SUMOReal +ODMatrix::readFactor(LineReader& lr, SUMOReal scale) { + std::string line = getNextNonCommentLine(lr); + SUMOReal factor = -1; + try { + factor = TplConvert::_2SUMOReal(line.c_str()) * scale; + } catch (NumberFormatException&) { + throw ProcessError("Broken factor: '" + line + "'."); + } + return factor; +} + +void +ODMatrix::readV(LineReader& lr, SUMOReal scale, + std::string vehType, bool matrixHasVehType) { + PROGRESS_BEGIN_MESSAGE("Reading matrix '" + lr.getFileName() + "' stored as VMR"); + // parse first defs + std::string line; + if (matrixHasVehType) { + line = getNextNonCommentLine(lr); + if (vehType == "") { + vehType = StringUtils::prune(line); + } + } + + // parse time + std::pair times = readTime(lr); + SUMOTime begin = times.first; + SUMOTime end = times.second; + + // factor + SUMOReal factor = readFactor(lr, scale); + + // districts + line = getNextNonCommentLine(lr); + int districtNo = TplConvert::_2int(StringUtils::prune(line).c_str()); + // parse district names (normally ints) + std::vector names; + do { + line = getNextNonCommentLine(lr); + StringTokenizer st2(line, StringTokenizer::WHITECHARS); + while (st2.hasNext()) { + names.push_back(st2.next()); + } + } while ((int) names.size() != districtNo); + + // parse the cells + for (std::vector::iterator si = names.begin(); si != names.end(); ++si) { + std::vector::iterator di = names.begin(); + // + do { + line = getNextNonCommentLine(lr); + if (line.length() == 0) { + continue; + } + try { + StringTokenizer st2(line, StringTokenizer::WHITECHARS); + while (st2.hasNext()) { + assert(di != names.end()); + SUMOReal vehNumber = TplConvert::_2SUMOReal(st2.next().c_str()) * factor; + if (vehNumber != 0) { + add(vehNumber, begin, end, *si, *di, vehType); + } + if (di == names.end()) { + throw ProcessError("More entries than districts found."); + } + ++di; + } + } catch (NumberFormatException&) { + throw ProcessError("Not numeric vehicle number in line '" + line + "'."); + } + if (!lr.hasMore()) { + break; + } + } while (di != names.end()); + } + PROGRESS_DONE_MESSAGE(); +} + + +void +ODMatrix::readO(LineReader& lr, SUMOReal scale, + std::string vehType, bool matrixHasVehType) { + PROGRESS_BEGIN_MESSAGE("Reading matrix '" + lr.getFileName() + "' stored as OR"); + // parse first defs + std::string line; + if (matrixHasVehType) { + line = getNextNonCommentLine(lr); + int type = TplConvert::_2int(StringUtils::prune(line).c_str()); + if (vehType == "") { + vehType = toString(type); + } + } + + // parse time + std::pair times = readTime(lr); + SUMOTime begin = times.first; + SUMOTime end = times.second; + + // factor + SUMOReal factor = readFactor(lr, scale); + + // parse the cells + while (lr.hasMore()) { + line = getNextNonCommentLine(lr); + if (line.length() == 0) { + continue; + } + StringTokenizer st2(line, StringTokenizer::WHITECHARS); + if (st2.size() == 0) { + continue; + } + try { + std::string sourceD = st2.next(); + std::string destD = st2.next(); + SUMOReal vehNumber = TplConvert::_2SUMOReal(st2.next().c_str()) * factor; + if (vehNumber != 0) { + add(vehNumber, begin, end, sourceD, destD, vehType); + } + } catch (OutOfBoundsException&) { + throw ProcessError("Missing at least one information in line '" + line + "'."); + } catch (NumberFormatException&) { + throw ProcessError("Not numeric vehicle number in line '" + line + "'."); + } + } + PROGRESS_DONE_MESSAGE(); +} + + + +SUMOReal +ODMatrix::getNoLoaded() const { + return myNoLoaded; +} + + +SUMOReal +ODMatrix::getNoWritten() const { + return myNoWritten; +} + + +SUMOReal +ODMatrix::getNoDiscarded() const { + return myNoDiscarded; +} + + +void +ODMatrix::applyCurve(const Distribution_Points& ps, ODCell* cell, std::vector& newCells) { + for (size_t i = 0; i < ps.getAreaNo(); ++i) { + ODCell* ncell = new ODCell(); + ncell->begin = TIME2STEPS(ps.getAreaBegin(i)); + ncell->end = TIME2STEPS(ps.getAreaEnd(i)); + ncell->origin = cell->origin; + ncell->destination = cell->destination; + ncell->vehicleType = cell->vehicleType; + ncell->vehicleNumber = cell->vehicleNumber * ps.getAreaPerc(i); + newCells.push_back(ncell); + } +} + + +void +ODMatrix::applyCurve(const Distribution_Points& ps) { + std::vector oldCells = myContainer; + myContainer.clear(); + for (std::vector::iterator i = oldCells.begin(); i != oldCells.end(); ++i) { + std::vector newCells; + applyCurve(ps, *i, newCells); + copy(newCells.begin(), newCells.end(), back_inserter(myContainer)); + delete *i; + } +} + +void +ODMatrix::loadMatrix(OptionsCont& oc) { + std::vector files = oc.getStringVector("od-matrix-files"); + for (std::vector::iterator i = files.begin(); i != files.end(); ++i) { + LineReader lr(*i); + if (!lr.good()) { + throw ProcessError("Could not open '" + (*i) + "'."); + } + std::string type = lr.readLine(); + // get the type only + if (type.find(';') != std::string::npos) { + type = type.substr(0, type.find(';')); + } + // parse type-dependant + if (type.length() > 1 && type[1] == 'V') { + // process ptv's 'V'-matrices + if (type.find('N') != std::string::npos) { + throw ProcessError("'" + *i + "' does not contain the needed information about the time described."); + } + readV(lr, oc.getFloat("scale"), oc.getString("vtype"), type.find('M') != std::string::npos); + } else if (type.length() > 1 && type[1] == 'O') { + // process ptv's 'O'-matrices + if (type.find('N') != std::string::npos) { + throw ProcessError("'" + *i + "' does not contain the needed information about the time described."); + } + readO(lr, oc.getFloat("scale"), oc.getString("vtype"), type.find('M') != std::string::npos); + } else { + throw ProcessError("'" + *i + "' uses an unknown matrix type '" + type + "'."); + } + } + std::vector amitranFiles = oc.getStringVector("od-amitran-files"); + for (std::vector::iterator i = amitranFiles.begin(); i != amitranFiles.end(); ++i) { + if (!FileHelpers::isReadable(*i)) { + throw ProcessError("Could not access matrix file '" + *i + "' to load."); + } + PROGRESS_BEGIN_MESSAGE("Loading matrix in Amitran format from '" + *i + "'"); + ODAmitranHandler handler(*this, *i); + if (!XMLSubSys::runParser(handler, *i)) { + PROGRESS_FAILED_MESSAGE(); + } else { + PROGRESS_DONE_MESSAGE(); + } + } +} + + +Distribution_Points +ODMatrix::parseTimeLine(const std::vector& def, bool timelineDayInHours) { + bool interpolating = !timelineDayInHours; + PositionVector points; + SUMOReal prob = 0; + if (timelineDayInHours) { + if (def.size() != 24) { + throw ProcessError("Assuming 24 entries for a day timeline, but got " + toString(def.size()) + "."); + } + for (int chour = 0; chour < 24; ++chour) { + prob = TplConvert::_2SUMOReal(def[chour].c_str()); + points.push_back(Position((SUMOReal)(chour * 3600), prob)); + } + points.push_back(Position((SUMOReal)(24 * 3600), prob)); + } else { + size_t i = 0; + while (i < def.size()) { + StringTokenizer st2(def[i++], ":"); + if (st2.size() != 2) { + throw ProcessError("Broken time line definition: missing a value in '" + def[i - 1] + "'."); + } + int time = TplConvert::_2int(st2.next().c_str()); + prob = TplConvert::_2SUMOReal(st2.next().c_str()); + points.push_back(Position((SUMOReal) time, prob)); + } + } + return Distribution_Points("N/A", points, interpolating); +} + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODMatrix.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODMatrix.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od/ODMatrix.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od/ODMatrix.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,406 @@ +/****************************************************************************/ +/// @file ODMatrix.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Yun-Pang Floetteroed +/// @date 05. Apr. 2006 +/// @version $Id: ODMatrix.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// An O/D (origin/destination) matrix +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef ODMatrix_h +#define ODMatrix_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "ODCell.h" +#include "ODDistrictCont.h" +#include +#include +#include + +// =========================================================================== +// class declarations +// =========================================================================== +class OutputDevice; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class ODMatrix + * @brief An O/D (origin/destination) matrix + * + * This class is the internal representation of a loaded O/D-matrix. Beside + * being the storage for ODCells, the matrix also contains information about + * the numbers of loaded, discarded, and written vehicles. + * + * The matrix has a reference to the container of districts stored. This allows + * to validate added cell descriptions in means that using existing origins/ + * destinations only is assured. + * + * In addition of being a storage, the matrix is also responsible for writing + * the results and contains methods for splitting the entries over time. + */ +class ODMatrix { +public: + /** @brief Constructor + * + * @param[in] dc The district container to obtain referenced districts from + */ + ODMatrix(const ODDistrictCont& dc); + + + /// Destructor + ~ODMatrix(); + + + /** @brief Builds a single cell from the given values, verifying them + * + * At first, the number of loaded vehicles (myNoLoaded) is incremented + * by vehicleNumber. + * + * It is checked whether both the origin and the destination exist within + * the assigned district container (myDistricts). If one of them is missing, + * an error is generated, if both, a warning, because in the later case + * the described flow may lay completely beside the processed area. In both + * cases the given number of vehicles (vehicleNumber) is added to myNoDiscarded. + * + * If the origin/destination districts are known, a cell is built using the + * given values. This cell is added to the list of known cells (myContainer). + * + * @param[in] vehicleNumber The number of vehicles to store within the cell + * @param[in] begin The begin of the interval the cell is valid for + * @param[in] end The end of the interval the cell is valid for + * @param[in] origin The origin district to use for the cell's flows + * @param[in] destination The destination district to use for the cell's flows + * @param[in] vehicleType The vehicle type to use for the cell's flows + */ + void add(SUMOReal vehicleNumber, SUMOTime begin, + SUMOTime end, const std::string& origin, const std::string& destination, + const std::string& vehicleType); + + /** @brief Helper function for flow and trip output writing the depart + * and arrival attributes + * + * @param[in] dev The stream to write the generated vehicle trips to + * @param[in] noVtype Whether vtype information shall not be written + * @param[in] cell The OD cell containing the vtype + */ + void writeDefaultAttrs(OutputDevice& dev, const bool noVtype, + const ODCell* const cell); + + /** @brief Writes the vehicles stored in the matrix assigning the sources and sinks + * + * The cells stored in myContainer are sorted, first. Then, for each time + * step to generate vehicles for, it is checked whether the topmost cell + * is valid for this time step. If so, vehicles are generated from this + * cell's description using "computeDeparts" and stored in an internal vector. + * The pointer is moved and the check is repeated until the current cell + * is not valid for the current time or no further cells exist. + * + * Then, for the current time step, the internal list of vehicles is sorted and + * all vehicles that start within this time step are written. + * + * The left fraction of vehicles to insert is saved for each O/D-dependency + * over time and the number of vehicles to generate is increased as soon + * as this value is larger than 1, decrementing it. + * + * @param[in] begin The begin time to generate vehicles for + * @param[in] end The end time to generate vehicles for + * @param[in] dev The stream to write the generated vehicle trips to + * @param[in] uniform Information whether departure times shallbe uniformly spread or random + * @param[in] noVtype Whether vtype information shall not be written + * @param[in] prefix A prefix for the vehicle names + * @param[in] stepLog Whether processed time shall be written + */ + void write(SUMOTime begin, const SUMOTime end, + OutputDevice& dev, const bool uniform, const bool noVtype, + const std::string& prefix, const bool stepLog); + + + /** @brief Writes the flows stored in the matrix + * + * @param[in] begin The begin time to generate vehicles for + * @param[in] end The end time to generate vehicles for + * @param[in] dev The stream to write the generated vehicle trips to + * @param[in] noVtype Whether vtype information shall not be written + * @param[in] prefix A prefix for the flow names + */ + void writeFlows(const SUMOTime begin, const SUMOTime end, + OutputDevice& dev, const bool noVtype, + const std::string& prefix); + + + /** @brief Returns the number of loaded vehicles + * + * Returns the value of myNoLoaded + * + * @return The number of loaded vehicles + */ + SUMOReal getNoLoaded() const; + + + /** @brief Returns the number of written vehicles + * + * Returns the value of myNoWritten + * + * @return The number of written vehicles + */ + SUMOReal getNoWritten() const; + + + /** @brief Returns the number of discarded vehicles + * + * Returns the value of myNoDiscarded + * + * @return The number of discarded vehicles + */ + SUMOReal getNoDiscarded() const; + + + /** @brief Splits the stored cells dividing them on the given time line + * @todo Describe + */ + void applyCurve(const Distribution_Points& ps); + + + /** @brief read a VISUM-matrix with the O Format + * @todo Describe + */ + void readO(LineReader& lr, SUMOReal scale, + std::string vehType, bool matrixHasVehType); + + /** @brief read a VISUM-matrix with the V Format + * @todo Describe + */ + void readV(LineReader& lr, SUMOReal scale, + std::string vehType, bool matrixHasVehType); + + /** @brief read a VISUM-matrix with the V Format + * @todo Describe + */ + void loadMatrix(OptionsCont& oc); + + /** @brief split the given timeline + * @todo Describe + */ + Distribution_Points parseTimeLine(const std::vector& def, bool timelineDayInHours); + + const std::vector& getCells() { + return myContainer; + } + +protected: + /** + * @struct ODVehicle + * @brief An internal representation of a single vehicle + */ + struct ODVehicle { + /// @brief The id of the vehicle + std::string id; + /// @brief The departure time of the vehicle + SUMOTime depart; + /// @brief The cell of the ODMatrix which generated the vehicle + ODCell* cell; + /// @brief The edge the vehicles shall start at + std::string from; + /// @brief The edge the vehicles shall end at + std::string to; + + }; + + + /** @brief Computes the vehicle departs stored in the given cell and saves them in "into" + * + * At first, the number of vehicles to insert is computed using the + * integer value of the vehicleNumber information from the given cell. + * In the case vehicleNumber has a fraction, an additional vehicle + * may be added in the case a chosen random number is lower than this fraction. + * + * If uniform is true, the departure times of the generated vehicles + * are spread uniformly, otherwise the departure time are chosen randomly from + * the interval. + * + * The vehicle names are generated by putting the value of vehName after the + * given prefix. The value of vehName is incremented with each generated vehicle. + * + * The number of left vehicles (the fraction if no additional vehicle was + * generated) is returned. + * + * @param[in] cell The cell to use + * @param[in,out] vehName An incremented index of the generated vehicle + * @param[out] into The storage to put generated vehicles into + * @param[in] uniform Information whether departure times shallbe uniformly spread or random + * @param[in] prefix A prefix for the vehicle names + * @return The number of left vehicles to insert + */ + SUMOReal computeDeparts(ODCell* cell, + size_t& vehName, std::vector& into, bool uniform, + const std::string& prefix); + + + /** @brief Splits the given cell dividing it on the given time line and + * storing the results in the given container + * + * For the given cell, a list of clones is generated. The number of these + * is equal to the number of "areas" within the given distribution + * description (time line in this case) and each clone's vehicleNumber + * is equal to the given cell's vehicle number multiplied with the area's + * probability. The clones are stored in the given cell vector. + * + * @see Distribution_Points + * @param[in] ps The time line to apply + * @param[in] cell The cell to split + * @param[out] newCells The storage to put generated cells into + * @todo describe better!!! + */ + void applyCurve(const Distribution_Points& ps, ODCell* cell, + std::vector& newCells); + + +private: + /** @used in the functions readV and readO + * @todo Describe + */ + std::string getNextNonCommentLine(LineReader& lr); + + /** @used in the functions readV and readO + * @todo Describe + */ + SUMOTime parseSingleTime(const std::string& time); + + /** @used in the functions readV and readO + * @todo Describe + */ + std::pair readTime(LineReader& lr); + + /** @used in the functions readV and readO + * @todo Describe + */ + SUMOReal readFactor(LineReader& lr, SUMOReal scale); + + +protected: + /// @brief The loaded cells + std::vector myContainer; + + /// @brief The districts to retrieve sources/sinks from + const ODDistrictCont& myDistricts; + + /// @brief Number of loaded vehicles + SUMOReal myNoLoaded; + + /// @brief Number of written vehicles + SUMOReal myNoWritten; + + /// @brief Number of discarded vehicles + SUMOReal myNoDiscarded; + + + /** + * @class cell_by_begin_sorter + * @brief Used for sorting the cells by the begin time they describe + */ + class cell_by_begin_sorter { + public: + /// @brief constructor + explicit cell_by_begin_sorter() { } + + + /** @brief Comparing operator + * + * Compares two cells by the begin of the time they describe. The sort is stabilized + * (with secondary sort keys being origin and destination) to get comparable results + * with different platforms / compilers. + * + * @param[in] p1 First cell to compare + * @param[in] p2 Second cell to compare + * @return Whether the begin time of the first cell is lower than the one of the second + */ + int operator()(ODCell* p1, ODCell* p2) const { + if (p1->begin == p2->begin) { + if (p1->origin == p2->origin) { + return p1->destination < p2->destination; + } + return p1->origin < p2->origin; + } + return p1->begin < p2->begin; + } + + }; + + + /** + * @class descending_departure_comperator + * @brief Used for sorting vehicles by their departure (latest first) + * + * A reverse operator to what may be expected is used in order to allow + * prunning the sorted vector from its tail. + */ + class descending_departure_comperator { + public: + /// @brief constructor + descending_departure_comperator() { } + + + /** @brief Comparing operator + * + * Compares two vehicles by their departure time + * + * @param[in] p1 First vehicle to compare + * @param[in] p2 Second vehicle to compare + * @return Whether the departure time of the first vehicle is larger than the one of the second + */ + bool operator()(const ODVehicle& p1, const ODVehicle& p2) const { + if (p1.depart == p2.depart) { + return p1.id > p2.id; + } + return p1.depart > p2.depart; + } + + }; + +private: + /** @brief invalid copy constructor */ + ODMatrix(const ODMatrix& s); + + /** @brief invalid assignment operator */ + ODMatrix& operator=(const ODMatrix& s); + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -XERCES_LIBS = -l$(LIB_XERCES) - -if CHECK_MEMORY_LEAKS -MEM_LIBS = ../foreign/nvwa/libnvwa.a -endif - -COMMON_LIBS = ../utils/options/liboptions.a \ -../utils/xml/libxml.a \ -../utils/common/libcommon.a \ -../utils/importio/libimportio.a \ -../utils/iodevices/libiodevices.a \ -../foreign/tcpip/libtcpip.a \ -$(MEM_LIBS) \ -$(XERCES_LIBS) - -bin_PROGRAMS = od2trips - -od2trips_SOURCES = od2trips_main.cpp ODDistrict.cpp ODDistrict.h \ -ODDistrictCont.cpp ODDistrictCont.h ODDistrictHandler.cpp ODDistrictHandler.h \ -ODCell.h ODMatrix.h ODMatrix.cpp - -od2trips_LDFLAGS = $(XERCES_LDFLAGS) - -od2trips_LDADD = ../utils/options/liboptions.a \ -../utils/distribution/libdistribution.a \ -../utils/common/libcommon.a \ -../utils/geom/libgeom.a \ -$(COMMON_LIBS) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,580 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -bin_PROGRAMS = od2trips$(EXEEXT) -subdir = src/od2trips -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/src/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_od2trips_OBJECTS = od2trips_main.$(OBJEXT) ODDistrict.$(OBJEXT) \ - ODDistrictCont.$(OBJEXT) ODDistrictHandler.$(OBJEXT) \ - ODMatrix.$(OBJEXT) -od2trips_OBJECTS = $(am_od2trips_OBJECTS) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = ../utils/options/liboptions.a \ - ../utils/xml/libxml.a ../utils/common/libcommon.a \ - ../utils/importio/libimportio.a \ - ../utils/iodevices/libiodevices.a ../foreign/tcpip/libtcpip.a \ - $(MEM_LIBS) $(am__DEPENDENCIES_1) -od2trips_DEPENDENCIES = ../utils/options/liboptions.a \ - ../utils/distribution/libdistribution.a \ - ../utils/common/libcommon.a ../utils/geom/libgeom.a \ - $(am__DEPENDENCIES_2) -od2trips_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(od2trips_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(od2trips_SOURCES) -DIST_SOURCES = $(od2trips_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CPPFLAGS = @AM_CPPFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FOX_LDFLAGS = @FOX_LDFLAGS@ -GDAL_LDFLAGS = @GDAL_LDFLAGS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ -LIB_XERCES = @LIB_XERCES@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OSG_LIBS = @OSG_LIBS@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PROJ_LDFLAGS = @PROJ_LDFLAGS@ -PYTHON_LIBS = @PYTHON_LIBS@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -XERCES_CFLAGS = @XERCES_CFLAGS@ -XERCES_LDFLAGS = @XERCES_LDFLAGS@ -XERCES_LIBS = -l$(LIB_XERCES) -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -@CHECK_MEMORY_LEAKS_TRUE@MEM_LIBS = ../foreign/nvwa/libnvwa.a -COMMON_LIBS = ../utils/options/liboptions.a \ -../utils/xml/libxml.a \ -../utils/common/libcommon.a \ -../utils/importio/libimportio.a \ -../utils/iodevices/libiodevices.a \ -../foreign/tcpip/libtcpip.a \ -$(MEM_LIBS) \ -$(XERCES_LIBS) - -od2trips_SOURCES = od2trips_main.cpp ODDistrict.cpp ODDistrict.h \ -ODDistrictCont.cpp ODDistrictCont.h ODDistrictHandler.cpp ODDistrictHandler.h \ -ODCell.h ODMatrix.h ODMatrix.cpp - -od2trips_LDFLAGS = $(XERCES_LDFLAGS) -od2trips_LDADD = ../utils/options/liboptions.a \ -../utils/distribution/libdistribution.a \ -../utils/common/libcommon.a \ -../utils/geom/libgeom.a \ -$(COMMON_LIBS) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/od2trips/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/od2trips/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -od2trips$(EXEEXT): $(od2trips_OBJECTS) $(od2trips_DEPENDENCIES) - @rm -f od2trips$(EXEEXT) - $(od2trips_LINK) $(od2trips_OBJECTS) $(od2trips_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODDistrict.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODDistrictCont.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODDistrictHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ODMatrix.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/od2trips_main.Po@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/od2trips_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/od2trips_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/od2trips_main.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/od2trips_main.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,318 +0,0 @@ -/****************************************************************************/ -/// @file od2trips_main.cpp -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @author Laura Bieker -/// @date Thu, 12 September 2002 -/// @version $Id: od2trips_main.cpp 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Main for OD2TRIPS -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#ifdef HAVE_VERSION_H -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// functions -// =========================================================================== -void -fillOptions() { - OptionsCont& oc = OptionsCont::getOptions(); - oc.addCallExample("-c ", "run with configuration file"); - - // insert options sub-topics - SystemFrame::addConfigurationOptions(oc); // fill this subtopic, too - oc.addOptionSubTopic("Input"); - oc.addOptionSubTopic("Output"); - oc.addOptionSubTopic("Time"); - oc.addOptionSubTopic("Processing"); - oc.addOptionSubTopic("Defaults"); - SystemFrame::addReportOptions(oc); // fill this subtopic, too - - - // register the file input options - oc.doRegister("net-file", 'n', new Option_FileName()); - oc.addSynonyme("net-file", "net"); - oc.addDescription("net-file", "Input", "Loads network (districts) from FILE"); - - oc.doRegister("od-matrix-files", 'd', new Option_FileName()); - oc.addSynonyme("od-matrix-files", "od-files"); - oc.addSynonyme("od-matrix-files", "od"); - oc.addDescription("od-matrix-files", "Input", "Loads O/D-files from FILE(s)"); - - - // register the file output options - oc.doRegister("output-file", 'o', new Option_FileName()); - oc.addSynonyme("output-file", "output", true); - oc.addDescription("output-file", "Output", "Writes trip definitions into FILE"); - - oc.doRegister("flow-output", new Option_FileName()); - oc.addDescription("flow-output", "Output", "Writes flow definitions into FILE"); - - oc.doRegister("ignore-vehicle-type", new Option_Bool(false)); - oc.addSynonyme("ignore-vehicle-type", "no-vtype", true); - oc.addDescription("ignore-vehicle-type", "Output", "Does not save vtype information"); - - - // register the time settings - oc.doRegister("begin", 'b', new Option_String("0", "TIME")); - oc.addDescription("begin", "Time", "Defines the begin time; Previous trips will be discarded"); - - oc.doRegister("end", 'e', new Option_String(SUMOTIME_MAXSTRING, "TIME")); - oc.addDescription("end", "Time", "Defines the end time; Later trips will be discarded; Defaults to the maximum time that SUMO can represent"); - - - // register the data processing options - oc.doRegister("scale", 's', new Option_Float(1)); - oc.addDescription("scale", "Processing", "Scales the loaded flows by FLOAT"); - - oc.doRegister("spread.uniform", new Option_Bool(false)); - oc.addDescription("spread.uniform", "Processing", "Spreads trips uniformly over each time period"); - - oc.doRegister("vtype", new Option_String("")); - oc.addDescription("vtype", "Processing", "Defines the name of the vehicle type to use"); - - oc.doRegister("prefix", new Option_String("")); - oc.addDescription("prefix", "Processing", "Defines the prefix for vehicle names"); - - oc.doRegister("timeline", new Option_String()); - oc.addDescription("timeline", "Processing", "Uses STR as a timeline definition"); - - oc.doRegister("timeline.day-in-hours", new Option_Bool(false)); - oc.addDescription("timeline.day-in-hours", "Processing", "Uses STR as a 24h-timeline definition"); - - oc.doRegister("ignore-errors", new Option_Bool(false)); // !!! describe, document - oc.addSynonyme("ignore-errors", "dismiss-loading-errors", true); - oc.addDescription("ignore-errors", "Processing", "Continue on broken input"); - - oc.doRegister("no-step-log", new Option_Bool(false)); - oc.addDescription("no-step-log", "Processing", "Disable console output of current time step"); - - - // register defaults options - oc.doRegister("departlane", new Option_String("free")); - oc.addDescription("departlane", "Defaults", "Assigns a default depart lane"); - - oc.doRegister("departpos", new Option_String()); - oc.addDescription("departpos", "Defaults", "Assigns a default depart position"); - - oc.doRegister("departspeed", new Option_String("max")); - oc.addDescription("departspeed", "Defaults", "Assigns a default depart speed"); - - oc.doRegister("arrivallane", new Option_String()); - oc.addDescription("arrivallane", "Defaults", "Assigns a default arrival lane"); - - oc.doRegister("arrivalpos", new Option_String()); - oc.addDescription("arrivalpos", "Defaults", "Assigns a default arrival position"); - - oc.doRegister("arrivalspeed", new Option_String()); - oc.addDescription("arrivalspeed", "Defaults", "Assigns a default arrival speed"); - - // add rand options - RandHelper::insertRandOptions(); -} - -bool -checkOptions() { - OptionsCont& oc = OptionsCont::getOptions(); - bool ok = true; - if (!oc.isSet("net-file")) { - WRITE_ERROR("No net input file (-n) specified."); - ok = false; - } - if (!oc.isSet("od-matrix-files")) { - WRITE_ERROR("No input specified."); - ok = false; - } - if (!oc.isSet("output-file")) { - WRITE_ERROR("No trip table output file (-o) specified."); - ok = false; - } - // - SUMOVehicleParameter p; - std::string error; - if (oc.isSet("departlane") && !SUMOVehicleParameter::parseDepartLane(oc.getString("departlane"), "option", "departlane", p.departLane, p.departLaneProcedure, error)) { - WRITE_ERROR(error); - ok = false; - } - if (oc.isSet("departpos") && !SUMOVehicleParameter::parseDepartPos(oc.getString("departpos"), "option", "departpos", p.departPos, p.departPosProcedure, error)) { - WRITE_ERROR(error); - ok = false; - } - if (oc.isSet("departspeed") && !SUMOVehicleParameter::parseDepartSpeed(oc.getString("departspeed"), "option", "departspeed", p.departSpeed, p.departSpeedProcedure, error)) { - WRITE_ERROR(error); - ok = false; - } - if (oc.isSet("arrivallane") && !SUMOVehicleParameter::parseArrivalLane(oc.getString("arrivallane"), "option", "arrivallane", p.arrivalLane, p.arrivalLaneProcedure, error)) { - WRITE_ERROR(error); - ok = false; - } - if (oc.isSet("arrivalpos") && !SUMOVehicleParameter::parseArrivalPos(oc.getString("arrivalpos"), "option", "arrivalpos", p.arrivalPos, p.arrivalPosProcedure, error)) { - WRITE_ERROR(error); - ok = false; - } - if (oc.isSet("arrivalspeed") && !SUMOVehicleParameter::parseArrivalSpeed(oc.getString("arrivalspeed"), "option", "arrivalspeed", p.arrivalSpeed, p.arrivalSpeedProcedure, error)) { - WRITE_ERROR(error); - ok = false; - } - return ok; -} - - - - -/* ------------------------------------------------------------------------- - * main - * ----------------------------------------------------------------------- */ -int -main(int argc, char** argv) { - OptionsCont& oc = OptionsCont::getOptions(); - // give some application descriptions - oc.setApplicationDescription("Importer of O/D-matrices for the road traffic simulation SUMO."); - oc.setApplicationName("od2trips", "SUMO od2trips Version " + (std::string)VERSION_STRING); - int ret = 0; - try { - // initialise subsystems - XMLSubSys::init(); - fillOptions(); - OptionsIO::getOptions(true, argc, argv); - if (oc.processMetaOptions(argc < 2)) { - SystemFrame::close(); - return 0; - } - XMLSubSys::setValidation(oc.getBool("xml-validation")); - MsgHandler::initOutputOptions(); - if (!checkOptions()) { - throw ProcessError(); - } - RandHelper::initRandGlobal(); - // load the districts - // check whether the user gave a net filename - if (!oc.isSet("net-file")) { - throw ProcessError("You must supply a network or districts file ('-n')."); - } - // get the file name and set it - ODDistrictCont districts; - districts.loadDistricts(oc.getString("net-file")); - if (districts.size() == 0) { - throw ProcessError("No districts loaded."); - } - // load the matrix - ODMatrix matrix(districts); - matrix.loadMatrix(oc); - if (matrix.getNoLoaded() == 0) { - throw ProcessError("No vehicles loaded."); - } - if (MsgHandler::getErrorInstance()->wasInformed() && !oc.getBool("ignore-errors")) { - throw ProcessError("Loading failed."); - } - WRITE_MESSAGE(toString(matrix.getNoLoaded()) + " vehicles loaded."); - // apply a curve if wished - if (oc.isSet("timeline")) { - matrix.applyCurve(matrix.parseTimeLine(oc.getStringVector("timeline"), oc.getBool("timeline.day-in-hours"))); - } - // write - bool haveOutput = false; - if (OutputDevice::createDeviceByOption("output-file", "routes")) { - matrix.write(string2time(oc.getString("begin")), string2time(oc.getString("end")), - OutputDevice::getDeviceByOption("output-file"), - oc.getBool("spread.uniform"), oc.getBool("ignore-vehicle-type"), - oc.getString("prefix"), !oc.getBool("no-step-log")); - haveOutput = true; - } - if (OutputDevice::createDeviceByOption("flow-output", "routes")) { - matrix.writeFlows(string2time(oc.getString("begin")), string2time(oc.getString("end")), - OutputDevice::getDeviceByOption("flow-output"), - oc.getBool("ignore-vehicle-type"), oc.getString("prefix")); - haveOutput = true; - } - if (!haveOutput) { - throw ProcessError("No output file given."); - } - WRITE_MESSAGE(toString(matrix.getNoDiscarded()) + " vehicles discarded."); - WRITE_MESSAGE(toString(matrix.getNoWritten()) + " vehicles written."); - } catch (const ProcessError& e) { - if (std::string(e.what()) != std::string("Process Error") && std::string(e.what()) != std::string("")) { - WRITE_ERROR(e.what()); - } - MsgHandler::getErrorInstance()->inform("Quitting (on error).", false); - ret = 1; -#ifndef _DEBUG - } catch (const std::exception& e) { - if (std::string(e.what()) != std::string("")) { - WRITE_ERROR(e.what()); - } - MsgHandler::getErrorInstance()->inform("Quitting (on error).", false); - ret = 1; - } catch (...) { - MsgHandler::getErrorInstance()->inform("Quitting (on unknown error).", false); - ret = 1; -#endif - } - SystemFrame::close(); - if (ret == 0) { - std::cout << "Success." << std::endl; - } - return ret; -} - - - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODCell.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODCell.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODCell.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODCell.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -/****************************************************************************/ -/// @file ODCell.h -/// @author Peter Mieth -/// @author Daniel Krajzewicz -/// @date Sept 2002 -/// @version $Id: ODCell.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// A single O/D-matrix cell -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef ODCell_h -#define ODCell_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - - -// =========================================================================== -// class declarations -// =========================================================================== -class RORoute; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @struct ODCell - * @brief A single O/D-matrix cell - * - * A single cell within an O/D-matrix. Contains the information about the origin - * and destination via string-ids of the district, the begin and the end time - * for which this cell is valid, the id of the vehicle type to use, and the - * amount of vehicles to insert during the described interval. - * - * @todo Check whether the vehicle type is used and makes sense herein - */ -struct ODCell { - /// @brief The number of vehicles - SUMOReal vehicleNumber; - - /// @brief The begin time this cell describes - SUMOTime begin; - - /// @brief The end time this cell describes - SUMOTime end; - - /// @brief Name of the origin district - std::string origin; - - /// @brief Name of the destination district - std::string destination; - - /// @brief Name of the vehicle type - std::string vehicleType; - - /// @brief the list of paths / routes - std::vector pathsVector; // path_id, string of edges? -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODDistrictCont.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODDistrictCont.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODDistrictCont.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODDistrictCont.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ -/****************************************************************************/ -/// @file ODDistrictCont.cpp -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date Sept 2002 -/// @version $Id: ODDistrictCont.cpp 14425 2013-08-16 20:11:47Z behrisch $ -/// -// A container for districts -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include "ODDistrict.h" -#include "ODDistrictCont.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CHECK_MEMORY_LEAKS -#include -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// method definitions -// =========================================================================== -ODDistrictCont::ODDistrictCont() {} - - -ODDistrictCont::~ODDistrictCont() {} - - -std::string -ODDistrictCont::getRandomSourceFromDistrict(const std::string& name) const { - ODDistrict* district = get(name); - if (district == 0) { - throw InvalidArgument("There is no district '" + name + "'."); - } - return district->getRandomSource(); -} - - -std::string -ODDistrictCont::getRandomSinkFromDistrict(const std::string& name) const { - ODDistrict* district = get(name); - if (district == 0) { - throw InvalidArgument("There is no district '" + name + "'."); - } - return district->getRandomSink(); -} - -void -ODDistrictCont::loadDistricts(std::string districtfile) { - if (!FileHelpers::exists(districtfile)) { - throw ProcessError("Could not find network '" + districtfile + "' to load."); - } - PROGRESS_BEGIN_MESSAGE("Loading districts from '" + districtfile + "'"); - // build the xml-parser and handler - ODDistrictHandler handler(*this, districtfile); - if (!XMLSubSys::runParser(handler, districtfile)) { - PROGRESS_FAILED_MESSAGE(); - } else { - PROGRESS_DONE_MESSAGE(); - } -} - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODDistrictCont.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODDistrictCont.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODDistrictCont.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODDistrictCont.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ -/****************************************************************************/ -/// @file ODDistrictCont.h -/// @author Daniel Krajzewicz -/// @date Sept 2002 -/// @version $Id: ODDistrictCont.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// A container for districts -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef ODDistrictCont_h -#define ODDistrictCont_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include "ODDistrict.h" -#include - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class ODDistrictCont - * @brief A container for districts - * - * Besides the inherited methods for adding/removing districts, this container - * allows to retrieve a random source or sink from a named district. - */ -class ODDistrictCont : public NamedObjectCont { -public: - /// Constructor - ODDistrictCont(); - - - /// Destructor - ~ODDistrictCont(); - - - /** @brief Returns the id of a random source from the named district - * - * At first, the named district is retrieved. If this fails, an - * InvalidArgument-exception is thrown. Otherwise, a source (edge) - * is chosen randomly from this district using this district's - * getRandomSource-method which throws an OutOfBoundsException-exception - * if this district does not contain a source. - * - * @param[in] name The id of the district to get a random source from - * @return The id of a randomly chosen source - * @exception InvalidArgument If the named district is not known - * @exception OutOfBoundsException If the named district has no sources - * @see ODDistrict::getRandomSource - */ - std::string getRandomSourceFromDistrict(const std::string& name) const; - - - /** @brief Returns the id of a random sink from the named district - * - * At first, the named district is retrieved. If this fails, an - * InvalidArgument-exception is thrown. Otherwise, a sink (edge) - * is chosen randomly from this district using this district's - * getRandomSink-method which throws an OutOfBoundsException-exception - * if this district does not contain a sink. - * - * @param[in] name The id of the district to get a random sink from - * @return The id of a randomly chosen sink - * @exception InvalidArgument If the named district is not known - * @exception OutOfBoundsException If the named district has no sinks - * @see ODDistrict::getRandomSink - */ - std::string getRandomSinkFromDistrict(const std::string& name) const; - - // @brief load districts from FILE - void loadDistricts(std::string districtfile); - -private: - /// @brief invalidated copy constructor - ODDistrictCont(const ODDistrictCont& s); - - /// @brief invalidated assignment operator - ODDistrictCont& operator=(const ODDistrictCont& s); - - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODDistrict.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODDistrict.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODDistrict.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODDistrict.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ -/****************************************************************************/ -/// @file ODDistrict.cpp -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date Sept 2002 -/// @version $Id: ODDistrict.cpp 14425 2013-08-16 20:11:47Z behrisch $ -/// -// A district (origin/destination) -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include -#include "ODDistrict.h" - - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// method definitions -// =========================================================================== -ODDistrict::ODDistrict(const std::string& id) - : Named(id) {} - - -ODDistrict::~ODDistrict() {} - - -void -ODDistrict::addSource(const std::string& id, SUMOReal weight) { - mySources.add(weight, id); -} - - -void -ODDistrict::addSink(const std::string& id, SUMOReal weight) { - mySinks.add(weight, id); -} - - -std::string -ODDistrict::getRandomSource() const { - return mySources.get(); -} - - -std::string -ODDistrict::getRandomSink() const { - return mySinks.get(); -} - - -unsigned int -ODDistrict::sinkNumber() const { - return (unsigned int) mySinks.getVals().size(); -} - - -unsigned int -ODDistrict::sourceNumber() const { - return (unsigned int) mySources.getVals().size(); -} - - - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODDistrict.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODDistrict.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODDistrict.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODDistrict.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,154 +0,0 @@ -/****************************************************************************/ -/// @file ODDistrict.h -/// @author Daniel Krajzewicz -/// @date Sept 2002 -/// @version $Id: ODDistrict.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// A district (origin/destination) -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef ODDistrict_h -#define ODDistrict_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class ODDistrict - * @brief A district (origin/destination) - * - * Class representing a district which has some ingoing and outgoing connections - * to the road network which may be weighted. - */ -class ODDistrict : public Named { -public: - /** @brief Constructor - * - * @param[in] id The id of the district - */ - ODDistrict(const std::string& id); - - - /// @brief Destructor - ~ODDistrict(); - - - /** @brief Adds a source connection - * - * A source is an edge where vehicles leave the district from to reach - * the network. The weight is used when a random source shall be - * chosen. - * - * BTW, it is possible to add a source twice. In this case it will occure - * twice within the distribution so that the behaviour is as adding - * both given probabilities. - * - * @param[in] id The id of the source - * @param[in] weight The weight (probability to be chosen) of the source - */ - void addSource(const std::string& id, SUMOReal weight); - - - /** @brief Adds a sink connection - * - * A sink connection is an edge which is used by vehicles to leave the - * network and reach the district. The weight is used when a random - * sink shall be chosen. - * - * BTW, it is possible to add a sink twice. In this case it will occure - * twice within the distribution so that the behaviour is as adding - * both given probabilities. - * - * @param[in] id The id of the sink - * @param[in] weight The weight (probability to be chosen) of the sink - */ - void addSink(const std::string& id, SUMOReal weight); - - - /** @brief Returns the id of a source to use - * - * If the list of this district's sources is empty, an OutOfBoundsException - * -exception is thrown. - * - * @return One of this district's sources chosen randomly regarding their weights - * @exception OutOfBoundsException If this district has no sources - */ - std::string getRandomSource() const; - - - /** @brief Returns the id of a sink to use - * - * If the list of this district's sinks is empty, an OutOfBoundsException - * -exception is thrown. - * - * @return One of this district's sinks chosen randomly regarding their weights - * @exception OutOfBoundsException If this district has no sinks - */ - std::string getRandomSink() const; - - - /** @brief Returns the number of sinks - * - * @return The number of known sinks - */ - unsigned int sinkNumber() const; - - - /** @brief Returns the number of sources - * - * @return The number of known sources - */ - unsigned int sourceNumber() const; - - -private: - /// @brief Container of weighted sources - RandomDistributor mySources; - - /// @brief Container of weighted sinks - RandomDistributor mySinks; - - -private: - /// @brief invalidated copy constructor - ODDistrict(const ODDistrict& s); - - /// @brief invalidated assignment operator - ODDistrict& operator=(const ODDistrict& s); - - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODDistrictHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODDistrictHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODDistrictHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODDistrictHandler.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,162 +0,0 @@ -/****************************************************************************/ -/// @file ODDistrictHandler.cpp -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date Sept 2002 -/// @version $Id: ODDistrictHandler.cpp 14425 2013-08-16 20:11:47Z behrisch $ -/// -// An XML-Handler for districts -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include "ODDistrict.h" -#include "ODDistrictCont.h" -#include "ODDistrictHandler.h" - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// method definitions -// =========================================================================== -ODDistrictHandler::ODDistrictHandler(ODDistrictCont& cont, - const std::string& file) - : SUMOSAXHandler(file), myContainer(cont), myCurrentDistrict(0) {} - - -ODDistrictHandler::~ODDistrictHandler() {} - - -void -ODDistrictHandler::myStartElement(int element, - const SUMOSAXAttributes& attrs) { - switch (element) { - case SUMO_TAG_TAZ: - openDistrict(attrs); - break; - case SUMO_TAG_TAZSOURCE: - addSource(attrs); - break; - case SUMO_TAG_TAZSINK: - addSink(attrs); - break; - default: - break; - } -} - - -void -ODDistrictHandler::myEndElement(int element) { - if (element == SUMO_TAG_TAZ) { - closeDistrict(); - } -} - - -void -ODDistrictHandler::openDistrict(const SUMOSAXAttributes& attrs) { - myCurrentDistrict = 0; - // get the id, report an error if not given or empty... - bool ok = true; - std::string id = attrs.get(SUMO_ATTR_ID, 0, ok); - if (!ok) { - return; - } - myCurrentDistrict = new ODDistrict(id); - if (attrs.hasAttribute(SUMO_ATTR_EDGES)) { - std::vector desc = attrs.getStringVector(SUMO_ATTR_EDGES); - for (std::vector::const_iterator i = desc.begin(); i != desc.end(); ++i) { - myCurrentDistrict->addSource(*i, 1.); - myCurrentDistrict->addSink(*i, 1.); - } - } -} - - -void -ODDistrictHandler::addSource(const SUMOSAXAttributes& attrs) { - std::pair vals = parseConnection(attrs); - if (vals.second >= 0) { - myCurrentDistrict->addSource(vals.first, vals.second); - } -} - - -void -ODDistrictHandler::addSink(const SUMOSAXAttributes& attrs) { - std::pair vals = parseConnection(attrs); - if (vals.second >= 0) { - myCurrentDistrict->addSink(vals.first, vals.second); - } -} - - - -std::pair -ODDistrictHandler::parseConnection(const SUMOSAXAttributes& attrs) { - // check the current district first - if (myCurrentDistrict == 0) { - return std::pair("", -1); - } - // get the id, report an error if not given or empty... - bool ok = true; - std::string id = attrs.get(SUMO_ATTR_ID, 0, ok); - if (!ok) { - return std::pair("", -1); - } - // get the weight - SUMOReal weight = attrs.get(SUMO_ATTR_WEIGHT, id.c_str(), ok); - if (ok) { - if (weight < 0) { - WRITE_ERROR("'probability' must be positive (in definition of " + attrs.getObjectType() + " '" + id + "')."); - } else { - return std::pair(id, weight); - } - } - return std::pair("", -1); -} - - -void -ODDistrictHandler::closeDistrict() { - if (myCurrentDistrict != 0) { - myContainer.add(myCurrentDistrict->getID(), myCurrentDistrict); - } -} - - - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODDistrictHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODDistrictHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODDistrictHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODDistrictHandler.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,187 +0,0 @@ -/****************************************************************************/ -/// @file ODDistrictHandler.h -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date Sept 2002 -/// @version $Id: ODDistrictHandler.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// An XML-Handler for districts -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef ODDistrictHandler_h -#define ODDistrictHandler_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class ODDistrict; -class ODDistrictCont; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class ODDistrictHandler - * @brief An XML-Handler for districts - * - * This SUMOSAXHandler parses districts and their sinks and sources from - * and stores them into a the district container given at initialisation. - */ -class ODDistrictHandler : public SUMOSAXHandler { -public: - /** @brief Constructor - * - * Saves the given district containe in order to fill it. - * @param[in] cont The container of districts to fill - * @param[in] file The file that will be processed - */ - ODDistrictHandler(ODDistrictCont& cont, const std::string& file); - - - /// @brief Destructor - ~ODDistrictHandler(); - - -protected: - /// @name inherited from GenericSAXHandler - //@{ - - /** @brief Called when an opening-tag occurs - * - * Processes district elements via openDistrict, their sinks (via - * addSink) and sources (via addSource). - * - * @param[in] element The enum of the currently opened element - * @param[in] attrs Attributes of the currently opened element - * @exception ProcessError If an error within the parsed file occurs - * @see GenericSAXHandler::myStartElement - */ - void myStartElement(int element, - const SUMOSAXAttributes& attrs); - - - /** @brief Called when a closing tag occurs - * - * Processes district elements via closeDistrict. - * - * @param[in] element ID of the currently opened element - * @exception ProcessError If an error within the parsed file occurs - */ - void myEndElement(int element); - //@} - - -private: - /** @brief Begins the parsing of a district - * - * Tries to retrieve the id of a district, adds a message to the - * error handler if this fails. Otherwise builds a new district - * with this id at myCurrentDistrict. - * - * @param[in] attrs Attributes of the currently opened element - */ - void openDistrict(const SUMOSAXAttributes& attrs); - - - /** @brief Adds a read source to the current district - * - * Tries to get the id and the weight of the currently parsed source - * from the attributes using getValues. If the retrieval could be - * done without errors (weight>=0), the so retrieved weighted source - * is added to myCurrentDistrict using addSource. (getValues checks - * whether myCurrentDistrict is valid) - * - * @param[in] attrs Attributes of the currently opened element - * @todo Checking whether myCurrentDistrict is valid through getValues is not quite nice - */ - void addSource(const SUMOSAXAttributes& attrs); - - - /** @brief Adds a read sink to the current district - * - * Tries to get the id and the weight of the currently parsed sink - * from the attributes using getValues. If the retrieval could be - * done without errors (weight>=0), the so retrieved weighted sink - * is added to myCurrentDistrict using addSink. (getValues checks - * whether myCurrentDistrict is valid) - * - * @param[in] attrs Attributes of the currently opened element - * @todo Checking whether myCurrentDistrict is valid through getValues is not quite nice - */ - void addSink(const SUMOSAXAttributes& attrs); - - - /** @brief Closes the processing of the current district - * - * Adds myCurrentDistrict to myContainer. - */ - void closeDistrict(); - - - /** @brief Returns the id and weight for a sink/source - * - * Checks whether myCurrentDistrict (the currently processed - * district) is !=0; in this case, both the id and the weight - * are parsed. If one of them is missing or the weight is not numerical, - * an error is generated and reported to MsgHandler. The "type"-parameter - * is used in order to inform the user whether a source or a sink was - * processed. In the case of an error, the returned weight is -1. - * - * If no error occurs, the correct id and weight are returned. - * - * @param[in] attrs Attributes of the currently opened element - * @param[in] type The type of the currntly processed connection (sink/source) - * @return The id and the weight of a connection - */ - std::pair parseConnection(const SUMOSAXAttributes& attrs); - -private: - /// The container to add read districts to - ODDistrictCont& myContainer; - - /// The currently parsed district - ODDistrict* myCurrentDistrict; - - -private: - /// @brief invalidated copy constructor - ODDistrictHandler(const ODDistrictHandler& s); - - /// @brief invalidated assignment operator - ODDistrictHandler& operator=(const ODDistrictHandler& s); - - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODMatrix.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODMatrix.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODMatrix.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODMatrix.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,538 +0,0 @@ -/****************************************************************************/ -/// @file ODMatrix.cpp -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date 05 Apr. 2006 -/// @version $Id: ODMatrix.cpp 14425 2013-08-16 20:11:47Z behrisch $ -/// -// An O/D (origin/destination) matrix -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include "ODMatrix.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// method definitions -// =========================================================================== -ODMatrix::ODMatrix(const ODDistrictCont& dc) - : myDistricts(dc), myNoLoaded(0), myNoWritten(0), myNoDiscarded(0) {} - - -ODMatrix::~ODMatrix() { - for (std::vector::iterator i = myContainer.begin(); i != myContainer.end(); ++i) { - delete *i; - } - myContainer.clear(); -} - - -void -ODMatrix::add(SUMOReal vehicleNumber, SUMOTime begin, - SUMOTime end, const std::string& origin, const std::string& destination, - const std::string& vehicleType) { - myNoLoaded += vehicleNumber; - if (myDistricts.get(origin) == 0 && myDistricts.get(destination) == 0) { - WRITE_WARNING("Missing origin '" + origin + "' and destination '" + destination + "' (" + toString(vehicleNumber) + " vehicles)."); - } else if (myDistricts.get(origin) == 0 && vehicleNumber > 0) { - WRITE_ERROR("Missing origin '" + origin + "' (" + toString(vehicleNumber) + " vehicles)."); - myNoDiscarded += vehicleNumber; - } else if (myDistricts.get(destination) == 0 && vehicleNumber > 0) { - WRITE_ERROR("Missing destination '" + destination + "' (" + toString(vehicleNumber) + " vehicles)."); - myNoDiscarded += vehicleNumber; - } else { - if (myDistricts.get(origin)->sourceNumber() == 0) { - WRITE_ERROR("District '" + origin + "' has no source."); - myNoDiscarded += vehicleNumber; - } else if (myDistricts.get(destination)->sinkNumber() == 0) { - WRITE_ERROR("District '" + destination + "' has no sink."); - myNoDiscarded += vehicleNumber; - } else { - ODCell* cell = new ODCell(); - cell->begin = begin; - cell->end = end; - cell->origin = origin; - cell->destination = destination; - cell->vehicleType = vehicleType; - cell->vehicleNumber = vehicleNumber; - myContainer.push_back(cell); - } - } -} - - -SUMOReal -ODMatrix::computeDeparts(ODCell* cell, - size_t& vehName, std::vector& into, - bool uniform, const std::string& prefix) { - int vehicles2insert = (int) cell->vehicleNumber; - // compute whether the fraction forces an additional vehicle insertion - SUMOReal mprob = (SUMOReal) cell->vehicleNumber - (SUMOReal) vehicles2insert; - if (RandHelper::rand() < mprob) { - vehicles2insert++; - } - - const SUMOReal offset = (SUMOReal)(cell->end - cell->begin) / (SUMOReal) vehicles2insert / (SUMOReal) 2.; - for (int i = 0; i < vehicles2insert; ++i) { - ODVehicle veh; - veh.id = prefix + toString(vehName++); - - if (uniform) { - veh.depart = (SUMOTime)(offset + cell->begin + ((SUMOReal)(cell->end - cell->begin) * (SUMOReal) i / (SUMOReal) vehicles2insert)); - } else { - veh.depart = (SUMOTime)RandHelper::rand(cell->begin, cell->end); - } - - veh.from = myDistricts.getRandomSourceFromDistrict(cell->origin); - veh.to = myDistricts.getRandomSinkFromDistrict(cell->destination); - veh.cell = cell; - into.push_back(veh); - } - return cell->vehicleNumber - vehicles2insert; -} - - -void -ODMatrix::writeDefaultAttrs(OutputDevice& dev, const bool noVtype, - const ODCell* const cell) { - const OptionsCont& oc = OptionsCont::getOptions(); - if (!noVtype && cell->vehicleType != "") { - dev.writeAttr(SUMO_ATTR_TYPE, cell->vehicleType); - } - dev.writeAttr(SUMO_ATTR_FROM_TAZ, cell->origin).writeAttr(SUMO_ATTR_TO_TAZ, cell->destination); - if (oc.isSet("departlane") && oc.getString("departlane") != "default") { - dev.writeAttr(SUMO_ATTR_DEPARTLANE, oc.getString("departlane")); - } - if (oc.isSet("departpos")) { - dev.writeAttr(SUMO_ATTR_DEPARTPOS, oc.getString("departpos")); - } - if (oc.isSet("departspeed") && oc.getString("departspeed") != "default") { - dev.writeAttr(SUMO_ATTR_DEPARTSPEED, oc.getString("departspeed")); - } - if (oc.isSet("arrivallane")) { - dev.writeAttr(SUMO_ATTR_ARRIVALLANE, oc.getString("arrivallane")); - } - if (oc.isSet("arrivalpos")) { - dev.writeAttr(SUMO_ATTR_ARRIVALPOS, oc.getString("arrivalpos")); - } - if (oc.isSet("arrivalspeed")) { - dev.writeAttr(SUMO_ATTR_ARRIVALSPEED, oc.getString("arrivalspeed")); - } -} - - -void -ODMatrix::write(SUMOTime begin, const SUMOTime end, - OutputDevice& dev, const bool uniform, const bool noVtype, - const std::string& prefix, const bool stepLog) { - if (myContainer.size() == 0) { - return; - } - std::map, SUMOReal> fractionLeft; - size_t vehName = 0; - sort(myContainer.begin(), myContainer.end(), cell_by_begin_sorter()); - // recheck begin time - begin = MAX2(begin, myContainer.front()->begin); - std::vector::iterator next = myContainer.begin(); - std::vector vehicles; - SUMOTime lastOut = -DELTA_T; - // go through the time steps - for (SUMOTime t = begin; t != end;) { - if (stepLog && t - lastOut >= DELTA_T) { - std::cout << "Parsing time " + time2string(t) << '\r'; - lastOut = t; - } - // recheck whether a new cell got valid - bool changed = false; - while (next != myContainer.end() && (*next)->begin <= t && (*next)->end > t) { - std::pair odID = std::make_pair((*next)->origin, (*next)->destination); - // check whether the current cell must be extended by the last fraction - if (fractionLeft.find(odID) != fractionLeft.end()) { - (*next)->vehicleNumber += fractionLeft[odID]; - fractionLeft[odID] = 0; - } - // get the new departures (into tmp) - const size_t oldSize = vehicles.size(); - const SUMOReal fraction = computeDeparts(*next, vehName, vehicles, uniform, prefix); - if (oldSize != vehicles.size()) { - changed = true; - } - if (fraction != 0) { - fractionLeft[odID] = fraction; - } - ++next; - } - if (changed) { - sort(vehicles.begin(), vehicles.end(), descending_departure_comperator()); - } - for (std::vector::reverse_iterator i = vehicles.rbegin(); i != vehicles.rend() && (*i).depart == t; ++i) { - myNoWritten++; - dev.openTag(SUMO_TAG_TRIP).writeAttr(SUMO_ATTR_ID, (*i).id).writeAttr(SUMO_ATTR_DEPART, time2string(t)); - dev.writeAttr(SUMO_ATTR_FROM, (*i).from).writeAttr(SUMO_ATTR_TO, (*i).to); - writeDefaultAttrs(dev, noVtype, i->cell); - dev.closeTag(); - } - while (vehicles.size() != 0 && vehicles.back().depart == t) { - vehicles.pop_back(); - } - if (!vehicles.empty()) { - t = vehicles.back().depart; - } - if (next != myContainer.end() && (t > (*next)->begin || vehicles.empty())) { - t = (*next)->begin; - } - if (next == myContainer.end() && vehicles.empty()) { - break; - } - } -} - - -void -ODMatrix::writeFlows(const SUMOTime begin, const SUMOTime end, - OutputDevice& dev, bool noVtype, - const std::string& prefix) { - if (myContainer.size() == 0) { - return; - } - size_t flowName = 0; - sort(myContainer.begin(), myContainer.end(), cell_by_begin_sorter()); - // recheck begin time - for (std::vector::const_iterator i = myContainer.begin(); i != myContainer.end(); ++i) { - const ODCell* const c = *i; - if (c->end > begin && c->begin < end) { - dev.openTag(SUMO_TAG_FLOW).writeAttr(SUMO_ATTR_ID, prefix + toString(flowName++)); - dev.writeAttr(SUMO_ATTR_BEGIN, time2string(c->begin)); - dev.writeAttr(SUMO_ATTR_END, time2string(c->end)).writeAttr(SUMO_ATTR_NUMBER, int(c->vehicleNumber)); - writeDefaultAttrs(dev, noVtype, *i); - dev.closeTag(); - } - } -} - - -std::string -ODMatrix::getNextNonCommentLine(LineReader& lr) { - std::string line; - do { - line = lr.readLine(); - if (line[0] != '*') { - return StringUtils::prune(line); - } - } while (lr.good() && lr.hasMore()); - throw ProcessError(); -} - - -SUMOTime -ODMatrix::parseSingleTime(const std::string& time) { - if (time.find('.') == std::string::npos) { - throw OutOfBoundsException(); - } - std::string hours = time.substr(0, time.find('.')); - std::string minutes = time.substr(time.find('.') + 1); - return TIME2STEPS(TplConvert::_2int(hours.c_str()) * 3600 + TplConvert::_2int(minutes.c_str()) * 60); -} - - -std::pair -ODMatrix::readTime(LineReader& lr) { - std::string line = getNextNonCommentLine(lr); - try { - StringTokenizer st(line, StringTokenizer::WHITECHARS); - SUMOTime begin = parseSingleTime(st.next()); - SUMOTime end = parseSingleTime(st.next()); - if (begin >= end) { - throw ProcessError("Begin time is larger than end time."); - } - return std::make_pair(begin, end); - } catch (OutOfBoundsException&) { - throw ProcessError("Broken period definition '" + line + "'."); - } catch (NumberFormatException&) { - throw ProcessError("Broken period definition '" + line + "'."); - } -} - -SUMOReal -ODMatrix::readFactor(LineReader& lr, SUMOReal scale) { - std::string line = getNextNonCommentLine(lr); - SUMOReal factor = -1; - try { - factor = TplConvert::_2SUMOReal(line.c_str()) * scale; - } catch (NumberFormatException&) { - throw ProcessError("Broken factor: '" + line + "'."); - } - return factor; -} - -void -ODMatrix::readV(LineReader& lr, SUMOReal scale, - std::string vehType, bool matrixHasVehType) { - PROGRESS_BEGIN_MESSAGE("Reading matrix '" + lr.getFileName() + "' stored as VMR"); - // parse first defs - std::string line; - if (matrixHasVehType) { - line = getNextNonCommentLine(lr); - if (vehType == "") { - vehType = StringUtils::prune(line); - } - } - - // parse time - std::pair times = readTime(lr); - SUMOTime begin = times.first; - SUMOTime end = times.second; - - // factor - SUMOReal factor = readFactor(lr, scale); - - // districts - line = getNextNonCommentLine(lr); - int districtNo = TplConvert::_2int(StringUtils::prune(line).c_str()); - // parse district names (normally ints) - std::vector names; - do { - line = getNextNonCommentLine(lr); - StringTokenizer st2(line, StringTokenizer::WHITECHARS); - while (st2.hasNext()) { - names.push_back(st2.next()); - } - } while ((int) names.size() != districtNo); - - // parse the cells - for (std::vector::iterator si = names.begin(); si != names.end(); ++si) { - std::vector::iterator di = names.begin(); - // - do { - line = getNextNonCommentLine(lr); - if (line.length() == 0) { - continue; - } - try { - StringTokenizer st2(line, StringTokenizer::WHITECHARS); - while (st2.hasNext()) { - assert(di != names.end()); - SUMOReal vehNumber = TplConvert::_2SUMOReal(st2.next().c_str()) * factor; - if (vehNumber != 0) { - add(vehNumber, begin, end, *si, *di, vehType); - } - if (di == names.end()) { - throw ProcessError("More entries than districts found."); - } - ++di; - } - } catch (NumberFormatException&) { - throw ProcessError("Not numeric vehicle number in line '" + line + "'."); - } - if (!lr.hasMore()) { - break; - } - } while (di != names.end()); - } - PROGRESS_DONE_MESSAGE(); -} - - -void -ODMatrix::readO(LineReader& lr, SUMOReal scale, - std::string vehType, bool matrixHasVehType) { - PROGRESS_BEGIN_MESSAGE("Reading matrix '" + lr.getFileName() + "' stored as OR"); - // parse first defs - std::string line; - if (matrixHasVehType) { - line = getNextNonCommentLine(lr); - int type = TplConvert::_2int(StringUtils::prune(line).c_str()); - if (vehType == "") { - vehType = toString(type); - } - } - - // parse time - std::pair times = readTime(lr); - SUMOTime begin = times.first; - SUMOTime end = times.second; - - // factor - SUMOReal factor = readFactor(lr, scale); - - // parse the cells - while (lr.hasMore()) { - line = getNextNonCommentLine(lr); - if (line.length() == 0) { - continue; - } - StringTokenizer st2(line, StringTokenizer::WHITECHARS); - if (st2.size() == 0) { - continue; - } - try { - std::string sourceD = st2.next(); - std::string destD = st2.next(); - SUMOReal vehNumber = TplConvert::_2SUMOReal(st2.next().c_str()) * factor; - if (vehNumber != 0) { - add(vehNumber, begin, end, sourceD, destD, vehType); - } - } catch (OutOfBoundsException&) { - throw ProcessError("Missing at least one information in line '" + line + "'."); - } catch (NumberFormatException&) { - throw ProcessError("Not numeric vehicle number in line '" + line + "'."); - } - } - PROGRESS_DONE_MESSAGE(); -} - - - -SUMOReal -ODMatrix::getNoLoaded() const { - return myNoLoaded; -} - - -SUMOReal -ODMatrix::getNoWritten() const { - return myNoWritten; -} - - -SUMOReal -ODMatrix::getNoDiscarded() const { - return myNoDiscarded; -} - - -void -ODMatrix::applyCurve(const Distribution_Points& ps, ODCell* cell, std::vector& newCells) { - for (size_t i = 0; i < ps.getAreaNo(); ++i) { - ODCell* ncell = new ODCell(); - ncell->begin = TIME2STEPS(ps.getAreaBegin(i)); - ncell->end = TIME2STEPS(ps.getAreaEnd(i)); - ncell->origin = cell->origin; - ncell->destination = cell->destination; - ncell->vehicleType = cell->vehicleType; - ncell->vehicleNumber = cell->vehicleNumber * ps.getAreaPerc(i); - newCells.push_back(ncell); - } -} - - -void -ODMatrix::applyCurve(const Distribution_Points& ps) { - std::vector oldCells = myContainer; - myContainer.clear(); - for (std::vector::iterator i = oldCells.begin(); i != oldCells.end(); ++i) { - std::vector newCells; - applyCurve(ps, *i, newCells); - copy(newCells.begin(), newCells.end(), back_inserter(myContainer)); - delete *i; - } -} - -void -ODMatrix::loadMatrix(OptionsCont& oc) { - std::vector files = oc.getStringVector("od-files"); - // check - if (files.size() == 0) { - throw ProcessError("No files to parse are given."); - } - // parse - for (std::vector::iterator i = files.begin(); i != files.end(); ++i) { - LineReader lr(*i); - if (!lr.good()) { - throw ProcessError("Could not open '" + (*i) + "'."); - } - std::string type = lr.readLine(); - // get the type only - if (type.find(';') != std::string::npos) { - type = type.substr(0, type.find(';')); - } - // parse type-dependant - if (type.length() > 1 && type[1] == 'V') { - // process ptv's 'V'-matrices - if (type.find('N') != std::string::npos) { - throw ProcessError("'" + *i + "' does not contain the needed information about the time described."); - } - readV(lr, oc.getFloat("scale"), oc.getString("vtype"), type.find('M') != std::string::npos); - } else if (type.length() > 1 && type[1] == 'O') { - // process ptv's 'O'-matrices - if (type.find('N') != std::string::npos) { - throw ProcessError("'" + *i + "' does not contain the needed information about the time described."); - } - readO(lr, oc.getFloat("scale"), oc.getString("vtype"), type.find('M') != std::string::npos); - } else { - throw ProcessError("'" + *i + "' uses an unknown matrix type '" + type + "'."); - } - } -} - - -Distribution_Points -ODMatrix::parseTimeLine(const std::vector& def, bool timelineDayInHours) { - bool interpolating = !timelineDayInHours; - PositionVector points; - SUMOReal prob = 0; - if (timelineDayInHours) { - if (def.size() != 24) { - throw ProcessError("Assuming 24 entries for a day timeline, but got " + toString(def.size()) + "."); - } - for (int chour = 0; chour < 24; ++chour) { - prob = TplConvert::_2SUMOReal(def[chour].c_str()); - points.push_back(Position((SUMOReal)(chour * 3600), prob)); - } - points.push_back(Position((SUMOReal)(24 * 3600), prob)); - } else { - size_t i = 0; - while (i < def.size()) { - StringTokenizer st2(def[i++], ":"); - if (st2.size() != 2) { - throw ProcessError("Broken time line definition: missing a value in '" + def[i - 1] + "'."); - } - int time = TplConvert::_2int(st2.next().c_str()); - prob = TplConvert::_2SUMOReal(st2.next().c_str()); - points.push_back(Position((SUMOReal) time, prob)); - } - } - return Distribution_Points("N/A", points, interpolating); -} - -/****************************************************************************/ \ No newline at end of file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODMatrix.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODMatrix.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips/ODMatrix.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips/ODMatrix.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,405 +0,0 @@ -/****************************************************************************/ -/// @file ODMatrix.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date 05. Apr. 2006 -/// @version $Id: ODMatrix.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// An O/D (origin/destination) matrix -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef ODMatrix_h -#define ODMatrix_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "ODCell.h" -#include "ODDistrictCont.h" -#include -#include -#include - -// =========================================================================== -// class declarations -// =========================================================================== -class OutputDevice; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class ODMatrix - * @brief An O/D (origin/destination) matrix - * - * This class is the internal representation of a loaded O/D-matrix. Beside - * being the storage for ODCells, the matrix also contains information about - * the numbers of loaded, discarded, and written vehicles. - * - * The matrix has a reference to the container of districts stored. This allows - * to validate added cell descriptions in means that using existing origins/ - * destinations only is assured. - * - * In addition of being a storage, the matrix is also responsible for writing - * the results and contains methods for splitting the entries over time. - */ -class ODMatrix { -public: - /** @brief Constructor - * - * @param[in] dc The district container to obtain referenced distrivts from - */ - ODMatrix(const ODDistrictCont& dc); - - - /// Destructor - ~ODMatrix(); - - - /** @brief Builds a single cell from the given values, verifying them - * - * At first, the number of loaded vehicles (myNoLoaded) is incremented - * by vehicleNumber. - * - * It is checked whether both the origin and the destination exist within - * the assigned district container (myDistricts). If one of them is missing, - * an error is generated, if both, a warning, because in the later case - * the described flow may lay completely beside the processed area. In both - * cases the given number of vehicles (vehicleNumber) is added to myNoDiscarded. - * - * If the origin/destination districts are known, a cell is built using the - * given values. This cell is added to the list of known cells (myContainer). - * - * @param[in] vehicleNumber The number of vehicles to store within the cell - * @param[in] begin The begin of the interval the cell is valid for - * @param[in] end The end of the interval the cell is valid for - * @param[in] origin The origin district to use for the cell's flows - * @param[in] destination The destination district to use for the cell's flows - * @param[in] vehicleType The vehicle type to use for the cell's flows - */ - void add(SUMOReal vehicleNumber, SUMOTime begin, - SUMOTime end, const std::string& origin, const std::string& destination, - const std::string& vehicleType); - - /** @brief Helper function for flow and trip output writing the depart - * and arrival attributes - * - * @param[in] dev The stream to write the generated vehicle trips to - * @param[in] noVtype Whether vtype information shall not be written - * @param[in] cell The OD cell containing the vtype - */ - void writeDefaultAttrs(OutputDevice& dev, const bool noVtype, - const ODCell* const cell); - - /** @brief Writes the vehicles stored in the matrix assigning the sources and sinks - * - * The cells stored in myContainer are sorted, first. Then, for each time - * step to generate vehicles for, it is checked whether the topmost cell - * is valid for this time step. If so, vehicles are generated from this - * cell's description using "computeDeparts" and stored in an internal vector. - * The pointer is moved and the check is repeated until the current cell - * is not valid for the current time or no further cells exist. - * - * Then, for the current time step, the internal list of vehicles is sorted and - * all vehicles that start within this time step are written. - * - * The left fraction of vehicles to insert is saved for each O/D-dependency - * over time and the number of vehicles to generate is increased as soon - * as this value is larger than 1, decrementing it. - * - * @param[in] begin The begin time to generate vehicles for - * @param[in] end The end time to generate vehicles for - * @param[in] dev The stream to write the generated vehicle trips to - * @param[in] uniform Information whether departure times shallbe uniformly spread or random - * @param[in] noVtype Whether vtype information shall not be written - * @param[in] prefix A prefix for the vehicle names - * @param[in] stepLog Whether processed time shall be written - */ - void write(SUMOTime begin, const SUMOTime end, - OutputDevice& dev, const bool uniform, const bool noVtype, - const std::string& prefix, const bool stepLog); - - - /** @brief Writes the flows stored in the matrix - * - * @param[in] begin The begin time to generate vehicles for - * @param[in] end The end time to generate vehicles for - * @param[in] dev The stream to write the generated vehicle trips to - * @param[in] noVtype Whether vtype information shall not be written - * @param[in] prefix A prefix for the flow names - */ - void writeFlows(const SUMOTime begin, const SUMOTime end, - OutputDevice& dev, const bool noVtype, - const std::string& prefix); - - - /** @brief Returns the number of loaded vehicles - * - * Returns the value of myNoLoaded - * - * @return The number of loaded vehicles - */ - SUMOReal getNoLoaded() const; - - - /** @brief Returns the number of written vehicles - * - * Returns the value of myNoWritten - * - * @return The number of written vehicles - */ - SUMOReal getNoWritten() const; - - - /** @brief Returns the number of discarded vehicles - * - * Returns the value of myNoDiscarded - * - * @return The number of discarded vehicles - */ - SUMOReal getNoDiscarded() const; - - - /** @brief Splits the stored cells dividing them on the given time line - * @todo Describe - */ - void applyCurve(const Distribution_Points& ps); - - - /** @brief read a VISUM-matrix with the O Format - * @todo Describe - */ - void readO(LineReader& lr, SUMOReal scale, - std::string vehType, bool matrixHasVehType); - - /** @brief read a VISUM-matrix with the V Format - * @todo Describe - */ - void readV(LineReader& lr, SUMOReal scale, - std::string vehType, bool matrixHasVehType); - - /** @brief read a VISUM-matrix with the V Format - * @todo Describe - */ - void loadMatrix(OptionsCont& oc); - - /** @brief split the given timeline - * @todo Describe - */ - Distribution_Points parseTimeLine(const std::vector& def, bool timelineDayInHours); - - const std::vector& getCells() { - return myContainer; - } - -protected: - /** - * @struct ODVehicle - * @brief An internal representation of a single vehicle - */ - struct ODVehicle { - /// @brief The id of the vehicle - std::string id; - /// @brief The departure time of the vehicle - SUMOTime depart; - /// @brief The cell of the ODMatrix which generated the vehicle - ODCell* cell; - /// @brief The edge the vehicles shall start at - std::string from; - /// @brief The edge the vehicles shall end at - std::string to; - - }; - - - /** @brief Computes the vehicle departs stored in the given cell and saves them in "into" - * - * At first, the number of vehicles to insert is computed using the - * integer value of the vehicleNumber information from the given cell. - * In the case vehicleNumber has a fraction, an additional vehicle - * may be added in the case a chosen random number is lower than this fraction. - * - * If uniform is true, the departure times of the generated vehicles - * are spread uniformly, otherwise the departure time are chosen randomly from - * the interval. - * - * The vehicle names are generated by putting the value of vehName after the - * given prefix. The value of vehName is incremented with each generated vehicle. - * - * The number of left vehicles (the fraction if no additional vehicle was - * generated) is returned. - * - * @param[in] cell The cell to use - * @param[in,out] vehName An incremented index of the generated vehicle - * @param[out] into The storage to put generated vehicles into - * @param[in] uniform Information whether departure times shallbe uniformly spread or random - * @param[in] prefix A prefix for the vehicle names - * @return The number of left vehicles to insert - */ - SUMOReal computeDeparts(ODCell* cell, - size_t& vehName, std::vector& into, bool uniform, - const std::string& prefix); - - - /** @brief Splits the given cell dividing it on the given time line and - * storing the results in the given container - * - * For the given cell, a list of clones is generated. The number of these - * is equal to the number of "areas" within the given distribution - * description (time line in this case) and each clone's vehicleNumber - * is equal to the given cell's vehicle number multiplied with the area's - * probability. The clones are stored in the given cell vector. - * - * @see Distribution_Points - * @param[in] ps The time line to apply - * @param[in] cell The cell to split - * @param[out] newCells The storage to put generated cells into - * @todo describe better!!! - */ - void applyCurve(const Distribution_Points& ps, ODCell* cell, - std::vector& newCells); - - -private: - /** @used in the functions readV and readO - * @todo Describe - */ - std::string getNextNonCommentLine(LineReader& lr); - - /** @used in the functions readV and readO - * @todo Describe - */ - SUMOTime parseSingleTime(const std::string& time); - - /** @used in the functions readV and readO - * @todo Describe - */ - std::pair readTime(LineReader& lr); - - /** @used in the functions readV and readO - * @todo Describe - */ - SUMOReal readFactor(LineReader& lr, SUMOReal scale); - - -protected: - /// @brief The loaded cells - std::vector myContainer; - - /// @brief The districts to retrieve sources/sinks from - const ODDistrictCont& myDistricts; - - /// @brief Number of loaded vehicles - SUMOReal myNoLoaded; - - /// @brief Number of written vehicles - SUMOReal myNoWritten; - - /// @brief Number of discarded vehicles - SUMOReal myNoDiscarded; - - - /** - * @class cell_by_begin_sorter - * @brief Used for sorting the cells by the begin time they describe - */ - class cell_by_begin_sorter { - public: - /// @brief constructor - explicit cell_by_begin_sorter() { } - - - /** @brief Comparing operator - * - * Compares two cells by the begin of the time they describe. The sort is stabilized - * (with secondary sort keys being origin and destination) to get comparable results - * with different platforms / compilers. - * - * @param[in] p1 First cell to compare - * @param[in] p2 Second cell to compare - * @return Whether the begin time of the first cell is lower than the one of the second - */ - int operator()(ODCell* p1, ODCell* p2) const { - if (p1->begin == p2->begin) { - if (p1->origin == p2->origin) { - return p1->destination < p2->destination; - } - return p1->origin < p2->origin; - } - return p1->begin < p2->begin; - } - - }; - - - /** - * @class descending_departure_comperator - * @brief Used for sorting vehicles by their departure (latest first) - * - * A reverse operator to what may be expected is used in order to allow - * prunning the sorted vector from its tail. - */ - class descending_departure_comperator { - public: - /// @brief constructor - descending_departure_comperator() { } - - - /** @brief Comparing operator - * - * Compares two vehicles by their departure time - * - * @param[in] p1 First vehicle to compare - * @param[in] p2 Second vehicle to compare - * @return Whether the departure time of the first vehicle is larger than the one of the second - */ - bool operator()(const ODVehicle& p1, const ODVehicle& p2) const { - if (p1.depart == p2.depart) { - return p1.id > p2.id; - } - return p1.depart > p2.depart; - } - - }; - -private: - /** @brief invalid copy constructor */ - ODMatrix(const ODMatrix& s); - - /** @brief invalid assignment operator */ - ODMatrix& operator=(const ODMatrix& s); - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/od2trips_main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/od2trips_main.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,324 @@ +/****************************************************************************/ +/// @file od2trips_main.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @author Laura Bieker +/// @author Yun-Pang Floetteroed +/// @date Thu, 12 September 2002 +/// @version $Id: od2trips_main.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Main for OD2TRIPS +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#ifdef HAVE_VERSION_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// functions +// =========================================================================== +void +fillOptions() { + OptionsCont& oc = OptionsCont::getOptions(); + oc.addCallExample("-c ", "run with configuration file"); + + // insert options sub-topics + SystemFrame::addConfigurationOptions(oc); // fill this subtopic, too + oc.addOptionSubTopic("Input"); + oc.addOptionSubTopic("Output"); + oc.addOptionSubTopic("Time"); + oc.addOptionSubTopic("Processing"); + oc.addOptionSubTopic("Defaults"); + SystemFrame::addReportOptions(oc); // fill this subtopic, too + + + // register the file input options + oc.doRegister("net-file", 'n', new Option_FileName()); + oc.addSynonyme("net-file", "net"); + oc.addDescription("net-file", "Input", "Loads network (districts) from FILE"); + + oc.doRegister("od-matrix-files", 'd', new Option_FileName()); + oc.addSynonyme("od-matrix-files", "od-files"); + oc.addSynonyme("od-matrix-files", "od"); + oc.addDescription("od-matrix-files", "Input", "Loads O/D-files from FILE(s)"); + + oc.doRegister("od-amitran-files", new Option_FileName()); + oc.addSynonyme("od-amitran-files", "amitran-files"); + oc.addSynonyme("od-amitran-files", "amitran"); + oc.addDescription("od-amitran-files", "Input", "Loads O/D-matrix in Amitran format from FILE(s)"); + + + // register the file output options + oc.doRegister("output-file", 'o', new Option_FileName()); + oc.addSynonyme("output-file", "output", true); + oc.addDescription("output-file", "Output", "Writes trip definitions into FILE"); + + oc.doRegister("flow-output", new Option_FileName()); + oc.addDescription("flow-output", "Output", "Writes flow definitions into FILE"); + + oc.doRegister("ignore-vehicle-type", new Option_Bool(false)); + oc.addSynonyme("ignore-vehicle-type", "no-vtype", true); + oc.addDescription("ignore-vehicle-type", "Output", "Does not save vtype information"); + + + // register the time settings + oc.doRegister("begin", 'b', new Option_String("0", "TIME")); + oc.addDescription("begin", "Time", "Defines the begin time; Previous trips will be discarded"); + + oc.doRegister("end", 'e', new Option_String(SUMOTIME_MAXSTRING, "TIME")); + oc.addDescription("end", "Time", "Defines the end time; Later trips will be discarded; Defaults to the maximum time that SUMO can represent"); + + + // register the data processing options + oc.doRegister("scale", 's', new Option_Float(1)); + oc.addDescription("scale", "Processing", "Scales the loaded flows by FLOAT"); + + oc.doRegister("spread.uniform", new Option_Bool(false)); + oc.addDescription("spread.uniform", "Processing", "Spreads trips uniformly over each time period"); + + oc.doRegister("vtype", new Option_String("")); + oc.addDescription("vtype", "Processing", "Defines the name of the vehicle type to use"); + + oc.doRegister("prefix", new Option_String("")); + oc.addDescription("prefix", "Processing", "Defines the prefix for vehicle names"); + + oc.doRegister("timeline", new Option_String()); + oc.addDescription("timeline", "Processing", "Uses STR as a timeline definition"); + + oc.doRegister("timeline.day-in-hours", new Option_Bool(false)); + oc.addDescription("timeline.day-in-hours", "Processing", "Uses STR as a 24h-timeline definition"); + + oc.doRegister("ignore-errors", new Option_Bool(false)); // !!! describe, document + oc.addSynonyme("ignore-errors", "dismiss-loading-errors", true); + oc.addDescription("ignore-errors", "Processing", "Continue on broken input"); + + oc.doRegister("no-step-log", new Option_Bool(false)); + oc.addDescription("no-step-log", "Processing", "Disable console output of current time step"); + + + // register defaults options + oc.doRegister("departlane", new Option_String("free")); + oc.addDescription("departlane", "Defaults", "Assigns a default depart lane"); + + oc.doRegister("departpos", new Option_String()); + oc.addDescription("departpos", "Defaults", "Assigns a default depart position"); + + oc.doRegister("departspeed", new Option_String("max")); + oc.addDescription("departspeed", "Defaults", "Assigns a default depart speed"); + + oc.doRegister("arrivallane", new Option_String()); + oc.addDescription("arrivallane", "Defaults", "Assigns a default arrival lane"); + + oc.doRegister("arrivalpos", new Option_String()); + oc.addDescription("arrivalpos", "Defaults", "Assigns a default arrival position"); + + oc.doRegister("arrivalspeed", new Option_String()); + oc.addDescription("arrivalspeed", "Defaults", "Assigns a default arrival speed"); + + // add rand options + RandHelper::insertRandOptions(); +} + +bool +checkOptions() { + OptionsCont& oc = OptionsCont::getOptions(); + bool ok = true; + if (!oc.isSet("net-file")) { + WRITE_ERROR("No net input file (-n) specified."); + ok = false; + } + if (!oc.isSet("od-matrix-files") && !oc.isSet("od-amitran-files")) { + WRITE_ERROR("No input specified."); + ok = false; + } + if (!oc.isSet("output-file")) { + WRITE_ERROR("No trip table output file (-o) specified."); + ok = false; + } + // + SUMOVehicleParameter p; + std::string error; + if (oc.isSet("departlane") && !SUMOVehicleParameter::parseDepartLane(oc.getString("departlane"), "option", "departlane", p.departLane, p.departLaneProcedure, error)) { + WRITE_ERROR(error); + ok = false; + } + if (oc.isSet("departpos") && !SUMOVehicleParameter::parseDepartPos(oc.getString("departpos"), "option", "departpos", p.departPos, p.departPosProcedure, error)) { + WRITE_ERROR(error); + ok = false; + } + if (oc.isSet("departspeed") && !SUMOVehicleParameter::parseDepartSpeed(oc.getString("departspeed"), "option", "departspeed", p.departSpeed, p.departSpeedProcedure, error)) { + WRITE_ERROR(error); + ok = false; + } + if (oc.isSet("arrivallane") && !SUMOVehicleParameter::parseArrivalLane(oc.getString("arrivallane"), "option", "arrivallane", p.arrivalLane, p.arrivalLaneProcedure, error)) { + WRITE_ERROR(error); + ok = false; + } + if (oc.isSet("arrivalpos") && !SUMOVehicleParameter::parseArrivalPos(oc.getString("arrivalpos"), "option", "arrivalpos", p.arrivalPos, p.arrivalPosProcedure, error)) { + WRITE_ERROR(error); + ok = false; + } + if (oc.isSet("arrivalspeed") && !SUMOVehicleParameter::parseArrivalSpeed(oc.getString("arrivalspeed"), "option", "arrivalspeed", p.arrivalSpeed, p.arrivalSpeedProcedure, error)) { + WRITE_ERROR(error); + ok = false; + } + return ok; +} + + + + +/* ------------------------------------------------------------------------- + * main + * ----------------------------------------------------------------------- */ +int +main(int argc, char** argv) { + OptionsCont& oc = OptionsCont::getOptions(); + // give some application descriptions + oc.setApplicationDescription("Importer of O/D-matrices for the road traffic simulation SUMO."); + oc.setApplicationName("od2trips", "SUMO od2trips Version " + getBuildName(VERSION_STRING)); + int ret = 0; + try { + // initialise subsystems + XMLSubSys::init(); + fillOptions(); + OptionsIO::getOptions(true, argc, argv); + if (oc.processMetaOptions(argc < 2)) { + SystemFrame::close(); + return 0; + } + XMLSubSys::setValidation(oc.getString("xml-validation"), oc.getString("xml-validation.net")); + MsgHandler::initOutputOptions(); + if (!checkOptions()) { + throw ProcessError(); + } + RandHelper::initRandGlobal(); + // load the districts + // check whether the user gave a net filename + if (!oc.isSet("net-file")) { + throw ProcessError("You must supply a network or districts file ('-n')."); + } + // get the file name and set it + ODDistrictCont districts; + districts.loadDistricts(oc.getString("net-file")); + if (districts.size() == 0) { + throw ProcessError("No districts loaded."); + } + // load the matrix + ODMatrix matrix(districts); + matrix.loadMatrix(oc); + if (matrix.getNoLoaded() == 0) { + throw ProcessError("No vehicles loaded."); + } + if (MsgHandler::getErrorInstance()->wasInformed() && !oc.getBool("ignore-errors")) { + throw ProcessError("Loading failed."); + } + WRITE_MESSAGE(toString(matrix.getNoLoaded()) + " vehicles loaded."); + // apply a curve if wished + if (oc.isSet("timeline")) { + matrix.applyCurve(matrix.parseTimeLine(oc.getStringVector("timeline"), oc.getBool("timeline.day-in-hours"))); + } + // write + bool haveOutput = false; + if (OutputDevice::createDeviceByOption("output-file", "routes", "routes_file.xsd")) { + matrix.write(string2time(oc.getString("begin")), string2time(oc.getString("end")), + OutputDevice::getDeviceByOption("output-file"), + oc.getBool("spread.uniform"), oc.getBool("ignore-vehicle-type"), + oc.getString("prefix"), !oc.getBool("no-step-log")); + haveOutput = true; + } + if (OutputDevice::createDeviceByOption("flow-output", "routes", "routes_file.xsd")) { + matrix.writeFlows(string2time(oc.getString("begin")), string2time(oc.getString("end")), + OutputDevice::getDeviceByOption("flow-output"), + oc.getBool("ignore-vehicle-type"), oc.getString("prefix")); + haveOutput = true; + } + if (!haveOutput) { + throw ProcessError("No output file given."); + } + WRITE_MESSAGE(toString(matrix.getNoDiscarded()) + " vehicles discarded."); + WRITE_MESSAGE(toString(matrix.getNoWritten()) + " vehicles written."); + } catch (const ProcessError& e) { + if (std::string(e.what()) != std::string("Process Error") && std::string(e.what()) != std::string("")) { + WRITE_ERROR(e.what()); + } + MsgHandler::getErrorInstance()->inform("Quitting (on error).", false); + ret = 1; +#ifndef _DEBUG + } catch (const std::exception& e) { + if (std::string(e.what()) != std::string("")) { + WRITE_ERROR(e.what()); + } + MsgHandler::getErrorInstance()->inform("Quitting (on error).", false); + ret = 1; + } catch (...) { + MsgHandler::getErrorInstance()->inform("Quitting (on unknown error).", false); + ret = 1; +#endif + } + SystemFrame::close(); + if (ret == 0) { + std::cout << "Success." << std::endl; + } + return ret; +} + + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,5 @@ XERCES_LIBS = -l$(LIB_XERCES) -if WITH_PROJ -PROJ_LIBS = -l$(LIB_PROJ) -endif - -if WITH_GDAL -GDAL_LIBS = -l$(LIB_GDAL) -endif - if CHECK_MEMORY_LEAKS MEM_LIBS = ../foreign/nvwa/libnvwa.a endif @@ -33,11 +25,8 @@ PCTypeDefHandler.cpp PCTypeDefHandler.h \ PCTypeMap.cpp PCTypeMap.h -polyconvert_LDFLAGS = $(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) - polyconvert_LDADD = ../utils/options/liboptions.a \ ../utils/geom/libgeom.a \ ../utils/shapes/libshapes.a \ $(COMMON_LIBS) \ -$(GDAL_LIBS) \ -$(PROJ_LIBS) +$(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -37,7 +81,8 @@ target_triplet = @target@ bin_PROGRAMS = polyconvert$(EXEEXT) subdir = src/polyconvert -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -64,34 +109,87 @@ polyconvert_DEPENDENCIES = ../utils/options/liboptions.a \ ../utils/geom/libgeom.a ../utils/shapes/libshapes.a \ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -polyconvert_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(polyconvert_LDFLAGS) $(LDFLAGS) -o $@ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(polyconvert_SOURCES) DIST_SOURCES = $(polyconvert_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -100,6 +198,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -126,9 +225,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -139,10 +242,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -236,8 +335,6 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -@WITH_PROJ_TRUE@PROJ_LIBS = -l$(LIB_PROJ) -@WITH_GDAL_TRUE@GDAL_LIBS = -l$(LIB_GDAL) @CHECK_MEMORY_LEAKS_TRUE@MEM_LIBS = ../foreign/nvwa/libnvwa.a COMMON_LIBS = ../utils/options/liboptions.a \ ../utils/xml/libxml.a \ @@ -258,13 +355,11 @@ PCTypeDefHandler.cpp PCTypeDefHandler.h \ PCTypeMap.cpp PCTypeMap.h -polyconvert_LDFLAGS = $(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) polyconvert_LDADD = ../utils/options/liboptions.a \ ../utils/geom/libgeom.a \ ../utils/shapes/libshapes.a \ $(COMMON_LIBS) \ -$(GDAL_LIBS) \ -$(PROJ_LIBS) +$(XERCES_LDFLAGS) $(GDAL_LDFLAGS) $(PROJ_LDFLAGS) all: all-am @@ -302,14 +397,19 @@ $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -330,7 +430,8 @@ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -343,9 +444,10 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -polyconvert$(EXEEXT): $(polyconvert_OBJECTS) $(polyconvert_DEPENDENCIES) + +polyconvert$(EXEEXT): $(polyconvert_OBJECTS) $(polyconvert_DEPENDENCIES) $(EXTRA_polyconvert_DEPENDENCIES) @rm -f polyconvert$(EXEEXT) - $(polyconvert_LINK) $(polyconvert_OBJECTS) $(polyconvert_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(polyconvert_OBJECTS) $(polyconvert_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -365,25 +467,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polyconvert_main.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -391,26 +493,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -422,15 +513,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -439,6 +526,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -490,10 +592,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -577,19 +684,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderArcView.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderArcView.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderArcView.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderArcView.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: PCLoaderArcView.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCLoaderArcView.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A reader of pois and polygons from shape files /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -115,10 +115,11 @@ poLayer->ResetReading(); unsigned int runningID = 0; while ((poFeature = poLayer->GetNextFeature()) != NULL) { + std::vector parCont; // read in edge attributes std::string id = useRunningID ? toString(runningID) : poFeature->GetFieldAsString(idField.c_str()); ++runningID; - id = StringUtils::prune(id); + id = StringUtils::latin1_to_utf8(StringUtils::prune(id)); if (id == "") { throw ProcessError("Missing id under '" + idField + "'"); } @@ -140,9 +141,8 @@ WRITE_ERROR("Unable to project coordinates for POI '" + id + "'."); } PointOfInterest* poi = new PointOfInterest(id, type, color, pos, (SUMOReal)layer); - if (!toFill.insert(id, poi, layer)) { - WRITE_ERROR("POI '" + id + "' could not be added."); - delete poi; + if (toFill.insert(id, poi, layer)) { + parCont.push_back(poi); } } break; @@ -157,9 +157,8 @@ shape.push_back_noDoublePos(pos); } Polygon* poly = new Polygon(id, type, color, shape, false, (SUMOReal)layer); - if (!toFill.insert(id, poly, layer)) { - WRITE_ERROR("Polygon '" + id + "' could not be added."); - delete poly; + if (toFill.insert(id, poly, layer)) { + parCont.push_back(poly); } } break; @@ -174,9 +173,8 @@ shape.push_back_noDoublePos(pos); } Polygon* poly = new Polygon(id, type, color, shape, true, (SUMOReal)layer); - if (!toFill.insert(id, poly, layer)) { - WRITE_ERROR("Polygon '" + id + "' could not be added."); - delete poly; + if (toFill.insert(id, poly, layer)) { + parCont.push_back(poly); } } break; @@ -190,9 +188,8 @@ WRITE_ERROR("Unable to project coordinates for POI '" + tid + "'."); } PointOfInterest* poi = new PointOfInterest(tid, type, color, pos, (SUMOReal)layer); - if (!toFill.insert(tid, poi, layer)) { - WRITE_ERROR("POI '" + tid + "' could not be added."); - delete poi; + if (toFill.insert(tid, poi, layer)) { + parCont.push_back(poi); } } } @@ -211,9 +208,8 @@ shape.push_back_noDoublePos(pos); } Polygon* poly = new Polygon(tid, type, color, shape, false, (SUMOReal)layer); - if (!toFill.insert(tid, poly, layer)) { - WRITE_ERROR("Polygon '" + tid + "' could not be added."); - delete poly; + if (toFill.insert(tid, poly, layer)) { + parCont.push_back(poly); } } } @@ -232,9 +228,8 @@ shape.push_back_noDoublePos(pos); } Polygon* poly = new Polygon(tid, type, color, shape, true, (SUMOReal)layer); - if (!toFill.insert(tid, poly, layer)) { - WRITE_ERROR("Polygon '" + tid + "' could not be added."); - delete poly; + if (toFill.insert(tid, poly, layer)) { + parCont.push_back(poly); } } } @@ -243,6 +238,21 @@ WRITE_WARNING("Unsupported shape type occured (id='" + id + "')."); break; } + if (oc.getBool("shapefile.add-param")) { + for (std::vector::const_iterator it = parCont.begin(); it != parCont.end(); ++it) { + OGRFeatureDefn* poFDefn = poLayer->GetLayerDefn(); + for (int iField = 0; iField < poFDefn->GetFieldCount(); iField++) { + OGRFieldDefn* poFieldDefn = poFDefn->GetFieldDefn(iField); + if (poFieldDefn->GetNameRef() != idField) { + if (poFieldDefn->GetType() == OFTReal) { + (*it)->addParameter(poFieldDefn->GetNameRef(), toString(poFeature->GetFieldAsDouble(iField))); + } else { + (*it)->addParameter(poFieldDefn->GetNameRef(), StringUtils::latin1_to_utf8(poFeature->GetFieldAsString(iField))); + } + } + } + } + } OGRFeature::DestroyFeature(poFeature); } PROGRESS_DONE_MESSAGE(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderArcView.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderArcView.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderArcView.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderArcView.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: PCLoaderArcView.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCLoaderArcView.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A reader of pois and polygons from shape files /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderDlrNavteq.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderDlrNavteq.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderDlrNavteq.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderDlrNavteq.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Christoph Sommer /// @author Michael Behrisch /// @date Thu, 02.11.2006 -/// @version $Id: PCLoaderDlrNavteq.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCLoaderDlrNavteq.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A reader of pois and polygons stored in DLR-Navteq (Elmar)-format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -80,7 +80,7 @@ PCTypeMap& tm) { std::vector files = oc.getStringVector("dlr-navteq-poi-files"); for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { - if (!FileHelpers::exists(*file)) { + if (!FileHelpers::isReadable(*file)) { throw ProcessError("Could not open dlr-navteq-poi-file '" + *file + "'."); } PROGRESS_BEGIN_MESSAGE("Parsing pois from dlr-navteq-poi-file '" + *file + "'"); @@ -95,7 +95,7 @@ PCTypeMap& tm) { std::vector files = oc.getStringVector("dlr-navteq-poly-files"); for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { - if (!FileHelpers::exists(*file)) { + if (!FileHelpers::isReadable(*file)) { throw ProcessError("Could not open dlr-navteq-poly-file '" + *file + "'."); } PROGRESS_BEGIN_MESSAGE("Parsing pois from dlr-navteq-poly-file '" + *file + "'"); @@ -175,10 +175,7 @@ ignorePrunning = true; } PointOfInterest* poi = new PointOfInterest(name, type, color, pos, (SUMOReal)layer); - if (!toFill.insert(name, poi, layer, ignorePrunning)) { - WRITE_ERROR("POI '" + name + "' could not be added."); - delete poi; - } + toFill.insert(name, poi, layer, ignorePrunning); } } } @@ -265,10 +262,7 @@ } if (!discard) { Polygon* poly = new Polygon(name, type, color, vec, fill, (SUMOReal)layer); - if (!toFill.insert(name, poly, layer)) { - WRITE_ERROR("Polygon '" + name + "' could not be added."); - delete poly; - } + toFill.insert(name, poly, layer); } vec.clear(); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderDlrNavteq.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderDlrNavteq.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderDlrNavteq.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderDlrNavteq.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Thu, 02.11.2006 -/// @version $Id: PCLoaderDlrNavteq.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCLoaderDlrNavteq.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A reader of pois and polygons stored in DLR-Navteq (Elmar)-format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderOSM.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderOSM.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderOSM.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderOSM.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,14 @@ /// @author Jakob Erdmann /// @author Christoph Sommer /// @author Michael Behrisch +/// @author Melanie Knocke /// @date Wed, 19.11.2008 -/// @version $Id: PCLoaderOSM.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCLoaderOSM.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A reader of pois and polygons stored in OSM-format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -67,6 +68,7 @@ // --------------------------------------------------------------------------- std::set PCLoaderOSM::initMyKeysToInclude() { std::set result; + result.insert("highway"); result.insert("waterway"); result.insert("aeroway"); result.insert("aerialway"); @@ -107,7 +109,7 @@ NodesHandler nodesHandler(nodes, withAttributes, *m); for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { // nodes - if (!FileHelpers::exists(*file)) { + if (!FileHelpers::isReadable(*file)) { WRITE_ERROR("Could not open osm-file '" + *file + "'."); return; } @@ -232,8 +234,6 @@ poly->addParameter(edge->myAttributes); } if (!toFill.insert(id, poly, def.layer, ignorePruning)) { - WRITE_ERROR("Polygon '" + id + "' could not be added."); - delete poly; return index; } else { return index + 1; @@ -257,8 +257,6 @@ poi->addParameter(node->myAttributes); } if (!toFill.insert(id, poi, def.layer, ignorePruning)) { - WRITE_ERROR("POI '" + id + "' could not be added."); - delete poi; return index; } else { return index + 1; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderOSM.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderOSM.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderOSM.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderOSM.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @author Michael Behrisch +/// @author Melanie Knocke /// @date Wed, 19.11.2008 -/// @version $Id: PCLoaderOSM.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCLoaderOSM.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A reader of pois and polygons stored in OSM-format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderVisum.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderVisum.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderVisum.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderVisum.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Christoph Sommer /// @author Michael Behrisch /// @date Thu, 02.11.2006 -/// @version $Id: PCLoaderVisum.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCLoaderVisum.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A reader of pois and polygons stored in VISUM-format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -71,7 +71,7 @@ // parse file(s) std::vector files = oc.getStringVector("visum-files"); for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { - if (!FileHelpers::exists(*file)) { + if (!FileHelpers::isReadable(*file)) { throw ProcessError("Could not open visum-file '" + *file + "'."); } PROGRESS_BEGIN_MESSAGE("Parsing from visum-file '" + *file + "'"); @@ -250,10 +250,7 @@ } if (!discard) { PointOfInterest* poi = new PointOfInterest(id, type, color, pos, (SUMOReal)layer); - if (!toFill.insert(id, poi, layer)) { - WRITE_ERROR("POI '" + id + "' could not be added."); - delete poi; - } + toFill.insert(id, poi, layer); } } @@ -281,10 +278,7 @@ } if (!discard) { Polygon* poly = new Polygon(id, type, color, vec, false, (SUMOReal)layer); - if (!toFill.insert(id, poly, 1)) { - WRITE_ERROR("Polygon '" + id + "' could not be added."); - delete poly; - } + toFill.insert(id, poly, 1); } vec.clear(); } @@ -330,20 +324,14 @@ if (!discard) { if (teilflaechen[flaechenelemente[area]].size() > 0) { Polygon* poly = new Polygon(id, type, color, teilflaechen[flaechenelemente[area]], false, (SUMOReal)layer); - if (!toFill.insert(id, poly, layer)) { - WRITE_ERROR("Polygon '" + id + "' could not be added."); - delete poly; - } + toFill.insert(id, poly, layer); } else { Position pos(x, y); if (!geoConvHelper.x2cartesian(pos)) { WRITE_WARNING("Unable to project coordinates for POI '" + id + "'."); } PointOfInterest* poi = new PointOfInterest(id, type, color, pos, (SUMOReal)layer); - if (!toFill.insert(id, poi, layer)) { - WRITE_ERROR("POI '" + id + "' could not be added."); - delete poi; - } + toFill.insert(id, poi, layer); } } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderVisum.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderVisum.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderVisum.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderVisum.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Thu, 02.11.2006 -/// @version $Id: PCLoaderVisum.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCLoaderVisum.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A reader of pois and polygons stored in VISUM-format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderXML.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderXML.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderXML.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderXML.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Christoph Sommer /// @author Michael Behrisch /// @date Thu, 02.11.2006 -/// @version $Id: PCLoaderXML.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCLoaderXML.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A reader for polygons and pois stored in XML-format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -71,7 +71,7 @@ // parse file(s) std::vector files = oc.getStringVector("xml"); for (std::vector::const_iterator file = files.begin(); file != files.end(); ++file) { - if (!FileHelpers::exists(*file)) { + if (!FileHelpers::isReadable(*file)) { throw ProcessError("Could not open xml-file '" + *file + "'."); } PROGRESS_BEGIN_MESSAGE("Parsing XML from '" + *file + "'"); @@ -151,10 +151,7 @@ ignorePrunning = true; } PointOfInterest* poi = new PointOfInterest(id, type, color, pos, layer, angle, imgFile, imgWidth, imgHeight); - if (!myCont.insert(id, poi, (int)layer, ignorePrunning)) { - WRITE_ERROR("POI '" + id + "' could not be added."); - delete poi; - } + myCont.insert(id, poi, (int)layer, ignorePrunning); } } if (element == SUMO_TAG_POLY) { @@ -214,10 +211,7 @@ shape.push_back(pos); } Polygon* poly = new Polygon(myCurrentID, myCurrentType, myCurrentColor, shape, fill, layer, angle, imgFile); - if (!myCont.insert(myCurrentID, poly, (int)myCurrentLayer, myCurrentIgnorePrunning)) { - WRITE_ERROR("Polygon '" + myCurrentID + "' could not be added."); - delete poly; - } + myCont.insert(myCurrentID, poly, (int)myCurrentLayer, myCurrentIgnorePrunning); } } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderXML.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderXML.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCLoaderXML.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCLoaderXML.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Thu, 02.11.2006 -/// @version $Id: PCLoaderXML.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCLoaderXML.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A reader for polygons and pois stored in XML-format /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCNetProjectionLoader.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCNetProjectionLoader.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCNetProjectionLoader.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCNetProjectionLoader.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Thu, 02.11.2006 -/// @version $Id: PCNetProjectionLoader.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCNetProjectionLoader.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A reader for a SUMO network's projection description /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -63,7 +63,7 @@ // --------------------------------------------------------------------------- void PCNetProjectionLoader::load(const std::string& file, int shift) { - if (!FileHelpers::exists(file)) { + if (!FileHelpers::isReadable(file)) { throw ProcessError("Could not open net-file '" + file + "'."); } // build handler and parser diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCNetProjectionLoader.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCNetProjectionLoader.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCNetProjectionLoader.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCNetProjectionLoader.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Thu, 02.11.2006 -/// @version $Id: PCNetProjectionLoader.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCNetProjectionLoader.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A reader for a SUMO network's projection description /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCPolyContainer.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCPolyContainer.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCPolyContainer.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCPolyContainer.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @author Michael Behrisch +/// @author Melanie Knocke /// @date Mon, 05 Dec 2005 -/// @version $Id: PCPolyContainer.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCPolyContainer.cpp 18137 2015-03-24 15:12:38Z behrisch $ /// // A storage for loaded polygons and pois /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -37,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -51,9 +53,9 @@ // method definitions // =========================================================================== PCPolyContainer::PCPolyContainer(bool prune, - const Boundary& prunningBoundary, + const Boundary& pruningBoundary, const std::vector& removeByNames) - : myPrunningBoundary(prunningBoundary), myDoPrunne(prune), + : myPruningBoundary(pruningBoundary), myDoPrune(prune), myRemoveByNames(removeByNames) {} @@ -64,24 +66,26 @@ bool PCPolyContainer::insert(const std::string& id, Polygon* poly, - int layer, bool ignorePrunning) { + int layer, bool ignorePruning) { // check whether the polygon lies within the wished area // - if such an area was given - if (myDoPrunne && !ignorePrunning) { + if (myDoPrune && !ignorePruning) { Boundary b = poly->getShape().getBoxBoundary(); - if (!b.partialWithin(myPrunningBoundary)) { + if (!b.partialWithin(myPruningBoundary)) { delete poly; - return true; + return false; } } // check whether the polygon was named to be a removed one if (find(myRemoveByNames.begin(), myRemoveByNames.end(), id) != myRemoveByNames.end()) { delete poly; - return true; + return false; } // PolyCont::iterator i = myPolyCont.find(id); if (i != myPolyCont.end()) { + WRITE_ERROR("Polygon '" + id + "' could not be added."); + delete poly; return false; } myPolyCont[id] = poly; @@ -92,23 +96,25 @@ bool PCPolyContainer::insert(const std::string& id, PointOfInterest* poi, - int layer, bool ignorePrunning) { + int layer, bool ignorePruning) { // check whether the poi lies within the wished area // - if such an area was given - if (myDoPrunne && !ignorePrunning) { - if (!myPrunningBoundary.around(*poi)) { + if (myDoPrune && !ignorePruning) { + if (!myPruningBoundary.around(*poi)) { delete poi; - return true; + return false; } } // check whether the polygon was named to be a removed one if (find(myRemoveByNames.begin(), myRemoveByNames.end(), id) != myRemoveByNames.end()) { delete poi; - return true; + return false; } // POICont::iterator i = myPOICont.find(id); if (i != myPOICont.end()) { + WRITE_ERROR("POI '" + id + "' could not be added."); + delete poi; return false; } myPOICont[id] = poi; @@ -148,35 +154,22 @@ void -PCPolyContainer::save(const std::string& file) { +PCPolyContainer::save(const std::string& file, bool useGeo) { + const GeoConvHelper& gch = GeoConvHelper::getFinal(); + if (useGeo && !gch.usingGeoProjection()) { + WRITE_WARNING("Ignoring option \"proj.plain-geo\" because no geo-conversion has been defined"); + useGeo = false; + } OutputDevice& out = OutputDevice::getDevice(file); - out.writeXMLHeader("shapes"); + out.writeXMLHeader("additional", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/additional_file.xsd\""); + if (useGeo) { + out.setPrecision(GEO_OUTPUT_ACCURACY); + } else { + GeoConvHelper::writeLocation(out); + } // write polygons for (PolyCont::iterator i = myPolyCont.begin(); i != myPolyCont.end(); ++i) { - Polygon* p = i->second; - out.openTag(SUMO_TAG_POLY); - out.writeAttr(SUMO_ATTR_ID, StringUtils::escapeXML(p->getID())); - out.writeAttr(SUMO_ATTR_TYPE, StringUtils::escapeXML(p->getType())); - out.writeAttr(SUMO_ATTR_COLOR, p->getColor()); - out.writeAttr(SUMO_ATTR_FILL, p->getFill()); - out.writeAttr(SUMO_ATTR_LAYER, p->getLayer()); - out.writeAttr(SUMO_ATTR_SHAPE, p->getShape()); - if (p->getAngle() != Shape::DEFAULT_ANGLE) { - out.writeAttr(SUMO_ATTR_ANGLE, p->getAngle()); - } - if (p->getImgFile() != Shape::DEFAULT_IMG_FILE) { - out.writeAttr(SUMO_ATTR_IMGFILE, p->getImgFile()); - } - const std::map& attrs = p->getMap(); - if (attrs.size() != 0) { - for (std::map::const_iterator j = attrs.begin(); j != attrs.end(); ++j) { - out.openTag(SUMO_TAG_PARAM); - out.writeAttr(SUMO_ATTR_KEY, (*j).first); - out.writeAttr(SUMO_ATTR_VALUE, (*j).second); - out.closeTag(); - } - } - out.closeTag(); + i->second->writeXML(out, useGeo); } // write pois for (POICont::iterator i = myPOICont.begin(); i != myPOICont.end(); ++i) { @@ -186,8 +179,15 @@ out.writeAttr(SUMO_ATTR_TYPE, StringUtils::escapeXML(p->getType())); out.writeAttr(SUMO_ATTR_COLOR, p->getColor()); out.writeAttr(SUMO_ATTR_LAYER, p->getLayer()); - out.writeAttr(SUMO_ATTR_X, p->x()); - out.writeAttr(SUMO_ATTR_Y, p->y()); + if (useGeo) { + Position pos(*p); + gch.cartesian2geo(pos); + out.writeAttr(SUMO_ATTR_LON, pos.x()); + out.writeAttr(SUMO_ATTR_LAT, pos.y()); + } else { + out.writeAttr(SUMO_ATTR_X, p->x()); + out.writeAttr(SUMO_ATTR_Y, p->y()); + } if (p->getAngle() != Shape::DEFAULT_ANGLE) { out.writeAttr(SUMO_ATTR_ANGLE, p->getAngle()); } @@ -200,14 +200,11 @@ if (p->getHeight() != Shape::DEFAULT_IMG_HEIGHT) { out.writeAttr(SUMO_ATTR_HEIGHT, p->getHeight()); } - const std::map& attrs = p->getMap(); - if (attrs.size() != 0) { - for (std::map::const_iterator j = attrs.begin(); j != attrs.end(); ++j) { - out.openTag(SUMO_TAG_PARAM); - out.writeAttr(SUMO_ATTR_KEY, (*j).first); - out.writeAttr(SUMO_ATTR_VALUE, (*j).second); - out.closeTag(); - } + for (std::map::const_iterator j = p->getMap().begin(); j != p->getMap().end(); ++j) { + out.openTag(SUMO_TAG_PARAM); + out.writeAttr(SUMO_ATTR_KEY, (*j).first); + out.writeAttr(SUMO_ATTR_VALUE, (*j).second); + out.closeTag(); } out.closeTag(); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCPolyContainer.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCPolyContainer.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCPolyContainer.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCPolyContainer.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file PCPolyContainer.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Mon, 05 Dec 2005 -/// @version $Id: PCPolyContainer.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCPolyContainer.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A storage for loaded polygons and pois /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -51,11 +52,11 @@ class PCPolyContainer { public: /** @brief Constructor - * @param[in] prune Whether added polygons/pois shall be prunned - * @param[in] prunningBoundary The pruning boundary (onyl valid if prune==true) + * @param[in] prune Whether added polygons/pois shall be pruned + * @param[in] pruningBoundary The pruning boundary (only valid if prune==true) * @param[in] removeByNames Names of objects that shall not be added */ - PCPolyContainer(bool prune, const Boundary& prunningBoundary, + PCPolyContainer(bool prune, const Boundary& pruningBoundary, const std::vector& removeByNames); @@ -65,40 +66,40 @@ /** @brief Adds a polygon to the storage * - * If prunning if enabled, "ignorePrunning" is false and the polygon lies outside - * the prunning boundary, or if the polygon's name is within the names of - * objects to discard, the polygon is deleted and true is returned. + * If pruning if enabled, "ignorePruning" is false and the polygon lies outside + * the pruning boundary, or if the polygon's name is within the names of + * objects to discard, the polygon is deleted and false is returned. * - * Otherwise, it is tested whether a polygon with the same name is already stored. - * If so, false is returned (the polygon is not deleted), otherwise true. + * Afterwards it is tested whether a polygon with the same name is already stored. + * If so, an error message is printed, the polygon is deleted and false is returned, otherwise true. * * @param[in] id The id of the polygon to add * @param[in] poly The polygon to add * @param[in] layer The layer the polygon shall be located within - * @param[in] ignorePrunning Whether the polygon shall be kept, even though it would be prunned - * @return Whether the polygon could been added (no one with the same id was added before) + * @param[in] ignorePruning Whether the polygon shall be kept, even though it would be pruned + * @return Whether the polygon could be added */ bool insert(const std::string& id, Polygon* poly, int layer, - bool ignorePrunning = false); + bool ignorePruning = false); /** @brief Adds a poi to the storage * - * If prunning if enabled, "ignorePrunning" is false and the poi lies outside - * the prunning boundary, or if the poi's name is within the names of - * objects to discard, the poi is deleted and true is returned. + * If pruning if enabled, "ignorePruning" is false and the poi lies outside + * the pruning boundary, or if the poi's name is within the names of + * objects to discard, the poi is deleted and false is returned. * - * Otherwise, it is tested whether a poi with the same name is already stored. - * If so, false is returned (the poi is not deleted), otherwise true. + * Afterwards it is tested whether a poi with the same name is already stored. + * If so, an error message is printed, the poi is deleted and false is returned, otherwise true. * * @param[in] id The id of the poi to add * @param[in] poly The poi to add * @param[in] layer The layer the poi shall be located within - * @param[in] ignorePrunning Whether the poi shall be kept, even though it would be prunned - * @return Whether the poi could been added (no one with the same id was added before) + * @param[in] ignorePruning Whether the poi shall be kept, even though it would be pruned + * @return Whether the poi could be added */ bool insert(const std::string& id, PointOfInterest* poi, int layer, - bool ignorePrunning = false); + bool ignorePruning = false); /** @brief Returns the number of stored polygons @@ -137,9 +138,10 @@ /** @brief Saves the stored polygons into the given file * @param[in] file The name of the file to write stored objects' definitions into + * @param[in] useGeo Whether to write output in geo-coordinates * @exception IOError If the file could not be opened */ - void save(const std::string& file); + void save(const std::string& file, bool useGeo); /** @brief Retuns a unique id for a given name @@ -175,10 +177,10 @@ /// @brief The boundary that described the rectangle within which an object must be in order to be kept - Boundary myPrunningBoundary; + Boundary myPruningBoundary; - /// @brief Information whether the prunning boundary shall be used - bool myDoPrunne; + /// @brief Information whether the pruning boundary shall be used + bool myDoPrune; /// @brief List of names of polygons/pois that shall be removed std::vector myRemoveByNames; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCTypeDefHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCTypeDefHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCTypeDefHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCTypeDefHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Thu, 16.03.2006 -/// @version $Id: PCTypeDefHandler.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCTypeDefHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A handler for loading polygon type maps /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCTypeDefHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCTypeDefHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCTypeDefHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCTypeDefHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Thu, 16.03.2006 -/// @version $Id: PCTypeDefHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCTypeDefHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A handler for loading polygon type maps /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCTypeMap.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCTypeMap.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCTypeMap.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCTypeMap.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file PCTypeMap.cpp /// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch /// @date Mon, 05 Dec 2005 -/// @version $Id: PCTypeMap.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCTypeMap.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A storage for type mappings /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCTypeMap.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCTypeMap.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/PCTypeMap.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/PCTypeMap.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file PCTypeMap.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Mon, 05 Dec 2005 -/// @version $Id: PCTypeMap.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PCTypeMap.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A storage for type mappings /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/polyconvert_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/polyconvert_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/polyconvert/polyconvert_main.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/polyconvert/polyconvert_main.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,14 @@ /// @author Jakob Erdmann /// @author Christoph Sommer /// @author Michael Behrisch +/// @author Melanie Knocke /// @date Mon, 05 Dec 2005 -/// @version $Id: polyconvert_main.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: polyconvert_main.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Main for POLYCONVERT /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -112,9 +113,9 @@ oc.addSynonyme("osm-files", "osm"); oc.addDescription("osm-files", "Input", "Reads pois from FILE+ assuming they're coded in OSM"); oc.doRegister("osm.keep-full-type", new Option_Bool(false)); - oc.addDescription("osm.keep-full-type", "Input", "The type will be made of the key-value - pair."); + oc.addDescription("osm.keep-full-type", "Input", "The type will be made of the key-value - pair"); oc.doRegister("osm.use-name", new Option_Bool(false)); - oc.addDescription("osm.use-name", "Input", "The id will be set from the given 'name' attribute."); + oc.addDescription("osm.use-name", "Input", "The id will be set from the given 'name' attribute"); // arcview import oc.doRegister("shapefile-prefixes", new Option_FileName()); @@ -133,7 +134,10 @@ oc.addDescription("shapefile.id-column", "Input", "Defines in which column the id can be found"); oc.doRegister("shapefile.use-running-id", new Option_Bool()); - oc.addDescription("shapefile.use-running-id", "Input", "A running number will be used as id."); + oc.addDescription("shapefile.use-running-id", "Input", "A running number will be used as id"); + + oc.doRegister("shapefile.add-param", new Option_Bool()); + oc.addDescription("shapefile.add-param", "Input", "Extract all additonal columns as params"); // typemap reading oc.doRegister("type-file", new Option_FileName()); @@ -199,6 +203,10 @@ oc.doRegister("discard", new Option_Bool(false)); oc.addDescription("discard", "Building Defaults", "Sets default action to discard"); + + // projection + oc.doRegister("proj.plain-geo", new Option_Bool(false)); + oc.addDescription("proj.plain-geo", "Projection", "Write geo coordinates in output"); } @@ -206,7 +214,7 @@ main(int argc, char** argv) { OptionsCont& oc = OptionsCont::getOptions(); oc.setApplicationDescription("Importer of polygons and POIs for the road traffic simulation SUMO."); - oc.setApplicationName("polyconvert", "SUMO polyconvert Version " + (std::string)VERSION_STRING); + oc.setApplicationName("polyconvert", "SUMO polyconvert Version " + getBuildName(VERSION_STRING)); int ret = 0; try { // initialise subsystems @@ -217,7 +225,7 @@ SystemFrame::close(); return 0; } - XMLSubSys::setValidation(oc.getBool("xml-validation")); + XMLSubSys::setValidation(oc.getString("xml-validation"), oc.getString("xml-validation.net")); MsgHandler::initOutputOptions(); // build the projection int shift = 0; @@ -283,13 +291,14 @@ PCLoaderDlrNavteq::loadIfSet(oc, toFill, tm); // Elmar-files PCLoaderVisum::loadIfSet(oc, toFill, tm); // VISUM PCLoaderArcView::loadIfSet(oc, toFill, tm); // shape-files + GeoConvHelper::computeFinal(); // error processing if (MsgHandler::getErrorInstance()->wasInformed() && oc.getBool("ignore-errors")) { MsgHandler::getErrorInstance()->clear(); } if (!MsgHandler::getErrorInstance()->wasInformed()) { // no? ok, save - toFill.save(oc.getString("output-file")); + toFill.save(oc.getString("output-file"), oc.getBool("proj.plain-geo")); } else { throw ProcessError(); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,11 @@ noinst_LIBRARIES = librouter.a -librouter_a_SOURCES = ReferencedItem.h \ -ROAbstractEdgeBuilder.h \ -ROCostCalculator.cpp ROCostCalculator.h \ +librouter_a_SOURCES = ROAbstractEdgeBuilder.h \ ROEdge.cpp ROEdge.h \ ROFrame.cpp ROFrame.h ROHelper.cpp ROHelper.h ROLane.h \ ROLoader.cpp ROLoader.h \ RONet.cpp RONet.h RONetHandler.cpp RONetHandler.h \ -RONode.cpp RONode.h \ +RONode.cpp RONode.h RORouteAggregator.h \ RORoute.cpp RORoute.h RORouteDef.cpp RORouteDef.h \ RORouteHandler.cpp RORouteHandler.h \ ROVehicle.cpp ROVehicle.h \ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/router -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,39 +92,98 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = librouter_a_AR = $(AR) $(ARFLAGS) librouter_a_LIBADD = -am_librouter_a_OBJECTS = ROCostCalculator.$(OBJEXT) ROEdge.$(OBJEXT) \ - ROFrame.$(OBJEXT) ROHelper.$(OBJEXT) ROLoader.$(OBJEXT) \ - RONet.$(OBJEXT) RONetHandler.$(OBJEXT) RONode.$(OBJEXT) \ - RORoute.$(OBJEXT) RORouteDef.$(OBJEXT) \ - RORouteHandler.$(OBJEXT) ROVehicle.$(OBJEXT) \ - ROVehicleCont.$(OBJEXT) +am_librouter_a_OBJECTS = ROEdge.$(OBJEXT) ROFrame.$(OBJEXT) \ + ROHelper.$(OBJEXT) ROLoader.$(OBJEXT) RONet.$(OBJEXT) \ + RONetHandler.$(OBJEXT) RONode.$(OBJEXT) RORoute.$(OBJEXT) \ + RORouteDef.$(OBJEXT) RORouteHandler.$(OBJEXT) \ + ROVehicle.$(OBJEXT) ROVehicleCont.$(OBJEXT) librouter_a_OBJECTS = $(am_librouter_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(librouter_a_SOURCES) DIST_SOURCES = $(librouter_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -88,6 +192,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -114,9 +219,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -127,10 +236,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -225,14 +330,12 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = librouter.a -librouter_a_SOURCES = ReferencedItem.h \ -ROAbstractEdgeBuilder.h \ -ROCostCalculator.cpp ROCostCalculator.h \ +librouter_a_SOURCES = ROAbstractEdgeBuilder.h \ ROEdge.cpp ROEdge.h \ ROFrame.cpp ROFrame.h ROHelper.cpp ROHelper.h ROLane.h \ ROLoader.cpp ROLoader.h \ RONet.cpp RONet.h RONetHandler.cpp RONetHandler.h \ -RONode.cpp RONode.h \ +RONode.cpp RONode.h RORouteAggregator.h \ RORoute.cpp RORoute.h RORouteDef.cpp RORouteDef.h \ RORouteHandler.cpp RORouteHandler.h \ ROVehicle.cpp ROVehicle.h \ @@ -275,10 +378,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -librouter.a: $(librouter_a_OBJECTS) $(librouter_a_DEPENDENCIES) - -rm -f librouter.a - $(librouter_a_AR) librouter.a $(librouter_a_OBJECTS) $(librouter_a_LIBADD) - $(RANLIB) librouter.a + +librouter.a: $(librouter_a_OBJECTS) $(librouter_a_DEPENDENCIES) $(EXTRA_librouter_a_DEPENDENCIES) + $(AM_V_at)-rm -f librouter.a + $(AM_V_AR)$(librouter_a_AR) librouter.a $(librouter_a_OBJECTS) $(librouter_a_LIBADD) + $(AM_V_at)$(RANLIB) librouter.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -286,7 +390,6 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROCostCalculator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROEdge.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROFrame.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROHelper.Po@am__quote@ @@ -301,25 +404,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ROVehicleCont.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -327,26 +430,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -358,15 +450,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -375,6 +463,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -423,10 +526,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -511,18 +619,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ReferencedItem.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ReferencedItem.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ReferencedItem.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ReferencedItem.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -/****************************************************************************/ -/// @file ReferencedItem.h -/// @author Daniel Krajzewicz -/// @date Sept 2002 -/// @version $Id: ReferencedItem.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Helper base for things that are referenced and have to be saved only once -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef ReferencedItem_h -#define ReferencedItem_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class ReferencedItem - * @brief Helper base for things that are referenced and have to be saved only once - * - * Basic class for structures which are referenced by other classes. The wish - * is to have an information whether an instance of a derived class was already - * saved (together with a referencing class) or shall be saved this time. - */ -class ReferencedItem { -public: - /// @brief Constructor - ReferencedItem() : myWasSaved(false) { } - - - /// @brief Destructor - virtual ~ReferencedItem() { } - - - /** @brief Returns the information whether this item was already saved - * - * @return Whether this item was saved - */ - bool isSaved() const { - return myWasSaved; - } - - - /** @brief Marks the item as saved - */ - void markSaved() { - myWasSaved = true; - } - - -private: - /// @brief Information whether the item was already saved - bool myWasSaved; - - -private: - /// @brief Invalidated copy constructor - ReferencedItem(const ReferencedItem& src); - - /// @brief Invalidated assignment operator - ReferencedItem& operator=(const ReferencedItem& src); - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROAbstractEdgeBuilder.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROAbstractEdgeBuilder.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROAbstractEdgeBuilder.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROAbstractEdgeBuilder.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file ROAbstractEdgeBuilder.h /// @author Daniel Krajzewicz +/// @author Yun-Pang Floetteroed /// @date Wed, 21 Jan 2004 -/// @version $Id: ROAbstractEdgeBuilder.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROAbstractEdgeBuilder.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Interface for building instances of router-edges /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROCostCalculator.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROCostCalculator.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROCostCalculator.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROCostCalculator.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,250 +0,0 @@ -/****************************************************************************/ -/// @file ROCostCalculator.cpp -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date Sept 2002 -/// @version $Id: ROCostCalculator.cpp 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Calculators for route costs and probabilities -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include "ROEdge.h" -#include "RORoute.h" -#include "ROVehicle.h" -#include "ROCostCalculator.h" - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// static member definitions -// =========================================================================== -ROCostCalculator* ROCostCalculator::myInstance = 0; - - -// =========================================================================== -// method definitions -// =========================================================================== -ROCostCalculator::ROCostCalculator() { - OptionsCont& oc = OptionsCont::getOptions(); - myMaxRouteNumber = oc.getInt("max-alternatives"); - myKeepRoutes = oc.getBool("keep-all-routes"); - mySkipRouteCalculation = oc.getBool("skip-new-routes"); -} - - -ROCostCalculator::~ROCostCalculator() {} - - -ROCostCalculator& -ROCostCalculator::getCalculator() { - if (myInstance == 0) { - OptionsCont& oc = OptionsCont::getOptions(); - if (oc.getBool("logit")) { - myInstance = new ROLogitCalculator(oc.getFloat("logit.beta"), oc.getFloat("logit.gamma"), oc.getFloat("logit.theta")); - } else { - myInstance = new ROGawronCalculator(oc.getFloat("gawron.beta"), oc.getFloat("gawron.a")); - } - } - return *myInstance; -} - - -void -ROCostCalculator::cleanup() { - delete myInstance; - myInstance = 0; -} - - -ROGawronCalculator::ROGawronCalculator(const SUMOReal beta, const SUMOReal a) - : myBeta(beta), myA(a) {} - - -ROGawronCalculator::~ROGawronCalculator() {} - - -void -ROGawronCalculator::setCosts(RORoute* route, const SUMOReal costs, const bool isActive) const { - if (isActive) { - route->setCosts(costs); - } else { - route->setCosts(myBeta * costs + ((SUMOReal) 1.0 - myBeta) * route->getCosts()); - } -} - - -void -ROGawronCalculator::calculateProbabilities(const ROVehicle* const /* veh */, std::vector alternatives) { - for (std::vector::iterator i = alternatives.begin(); i != alternatives.end() - 1; i++) { - RORoute* pR = *i; - for (std::vector::iterator j = i + 1; j != alternatives.end(); j++) { - RORoute* pS = *j; - // see [Gawron, 1998] (4.2) - const SUMOReal delta = - (pS->getCosts() - pR->getCosts()) / - (pS->getCosts() + pR->getCosts()); - // see [Gawron, 1998] (4.3a, 4.3b) - SUMOReal newPR = gawronF(pR->getProbability(), pS->getProbability(), delta); - SUMOReal newPS = pR->getProbability() + pS->getProbability() - newPR; - if (ISNAN(newPR) || ISNAN(newPS)) { - newPR = pS->getCosts() > pR->getCosts() - ? (SUMOReal) 1. : 0; - newPS = pS->getCosts() > pR->getCosts() - ? 0 : (SUMOReal) 1.; - } - newPR = MIN2((SUMOReal) MAX2(newPR, (SUMOReal) 0), (SUMOReal) 1); - newPS = MIN2((SUMOReal) MAX2(newPS, (SUMOReal) 0), (SUMOReal) 1); - pR->setProbability(newPR); - pS->setProbability(newPS); - } - } -} - - -SUMOReal -ROGawronCalculator::gawronF(const SUMOReal pdr, const SUMOReal pds, const SUMOReal x) const { - if (pdr * gawronG(myA, x) + pds == 0) { - return std::numeric_limits::max(); - } - return (pdr * (pdr + pds) * gawronG(myA, x)) / - (pdr * gawronG(myA, x) + pds); -} - - -SUMOReal -ROGawronCalculator::gawronG(const SUMOReal a, const SUMOReal x) const { - if (((1.0 - (x * x)) == 0)) { - return std::numeric_limits::max(); - } - return (SUMOReal) exp((a * x) / (1.0 - (x * x))); -} - - - - -ROLogitCalculator::ROLogitCalculator(const SUMOReal beta, const SUMOReal gamma, - const SUMOReal theta) - : myBeta(beta), myGamma(gamma), myTheta(theta) {} - - -ROLogitCalculator::~ROLogitCalculator() {} - - -void -ROLogitCalculator::setCosts(RORoute* route, const SUMOReal costs, const bool /* isActive */) const { - route->setCosts(costs); -} - - -void -ROLogitCalculator::calculateProbabilities(const ROVehicle* const veh, std::vector alternatives) { - const SUMOReal theta = myTheta >= 0 ? myTheta : getThetaForCLogit(alternatives); - const SUMOReal beta = myBeta >= 0 ? myBeta : getBetaForCLogit(alternatives); - if (beta > 0) { - // calculate commonalities - for (std::vector::const_iterator i = alternatives.begin(); i != alternatives.end(); i++) { - const RORoute* pR = *i; - SUMOReal lengthR = 0; - const std::vector& edgesR = pR->getEdgeVector(); - for (std::vector::const_iterator edge = edgesR.begin(); edge != edgesR.end(); ++edge) { - //@todo we should use costs here - lengthR += (*edge)->getTravelTime(veh, STEPS2TIME(veh->getDepartureTime())); - } - SUMOReal overlapSum = 0; - for (std::vector::const_iterator j = alternatives.begin(); j != alternatives.end(); j++) { - const RORoute* pS = *j; - SUMOReal overlapLength = 0.; - SUMOReal lengthS = 0; - const std::vector& edgesS = pS->getEdgeVector(); - for (std::vector::const_iterator edge = edgesS.begin(); edge != edgesS.end(); ++edge) { - lengthS += (*edge)->getTravelTime(veh, STEPS2TIME(veh->getDepartureTime())); - if (std::find(edgesR.begin(), edgesR.end(), *edge) != edgesR.end()) { - overlapLength += (*edge)->getTravelTime(veh, STEPS2TIME(veh->getDepartureTime())); - } - } - overlapSum += pow(overlapLength / sqrt(lengthR * lengthS), myGamma); - } - myCommonalities[pR] = beta * log(overlapSum); - } - } - for (std::vector::iterator i = alternatives.begin(); i != alternatives.end(); i++) { - RORoute* pR = *i; - SUMOReal weightedSum = 0; - for (std::vector::iterator j = alternatives.begin(); j != alternatives.end(); j++) { - RORoute* pS = *j; - weightedSum += exp(theta * (pR->getCosts() - pS->getCosts() + myCommonalities[pR] - myCommonalities[pS])); - } - pR->setProbability(1. / weightedSum); - } -} - - -SUMOReal -ROLogitCalculator::getBetaForCLogit(const std::vector alternatives) const { - SUMOReal min = std::numeric_limits::max(); - for (std::vector::const_iterator i = alternatives.begin(); i != alternatives.end(); i++) { - const SUMOReal cost = (*i)->getCosts() / 3600.; - if (cost < min) { - min = cost; - } - } - return min; -} - - -SUMOReal -ROLogitCalculator::getThetaForCLogit(const std::vector alternatives) const { - // @todo this calculation works for travel times only - SUMOReal sum = 0.; - SUMOReal diff = 0.; - SUMOReal min = std::numeric_limits::max(); - for (std::vector::const_iterator i = alternatives.begin(); i != alternatives.end(); i++) { - const SUMOReal cost = (*i)->getCosts() / 3600.; - sum += cost; - if (cost < min) { - min = cost; - } - } - const SUMOReal meanCost = sum / SUMOReal(alternatives.size()); - for (std::vector::const_iterator i = alternatives.begin(); i != alternatives.end(); i++) { - diff += pow((*i)->getCosts() / 3600. - meanCost, 2); - } - const SUMOReal cvCost = sqrt(diff / SUMOReal(alternatives.size())) / meanCost; - // @todo re-evaluate function -// if (cvCost > 0.04) { // Magic numbers from Lohse book - return M_PI / (sqrt(6.) * cvCost * (min + 1.1)) / 3600.; -// } -// return 1./3600.; -} - - -/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROCostCalculator.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROCostCalculator.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROCostCalculator.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROCostCalculator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,185 +0,0 @@ -/****************************************************************************/ -/// @file ROCostCalculator.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date Sept 2002 -/// @version $Id: ROCostCalculator.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Calculators for route costs and probabilities -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef ROCostCalculator_h -#define ROCostCalculator_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class RORoute; -class ROVehicle; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class ROCostCalculator - * @brief Abstract base class providing static factory method. - */ -class ROCostCalculator { -public: - static ROCostCalculator& getCalculator(); - - static void cleanup(); - - virtual void setCosts(RORoute* route, const SUMOReal costs, const bool isActive = false) const = 0; - - /** @brief calculate the probabilities in the logit model */ - virtual void calculateProbabilities(const ROVehicle* const veh, std::vector alternatives) = 0; - - unsigned int getMaxRouteNumber() const { - return myMaxRouteNumber; - } - - bool keepRoutes() const { - return myKeepRoutes; - } - - bool skipRouteCalculation() const { - return mySkipRouteCalculation; - } - -protected: - /// @brief Constructor - ROCostCalculator(); - - /// @brief Destructor - virtual ~ROCostCalculator(); - -private: - static ROCostCalculator* myInstance; - - /// @brief The maximum route alternatives number - unsigned int myMaxRouteNumber; - - /// @brief Information whether all routes should be saved - bool myKeepRoutes; - - /// @brief Information whether new routes should be calculated - bool mySkipRouteCalculation; - -}; - - -/** - * @class ROGawronCalculator - * @brief Cost calculation with Gawron's method. - */ -class ROGawronCalculator : public ROCostCalculator { -public: - /// Constructor - ROGawronCalculator(const SUMOReal beta, const SUMOReal a); - - /// Destructor - virtual ~ROGawronCalculator(); - - void setCosts(RORoute* route, const SUMOReal costs, const bool isActive = false) const; - - /** @brief calculate the probabilities */ - void calculateProbabilities(const ROVehicle* const veh, std::vector alternatives); - -private: - /** @brief Performs the gawron - f() function - From "Dynamic User Equilibria..." */ - SUMOReal gawronF(const SUMOReal pdr, const SUMOReal pds, const SUMOReal x) const; - - /** @brief Performs the gawron - g() function - From "Dynamic User Equilibria..." */ - SUMOReal gawronG(const SUMOReal a, const SUMOReal x) const; - -private: - /// @brief gawron beta - value - const SUMOReal myBeta; - - /// @brief gawron a - value - const SUMOReal myA; - -private: - /** @brief invalidated assignment operator */ - ROGawronCalculator& operator=(const ROGawronCalculator& s); - -}; - - -/** - * @class ROLogitCalculator - * @brief Cost calculation with c-logit or logit method. - */ -class ROLogitCalculator : public ROCostCalculator { -public: - /// Constructor - ROLogitCalculator(const SUMOReal beta, const SUMOReal gamma, - const SUMOReal theta); - - /// Destructor - virtual ~ROLogitCalculator(); - - void setCosts(RORoute* route, const SUMOReal costs, const bool isActive = false) const; - - /** @brief calculate the probabilities in the logit model */ - void calculateProbabilities(const ROVehicle* const veh, std::vector alternatives); - -private: - /** @brief calculate the scaling factor in the logit model */ - SUMOReal getBetaForCLogit(const std::vector alternatives) const; - - /** @brief calculate the scaling factor in the logit model */ - SUMOReal getThetaForCLogit(const std::vector alternatives) const; - -private: - /// @brief logit beta - value - const SUMOReal myBeta; - - /// @brief logit gamma - value - const SUMOReal myGamma; - - /// @brief logit theta - value - const SUMOReal myTheta; - - /// @brief The route commonality factors for c-logit - std::map myCommonalities; - -private: - /** @brief invalidated assignment operator */ - ROLogitCalculator& operator=(const ROLogitCalculator& s); - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROEdge.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROEdge.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROEdge.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROEdge.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,15 @@ /// @author Jakob Erdmann /// @author Christian Roessel /// @author Michael Behrisch +/// @author Melanie Knocke +/// @author Yun-Pang Floetteroed /// @date Sept 2002 -/// @version $Id: ROEdge.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROEdge.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // A basic edge for routing applications /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -39,9 +41,9 @@ #include "ROLane.h" #include "ROEdge.h" #include "ROVehicle.h" -#include -#include -#include +#include +#include +#include #ifdef CHECK_MEMORY_LEAKS #include @@ -56,7 +58,7 @@ bool ROEdge::myInterpolate = false; bool ROEdge::myHaveTTWarned = false; bool ROEdge::myHaveEWarned = false; -std::vector ROEdge::myEdges; +ROEdgeVector ROEdge::myEdges; // =========================================================================== @@ -64,10 +66,12 @@ // =========================================================================== ROEdge::ROEdge(const std::string& id, RONode* from, RONode* to, unsigned int index, const int priority) : Named(id), myFromNode(from), myToNode(to), myIndex(index), myPriority(priority), - mySpeed(-1), myLength(-1), + mySpeed(-1), myLength(0), myUsingTTTimeLine(false), myUsingETimeLine(false), - myCombinedPermissions(0) { + myCombinedPermissions(0), + myFromJunction(0), + myToJunction(0) { while (myEdges.size() <= index) { myEdges.push_back(0); } @@ -84,10 +88,9 @@ void ROEdge::addLane(ROLane* lane) { - SUMOReal length = lane->getLength(); - assert(myLength == -1 || length == myLength); - myLength = length; - SUMOReal speed = lane->getSpeed(); + assert(myLanes.empty() || lane->getLength() == myLength); + myLength = lane->getLength(); + const SUMOReal speed = lane->getSpeed(); mySpeed = speed > mySpeed ? speed : mySpeed; myLanes.push_back(lane); @@ -97,12 +100,10 @@ void -ROEdge::addFollower(ROEdge* s, std::string) { +ROEdge::addSuccessor(ROEdge* s, std::string) { if (find(myFollowingEdges.begin(), myFollowingEdges.end(), s) == myFollowingEdges.end()) { myFollowingEdges.push_back(s); -#ifdef HAVE_INTERNAL // catchall for internal stuff s->myApproachingEdges.push_back(this); -#endif } } @@ -125,7 +126,7 @@ ROEdge::getEffort(const ROVehicle* const veh, SUMOReal time) const { SUMOReal ret = 0; if (!getStoredEffort(time, ret)) { - return (SUMOReal)(myLength / MIN2(veh->getType()->maxSpeed, mySpeed)); + return myLength / MIN2(veh->getType()->maxSpeed, mySpeed); } return ret; } @@ -144,119 +145,33 @@ SUMOReal ROEdge::getTravelTime(const ROVehicle* const veh, SUMOReal time) const { - return getTravelTime(veh->getType()->maxSpeed, time); -} - - -SUMOReal -ROEdge::getTravelTime(const SUMOReal maxSpeed, SUMOReal time) const { - return MAX2(myLength / maxSpeed, getTravelTime(time)); -} - - -SUMOReal -ROEdge::getTravelTime(SUMOReal time) const { if (myUsingTTTimeLine) { - if (!myHaveTTWarned && !myTravelTimes.describesTime(time)) { - WRITE_WARNING("No interval matches passed time " + toString(time) + " in edge '" + myID + "'.\n Using edge's length / edge's speed."); - myHaveTTWarned = true; - } - if (myInterpolate) { - SUMOReal inTT = myTravelTimes.getValue(time); - SUMOReal split = (SUMOReal)(myTravelTimes.getSplitTime(time, time + (SUMOTime)inTT) - time); - if (split >= 0) { - return myTravelTimes.getValue(time + (SUMOTime)inTT) * ((SUMOReal)1. - split / inTT) + split; + if (myTravelTimes.describesTime(time)) { + SUMOReal lineTT = myTravelTimes.getValue(time); + if (myInterpolate) { + const SUMOReal inTT = lineTT; + const SUMOReal split = (SUMOReal)(myTravelTimes.getSplitTime(time, time + inTT) - time); + if (split >= 0) { + lineTT = myTravelTimes.getValue(time + inTT) * ((SUMOReal)1. - split / inTT) + split; + } + } + return MAX2(getMinimumTravelTime(veh), lineTT); + } else { + if (!myHaveTTWarned) { + WRITE_WARNING("No interval matches passed time " + toString(time) + " in edge '" + myID + "'.\n Using edge's length / max speed."); + myHaveTTWarned = true; } } - return myTravelTimes.getValue(time); } - return myLength / mySpeed; -} - - -SUMOReal -ROEdge::getMinimumTravelTime(const ROVehicle* const veh) const { - return (SUMOReal)(myLength / MIN2(veh->getType()->maxSpeed, mySpeed)); + return myLength / MIN2(veh->getType()->maxSpeed, veh->getType()->speedFactor * mySpeed); } SUMOReal -ROEdge::getCOEffort(const ROVehicle* const veh, SUMOReal time) const { +ROEdge::getNoiseEffort(const ROEdge* const edge, const ROVehicle* const veh, SUMOReal time) { SUMOReal ret = 0; - if (!getStoredEffort(time, ret)) { - const SUMOReal vMax = MIN2(veh->getType()->maxSpeed, mySpeed); - const SUMOReal accel = veh->getType()->get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL) * veh->getType()->get(SUMO_ATTR_SIGMA, DEFAULT_VEH_SIGMA) / 2.; - ret = HelpersHBEFA::computeDefaultCO(veh->getType()->emissionClass, vMax, accel, getTravelTime(veh, time)); - } - return ret; -} - - -SUMOReal -ROEdge::getCO2Effort(const ROVehicle* const veh, SUMOReal time) const { - SUMOReal ret = 0; - if (!getStoredEffort(time, ret)) { - const SUMOReal vMax = MIN2(veh->getType()->maxSpeed, mySpeed); - const SUMOReal accel = veh->getType()->get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL) * veh->getType()->get(SUMO_ATTR_SIGMA, DEFAULT_VEH_SIGMA) / 2.; - ret = HelpersHBEFA::computeDefaultCO2(veh->getType()->emissionClass, vMax, accel, getTravelTime(veh, time)); - } - return ret; -} - - -SUMOReal -ROEdge::getPMxEffort(const ROVehicle* const veh, SUMOReal time) const { - SUMOReal ret = 0; - if (!getStoredEffort(time, ret)) { - const SUMOReal vMax = MIN2(veh->getType()->maxSpeed, mySpeed); - const SUMOReal accel = veh->getType()->get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL) * veh->getType()->get(SUMO_ATTR_SIGMA, DEFAULT_VEH_SIGMA) / 2.; - ret = HelpersHBEFA::computeDefaultPMx(veh->getType()->emissionClass, vMax, accel, getTravelTime(veh, time)); - } - return ret; -} - - -SUMOReal -ROEdge::getHCEffort(const ROVehicle* const veh, SUMOReal time) const { - SUMOReal ret = 0; - if (!getStoredEffort(time, ret)) { - const SUMOReal vMax = MIN2(veh->getType()->maxSpeed, mySpeed); - const SUMOReal accel = veh->getType()->get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL) * veh->getType()->get(SUMO_ATTR_SIGMA, DEFAULT_VEH_SIGMA) / 2.; - ret = HelpersHBEFA::computeDefaultHC(veh->getType()->emissionClass, vMax, accel, getTravelTime(veh, time)); - } - return ret; -} - - -SUMOReal -ROEdge::getNOxEffort(const ROVehicle* const veh, SUMOReal time) const { - SUMOReal ret = 0; - if (!getStoredEffort(time, ret)) { - const SUMOReal vMax = MIN2(veh->getType()->maxSpeed, mySpeed); - const SUMOReal accel = veh->getType()->get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL) * veh->getType()->get(SUMO_ATTR_SIGMA, DEFAULT_VEH_SIGMA) / 2.; - ret = HelpersHBEFA::computeDefaultNOx(veh->getType()->emissionClass, vMax, accel, getTravelTime(veh, time)); - } - return ret; -} - - -SUMOReal -ROEdge::getFuelEffort(const ROVehicle* const veh, SUMOReal time) const { - SUMOReal ret = 0; - if (!getStoredEffort(time, ret)) { - const SUMOReal vMax = MIN2(veh->getType()->maxSpeed, mySpeed); - const SUMOReal accel = veh->getType()->get(SUMO_ATTR_ACCEL, DEFAULT_VEH_ACCEL) * veh->getType()->get(SUMO_ATTR_SIGMA, DEFAULT_VEH_SIGMA) / 2.; - ret = HelpersHBEFA::computeDefaultFuel(veh->getType()->emissionClass, vMax, accel, getTravelTime(veh, time)); - } - return ret; -} - - -SUMOReal -ROEdge::getNoiseEffort(const ROVehicle* const veh, SUMOReal time) const { - SUMOReal ret = 0; - if (!getStoredEffort(time, ret)) { - const SUMOReal v = MIN2(veh->getType()->maxSpeed, mySpeed); + if (!edge->getStoredEffort(time, ret)) { + const SUMOReal v = MIN2(veh->getType()->maxSpeed, edge->mySpeed); ret = HelpersHarmonoise::computeNoise(veh->getType()->emissionClass, v, 0); } return ret; @@ -289,7 +204,7 @@ unsigned int -ROEdge::getNoFollowing() const { +ROEdge::getNumSuccessors() const { if (getType() == ET_SINK) { return 0; } @@ -297,15 +212,13 @@ } -#ifdef HAVE_INTERNAL // catchall for internal stuff unsigned int -ROEdge::getNumApproaching() const { +ROEdge::getNumPredecessors() const { if (getType() == ET_SOURCE) { return 0; } return (unsigned int) myApproachingEdges.size(); } -#endif void @@ -317,37 +230,37 @@ void ROEdge::buildTimeLines(const std::string& measure) { if (myUsingETimeLine) { - SUMOReal value = (SUMOReal)(myLength / mySpeed); + SUMOReal value = myLength / mySpeed; + const SUMOEmissionClass c = PollutantsInterface::getClassByName("unknown"); if (measure == "CO") { - value = HelpersHBEFA::computeCO(SVE_UNKNOWN, mySpeed, 0) * value; + value = PollutantsInterface::compute(c, PollutantsInterface::CO, mySpeed, 0, 0) * value; // @todo: give correct slope } if (measure == "CO2") { - value = HelpersHBEFA::computeCO2(SVE_UNKNOWN, mySpeed, 0) * value; + value = PollutantsInterface::compute(c, PollutantsInterface::CO2, mySpeed, 0, 0) * value; // @todo: give correct slope } if (measure == "HC") { - value = HelpersHBEFA::computeHC(SVE_UNKNOWN, mySpeed, 0) * value; + value = PollutantsInterface::compute(c, PollutantsInterface::HC, mySpeed, 0, 0) * value; // @todo: give correct slope } if (measure == "PMx") { - value = HelpersHBEFA::computePMx(SVE_UNKNOWN, mySpeed, 0) * value; + value = PollutantsInterface::compute(c, PollutantsInterface::PM_X, mySpeed, 0, 0) * value; // @todo: give correct slope } if (measure == "NOx") { - value = HelpersHBEFA::computeNOx(SVE_UNKNOWN, mySpeed, 0) * value; + value = PollutantsInterface::compute(c, PollutantsInterface::NO_X, mySpeed, 0, 0) * value; // @todo: give correct slope } if (measure == "fuel") { - value = HelpersHBEFA::computeFuel(SVE_UNKNOWN, mySpeed, 0) * value; + value = PollutantsInterface::compute(c, PollutantsInterface::FUEL, mySpeed, 0, 0) * value; // @todo: give correct slope } myEfforts.fillGaps(value, myUseBoundariesOnOverrideE); } if (myUsingTTTimeLine) { - SUMOReal value = (SUMOReal)(myLength / mySpeed); - myTravelTimes.fillGaps(value, myUseBoundariesOnOverrideTT); + myTravelTimes.fillGaps(myLength / mySpeed, myUseBoundariesOnOverrideTT); } } bool ROEdge::allFollowersProhibit(const ROVehicle* const vehicle) const { - for (std::vector::const_iterator i = myFollowingEdges.begin(); i != myFollowingEdges.end(); ++i) { + for (ROEdgeVector::const_iterator i = myFollowingEdges.begin(); i != myFollowingEdges.end(); ++i) { if (!(*i)->prohibits(vehicle)) { return false; } @@ -363,6 +276,44 @@ } +const ROEdgeVector& +ROEdge::getSuccessors(SUMOVehicleClass vClass) const { + if (vClass == SVC_IGNORING) { + return myFollowingEdges; + } + ClassesSuccesorMap::const_iterator i = myClassesSuccessorMap.find(vClass); + if (i != myClassesSuccessorMap.end()) { + // can use cached value + return i->second; + } else { + // this vClass is requested for the first time. rebuild all succesors + std::set followers; + for (std::vector::const_iterator it = myLanes.begin(); it != myLanes.end(); ++it) { + ROLane* lane = *it; + if ((lane->getPermissions() & vClass) != 0) { + const std::vector& outgoing = lane->getOutgoingLanes(); + for (std::vector::const_iterator it2 = outgoing.begin(); it2 != outgoing.end(); ++it2) { + const ROLane* next = *it2; + if ((next->getPermissions() & vClass) != 0) { + followers.insert(&next->getEdge()); + } + } + } + } + myClassesSuccessorMap[vClass].insert(myClassesSuccessorMap[vClass].begin(), + followers.begin(), followers.end()); + return myClassesSuccessorMap[vClass]; + } + +} + + +bool +ROEdge::isConnectedTo(const ROEdge* const e, const ROVehicle* const vehicle) const { + const SUMOVehicleClass vClass = (vehicle == 0 ? SVC_IGNORING : vehicle->getVClass()); + const ROEdgeVector& followers = getSuccessors(vClass); + return std::find(followers.begin(), followers.end(), e) != followers.end(); +} /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROEdge.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROEdge.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROEdge.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROEdge.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,15 @@ /// @author Jakob Erdmann /// @author Christian Roessel /// @author Michael Behrisch +/// @author Melanie Knocke +/// @author Yun-Pang Floetteroed /// @date Sept 2002 -/// @version $Id: ROEdge.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROEdge.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A basic edge for routing applications /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -38,9 +40,11 @@ #include #include #include +#include #include #include -#include +#include +#include #include "RONode.h" #include "ROVehicle.h" @@ -49,8 +53,10 @@ // class declarations // =========================================================================== class ROLane; -class ROVehicle; +class ROEdge; +typedef std::vector ROEdgeVector; +typedef std::vector ConstROEdgeVector; // =========================================================================== // class definitions @@ -78,7 +84,13 @@ /// @brief An edge where vehicles are inserted at (no vehicle may come from back) ET_SOURCE, /// @brief An edge where vehicles disappear (no vehicle may leave this edge) - ET_SINK + ET_SINK, + /// @brief An internal edge which models walking areas for pedestrians + ET_WALKINGAREA, + /// @brief An internal edge which models pedestrian crossings + ET_CROSSING, + /// @brief An internal edge which models vehicles driving across a junction. This is currently not used for routing + ET_INTERNAL }; @@ -112,12 +124,11 @@ /** @brief Adds information about a connected edge * - * The edge is added to "myFollowingEdges". + * The edge s is added to "myFollowingEdges" and this edge is added as predecessor to s. * @param[in] s The edge to add * @todo What about vehicle-type aware connections? - * @note: if HAVE_INTERNAL is defined, the backward connections is added as well */ - virtual void addFollower(ROEdge* s, std::string dir = ""); + virtual void addSuccessor(ROEdge* s, std::string dir = ""); /** @brief Sets the type of te edge @@ -125,6 +136,20 @@ */ void setType(EdgeType type); + /// @brief return whether this edge is an internal edge + inline bool isInternal() const { + return myType == ET_INTERNAL; + } + + /// @brief return whether this edge is a pedestrian crossing + inline bool isCrossing() const { + return myType == ET_CROSSING; + } + + /// @brief return whether this edge is walking area + inline bool isWalkingArea() const { + return myType == ET_WALKINGAREA; + } /** @brief Builds the internal representation of the travel time/effort * @@ -202,11 +227,10 @@ /** @brief returns the information whether this edge is directly connected to the given * * @param[in] e The edge which may be connected + * @param[in] vehicle The vehicle for which the connectivity is checked * @return Whether the given edge is a direct successor to this one */ - bool isConnectedTo(const ROEdge* const e) const { - return std::find(myFollowingEdges.begin(), myFollowingEdges.end(), e) != myFollowingEdges.end(); - } + bool isConnectedTo(const ROEdge* const e, const ROVehicle* const vehicle) const; /** @brief Returns whether this edge prohibits the given vehicle to pass it @@ -223,7 +247,7 @@ } - /** @brief Returns whether this edge succeding edges prohibit the given vehicle to pass them + /** @brief Returns whether this edge succeeding edges prohibit the given vehicle to pass them * @param[in] vehicle The vehicle for which the information has to be returned * @return Whether the vehicle may continue its route on any of the following edges */ @@ -260,37 +284,40 @@ * * @return The number of edges following this edge */ - unsigned int getNoFollowing() const; + unsigned int getNumSuccessors() const; - /** @brief Returns the edge at the given position from the list of reachable edges - * @param[in] pos The position of the list within the list of following - * @return The following edge, stored at position pos + /** @brief Returns the following edges */ - ROEdge* getFollower(unsigned int pos) const { - return myFollowingEdges[pos]; + const ROEdgeVector& getSuccessors() const { + return myFollowingEdges; } -#ifdef HAVE_INTERNAL // catchall for internal stuff - /** @brief Returns the number of edges this edge is connected to + /** @brief Returns the following edges, restricted by vClass + * @param[in] vClass The vClass for which to restrict the successors + * @return The eligible following edges + */ + const ROEdgeVector& getSuccessors(SUMOVehicleClass vClass) const; + + + /** @brief Returns the number of edges connected to this edge * * If this edge's type is set to "source", 0 is returned, otherwise * the number of edges stored in "myApproachingEdges". * - * @return The number of edges following this edge + * @return The number of edges reaching into this edge */ - unsigned int getNumApproaching() const; + unsigned int getNumPredecessors() const; - /** @brief Returns the edge at the given position from the list of reachable edges - * @param[in] pos The position of the list within the list of approached - * @return The following edge, stored at position pos + /** @brief Returns the edge at the given position from the list of incoming edges + * @param[in] pos The position of the list within the list of incoming + * @return The incoming edge, stored at position pos */ - ROEdge* getApproaching(unsigned int pos) const { - return myApproachingEdges[pos]; + const ROEdgeVector& getPredecessors() const { + return myApproachingEdges; } -#endif /** @brief Returns the effort for this edge @@ -305,37 +332,62 @@ /** @brief Returns the travel time for this edge * + * @param[in] veh The vehicle for which the travel time on this edge shall be retrieved + * @param[in] time The time for which the travel time shall be returned [s] + * @return The travel time needed by the given vehicle to pass the edge at the given time + */ + SUMOReal getTravelTime(const ROVehicle* const veh, SUMOReal time) const; + + + /** @brief Returns the effort for the given edge + * + * @param[in] edge The edge for which the effort shall be retrieved * @param[in] veh The vehicle for which the effort on this edge shall be retrieved * @param[in] time The time for which the effort shall be returned [s] - * @return The traveltime needed by the given vehicle to pass the edge at the given time + * @return The effort needed by the given vehicle to pass the edge at the given time + * @todo Recheck whether the vehicle's maximum speed is considered */ - SUMOReal getTravelTime(const ROVehicle* const veh, SUMOReal time) const; + static inline SUMOReal getEffortStatic(const ROEdge* const edge, const ROVehicle* const veh, SUMOReal time) { + return edge->getEffort(veh, time); + } - /** @brief Returns the travel time for this edge + /** @brief Returns the travel time for the given edge * - * @param[in] maxSpeed The maximum speed to assume if no travel times are stored - * @param[in] time The time in seconds(!) for which the traveltime shall be returned - * @return The traveltime needed to pass the edge at the given time + * @param[in] edge The edge for which the travel time shall be retrieved + * @param[in] veh The vehicle for which the travel time on this edge shall be retrieved + * @param[in] time The time for which the travel time shall be returned [s] + * @return The traveltime needed by the given vehicle to pass the edge at the given time */ - SUMOReal getTravelTime(const SUMOReal maxSpeed, SUMOReal time) const; + static inline SUMOReal getTravelTimeStatic(const ROEdge* const edge, const ROVehicle* const veh, SUMOReal time) { + return edge->getTravelTime(veh, time); + } - /** @brief Returns the travel time for this edge without using any stored timeLine + /** @brief Returns a lower bound for the travel time on this edge without using any stored timeLine * * @param[in] veh The vehicle for which the effort on this edge shall be retrieved * @param[in] time The time for which the effort shall be returned [s] */ - SUMOReal getMinimumTravelTime(const ROVehicle* const veh) const; + inline SUMOReal getMinimumTravelTime(const ROVehicle* const veh) const { + return myLength / MIN2(veh->getType()->maxSpeed, veh->getChosenSpeedFactor() * mySpeed); + } + + template + static SUMOReal getEmissionEffort(const ROEdge* const edge, const ROVehicle* const veh, SUMOReal time) { + SUMOReal ret = 0; + if (!edge->getStoredEffort(time, ret)) { + const SUMOVTypeParameter* const type = veh->getType(); + const SUMOReal vMax = MIN2(type->maxSpeed, edge->mySpeed); + const SUMOReal accel = type->get(SUMO_ATTR_ACCEL, SUMOVTypeParameter::getDefaultAccel(type->vehicleClass)) * type->get(SUMO_ATTR_SIGMA, SUMOVTypeParameter::getDefaultImperfection(type->vehicleClass)) / 2.; + ret = PollutantsInterface::computeDefault(type->emissionClass, ET, vMax, accel, 0, edge->getTravelTime(veh, time)); // @todo: give correct slope + } + return ret; + } - SUMOReal getCOEffort(const ROVehicle* const veh, SUMOReal time) const; - SUMOReal getCO2Effort(const ROVehicle* const veh, SUMOReal time) const; - SUMOReal getPMxEffort(const ROVehicle* const veh, SUMOReal time) const; - SUMOReal getHCEffort(const ROVehicle* const veh, SUMOReal time) const; - SUMOReal getNOxEffort(const ROVehicle* const veh, SUMOReal time) const; - SUMOReal getFuelEffort(const ROVehicle* const veh, SUMOReal time) const; - SUMOReal getNoiseEffort(const ROVehicle* const veh, SUMOReal time) const; + + static SUMOReal getNoiseEffort(const ROEdge* const edge, const ROVehicle* const veh, SUMOReal time); //@} @@ -365,6 +417,27 @@ return myPriority; } + const RONode* getFromJunction() const { + return myFromJunction; + } + + const RONode* getToJunction() const { + return myToJunction; + } + + + void setJunctions(RONode* from, RONode* to) { + myFromJunction = from; + myToJunction = to; + } + + /** @brief Returns this edge's lanes + * + * @return This edge's lanes + */ + const std::vector& getLanes() const { + return myLanes; + } protected: /** @brief Retrieves the stored effort * @@ -416,12 +489,10 @@ static bool myHaveTTWarned; /// @brief List of edges that may be approached from this edge - std::vector myFollowingEdges; + ROEdgeVector myFollowingEdges; -#ifdef HAVE_INTERNAL // catchall for internal stuff /// @brief List of edges that approached this edge - std::vector myApproachingEdges; -#endif + ROEdgeVector myApproachingEdges; /// @brief The type of the edge EdgeType myType; @@ -432,17 +503,15 @@ /// @brief The list of allowed vehicle classes combined across lanes SVCPermissions myCombinedPermissions; - static std::vector myEdges; - + static ROEdgeVector myEdges; -private: - /** @brief Returns the minimum travel time for this edge - * If there is a timeline-value for the given time it is returned, otherwise - * the maximum speed of the edge is assumed - * @param[in] veh The vehicle for which the traveltime on this edge shall be retrieved - * @return The minimum traveltime needed to pass the edge at the given time - */ - SUMOReal getTravelTime(SUMOReal time) const; + /// @brief the junctions for this edge + RONode* myFromJunction; + RONode* myToJunction; + + /// @brief The successors available for a given vClass + typedef std::map ClassesSuccesorMap; + mutable ClassesSuccesorMap myClassesSuccessorMap; private: /// @brief Invalidated copy constructor diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROFrame.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROFrame.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROFrame.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROFrame.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: ROFrame.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROFrame.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for routing /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -65,9 +66,11 @@ oc.addSynonyme("net-file", "net"); oc.addDescription("net-file", "Input", "Use FILE as SUMO-network to route on"); - oc.doRegister("taz-files", 'd', new Option_FileName()); - oc.addSynonyme("taz-files", "districts", true); - oc.addDescription("taz-files", "Input", "Read (additional) districts from FILE"); + oc.doRegister("additional-files", 'd', new Option_FileName()); + oc.addSynonyme("additional-files", "additional"); + oc.addSynonyme("additional-files", "taz-files"); + oc.addSynonyme("additional-files", "districts", true); + oc.addDescription("additional-files", "Input", "Read additional network data (districts, bus stops) from FILE"); oc.doRegister("alternative-files", 'a', new Option_FileName()); oc.addSynonyme("alternative-files", "alternatives-files"); @@ -90,6 +93,9 @@ oc.doRegister("weight-attribute", 'x', new Option_String("traveltime")); oc.addSynonyme("weight-attribute", "measure", true); oc.addDescription("weight-attribute", "Input", "Name of the xml attribute which gives the edge weight"); + + oc.doRegister("phemlight-path", new Option_FileName("./PHEMlight/")); + oc.addDescription("phemlight-path", "Input", "Determines where to load PHEMlight definitions from."); } // register the time settings @@ -108,6 +114,9 @@ oc.addSynonyme("unsorted-input", "unsorted"); oc.addDescription("unsorted-input", "Processing", "Assume input is unsorted"); + oc.doRegister("route-steps", 's', new Option_String("200", "TIME")); + oc.addDescription("route-steps", "Processing", "Load routes for the next number of seconds ahead"); + oc.doRegister("randomize-flows", new Option_Bool(false)); oc.addDescription("randomize-flows", "Processing", "generate random departure times for flow input"); @@ -129,20 +138,17 @@ if (forDuarouter) { oc.doRegister("routing-algorithm", new Option_String("dijkstra")); - oc.addDescription("routing-algorithm", "Processing", -#ifndef HAVE_INTERNAL // catchall for internal stuff - "Select among routing algorithms ['dijkstra', 'astar']" -#else - "Select among routing algorithms ['dijkstra', 'astar', 'bulkstar', 'CH', 'CHWrapper']" -#endif - ); + oc.addDescription("routing-algorithm", "Processing", "Select among routing algorithms ['dijkstra', 'astar', 'bulkstar', 'CH', 'CHWrapper']"); -#ifdef HAVE_INTERNAL // catchall for internal stuff oc.doRegister("weight-period", new Option_String("3600", "TIME")); - oc.addDescription("weight-period", "Processing", "Aggregation period for the given weight files; triggers rebuilding of Contraction Hirarchy"); -#endif + oc.addDescription("weight-period", "Processing", "Aggregation period for the given weight files; triggers rebuilding of Contraction Hierarchy"); } +#ifdef HAVE_FOX + oc.doRegister("routing-threads", new Option_Integer(0)); + oc.addDescription("routing-threads", "Processing", "The number of parallel execution threads used for routing"); +#endif + // register defaults options oc.doRegister("departlane", new Option_String()); oc.addDescription("departlane", "Defaults", "Assigns a default depart lane"); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROFrame.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROFrame.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROFrame.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROFrame.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: ROFrame.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROFrame.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Sets and checks options for routing /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROHelper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROHelper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROHelper.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROHelper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: ROHelper.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROHelper.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Some helping methods for router /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -41,7 +41,9 @@ namespace ROHelper { void -recheckForLoops(std::vector& edges) { +recheckForLoops(ConstROEdgeVector& edges) { + // XXX check for stops, departLane, departPos, departSpeed, .... + // remove loops at the route's begin // (vehicle makes a turnaround to get into the right direction at an already passed node) RONode* start = edges[0]->getFromNode(); @@ -66,9 +68,23 @@ if (firstEnd < edges.size() - 1) { edges.erase(edges.begin() + firstEnd + 2, edges.end()); } - // remove loops within the route + + // removal of edge loops within the route (edge occurs twice) + std::map lastOccurence; // index of the last occurence of this edge + for (size_t ii = 0; ii < edges.size(); ++ii) { + std::map::iterator it_pre = lastOccurence.find(edges[ii]); + if (it_pre != lastOccurence.end()) { + edges.erase(edges.begin() + it_pre->second, edges.begin() + ii); + ii = it_pre->second; + } else { + lastOccurence[edges[ii]] = ii; + } + } + + // removal of node loops (node occurs twice) is not done because these may occur legitimately + /* std::vector nodes; - for (std::vector::iterator i = edges.begin(); i != edges.end(); ++i) { + for (ConstROEdgeVector::iterator i = edges.begin(); i != edges.end(); ++i) { nodes.push_back((*i)->getFromNode()); } nodes.push_back(edges.back()->getToNode()); @@ -86,7 +102,6 @@ } } } while (changed); - /* */ } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROHelper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROHelper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROHelper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROHelper.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: ROHelper.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROHelper.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Some helping methods for router /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -67,10 +67,10 @@ * @todo Check whether both vehicles can be const */ bool operator()(ROVehicle* veh1, ROVehicle* veh2) const { - if (veh1->getDepartureTime() == veh2->getDepartureTime()) { + if (veh1->getDepart() == veh2->getDepart()) { return veh1->getID() > veh2->getID(); } - return veh1->getDepartureTime() > veh2->getDepartureTime(); + return veh1->getDepart() > veh2->getDepart(); } }; @@ -84,7 +84,7 @@ * * @param[in] edges The list of edges to remove loops from */ -void recheckForLoops(std::vector& edges); +void recheckForLoops(ConstROEdgeVector& edges); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROLane.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROLane.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROLane.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROLane.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: ROLane.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROLane.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A single lane the router may use /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,6 +34,7 @@ #include #include #include +#include "ROEdge.h" // =========================================================================== @@ -57,8 +58,8 @@ * @param[in] maxSpeed The maximum speed allowed on the lane * @param[in] permissions Vehicle classes that may pass this lane */ - ROLane(const std::string& id, SUMOReal length, SUMOReal maxSpeed, SVCPermissions permissions) : - Named(id), myLength(length), myMaxSpeed(maxSpeed), myPermissions(permissions) + ROLane(const std::string& id, ROEdge* edge, SUMOReal length, SUMOReal maxSpeed, SVCPermissions permissions) : + Named(id), myEdge(edge), myLength(length), myMaxSpeed(maxSpeed), myPermissions(permissions) {} @@ -85,12 +86,39 @@ /** @brief Returns the list of allowed vehicle classes * @return The list of vehicle classes allowed on this lane */ - inline SVCPermissions getPermissions() { + inline SVCPermissions getPermissions() const { return myPermissions; } + /** @brief Returns the lane's edge + * @return This lane's edge + */ + ROEdge& getEdge() const { + return *myEdge; + } + + /// @brief get the list of outgoing lanes + const std::vector& getOutgoingLanes() const { + return myOutgoingLanes; + } + + void addOutgoingLane(ROLane* lane) { + myOutgoingLanes.push_back(lane); + } + + /// @brief get the state of the link from the logical predecessor to this lane (ignored for routing) + inline LinkState getIncomingLinkState() const { + return LINKSTATE_MAJOR; + } + + inline bool allowsVehicleClass(SUMOVehicleClass vclass) const { + return (myPermissions & vclass) == vclass; + } private: + /// @brief The parent edge of this lane + ROEdge* myEdge; + /// @brief The length of the lane SUMOReal myLength; @@ -100,6 +128,8 @@ /// @brief The encoding of allowed vehicle classes SVCPermissions myPermissions; + std::vector myOutgoingLanes; + private: /// @brief Invalidated copy constructor diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROLoader.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROLoader.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROLoader.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROLoader.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Christian Roessel /// @date Sept 2002 -/// @version $Id: ROLoader.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROLoader.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Loader for networks and route imports /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -54,10 +54,7 @@ #include "ROLoader.h" #include "ROEdge.h" #include "RORouteHandler.h" - -#ifdef HAVE_INTERNAL // catchall for internal stuff -#include -#endif // have HAVE_INTERNAL +#include "RORouteAggregator.h" #ifdef CHECK_MEMORY_LEAKS #include @@ -130,30 +127,36 @@ if (file == "") { throw ProcessError("Missing definition of network to load!"); } - if (!FileHelpers::exists(file)) { - throw ProcessError("The network file '" + file + "' could not be found."); + if (!FileHelpers::isReadable(file)) { + throw ProcessError("The network file '" + file + "' is not accessible."); } PROGRESS_BEGIN_MESSAGE("Loading net"); RONetHandler handler(toFill, eb); handler.setFileName(file); - if (!XMLSubSys::runParser(handler, file)) { + if (!XMLSubSys::runParser(handler, file, true)) { PROGRESS_FAILED_MESSAGE(); throw ProcessError(); } else { PROGRESS_DONE_MESSAGE(); } - if (myOptions.isSet("taz-files", false)) { // dfrouter does not register this option - file = myOptions.getString("taz-files"); - if (!FileHelpers::exists(file)) { - throw ProcessError("The districts file '" + file + "' could not be found."); - } - PROGRESS_BEGIN_MESSAGE("Loading districts"); - handler.setFileName(file); - if (!XMLSubSys::runParser(handler, file)) { - PROGRESS_FAILED_MESSAGE(); - throw ProcessError(); - } else { - PROGRESS_DONE_MESSAGE(); + if (!deprecatedVehicleClassesSeen.empty()) { + WRITE_WARNING("Deprecated vehicle classes '" + toString(deprecatedVehicleClassesSeen) + "' in input network."); + deprecatedVehicleClassesSeen.clear(); + } + if (myOptions.isSet("additional-files", false)) { // dfrouter does not register this option + std::vector files = myOptions.getStringVector("additional-files"); + for (std::vector::const_iterator fileIt = files.begin(); fileIt != files.end(); ++fileIt) { + if (!FileHelpers::isReadable(*fileIt)) { + throw ProcessError("The additional file '" + *fileIt + "' is not accessible."); + } + PROGRESS_BEGIN_MESSAGE("Loading additional file '" + *fileIt + "' "); + handler.setFileName(*fileIt); + if (!XMLSubSys::runParser(handler, *fileIt)) { + PROGRESS_FAILED_MESSAGE(); + throw ProcessError(); + } else { + PROGRESS_DONE_MESSAGE(); + } } } } @@ -162,8 +165,10 @@ void ROLoader::openRoutes(RONet& net) { // build loader + // load relevant elements from additinal file + bool ok = openTypedRoutes("additional-files", net); // load sumo-routes when wished - bool ok = openTypedRoutes("route-files", net); + ok &= openTypedRoutes("route-files", net); // load the XML-trip definitions when wished ok &= openTypedRoutes("trip-files", net); // load the sumo-alternative file when wished @@ -173,8 +178,12 @@ // check if (ok) { myLoaders.loadNext(string2time(myOptions.getString("begin"))); - if (!MsgHandler::getErrorInstance()->wasInformed() && !net.furtherStored()) { - throw ProcessError("No route input specified."); + if (!net.furtherStored()) { + if (MsgHandler::getErrorInstance()->wasInformed()) { + throw ProcessError(); + } else { + throw ProcessError("No route input specified or all routes were invalid."); + } } // skip routes prior to the begin time if (!myOptions.getBool("unsorted-input")) { @@ -185,22 +194,30 @@ void -ROLoader::processRoutes(SUMOTime start, SUMOTime end, +ROLoader::processRoutes(const SUMOTime start, const SUMOTime end, const SUMOTime increment, RONet& net, SUMOAbstractRouter& router) { - SUMOTime absNo = end - start; + const SUMOTime absNo = end - start; + const bool endGiven = !OptionsCont::getOptions().isDefault("end"); // skip routes that begin before the simulation's begin // loop till the end - bool endReached = false; - bool errorOccured = false; const SUMOTime firstStep = myLoaders.getFirstLoadTime(); SUMOTime lastStep = firstStep; - for (SUMOTime time = firstStep; time < end && !errorOccured && !endReached; time += DELTA_T) { - writeStats(time, start, absNo); + SUMOTime time = MIN2(firstStep, end); + while (time <= end) { + writeStats(time, start, absNo, endGiven); myLoaders.loadNext(time); - net.saveAndRemoveRoutesUntil(myOptions, router, time); - endReached = !net.furtherStored(); - lastStep = time; - errorOccured = MsgHandler::getErrorInstance()->wasInformed() && !myOptions.getBool("ignore-errors"); + if (!net.furtherStored() || MsgHandler::getErrorInstance()->wasInformed()) { + break; + } + lastStep = net.saveAndRemoveRoutesUntil(myOptions, router, time); + if ((!net.furtherStored() && myLoaders.haveAllLoaded()) || MsgHandler::getErrorInstance()->wasInformed()) { + break; + } + if (time < end && time + increment > end) { + time = end; + } else { + time += increment; + } } if (myLogSteps) { WRITE_MESSAGE("Routes found between time steps " + time2string(firstStep) + " and " + time2string(lastStep) + "."); @@ -208,15 +225,13 @@ } -#ifdef HAVE_INTERNAL // catchall for internal stuff void -ROLoader::processAllRoutesWithBulkRouter(SUMOTime start, SUMOTime end, +ROLoader::processAllRoutesWithBulkRouter(SUMOTime /* start */, SUMOTime end, RONet& net, SUMOAbstractRouter& router) { myLoaders.loadNext(SUMOTime_MAX); - RouteAggregator::processAllRoutes(net, router); + RORouteAggregator::processAllRoutes(net, router); net.saveAndRemoveRoutesUntil(myOptions, router, end); } -#endif bool @@ -298,10 +313,14 @@ void -ROLoader::writeStats(SUMOTime time, SUMOTime start, int absNo) { +ROLoader::writeStats(SUMOTime time, SUMOTime start, int absNo, bool endGiven) { if (myLogSteps) { - const SUMOReal perc = (SUMOReal)(time - start) / (SUMOReal) absNo; - std::cout << "Reading time step: " + time2string(time) + " (" + time2string(time - start) + "/" + time2string(absNo) + " = " + toString(perc * 100) + "% done) \r"; + if (endGiven) { + const SUMOReal perc = (SUMOReal)(time - start) / (SUMOReal) absNo; + std::cout << "Reading up to time step: " + time2string(time) + " (" + time2string(time - start) + "/" + time2string(absNo) + " = " + toString(perc * 100) + "% done) \r"; + } else { + std::cout << "Reading up to time step: " + time2string(time) + "\r"; + } } } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROLoader.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROLoader.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROLoader.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROLoader.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Christian Roessel /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: ROLoader.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROLoader.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Loader for networks and route imports /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,7 +34,7 @@ #endif #include -#include +#include #include #include #include @@ -84,14 +85,12 @@ void openRoutes(RONet& net); /** @brief Loads routes from all previously build route loaders */ - void processRoutes(SUMOTime start, SUMOTime end, + void processRoutes(const SUMOTime start, const SUMOTime end, const SUMOTime increment, RONet& net, SUMOAbstractRouter& router); -#ifdef HAVE_INTERNAL // catchall for internal stuff /** @brief Loads all routes and processes them with BulkStarRouter */ void processAllRoutesWithBulkRouter(SUMOTime start, SUMOTime end, RONet& net, SUMOAbstractRouter& router); -#endif protected: /** @brief Opens route handler of the given type @@ -182,7 +181,7 @@ protected: - void writeStats(SUMOTime time, SUMOTime start, int absNo); + void writeStats(SUMOTime time, SUMOTime start, int absNo, bool endGiven); private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RONet.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RONet.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RONet.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RONet.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: RONet.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: RONet.cpp 18136 2015-03-24 15:10:45Z behrisch $ /// // The router's network representation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -37,11 +37,11 @@ #include "RORoute.h" #include "RORouteDef.h" #include "ROVehicle.h" -#include -#include +#include +#include +#include #include #include -#include #include #include #include @@ -59,9 +59,11 @@ : myVehicleTypes(), myDefaultVTypeMayBeDeleted(true), myRoutesOutput(0), myRouteAlternativesOutput(0), myTypesOutput(0), myReadRouteNo(0), myDiscardedRouteNo(0), myWrittenRouteNo(0), - myHaveRestrictions(false) { - SUMOVTypeParameter* type = new SUMOVTypeParameter(); - type->id = DEFAULT_VTYPE_ID; + myHaveRestrictions(false), + myNumInternalEdges(0), + myErrorHandler(OptionsCont::getOptions().exists("ignore-errors") + && OptionsCont::getOptions().getBool("ignore-errors") ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()) { + SUMOVTypeParameter* type = new SUMOVTypeParameter(DEFAULT_VTYPE_ID, SVC_IGNORING); type->onlyReferenced = true; myVehicleTypes.add(type->id, type); } @@ -83,6 +85,48 @@ delete edge; return false; } + if (edge->getType() == ROEdge::ET_INTERNAL) { + myNumInternalEdges += 1; + } + return true; +} + + +bool +RONet::addDistrict(const std::string id, ROEdge* source, ROEdge* sink) { + if (myDistricts.count(id) > 0) { + WRITE_ERROR("The TAZ '" + id + "' occurs at least twice."); + delete source; + delete sink; + return false; + } + sink->setType(ROEdge::ET_DISTRICT); + addEdge(sink); + source->setType(ROEdge::ET_DISTRICT); + addEdge(source); + myDistricts[id] = std::make_pair(std::vector(), std::vector()); + return true; +} + + +bool +RONet::addDistrictEdge(const std::string tazID, const std::string edgeID, const bool isSource) { + if (myDistricts.count(tazID) == 0) { + WRITE_ERROR("The TAZ '" + tazID + "' is unknown."); + return false; + } + ROEdge* edge = getEdge(edgeID); + if (edge == 0) { + WRITE_ERROR("The edge '" + edgeID + "' for TAZ '" + tazID + "' is unknown."); + return false; + } + if (isSource) { + getEdge(tazID + "-source")->addSuccessor(edge); + myDistricts[tazID].first.push_back(edgeID); + } else { + edge->addSuccessor(getEdge(tazID + "-sink")); + myDistricts[tazID].second.push_back(edgeID); + } return true; } @@ -96,6 +140,28 @@ } +void +RONet::addBusStop(const std::string& id, SUMOVehicleParameter::Stop* stop) { + std::map::const_iterator it = myBusStops.find(id); + if (it != myBusStops.end()) { + WRITE_ERROR("The bus stop '" + id + "' occurs at least twice."); + delete stop; + } + myBusStops[id] = stop; +} + + +void +RONet::addContainerStop(const std::string& id, SUMOVehicleParameter::Stop* stop) { + std::map::const_iterator it = myContainerStops.find(id); + if (it != myContainerStops.end()) { + WRITE_ERROR("The container stop '" + id + "' occurs at least twice."); + delete stop; + } + myContainerStops[id] = stop; +} + + bool RONet::addRouteDef(RORouteDef* def) { return myRoutes.add(def->getID(), def); @@ -107,22 +173,22 @@ if (filename != "") { myRoutesOutput = &OutputDevice::getDevice(filename); myRoutesOutput->writeHeader(SUMO_TAG_ROUTES); - myRoutesOutput->writeAttr("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance").writeAttr("xsi:noNamespaceSchemaLocation", "http://sumo.sf.net/xsd/routes_file.xsd"); + myRoutesOutput->writeAttr("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance").writeAttr("xsi:noNamespaceSchemaLocation", "http://sumo.dlr.de/xsd/routes_file.xsd"); } if (altFilename != "") { myRouteAlternativesOutput = &OutputDevice::getDevice(altFilename); myRouteAlternativesOutput->writeHeader(SUMO_TAG_ROUTES); - myRouteAlternativesOutput->writeAttr("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance").writeAttr("xsi:noNamespaceSchemaLocation", "http://sumo.sf.net/xsd/routes_file.xsd"); + myRouteAlternativesOutput->writeAttr("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance").writeAttr("xsi:noNamespaceSchemaLocation", "http://sumo.dlr.de/xsd/routes_file.xsd"); } if (typeFilename != "") { myTypesOutput = &OutputDevice::getDevice(typeFilename); - myTypesOutput->writeXMLHeader("routes", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/routes_file.xsd\""); + myTypesOutput->writeXMLHeader("routes", "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/routes_file.xsd\""); } } void -RONet::closeOutput() { +RONet::cleanup(SUMOAbstractRouter* router) { // end writing if (myRoutesOutput != 0) { myRoutesOutput->close(); @@ -135,6 +201,14 @@ if (myTypesOutput != 0) { myTypesOutput->close(); } + RouteCostCalculator::cleanup(); +#ifdef HAVE_FOX + if (myThreadPool.size() > 0) { + myThreadPool.clear(); + return; + } +#endif + delete router; } @@ -154,17 +228,11 @@ return it2->second->get(); } if (id == "") { - // ok, no vehicle type was given within the user input + // ok, no vehicle type or an unknown type was given within the user input // return the default type myDefaultVTypeMayBeDeleted = false; return myVehicleTypes.get(DEFAULT_VTYPE_ID); } - // Assume, the user will define the type somewhere else - // return a type which contains the id only - type = new SUMOVTypeParameter(); - type->id = id; - type->onlyReferenced = true; - addVehicleType(type); return type; } @@ -217,7 +285,7 @@ myReadRouteNo++; return true; } - WRITE_ERROR("The vehicle '" + id + "' occurs at least twice."); + WRITE_ERROR("Another vehicle with the id '" + id + "' exists."); return false; } @@ -241,37 +309,36 @@ myPersons.insert(std::pair(depart, desc)); } +void +RONet::addContainer(const SUMOTime depart, const std::string desc) { + myContainers.insert(std::pair(depart, desc)); +} + bool -RONet::computeRoute(OptionsCont& options, SUMOAbstractRouter& router, - const ROVehicle* const veh) { - MsgHandler* mh = (OptionsCont::getOptions().getBool("ignore-errors") ? - MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()); +RONet::computeRoute(SUMOAbstractRouter& router, + const ROVehicle* const veh, const bool removeLoops, + MsgHandler* errorHandler) { std::string noRouteMsg = "The vehicle '" + veh->getID() + "' has no valid route."; RORouteDef* const routeDef = veh->getRouteDefinition(); // check if the route definition is valid if (routeDef == 0) { - mh->inform(noRouteMsg); + errorHandler->inform(noRouteMsg); return false; } - // check whether the route was already saved - if (routeDef->isSaved()) { - return true; - } - // RORoute* current = routeDef->buildCurrentRoute(router, veh->getDepartureTime(), *veh); if (current == 0 || current->size() == 0) { delete current; - mh->inform(noRouteMsg); + errorHandler->inform(noRouteMsg); return false; } // check whether we have to evaluate the route for not containing loops - if (options.getBool("remove-loops")) { + if (removeLoops) { current->recheckForLoops(); // check whether the route is still valid if (current->size() == 0) { delete current; - mh->inform(noRouteMsg + " (after removing loops)"); + errorHandler->inform(noRouteMsg + " (after removing loops)"); return false; } } @@ -286,30 +353,65 @@ std::vector toRemove; for (NamedObjectCont::IDMap::const_iterator i = myFlows.getMyMap().begin(); i != myFlows.getMyMap().end(); ++i) { SUMOVehicleParameter* pars = i->second; - while (pars->repetitionsDone < pars->repetitionNumber) { - SUMOTime depart = static_cast(pars->depart + pars->repetitionsDone * pars->repetitionOffset); - if (myDepartures.find(pars->id) != myDepartures.end()) { - depart = myDepartures[pars->id].back(); - } - if (depart >= time + DELTA_T) { - break; - } - if (myDepartures.find(pars->id) != myDepartures.end()) { - myDepartures[pars->id].pop_back(); - } - SUMOVehicleParameter* newPars = new SUMOVehicleParameter(*pars); - newPars->id = pars->id + "." + toString(pars->repetitionsDone); - newPars->depart = depart; - pars->repetitionsDone++; - // try to build the vehicle - SUMOVTypeParameter* type = getVehicleTypeSecure(pars->vtypeid); - RORouteDef* route = getRouteDef(pars->routeid)->copy("!" + newPars->id); - ROVehicle* veh = new ROVehicle(*newPars, route, type); - addVehicle(newPars->id, veh); - delete newPars; - } - if (pars->repetitionsDone == pars->repetitionNumber) { - toRemove.push_back(i->first); + if (pars->repetitionProbability > 0) { + while (pars->depart < time) { + if (pars->repetitionEnd <= pars->depart) { + toRemove.push_back(i->first); + break; + } + // only call rand if all other conditions are met + if (RandHelper::rand() < (pars->repetitionProbability * TS)) { + SUMOVehicleParameter* newPars = new SUMOVehicleParameter(*pars); + newPars->id = pars->id + "." + toString(pars->repetitionsDone); + newPars->depart = pars->depart; + pars->repetitionsDone++; + // try to build the vehicle + SUMOVTypeParameter* type = getVehicleTypeSecure(pars->vtypeid); + if (type == 0) { + type = getVehicleTypeSecure(DEFAULT_VTYPE_ID); + } else { + // fix the type id in case we used a distribution + newPars->vtypeid = type->id; + } + RORouteDef* route = getRouteDef(pars->routeid)->copy("!" + newPars->id); + ROVehicle* veh = new ROVehicle(*newPars, route, type, this); + addVehicle(newPars->id, veh); + delete newPars; + } + pars->depart += DELTA_T; + } + } else { + while (pars->repetitionsDone < pars->repetitionNumber) { + SUMOTime depart = static_cast(pars->depart + pars->repetitionsDone * pars->repetitionOffset); + if (myDepartures.find(pars->id) != myDepartures.end()) { + depart = myDepartures[pars->id].back(); + } + if (depart >= time + DELTA_T) { + break; + } + if (myDepartures.find(pars->id) != myDepartures.end()) { + myDepartures[pars->id].pop_back(); + } + SUMOVehicleParameter* newPars = new SUMOVehicleParameter(*pars); + newPars->id = pars->id + "." + toString(pars->repetitionsDone); + newPars->depart = depart; + pars->repetitionsDone++; + // try to build the vehicle + SUMOVTypeParameter* type = getVehicleTypeSecure(pars->vtypeid); + if (type == 0) { + type = getVehicleTypeSecure(DEFAULT_VTYPE_ID); + } else { + // fix the type id in case we used a distribution + newPars->vtypeid = type->id; + } + RORouteDef* route = getRouteDef(pars->routeid)->copy("!" + newPars->id); + ROVehicle* veh = new ROVehicle(*newPars, route, type, this); + addVehicle(newPars->id, veh); + delete newPars; + } + if (pars->repetitionsDone == pars->repetitionNumber) { + toRemove.push_back(i->first); + } } } for (std::vector::const_iterator i = toRemove.begin(); i != toRemove.end(); ++i) { @@ -323,19 +425,52 @@ SUMOTime time) { checkFlows(time); SUMOTime lastTime = -1; + const bool removeLoops = options.getBool("remove-loops"); +#ifdef HAVE_FOX + const int maxNumThreads = options.getInt("routing-threads"); +#endif + if (myVehicles.size() != 0) { + const std::map& mmap = myVehicles.getMyMap(); + for (std::map::const_iterator i = mmap.begin(); i != mmap.end(); ++i) { + if (i->second->getDepart() >= time) { + // we cannot go through a sorted list here, because the priority queue in the myVehicles container is not fully sorted + continue; + } + i->second->setRoutingSuccess(false); +#ifdef HAVE_FOX + // add thread if necessary + const int numThreads = (int)myThreadPool.size(); + if (numThreads < maxNumThreads && myThreadPool.isFull()) { + new WorkerThread(myThreadPool, numThreads == 0 ? &router : router.clone()); + } + // add task + if (maxNumThreads > 0) { + myThreadPool.add(new RoutingTask(i->second, removeLoops, myErrorHandler)); + continue; + } +#endif + i->second->setRoutingSuccess(computeRoute(router, i->second, removeLoops, myErrorHandler)); + } +#ifdef HAVE_FOX + myThreadPool.waitAll(); +#endif + } // write all vehicles (and additional structures) - while (myVehicles.size() != 0 || myPersons.size() != 0) { - // get the next vehicle and person + while (myVehicles.size() != 0 || myPersons.size() != 0 || myContainers.size() != 0) { + // get the next vehicle, person or container const ROVehicle* const veh = myVehicles.getTopVehicle(); - const SUMOTime vehicleTime = veh == 0 ? SUMOTime_MAX : veh->getDepartureTime(); + const SUMOTime vehicleTime = veh == 0 ? SUMOTime_MAX : veh->getDepart(); PersonMap::iterator person = myPersons.begin(); const SUMOTime personTime = person == myPersons.end() ? SUMOTime_MAX : person->first; + ContainerMap::iterator container = myContainers.begin(); + const SUMOTime containerTime = container == myContainers.end() ? SUMOTime_MAX : container->first; // check whether it shall not yet be computed - if (vehicleTime > time && personTime > time) { - lastTime = MIN2(vehicleTime, personTime); + if (vehicleTime >= time && personTime >= time && containerTime >= time) { + lastTime = MIN3(vehicleTime, personTime, containerTime); break; } - if (vehicleTime < personTime) { + SUMOTime minTime = MIN3(vehicleTime, personTime, containerTime); + if (vehicleTime == minTime) { // check whether to print the output if (lastTime != vehicleTime && lastTime != -1) { // report writing progress @@ -346,9 +481,13 @@ lastTime = vehicleTime; // ok, compute the route (try it) - if (computeRoute(options, router, veh)) { + if (veh->getRoutingSuccess()) { // write the route - veh->saveAllAsXML(*myRoutesOutput, myRouteAlternativesOutput, myTypesOutput, options.getBool("exit-times")); + veh->saveTypeAsXML(*myRoutesOutput, myRouteAlternativesOutput, myTypesOutput); + veh->saveAllAsXML(*myRoutesOutput, false, options.getBool("exit-times")); + if (myRouteAlternativesOutput != 0) { + veh->saveAllAsXML(*myRouteAlternativesOutput, true, options.getBool("exit-times")); + } myWrittenRouteNo++; } else { myDiscardedRouteNo++; @@ -360,13 +499,21 @@ } } myVehicles.erase(veh->getID()); - } else { - (*myRoutesOutput) << person->second; + } + if (personTime == minTime) { + myRoutesOutput->writePreformattedTag(person->second); if (myRouteAlternativesOutput != 0) { - (*myRouteAlternativesOutput) << person->second; + myRouteAlternativesOutput->writePreformattedTag(person->second); } myPersons.erase(person); } + if (containerTime == minTime) { + myRoutesOutput->writePreformattedTag(container->second); + if (myRouteAlternativesOutput != 0) { + myRouteAlternativesOutput->writePreformattedTag(container->second); + } + myContainers.erase(container); + } } return lastTime; } @@ -374,13 +521,19 @@ bool RONet::furtherStored() { - return myVehicles.size() > 0 || myFlows.size() > 0; + return myVehicles.size() > 0 || myFlows.size() > 0 || myPersons.size() > 0 || myContainers.size() > 0; } -unsigned int +size_t RONet::getEdgeNo() const { - return (unsigned int) myEdges.size(); + return myEdges.size(); +} + + +int +RONet::getInternalEdgeNumber() const { + return myNumInternalEdges; } @@ -402,6 +555,16 @@ } +#ifdef HAVE_FOX +// --------------------------------------------------------------------------- +// RONet::RoutingTask-methods +// --------------------------------------------------------------------------- +void +RONet::RoutingTask::run(FXWorkerThread* context) { + myVehicle->setRoutingSuccess(RONet::computeRoute(static_cast(context)->getRouter(), myVehicle, myRemoveLoops, myErrorHandler)); +} +#endif + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RONet.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RONet.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RONet.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RONet.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,15 @@ /// @file RONet.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann +/// @author Yun-Pang Floetteroed /// @date Sept 2002 -/// @version $Id: RONet.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RONet.h 18136 2015-03-24 15:10:45Z behrisch $ /// // The router's network representation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -37,10 +39,15 @@ #include "ROVehicleCont.h" #include "ROVehicle.h" #include "RORouteDef.h" -#include -#include +#include +#include +#include #include +#ifdef HAVE_FOX +#include +#endif + // =========================================================================== // class declarations @@ -63,7 +70,7 @@ * @todo Vehicle ids are not tracked; it may happen that the same id is added twice... */ class RONet { - friend class RouteAggregator; + friend class RORouteAggregator; public: /// @brief Constructor @@ -89,6 +96,37 @@ virtual bool addEdge(ROEdge* edge); + /* @brief Adds a district and connecting edges to the network + * + * If the district is already known (another one with the same id exists), + * an error is generated and given to msg-error-handler. The edges + * are deleted in this case and false is returned. + * + * @param[in] id The district to add + * @return Whether the district was added + */ + bool addDistrict(const std::string id, ROEdge* source, ROEdge* sink); + + + /* @brief Adds a district and connecting edges to the network + * + * If the district is already known (another one with the same id exists), + * an error is generated and given to msg-error-handler. The edges + * are deleted in this case and false is returned. + * + * @param[in] id The district to add + * @return Whether the district was added + */ + bool addDistrictEdge(const std::string tazID, const std::string edgeID, const bool isSource); + + /** @brief Retrieves all TAZ (districts) from the network + * + * @return The map of all districts + */ + const std::map, std::vector > >& getDistricts() const { + return myDistricts; + } + /** @brief Retrieves an edge from the network * * This is not very pretty, but necessary, though, as routes run @@ -96,7 +134,6 @@ * * @param[in] name The name of the edge to retrieve * @return The named edge if known, otherwise 0 - * @todo Check whether a const pointer may be returned */ ROEdge* getEdge(const std::string& name) const { return myEdges.get(name); @@ -123,6 +160,56 @@ RONode* getNode(const std::string& id) const { return myNodes.get(id); } + + + /* @brief Adds a read bus stop to the network + * + * If the bus stop is already known (another one with the same id exists), + * an error is generated and given to msg-error-handler. The stop + * is deleted in this case + * + * @param[in] node The stop to add + */ + void addBusStop(const std::string& id, SUMOVehicleParameter::Stop* stop); + + + /* @brief Adds a read container stop to the network + * + * If the container stop is already known (another one with the same id exists), + * an error is generated and given to msg-error-handler. The stop + * is deleted in this case + * + * @param[in] node The stop to add + */ + void addContainerStop(const std::string& id, SUMOVehicleParameter::Stop* stop); + + + /** @brief Retrieves a bus stop from the network + * + * @param[in] name The name of the stop to retrieve + * @return The named stop if known, otherwise 0 + */ + const SUMOVehicleParameter::Stop* getBusStop(const std::string& id) const { + std::map::const_iterator it = myBusStops.find(id); + if (it == myBusStops.end()) { + return 0; + } + return it->second; + } + + + /** @brief Retrieves a container stop from the network + * + * @param[in] name The name of the stop to retrieve + * @return The named stop if known, otherwise 0 + */ + const SUMOVehicleParameter::Stop* getContainerStop(const std::string& id) const { + std::map::const_iterator it = myContainerStops.find(id); + if (it == myContainerStops.end()) { + return 0; + } + return it->second; + } //@} @@ -169,11 +256,9 @@ /** @brief Retrieves the named vehicle type * - * If the named vehicle type was not added to the net before, a default - * vehicle type which consists of the id only is generated, added to the net - * and returned. - * - * Only if the name is "", 0 is returned. + * If the name is "" the default type is returned. + * If the named vehicle type (or typeDistribution) was not added to the net before + * 0 is returned * * @param[in] id The id of the vehicle type to return * @return The named vehicle type @@ -240,6 +325,14 @@ * @param[in] desc The xml description of the person */ void addPerson(const SUMOTime depart, const std::string desc); + + + /* @brief Adds a container to the network + * + * @param[in] depart The departure time of the container + * @param[in] desc The xml description of the container + */ + void addContainer(const SUMOTime depart, const std::string desc); // @} @@ -248,20 +341,20 @@ /** @brief Computes routes described by their definitions and saves them * - * As long a vehicle with a departure time not larger than the given + * As long as a vehicle with a departure time smaller than the given * exists, its route is computed and it is written and removed from * the internal container. * * @param[in] options The options used during this process * @param[in] router The router to use for routes computation - * @param[in] options The time until which route definitions shall be processed + * @param[in] time The time until which route definitions shall be processed * @return The last seen departure time>=time */ SUMOTime saveAndRemoveRoutesUntil(OptionsCont& options, SUMOAbstractRouter& router, SUMOTime time); - /// Returns the information whether further vehicles are stored + /// Returns the information whether further vehicles, persons or containers are stored virtual bool furtherStored(); //@} @@ -282,12 +375,15 @@ void openOutput(const std::string& filename, const std::string altFilename, const std::string typeFilename); - /** @brief closes the file output for computed routes */ - void closeOutput(); + /** @brief closes the file output for computed routes and deletes routers and associated threads if necessary */ + void cleanup(SUMOAbstractRouter* router); - /// Returns the number of edges thenetwork contains - unsigned int getEdgeNo() const; + /// Returns the total number of edges the network contains including internal edges + size_t getEdgeNo() const; + + /// Returns the number of internal edges the network contains + int getInternalEdgeNumber() const; const std::map& getEdgeMap() const; @@ -303,8 +399,9 @@ } protected: - bool computeRoute(OptionsCont& options, - SUMOAbstractRouter& router, const ROVehicle* const veh); + static bool computeRoute(SUMOAbstractRouter& router, + const ROVehicle* const veh, const bool removeLoops, + MsgHandler* errorHandler); /// @brief return vehicles for use by RouteAggregator ROVehicleCont& getVehicles() { @@ -325,6 +422,12 @@ /// @brief Known edges NamedObjectCont myEdges; + /// @brief Known bus stops + std::map myBusStops; + + /// @brief Known container stops + std::map myContainerStops; + /// @brief Known vehicle types NamedObjectCont myVehicleTypes; @@ -349,9 +452,16 @@ typedef std::multimap PersonMap; PersonMap myPersons; + /// @brief Known containers + typedef std::multimap ContainerMap; + ContainerMap myContainers; + /// @brief Departure times for randomized flows std::map > myDepartures; + /// @brief traffic assignment zones with sources and sinks + std::map, std::vector > > myDistricts; + /// @brief The file to write the computed routes into OutputDevice* myRoutesOutput; @@ -373,6 +483,46 @@ /// @brief Whether the network contains edges which not all vehicles may pass bool myHaveRestrictions; + /// @brief The number of internal edges in the dictionary + int myNumInternalEdges; + + /// @brief handler for ignorable error messages + MsgHandler* myErrorHandler; + +#ifdef HAVE_FOX + FXWorkerThread::Pool myThreadPool; + +private: + class WorkerThread : public FXWorkerThread { + public: + WorkerThread(FXWorkerThread::Pool& pool, + SUMOAbstractRouter* router) + : FXWorkerThread(pool), myRouter(router) {} + SUMOAbstractRouter& getRouter() const { + return *myRouter; + } + virtual ~WorkerThread() { + stop(); + delete myRouter; + } + private: + SUMOAbstractRouter* myRouter; + }; + + class RoutingTask : public FXWorkerThread::Task { + public: + RoutingTask(ROVehicle* v, const bool removeLoops, MsgHandler* errorHandler) + : myVehicle(v), myRemoveLoops(removeLoops), myErrorHandler(errorHandler) {} + void run(FXWorkerThread* context); + private: + ROVehicle* const myVehicle; + const bool myRemoveLoops; + MsgHandler* const myErrorHandler; + private: + /// @brief Invalidated assignment operator. + RoutingTask& operator=(const RoutingTask&); + }; +#endif private: /// @brief Invalidated copy constructor diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RONetHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RONetHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RONetHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RONetHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,14 @@ /// @author Jakob Erdmann /// @author Christian Roessel /// @author Michael Behrisch +/// @author Yun-Pang Floetteroed /// @date Sept 2002 -/// @version $Id: RONetHandler.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RONetHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The handler for SUMO-Networks /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -37,6 +38,7 @@ #include #include #include +#include #include #include #include "ROEdge.h" @@ -58,7 +60,7 @@ ROAbstractEdgeBuilder& eb) : SUMOSAXHandler("sumo-network"), myNet(net), myCurrentName(), - myCurrentEdge(0), myEdgeBuilder(eb) {} + myCurrentEdge(0), myProcess(true), myEdgeBuilder(eb) {} RONetHandler::~RONetHandler() {} @@ -85,6 +87,12 @@ case SUMO_TAG_CONNECTION: parseConnection(attrs); break; + case SUMO_TAG_BUS_STOP: + parseBusStop(attrs); + break; + case SUMO_TAG_CONTAINER_STOP: + parseContainerStop(attrs); + break; case SUMO_TAG_TAZ: parseDistrict(attrs); break; @@ -101,6 +109,28 @@ void +RONetHandler::myEndElement(int element) { + switch (element) { + case SUMO_TAG_NET: + // build junction graph + for (JunctionGraph::iterator it = myJunctionGraph.begin(); it != myJunctionGraph.end(); ++it) { + ROEdge* edge = myNet.getEdge(it->first); + RONode* from = myNet.getNode(it->second.first); + RONode* to = myNet.getNode(it->second.second); + if (edge != 0 && from != 0 && to != 0) { + edge->setJunctions(from, to); + from->addOutgoing(edge); + to->addIncoming(edge); + } + } + break; + default: + break; + } +} + + +void RONetHandler::parseEdge(const SUMOSAXAttributes& attrs) { // get the id, report an error if not given or empty... bool ok = true; @@ -108,48 +138,74 @@ if (!ok) { throw ProcessError(); } - // get the edge - myCurrentEdge = 0; - if (myCurrentName[0] == ':') { - // this is an internal edge - we will not use it - // !!! recheck this; internal edges may be of importance during the dua - return; - } - const std::string from = attrs.get(SUMO_ATTR_FROM, myCurrentName.c_str(), ok); - const std::string to = attrs.get(SUMO_ATTR_TO, myCurrentName.c_str(), ok); - const std::string type = attrs.hasAttribute(SUMO_ATTR_FUNCTION) ? attrs.get(SUMO_ATTR_FUNCTION, myCurrentName.c_str(), ok) : ""; - const int priority = attrs.get(SUMO_ATTR_PRIORITY, myCurrentName.c_str(), ok); + const SumoXMLEdgeFunc type = attrs.getEdgeFunc(ok); if (!ok) { + WRITE_ERROR("Edge '" + myCurrentName + "' has an unknown type."); return; } - RONode* fromNode = myNet.getNode(from); + // get the edge + std::string from; + std::string to; + RONode* fromNode; + RONode* toNode; + int priority; + myCurrentEdge = 0; + if (type == EDGEFUNC_INTERNAL || type == EDGEFUNC_CROSSING || type == EDGEFUNC_WALKINGAREA) { + assert(myCurrentName[0] == ':'); + std::string junctionID = myCurrentName.substr(1, myCurrentName.rfind('_') - 1); + myJunctionGraph[myCurrentName] = std::make_pair(junctionID, junctionID); + from = junctionID; + to = junctionID; + priority = 0; + } else { + from = attrs.get(SUMO_ATTR_FROM, myCurrentName.c_str(), ok); + to = attrs.get(SUMO_ATTR_TO, myCurrentName.c_str(), ok); + priority = attrs.get(SUMO_ATTR_PRIORITY, myCurrentName.c_str(), ok); + if (!ok) { + return; + } + } + myJunctionGraph[myCurrentName] = std::make_pair(from, to); + fromNode = myNet.getNode(from); if (fromNode == 0) { fromNode = new RONode(from); myNet.addNode(fromNode); } - RONode* toNode = myNet.getNode(to); + toNode = myNet.getNode(to); if (toNode == 0) { toNode = new RONode(to); myNet.addNode(toNode); } // build the edge myCurrentEdge = myEdgeBuilder.buildEdge(myCurrentName, fromNode, toNode, priority); - if (myNet.addEdge(myCurrentEdge)) { - // get the type of the edge - myProcess = true; - if (type == "" || type == "normal" || type == "connector") { + // set the type + myProcess = true; + switch (type) { + case EDGEFUNC_CONNECTOR: + case EDGEFUNC_NORMAL: myCurrentEdge->setType(ROEdge::ET_NORMAL); - } else if (type == "source") { + break; + case EDGEFUNC_SOURCE: myCurrentEdge->setType(ROEdge::ET_SOURCE); - } else if (type == "sink") { + break; + case EDGEFUNC_SINK: myCurrentEdge->setType(ROEdge::ET_SINK); - } else if (type == "internal") { + break; + case EDGEFUNC_WALKINGAREA: + myCurrentEdge->setType(ROEdge::ET_WALKINGAREA); + break; + case EDGEFUNC_CROSSING: + myCurrentEdge->setType(ROEdge::ET_CROSSING); + break; + case EDGEFUNC_INTERNAL: + myCurrentEdge->setType(ROEdge::ET_INTERNAL); myProcess = false; - } else { - WRITE_ERROR("Edge '" + myCurrentName + "' has an unknown type."); - return; - } - } else { + break; + default: + throw ProcessError("Unhandled EdgeFunk " + toString(type)); + } + + if (!myNet.addEdge(myCurrentEdge)) { myCurrentEdge = 0; } } @@ -178,12 +234,12 @@ // get the length // get the vehicle classes SVCPermissions permissions = parseVehicleClasses(allow, disallow); - if (permissions != SVCFreeForAll) { + if (permissions != SVCAll) { myNet.setRestrictionFound(); } // add when both values are valid if (maxSpeed > 0 && length > 0 && id.length() > 0) { - myCurrentEdge->addLane(new ROLane(id, length, maxSpeed, permissions)); + myCurrentEdge->addLane(new ROLane(id, myCurrentEdge, length, maxSpeed, permissions)); } } @@ -217,10 +273,9 @@ bool ok = true; std::string fromID = attrs.get(SUMO_ATTR_FROM, 0, ok); std::string toID = attrs.get(SUMO_ATTR_TO, 0, ok); + int fromLane = attrs.get(SUMO_ATTR_FROM_LANE, 0, ok); + int toLane = attrs.get(SUMO_ATTR_TO_LANE, 0, ok); std::string dir = attrs.get(SUMO_ATTR_DIR, 0, ok); - if (fromID[0] == ':') { // skip inner lane connections - return; - } ROEdge* from = myNet.getEdge(fromID); ROEdge* to = myNet.getEdge(toID); if (from == 0) { @@ -229,7 +284,69 @@ if (to == 0) { throw ProcessError("unknown to-edge '" + toID + "' in connection"); } - from->addFollower(to, dir); + if (from->getType() == ROEdge::ET_INTERNAL) { // skip inner lane connections + return; + } + if (from->getLanes().size() <= (size_t)fromLane) { + throw ProcessError("invalid fromLane '" + toString(fromLane) + "' in connection from '" + fromID + "'."); + } + if (to->getLanes().size() <= (size_t)toLane) { + throw ProcessError("invalid toLane '" + toString(toLane) + "' in connection to '" + toID + "'."); + } + from->getLanes()[fromLane]->addOutgoingLane(to->getLanes()[toLane]); + from->addSuccessor(to, dir); +} + + +void +RONetHandler::parseBusStop(const SUMOSAXAttributes& attrs) { + bool ok = true; + SUMOVehicleParameter::Stop* stop = new SUMOVehicleParameter::Stop(); + // get the id, throw if not given or empty... + std::string id = attrs.get(SUMO_ATTR_ID, "busStop", ok); + // get the lane + stop->lane = attrs.get(SUMO_ATTR_LANE, "busStop", ok); + if (!ok) { + throw ProcessError(); + } + const ROEdge* edge = myNet.getEdge(stop->lane.substr(0, stop->lane.rfind("_"))); + if (edge == 0) { + throw InvalidArgument("Unknown lane '" + stop->lane + "' for bus stop '" + id + "'."); + } + // get the positions + stop->startPos = attrs.getOpt(SUMO_ATTR_STARTPOS, id.c_str(), ok, 0); + stop->endPos = attrs.getOpt(SUMO_ATTR_ENDPOS, id.c_str(), ok, edge->getLength()); + const bool friendlyPos = attrs.getOpt(SUMO_ATTR_FRIENDLY_POS, id.c_str(), ok, false); + if (!ok || !SUMORouteHandler::checkStopPos(stop->startPos, stop->endPos, edge->getLength(), POSITION_EPS, friendlyPos)) { + throw InvalidArgument("Invalid position for bus stop '" + id + "'."); + } + myNet.addBusStop(id, stop); +} + + +void +RONetHandler::parseContainerStop(const SUMOSAXAttributes& attrs) { + bool ok = true; + SUMOVehicleParameter::Stop* stop = new SUMOVehicleParameter::Stop(); + // get the id, throw if not given or empty... + std::string id = attrs.get(SUMO_ATTR_ID, "containerStop", ok); + // get the lane + stop->lane = attrs.get(SUMO_ATTR_LANE, "containerStop", ok); + if (!ok) { + throw ProcessError(); + } + const ROEdge* edge = myNet.getEdge(stop->lane.substr(0, stop->lane.rfind("_"))); + if (edge == 0) { + throw InvalidArgument("Unknown lane '" + stop->lane + "' for container stop '" + id + "'."); + } + // get the positions + stop->startPos = attrs.getOpt(SUMO_ATTR_STARTPOS, id.c_str(), ok, 0); + stop->endPos = attrs.getOpt(SUMO_ATTR_ENDPOS, id.c_str(), ok, edge->getLength()); + const bool friendlyPos = attrs.getOpt(SUMO_ATTR_FRIENDLY_POS, id.c_str(), ok, false); + if (!ok || !SUMORouteHandler::checkStopPos(stop->startPos, stop->endPos, edge->getLength(), POSITION_EPS, friendlyPos)) { + throw InvalidArgument("Invalid position for container stop '" + id + "'."); + } + myNet.addContainerStop(id, stop); } @@ -241,22 +358,12 @@ if (!ok) { return; } - ROEdge* sink = myEdgeBuilder.buildEdge(myCurrentName + "-sink", 0, 0, 0); - sink->setType(ROEdge::ET_DISTRICT); - myNet.addEdge(sink); - ROEdge* source = myEdgeBuilder.buildEdge(myCurrentName + "-source", 0, 0, 0); - source->setType(ROEdge::ET_DISTRICT); - myNet.addEdge(source); + myNet.addDistrict(myCurrentName, myEdgeBuilder.buildEdge(myCurrentName + "-source", 0, 0, 0), myEdgeBuilder.buildEdge(myCurrentName + "-sink", 0, 0, 0)); if (attrs.hasAttribute(SUMO_ATTR_EDGES)) { std::vector desc = attrs.getStringVector(SUMO_ATTR_EDGES); for (std::vector::const_iterator i = desc.begin(); i != desc.end(); ++i) { - ROEdge* edge = myNet.getEdge(*i); - // check whether the edge exists - if (edge == 0) { - throw ProcessError("The edge '" + *i + "' within district '" + myCurrentName + "' is not known."); - } - source->addFollower(edge); - edge->addFollower(sink); + myNet.addDistrictEdge(myCurrentName, *i, true); + myNet.addDistrictEdge(myCurrentName, *i, false); } } } @@ -266,17 +373,7 @@ RONetHandler::parseDistrictEdge(const SUMOSAXAttributes& attrs, bool isSource) { bool ok = true; std::string id = attrs.get(SUMO_ATTR_ID, myCurrentName.c_str(), ok); - ROEdge* succ = myNet.getEdge(id); - if (succ != 0) { - // connect edge - if (isSource) { - myNet.getEdge(myCurrentName + "-source")->addFollower(succ); - } else { - succ->addFollower(myNet.getEdge(myCurrentName + "-sink")); - } - } else { - WRITE_ERROR("At district '" + myCurrentName + "': succeeding edge '" + id + "' does not exist."); - } + myNet.addDistrictEdge(myCurrentName, id, isSource); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RONetHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RONetHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RONetHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RONetHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: RONetHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RONetHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The handler that parses a SUMO-network for its usage in a router /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -82,8 +82,15 @@ * @exception ProcessError If something fails * @see GenericSAXHandler::myStartElement */ - virtual void myStartElement(int element, - const SUMOSAXAttributes& attrs); + virtual void myStartElement(int element, const SUMOSAXAttributes& attrs); + + /** @brief Called when a closing tag occurs + * + * @param[in] element ID of the currently opened element + * @exception ProcessError If something fails + * @see GenericSAXHandler::myEndElement + */ + virtual void myEndElement(int element); //@} protected: @@ -133,6 +140,20 @@ void parseConnection(const SUMOSAXAttributes& attrs); + /** @begin Parses a bus stop + * Called on the occurence of a "busStop" element + * @param[in] attrs The attributes (of the "busStop"-element) to parse + */ + void parseBusStop(const SUMOSAXAttributes& attrs); + + + /** @begin Parses a container stop + * Called on the occurence of a "containerStop" element + * @param[in] attrs The attributes (of the "containerStop"-element) to parse + */ + void parseContainerStop(const SUMOSAXAttributes& attrs); + + /** @begin Parses a district and creates a pseudo edge for it * * Called on the occurence of a "district" element, this method @@ -177,7 +198,9 @@ /// @brief The object used to build of edges of the desired type ROAbstractEdgeBuilder& myEdgeBuilder; - + /// @brief temporary data for building the junction graph after network parsing is finished + typedef std::map > JunctionGraph; + JunctionGraph myJunctionGraph; private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RONode.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RONode.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RONode.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RONode.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: RONode.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RONode.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A single router's node /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RONode.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RONode.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RONode.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RONode.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: RONode.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RONode.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Base class for nodes used by the router /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -32,9 +32,16 @@ #endif #include +#include #include #include +// =========================================================================== +// class declarations +// =========================================================================== +class ROEdge; + +typedef std::vector ConstROEdgeVector; // =========================================================================== // class definitions @@ -69,10 +76,31 @@ } + inline const ConstROEdgeVector& getIncoming() const { + return myIncoming; + } + + inline const ConstROEdgeVector& getOutgoing() const { + return myOutgoing; + } + + void addIncoming(ROEdge* edge) { + myIncoming.push_back(edge); + } + + void addOutgoing(ROEdge* edge) { + myOutgoing.push_back(edge); + } + private: /// @brief This node's position Position myPosition; + /// @brief incoming edges + ConstROEdgeVector myIncoming; + /// @brief outgoing edges + ConstROEdgeVector myOutgoing; + private: /// @brief Invalidated copy constructor diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RORouteAggregator.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RORouteAggregator.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RORouteAggregator.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RORouteAggregator.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,197 @@ +/****************************************************************************/ +/// @file RORouteAggregator.h +/// @author Jakob Erdmann +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date February 2012 +/// @version $Id: RORouteAggregator.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Handles grouping of routes to supply input for BulkStarRouter +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef RORouteAggregator_h +#define RORouteAggregator_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +// +class RORouteAggregator { + +public: + + /** @brief precomputes all routes grouped by their destination edge + * @note: the current setup is not suitable for using RORouteDef_Complete + * along with --repair since the sequence is not optimized for in-between destinations + */ + static void processAllRoutes(RONet& net, SUMOAbstractRouter& router) { + // simple version: group by destination edge + SameTargetMap stm; + NamedObjectCont::IDMap vehicles = net.getVehicles().getMyMap(); + if (vehicles.size() == 0) { + throw ProcessError("No vehicles loaded"); + } + // XXX @todo: use a configurable default vehicle + const ROVehicle* defaultVehicle = vehicles.begin()->second; + for (NamedObjectCont::IDMap::const_iterator it = vehicles.begin(); it != vehicles.end(); it++) { + ROVehicle* veh = it->second; + stm[veh->getRouteDefinition()->getDestination()].push_back(veh); + } + WRITE_MESSAGE("Loaded " + toString(vehicles.size()) + " vehicles with " + toString(stm.size()) + " unique destinations"); + + // merge nearby destinations for efficiency + const int MERGE_DISTANCE = 6; // XXX @todo make configurable + for (int i = 1; i <= MERGE_DISTANCE; i++) { + stm = mergeTargets(stm, MERGE_DISTANCE); + } + WRITE_MESSAGE("Kept " + toString(stm.size()) + " unique destinations after merging"); + + // skip precomputation if not enough vehicles have the same destination + // this value could be set automatically: num_edges / avg_number_of_nodes_visited_for_astar + const size_t SKIP_LIMIT = 11; // XXX @todo make configurable + int num_prepared = 0; + int num_unprepared = 0; + int num_routes_prepared = 0; + int num_routes_unprepared = 0; + // process by destination edge + for (SameTargetMap::iterator it = stm.begin(); it != stm.end(); it++) { + const ROEdge* dest = it->first; + VehVec& bulkVehicles = it->second; + bool skip = false; + if (bulkVehicles.size() < SKIP_LIMIT) { + skip = true; + num_routes_unprepared += (int)bulkVehicles.size(); + num_unprepared += 1; + } else { + num_routes_prepared += (int)bulkVehicles.size(); + num_prepared += 1; + } + router.prepare(dest, defaultVehicle, skip); + for (VehVec::iterator it = bulkVehicles.begin(); it != bulkVehicles.end(); it++) { + ROVehicle* veh = *it; + RORouteDef* routeDef = veh->getRouteDefinition(); + routeDef->preComputeCurrentRoute(router, veh->getDepartureTime(), *veh); + } + } + WRITE_MESSAGE("Performed pre-computation for " + toString(num_prepared) + " destinations"); + WRITE_MESSAGE("Skipped pre-computation for " + toString(num_unprepared) + " destinations"); + WRITE_MESSAGE("Computed " + toString(num_routes_prepared) + " routes with pre-computation"); + WRITE_MESSAGE("Computed " + toString(num_routes_unprepared) + " routes without pre-computation"); + } + +private: + typedef std::vector VehVec; + typedef std::map SameTargetMap; + typedef std::set EdgeSet; + + + /** Function-object for sorting from highest to lowest vehicle count. */ + struct ComparatorNumVehicles { + + ComparatorNumVehicles(SameTargetMap& sameTargetMap): + mySameTargetMap(sameTargetMap) {} + + bool operator()(const ROEdge* const a, const ROEdge* const b) { + return (mySameTargetMap[a].size() > mySameTargetMap[b].size()); + } + + SameTargetMap& mySameTargetMap; + + private: + /// @brief Invalidated assignment operator. + ComparatorNumVehicles& operator=(const ComparatorNumVehicles&); + + }; + + + static SameTargetMap mergeTargets(SameTargetMap& stm, const int distance) { + SameTargetMap result; + // we want to merg edges with few vehicles to edges with many vehicles + // so we have to sort by number of vehicles first + ConstROEdgeVector heap; + heap.reserve(stm.size()); + ComparatorNumVehicles cmp(stm); + for (SameTargetMap::iterator it = stm.begin(); it != stm.end(); it++) { + heap.push_back(it->first); + } + make_heap(heap.begin(), heap.end(), cmp); + while (heap.size() > 0) { + const ROEdge* dest = heap.front(); + pop_heap(heap.begin(), heap.end(), cmp); + heap.pop_back(); + if (stm.count(dest) > 0 && // dest has not been merged yet + stm[dest].size() > 0) { // for some strange reason 0-length vectors are found despite erase + result[dest] = stm[dest]; + stm.erase(dest); + EdgeSet nearby = getNearby(dest, distance); + for (EdgeSet::iterator it = nearby.begin(); it != nearby.end(); it++) { + const ROEdge* nearEdge = *it; + if (stm.count(nearEdge) > 0) { + // nearEdge occurs as destination and has not been merged yet + result[dest].insert(result[dest].end(), stm[nearEdge].begin(), stm[nearEdge].end()); + stm.erase(nearEdge); + } + } + } + } + return result; + } + + + static EdgeSet getNearby(const ROEdge* edge, const int distance) { + EdgeSet result; + result.insert(edge); + EdgeSet fringe(result); + for (int i = 0; i < distance; i++) { + fringe = approachingEdges(fringe); + result.insert(fringe.begin(), fringe.end()); + } + return result; + } + + + static EdgeSet approachingEdges(EdgeSet edges) { + EdgeSet result; + for (EdgeSet::iterator it = edges.begin(); it != edges.end(); it++) { + result.insert((*it)->getPredecessors().begin(), (*it)->getPredecessors().end()); + } + return result; + } + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RORoute.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RORoute.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RORoute.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RORoute.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file RORoute.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Yun-Pang Floetteroed /// @date Sept 2002 -/// @version $Id: RORoute.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RORoute.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A complete router's route /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -48,10 +49,11 @@ // method definitions // =========================================================================== RORoute::RORoute(const std::string& id, SUMOReal costs, SUMOReal prop, - const std::vector& route, - const RGBColor* const color) + const ConstROEdgeVector& route, + const RGBColor* const color, + const std::vector& stops) : Named(StringUtils::convertUmlaute(id)), myCosts(costs), - myProbability(prop), myRoute(route), myColor(color) {} + myProbability(prop), myRoute(route), myColor(color), myStops(stops) {} RORoute::RORoute(const RORoute& src) @@ -69,12 +71,6 @@ void -RORoute::add(ROEdge* edge) { - myRoute.push_back(edge); -} - - -void RORoute::setCosts(SUMOReal costs) { myCosts = costs; } @@ -111,16 +107,22 @@ if (myColor != 0) { dev.writeAttr(SUMO_ATTR_COLOR, *myColor); } - if (!myRoute.empty() && myRoute.front()->getType() == ROEdge::ET_DISTRICT) { - std::vector temp(myRoute.begin() + 1, myRoute.end() - 1); - dev.writeAttr(SUMO_ATTR_EDGES, temp); + if (!myRoute.empty()) { + const int frontOffset = myRoute.front()->getType() == ROEdge::ET_DISTRICT ? 1 : 0; + const int backOffset = myRoute.back()->getType() == ROEdge::ET_DISTRICT ? 1 : 0; + if (frontOffset + backOffset > 0) { + ConstROEdgeVector temp(myRoute.begin() + frontOffset, myRoute.end() - backOffset); + dev.writeAttr(SUMO_ATTR_EDGES, temp); + } else { + dev.writeAttr(SUMO_ATTR_EDGES, myRoute); + } } else { dev.writeAttr(SUMO_ATTR_EDGES, myRoute); } if (withExitTimes) { std::string exitTimes; SUMOReal time = STEPS2TIME(veh->getDepartureTime()); - for (std::vector::const_iterator i = myRoute.begin(); i != myRoute.end(); ++i) { + for (ConstROEdgeVector::const_iterator i = myRoute.begin(); i != myRoute.end(); ++i) { if (i != myRoute.begin()) { exitTimes += " "; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RORouteDef.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RORouteDef.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RORouteDef.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RORouteDef.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file RORouteDef.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: RORouteDef.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: RORouteDef.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Base class for a vehicle's route definition /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -42,30 +43,35 @@ #include #include "ROEdge.h" #include "RORoute.h" -#include -#include "ReferencedItem.h" +#include +#include #include "RORouteDef.h" #include "ROVehicle.h" -#include "ROCostCalculator.h" #ifdef CHECK_MEMORY_LEAKS #include #endif // CHECK_MEMORY_LEAKS +// =========================================================================== +// static members +// =========================================================================== +bool RORouteDef::myUsingJTRR(false); // =========================================================================== // method definitions // =========================================================================== RORouteDef::RORouteDef(const std::string& id, const unsigned int lastUsed, - const bool tryRepair) : - ReferencedItem(), Named(StringUtils::convertUmlaute(id)), - myPrecomputed(0), myLastUsed(lastUsed), myTryRepair(tryRepair) + const bool tryRepair, const bool mayBeDisconnected) : + Named(StringUtils::convertUmlaute(id)), + myPrecomputed(0), myLastUsed(lastUsed), myTryRepair(tryRepair), myMayBeDisconnected(mayBeDisconnected) {} RORouteDef::~RORouteDef() { for (std::vector::iterator i = myAlternatives.begin(); i != myAlternatives.end(); i++) { - delete *i; + if (myRouteRefs.count(*i) == 0) { + delete *i; + } } } @@ -80,6 +86,8 @@ RORouteDef::addAlternativeDef(const RORouteDef* alt) { std::copy(alt->myAlternatives.begin(), alt->myAlternatives.end(), back_inserter(myAlternatives)); + std::copy(alt->myAlternatives.begin(), alt->myAlternatives.end(), + std::inserter(myRouteRefs, myRouteRefs.end())); } @@ -116,11 +124,12 @@ repairCurrentRoute(router, begin, veh); return; } - if (ROCostCalculator::getCalculator().skipRouteCalculation()) { + if (RouteCostCalculator::getCalculator().skipRouteCalculation() + || OptionsCont::getOptions().getBool("remove-loops")) { myPrecomputed = myAlternatives[myLastUsed]; } else { // build a new route to test whether it is better - std::vector edges; + ConstROEdgeVector edges; router.compute(myAlternatives[0]->getFirst(), myAlternatives[0]->getLast(), &veh, begin, edges); // check whether the same route was already used int cheapest = -1; @@ -134,7 +143,7 @@ myPrecomputed = myAlternatives[cheapest]; } else { RGBColor* col = myAlternatives[0]->getColor() != 0 ? new RGBColor(*myAlternatives[0]->getColor()) : 0; - myPrecomputed = new RORoute(myID, 0, 1, edges, col); + myPrecomputed = new RORoute(myID, 0, 1, edges, col, myAlternatives[0]->getStops()); myNewRoute = true; } } @@ -146,32 +155,34 @@ SUMOTime begin, const ROVehicle& veh) const { MsgHandler* mh = (OptionsCont::getOptions().getBool("ignore-errors") ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()); - std::vector oldEdges = myAlternatives[0]->getEdgeVector(); - std::vector newEdges; - std::vector mandatory; + ConstROEdgeVector oldEdges = myAlternatives[0]->getEdgeVector(); + ConstROEdgeVector newEdges; + ConstROEdgeVector mandatory; if (oldEdges.size() == 1) { - /// should happen with jtrrouter only - router.compute(oldEdges.front(), oldEdges.front(), &veh, begin, newEdges); + if (myUsingJTRR) { + /// only ROJTRRouter is supposed to handle this type of input + router.compute(oldEdges.front(), 0, &veh, begin, newEdges); + } else { + newEdges = oldEdges; + } } else { // prepare mandatory edges mandatory.push_back(oldEdges.front()); - /*XXX add stop edges to the list of mandatory edges (ticket #988) - std::vector stops = veh.getStopEdges(); - for (std::vector::const_iterator i = stops.begin(); i != stops.end(); ++i) { + ConstROEdgeVector stops = veh.getStopEdges(); + for (ConstROEdgeVector::const_iterator i = stops.begin(); i != stops.end(); ++i) { if (*i != mandatory.back()) { mandatory.push_back(*i); } } - */ if (mandatory.size() < 2 || oldEdges.back() != mandatory.back()) { mandatory.push_back(oldEdges.back()); } assert(mandatory.size() >= 2); // removed prohibited - for (std::vector::iterator i = oldEdges.begin(); i != oldEdges.end();) { + for (ConstROEdgeVector::iterator i = oldEdges.begin(); i != oldEdges.end();) { if ((*i)->prohibits(&veh)) { if (std::find(mandatory.begin(), mandatory.end(), *i) != mandatory.end()) { - mh->inform("Stop edge '" + (*i)->getID() + "' does not allow vehicle '" + veh.getID() + "'."); + mh->inform("Mandatory edge '" + (*i)->getID() + "' does not allow vehicle '" + veh.getID() + "'."); return; } i = oldEdges.erase(i); @@ -181,44 +192,49 @@ } // reconnect remaining edges newEdges.push_back(*(oldEdges.begin())); - std::vector::iterator nextMandatory = mandatory.begin() + 1; - std::vector::iterator lastMandatory = newEdges.begin(); - for (std::vector::iterator i = oldEdges.begin() + 1; i != oldEdges.end(); ++i) { - if ((*(i - 1))->isConnectedTo(*i)) { - /// XXX could be connected from a prohibited lane only + ConstROEdgeVector::iterator nextMandatory = mandatory.begin() + 1; + size_t lastMandatory = 0; + for (ConstROEdgeVector::iterator i = oldEdges.begin() + 1; + i != oldEdges.end() && nextMandatory != mandatory.end(); ++i) { + if ((*(i - 1))->isConnectedTo(*i, &veh)) { newEdges.push_back(*i); } else { - std::vector edges; + ConstROEdgeVector edges; router.compute(newEdges.back(), *i, &veh, begin, edges); if (edges.size() == 0) { - if (*i == *nextMandatory) { - // fallback: try to route from last mandatory edge - if (newEdges.back() != *lastMandatory) { - router.compute(*lastMandatory, *nextMandatory, &veh, begin, edges); - } - if (edges.size() == 0) { - mh->inform("Mandatory edge '" + (*i)->getID() + "' not reachable by vehicle '" + veh.getID() + "'."); - return; - } else { - newEdges.erase(lastMandatory + 1, newEdges.end()); - std::copy(edges.begin() + 1, edges.end(), back_inserter(newEdges)); + // backtrack: try to route from last mandatory edge to next mandatory edge + // XXX add option for backtracking in smaller increments + // (i.e. previous edge to edge after *i) + // we would then need to decide whether we have found a good + // tradeoff between faithfulness to the input data and detour-length + if (newEdges.back() != newEdges[lastMandatory]) { + router.compute(newEdges[lastMandatory], *nextMandatory, &veh, begin, edges); + } + if (edges.size() == 0) { + mh->inform("Mandatory edge '" + (*i)->getID() + "' not reachable by vehicle '" + veh.getID() + "'."); + return; + } else { + while (*i != *nextMandatory) { + ++i; } + newEdges.erase(newEdges.begin() + lastMandatory + 1, newEdges.end()); } - } else { - std::copy(edges.begin() + 1, edges.end(), back_inserter(newEdges)); - } - if (*i == *nextMandatory) { - nextMandatory++; - lastMandatory = i; } + std::copy(edges.begin() + 1, edges.end(), back_inserter(newEdges)); + } + if (*i == *nextMandatory) { + nextMandatory++; + lastMandatory = newEdges.size() - 1; } } } if (myAlternatives[0]->getEdgeVector() != newEdges) { - WRITE_MESSAGE("Repaired route of vehicle '" + veh.getID() + "'."); + if (!myMayBeDisconnected) { + WRITE_WARNING("Repaired route of vehicle '" + veh.getID() + "'."); + } myNewRoute = true; RGBColor* col = myAlternatives[0]->getColor() != 0 ? new RGBColor(*myAlternatives[0]->getColor()) : 0; - myPrecomputed = new RORoute(myID, 0, 1, newEdges, col); + myPrecomputed = new RORoute(myID, 0, myAlternatives[0]->getProbability(), newEdges, col, myAlternatives[0]->getStops()); } else { myPrecomputed = myAlternatives[0]; } @@ -265,11 +281,11 @@ alt->setProbability(alt->getProbability() * scale); } } - ROCostCalculator::getCalculator().setCosts(alt, newCosts, *i == myAlternatives[myLastUsed]); + RouteCostCalculator::getCalculator().setCosts(alt, newCosts, *i == myAlternatives[myLastUsed]); } assert(myAlternatives.size() != 0); - ROCostCalculator::getCalculator().calculateProbabilities(veh, myAlternatives); - if (!ROCostCalculator::getCalculator().keepRoutes()) { + RouteCostCalculator::getCalculator().calculateProbabilities(myAlternatives, veh, veh->getDepartureTime()); + if (!RouteCostCalculator::getCalculator().keepRoutes()) { // remove with probability of 0 (not mentioned in Gawron) for (std::vector::iterator i = myAlternatives.begin(); i != myAlternatives.end();) { if ((*i)->getProbability() == 0) { @@ -280,13 +296,13 @@ } } } - if (myAlternatives.size() > ROCostCalculator::getCalculator().getMaxRouteNumber()) { + if (myAlternatives.size() > RouteCostCalculator::getCalculator().getMaxRouteNumber()) { // only keep the routes with highest probability sort(myAlternatives.begin(), myAlternatives.end(), ComparatorProbability()); - for (std::vector::iterator i = myAlternatives.begin() + ROCostCalculator::getCalculator().getMaxRouteNumber(); i != myAlternatives.end(); i++) { + for (std::vector::iterator i = myAlternatives.begin() + RouteCostCalculator::getCalculator().getMaxRouteNumber(); i != myAlternatives.end(); i++) { delete *i; } - myAlternatives.erase(myAlternatives.begin() + ROCostCalculator::getCalculator().getMaxRouteNumber(), myAlternatives.end()); + myAlternatives.erase(myAlternatives.begin() + RouteCostCalculator::getCalculator().getMaxRouteNumber(), myAlternatives.end()); // rescale probabilities SUMOReal newSum = 0; for (std::vector::iterator i = myAlternatives.begin(); i != myAlternatives.end(); i++) { @@ -337,24 +353,24 @@ RORouteDef* RORouteDef::copyOrigDest(const std::string& id) const { - RORouteDef* result = new RORouteDef(id, 0, true); + RORouteDef* result = new RORouteDef(id, 0, true, true); RORoute* route = myAlternatives[0]; RGBColor* col = route->getColor() != 0 ? new RGBColor(*route->getColor()) : 0; - std::vector edges; + ConstROEdgeVector edges; edges.push_back(route->getFirst()); edges.push_back(route->getLast()); - result->addLoadedAlternative(new RORoute(id, 0, 1, edges, col)); + result->addLoadedAlternative(new RORoute(id, 0, 1, edges, col, route->getStops())); return result; } RORouteDef* RORouteDef::copy(const std::string& id) const { - RORouteDef* result = new RORouteDef(id, 0, myTryRepair); + RORouteDef* result = new RORouteDef(id, 0, myTryRepair, myMayBeDisconnected); for (std::vector::const_iterator i = myAlternatives.begin(); i != myAlternatives.end(); i++) { RORoute* route = *i; RGBColor* col = route->getColor() != 0 ? new RGBColor(*route->getColor()) : 0; - result->addLoadedAlternative(new RORoute(id, 0, 1, route->getEdgeVector(), col)); + result->addLoadedAlternative(new RORoute(id, 0, 1, route->getEdgeVector(), col, route->getStops())); } return result; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RORouteDef.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RORouteDef.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RORouteDef.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RORouteDef.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file RORouteDef.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: RORouteDef.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RORouteDef.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Base class for a vehicle's route definition /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,8 +35,7 @@ #include #include #include -#include "ReferencedItem.h" -#include +#include #include "RORoute.h" @@ -60,7 +60,7 @@ * route through the network or even a route with alternatives depends on * the derived class. */ -class RORouteDef : public ReferencedItem, public Named { +class RORouteDef : public Named { public: /** @brief Constructor * @@ -68,7 +68,7 @@ * @param[in] color The color of the route */ RORouteDef(const std::string& id, const unsigned int lastUsed, - const bool tryRepair); + const bool tryRepair, const bool mayBeDisconnected); /// @brief Destructor @@ -105,6 +105,10 @@ const ROEdge* getDestination() const; + const RORoute* getFirstRoute() const { + return myAlternatives.front(); + } + /** @brief Saves the built route / route alternatives * * Writes the route into the given stream. @@ -139,6 +143,10 @@ /** @brief Returns the sum of the probablities of the contained routes */ SUMOReal getOverallProb() const; + static void setUsingJTRR() { + myUsingJTRR = true; + } + protected: /// @brief precomputed route for out-of-order computation mutable RORoute* myPrecomputed; @@ -149,10 +157,16 @@ /// @brief The alternatives std::vector myAlternatives; + /// @brief Routes which are deleted someplace else + std::set myRouteRefs; + /// @brief Information whether a new route was generated mutable bool myNewRoute; const bool myTryRepair; + const bool myMayBeDisconnected; + + static bool myUsingJTRR; private: /** Function-object for sorting routes from highest to lowest probability. */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RORoute.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RORoute.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RORoute.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RORoute.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,15 @@ /// @file RORoute.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann +/// @author Yun-Pang Floetteroed /// @date Sept 2002 -/// @version $Id: RORoute.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RORoute.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A complete router's route /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,7 +36,8 @@ #include #include #include -#include +#include +#include // =========================================================================== @@ -44,6 +47,7 @@ class ROVehicle; class OutputDevice; +typedef std::vector ConstROEdgeVector; // =========================================================================== // class definitions @@ -68,7 +72,8 @@ * @todo Are costs/prob really mandatory? */ RORoute(const std::string& id, SUMOReal costs, SUMOReal prob, - const std::vector& route, const RGBColor* const color); + const ConstROEdgeVector& route, const RGBColor* const color, + const std::vector& stops); /** @brief Copy constructor @@ -82,14 +87,6 @@ ~RORoute(); - /** @brief Adds an edge to the end of the route - * - * @param[in] edge The edge to add - * @todo What for? Isn't the route already complete? - */ - void add(ROEdge* edge); - - /** @brief Returns the first edge in the route * * @return The route's first edge @@ -155,7 +152,7 @@ * * @return The edges this route consists of */ - const std::vector& getEdgeVector() const { + const ConstROEdgeVector& getEdgeVector() const { return myRoute; } @@ -180,6 +177,14 @@ */ void addProbability(SUMOReal prob); + /** @brief Returns the list of stops this route contains + * + * @return list of stops + */ + const std::vector& getStops() const { + return myStops; + } + private: /// @brief The costs of the route SUMOReal myCosts; @@ -188,11 +193,14 @@ SUMOReal myProbability; /// @brief The edges the route consists of - std::vector myRoute; + ConstROEdgeVector myRoute; /// @brief The color of the route const RGBColor* myColor; + /// @brief List of the stops on the parsed route + std::vector myStops; + private: /// @brief Invalidated assignment operator diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RORouteHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RORouteHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RORouteHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RORouteHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Mon, 9 Jul 2001 -/// @version $Id: RORouteHandler.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RORouteHandler.cpp 18136 2015-03-24 15:10:45Z behrisch $ /// // Parser and container for routes during their loading /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -47,6 +47,7 @@ #include #include #include "RONet.h" +#include "ROLane.h" #include "RORouteHandler.h" #ifdef CHECK_MEMORY_LEAKS @@ -62,8 +63,12 @@ const bool emptyDestinationsAllowed, const bool ignoreErrors) : SUMORouteHandler(file), + myPedestrianRouter(0), myNet(net), myActivePlan(0), + myActiveContainerPlan(0), + myActivePlanSize(0), + myActiveContainerPlanSize(0), myTryRepair(tryRepair), myEmptyDestinationsAllowed(emptyDestinationsAllowed), myErrorOutput(ignoreErrors ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()), @@ -74,51 +79,58 @@ RORouteHandler::~RORouteHandler() { + delete myPedestrianRouter; } void -RORouteHandler::parseFromTo(std::string element, - const SUMOSAXAttributes& attrs) { +RORouteHandler::parseFromViaTo(std::string element, + const SUMOSAXAttributes& attrs) { + myActiveRoute.clear(); bool useTaz = OptionsCont::getOptions().getBool("with-taz"); - if (useTaz && !myVehicleParameter->wasSet(VEHPARS_TAZ_SET)) { + if (useTaz && !myVehicleParameter->wasSet(VEHPARS_FROM_TAZ_SET) && !myVehicleParameter->wasSet(VEHPARS_TO_TAZ_SET)) { WRITE_WARNING("Taz usage was requested but no taz present in " + element + " '" + myVehicleParameter->id + "'!"); useTaz = false; - } else if (!useTaz && !attrs.hasAttribute(SUMO_ATTR_FROM) && myVehicleParameter->wasSet(VEHPARS_TAZ_SET)) { - WRITE_WARNING("'from' attribute missing using taz for " + element + " '" + myVehicleParameter->id + "'!"); - useTaz = true; } - if (useTaz) { + bool ok = true; + if ((useTaz || !attrs.hasAttribute(SUMO_ATTR_FROM)) && myVehicleParameter->wasSet(VEHPARS_FROM_TAZ_SET)) { const ROEdge* fromTaz = myNet.getEdge(myVehicleParameter->fromTaz + "-source"); if (fromTaz == 0) { myErrorOutput->inform("Source taz '" + myVehicleParameter->fromTaz + "' not known for " + element + " '" + myVehicleParameter->id + "'!"); - } else if (fromTaz->getNoFollowing() == 0) { + } else if (fromTaz->getNumSuccessors() == 0) { myErrorOutput->inform("Source taz '" + myVehicleParameter->fromTaz + "' has no outgoing edges for " + element + " '" + myVehicleParameter->id + "'!"); } else { myActiveRoute.push_back(fromTaz); } + } else { + parseEdges(attrs.getOpt(SUMO_ATTR_FROM, myVehicleParameter->id.c_str(), ok, "", true), + myActiveRoute, "for " + element + " '" + myVehicleParameter->id + "'"); + } + if (!attrs.hasAttribute(SUMO_ATTR_VIA)) { + myInsertStopEdgesAt = (int)myActiveRoute.size(); + } + parseEdges(attrs.getOpt(SUMO_ATTR_VIA, myVehicleParameter->id.c_str(), ok, "", true), + myActiveRoute, "for " + element + " '" + myVehicleParameter->id + "'"); + if ((useTaz || !attrs.hasAttribute(SUMO_ATTR_TO)) && myVehicleParameter->wasSet(VEHPARS_TO_TAZ_SET)) { const ROEdge* toTaz = myNet.getEdge(myVehicleParameter->toTaz + "-sink"); if (toTaz == 0) { myErrorOutput->inform("Sink taz '" + myVehicleParameter->toTaz + "' not known for " + element + " '" + myVehicleParameter->id + "'!"); + } else if (toTaz->getNumPredecessors() == 0) { + myErrorOutput->inform("Sink taz '" + myVehicleParameter->toTaz + "' has no incoming edges for " + element + " '" + myVehicleParameter->id + "'!"); } else { myActiveRoute.push_back(toTaz); } } else { - bool ok = true; - parseEdges(attrs.get(SUMO_ATTR_FROM, myVehicleParameter->id.c_str(), ok), - myActiveRoute, "for " + element + " '" + myVehicleParameter->id + "'"); - parseEdges(attrs.get(SUMO_ATTR_TO, myVehicleParameter->id.c_str(), ok, !myEmptyDestinationsAllowed), + parseEdges(attrs.getOpt(SUMO_ATTR_TO, myVehicleParameter->id.c_str(), ok, "", true), myActiveRoute, "for " + element + " '" + myVehicleParameter->id + "'"); } myActiveRouteID = "!" + myVehicleParameter->id; if (myVehicleParameter->routeid == "") { myVehicleParameter->routeid = myActiveRouteID; } - closeRoute(true); } - void RORouteHandler::myStartElement(int element, const SUMOSAXAttributes& attrs) { @@ -126,6 +138,7 @@ switch (element) { case SUMO_TAG_PERSON: myActivePlan = new OutputDevice_String(false, 1); + myActivePlanSize = 0; myActivePlan->openTag(SUMO_TAG_PERSON); (*myActivePlan) << attrs; break; @@ -133,27 +146,62 @@ myActivePlan->openTag(SUMO_TAG_RIDE); (*myActivePlan) << attrs; myActivePlan->closeTag(); + myActivePlanSize++; break; } case SUMO_TAG_WALK: { - myActivePlan->openTag(SUMO_TAG_WALK); - (*myActivePlan) << attrs; - myActivePlan->closeTag(); + if (attrs.hasAttribute(SUMO_ATTR_EDGES)) { + // copy walk as it is + // XXX allow --repair? + myActivePlan->openTag(SUMO_TAG_WALK); + (*myActivePlan) << attrs; + myActivePlan->closeTag(); + myActivePlanSize++; + } else { + routePedestrian(attrs, *myActivePlan); + } + break; + } + case SUMO_TAG_CONTAINER: + myActiveContainerPlan = new OutputDevice_String(false, 1); + myActiveContainerPlanSize = 0; + myActiveContainerPlan->openTag(SUMO_TAG_CONTAINER); + (*myActiveContainerPlan) << attrs; + break; + case SUMO_TAG_TRANSPORT: { + myActiveContainerPlan->openTag(SUMO_TAG_TRANSPORT); + (*myActiveContainerPlan) << attrs; + myActiveContainerPlan->closeTag(); + myActiveContainerPlanSize++; + break; + } + case SUMO_TAG_TRANSHIP: { + if (attrs.hasAttribute(SUMO_ATTR_EDGES)) { + // copy walk as it is + // XXX allow --repair? + myActiveContainerPlan->openTag(SUMO_TAG_TRANSHIP); + (*myActiveContainerPlan) << attrs; + myActiveContainerPlan->closeTag(); + myActiveContainerPlanSize++; + } else { + routePedestrian(attrs, *myActiveContainerPlan); + } break; } case SUMO_TAG_FLOW: - parseFromTo("flow", attrs); + myActiveRouteProbability = DEFAULT_VEH_PROB; + parseFromViaTo("flow", attrs); break; case SUMO_TAG_TRIP: { - parseFromTo("trip", attrs); - closeVehicle(); + myActiveRouteProbability = DEFAULT_VEH_PROB; + parseFromViaTo("trip", attrs); } break; default: break; } // parse embedded vtype information - if (myCurrentVType != 0 && element != SUMO_TAG_VTYPE) { + if (myCurrentVType != 0 && element != SUMO_TAG_VTYPE && element != SUMO_TAG_PARAM) { SUMOVehicleParserHelper::parseVTypeEmbedded(*myCurrentVType, element, attrs); return; } @@ -195,6 +243,8 @@ void RORouteHandler::openRoute(const SUMOSAXAttributes& attrs) { + myActiveRoute.clear(); + myInsertStopEdgesAt = -1; // check whether the id is really necessary std::string rid; if (myCurrentAlternatives != 0) { @@ -246,15 +296,21 @@ RORouteHandler::myEndElement(int element) { SUMORouteHandler::myEndElement(element); switch (element) { - case SUMO_TAG_VTYPE: { + case SUMO_TAG_VTYPE: if (myNet.addVehicleType(myCurrentVType)) { if (myCurrentVTypeDistribution != 0) { myCurrentVTypeDistribution->add(myCurrentVType->defaultProbability, myCurrentVType); } } myCurrentVType = 0; - } - break; + break; + case SUMO_TAG_TRIP: + closeRoute(true); + closeVehicle(); + delete myVehicleParameter; + myVehicleParameter = 0; + myInsertStopEdgesAt = -1; + break; default: break; } @@ -271,7 +327,7 @@ return; } if (myVehicleParameter != 0) { - myErrorOutput->inform("Vehicle's '" + myVehicleParameter->id + "' route has no edges."); + myErrorOutput->inform("The route for vehicle '" + myVehicleParameter->id + "' has no edges."); } else { myErrorOutput->inform("Route '" + myActiveRouteID + "' has no edges."); } @@ -279,8 +335,14 @@ myActiveRouteStops.clear(); return; } + if (myActiveRoute.size() == 1 && myActiveRoute.front()->getType() == ROEdge::ET_DISTRICT) { + myErrorOutput->inform("The routing information for vehicle '" + myVehicleParameter->id + "' is insufficient."); + myActiveRouteID = ""; + myActiveRouteStops.clear(); + return; + } RORoute* route = new RORoute(myActiveRouteID, myCurrentCosts, myActiveRouteProbability, myActiveRoute, - myActiveRouteColor); + myActiveRouteColor, myActiveRouteStops); myActiveRoute.clear(); if (myCurrentAlternatives == 0) { if (myNet.getRouteDef(myActiveRouteID) != 0) { @@ -294,7 +356,7 @@ myActiveRouteStops.clear(); return; } else { - myCurrentAlternatives = new RORouteDef(myActiveRouteID, 0, mayBeDisconnected || myTryRepair); + myCurrentAlternatives = new RORouteDef(myActiveRouteID, 0, mayBeDisconnected || myTryRepair, mayBeDisconnected); myCurrentAlternatives->addLoadedAlternative(route); myNet.addRouteDef(myCurrentAlternatives); myCurrentAlternatives = 0; @@ -332,7 +394,7 @@ return; } // build the alternative cont - myCurrentAlternatives = new RORouteDef(id, index, myTryRepair); + myCurrentAlternatives = new RORouteDef(id, index, myTryRepair, false); if (attrs.hasAttribute(SUMO_ATTR_ROUTES)) { ok = true; StringTokenizer st(attrs.get(SUMO_ATTR_ROUTES, id.c_str(), ok)); @@ -372,6 +434,13 @@ } // get vehicle type SUMOVTypeParameter* type = myNet.getVehicleTypeSecure(myVehicleParameter->vtypeid); + if (type == 0) { + myErrorOutput->inform("The vehicle type '" + myVehicleParameter->vtypeid + "' for vehicle '" + myVehicleParameter->id + "' is not known."); + type = myNet.getVehicleTypeSecure(DEFAULT_VTYPE_ID); + } else { + // fix the type id in case we used a distribution + myVehicleParameter->vtypeid = type->id; + } // get the route RORouteDef* route = myNet.getRouteDef(myVehicleParameter->routeid); if (route == 0) { @@ -383,9 +452,10 @@ } // build the vehicle if (!MsgHandler::getErrorInstance()->wasInformed()) { - ROVehicle* veh = new ROVehicle(*myVehicleParameter, route, type); - myNet.addVehicle(myVehicleParameter->id, veh); - registerLastDepart(); + ROVehicle* veh = new ROVehicle(*myVehicleParameter, route, type, &myNet); + if (myNet.addVehicle(myVehicleParameter->id, veh)) { + registerLastDepart(); + } } } @@ -393,44 +463,77 @@ void RORouteHandler::closePerson() { myActivePlan->closeTag(); - myNet.addPerson(myVehicleParameter->depart, myActivePlan->getString()); - registerLastDepart(); + if (myActivePlanSize > 0) { + myNet.addPerson(myVehicleParameter->depart, myActivePlan->getString()); + registerLastDepart(); + } else { + WRITE_WARNING("Discarding person '" + myVehicleParameter->id + "' because it's plan is empty"); + } delete myVehicleParameter; myVehicleParameter = 0; delete myActivePlan; myActivePlan = 0; + myActivePlanSize = 0; +} + +void +RORouteHandler::closeContainer() { + myActiveContainerPlan->closeTag(); + if (myActiveContainerPlanSize > 0) { + myNet.addContainer(myVehicleParameter->depart, myActiveContainerPlan->getString()); + registerLastDepart(); + } else { + WRITE_WARNING("Discarding container '" + myVehicleParameter->id + "' because it's plan is empty"); + } + delete myVehicleParameter; + myVehicleParameter = 0; + delete myActiveContainerPlan; + myActiveContainerPlan = 0; + myActiveContainerPlanSize = 0; } void RORouteHandler::closeFlow() { // @todo: consider myScale? + if (myVehicleParameter->repetitionNumber == 0) { + delete myVehicleParameter; + myVehicleParameter = 0; + return; + } // let's check whether vehicles had to depart before the simulation starts myVehicleParameter->repetitionsDone = 0; - SUMOTime offsetToBegin = string2time(OptionsCont::getOptions().getString("begin")) - myVehicleParameter->depart; + const SUMOTime offsetToBegin = string2time(OptionsCont::getOptions().getString("begin")) - myVehicleParameter->depart; while (myVehicleParameter->repetitionsDone * myVehicleParameter->repetitionOffset < offsetToBegin) { myVehicleParameter->repetitionsDone++; if (myVehicleParameter->repetitionsDone == myVehicleParameter->repetitionNumber) { delete myVehicleParameter; + myVehicleParameter = 0; return; } } - SUMOVTypeParameter* type = myNet.getVehicleTypeSecure(myVehicleParameter->vtypeid); - RORouteDef* route = myNet.getRouteDef(myVehicleParameter->routeid); - if (type == 0) { - myErrorOutput->inform("The vehicle type '" + myVehicleParameter->vtypeid + "' for vehicle '" + myVehicleParameter->id + "' is not known."); - delete myVehicleParameter; - return; + if (myNet.getVehicleTypeSecure(myVehicleParameter->vtypeid) == 0) { + myErrorOutput->inform("The vehicle type '" + myVehicleParameter->vtypeid + "' for flow '" + myVehicleParameter->id + "' is not known."); } - if (route == 0) { - myErrorOutput->inform("Vehicle '" + myVehicleParameter->id + "' has no route."); + if (myVehicleParameter->routeid[0] == '!' && myNet.getRouteDef(myVehicleParameter->routeid) == 0) { + closeRoute(true); + } + if (myNet.getRouteDef(myVehicleParameter->routeid) == 0) { + myErrorOutput->inform("The route '" + myVehicleParameter->routeid + "' for flow '" + myVehicleParameter->id + "' is not known."); delete myVehicleParameter; + myVehicleParameter = 0; return; } myActiveRouteID = ""; - myNet.addFlow(myVehicleParameter, OptionsCont::getOptions().getBool("randomize-flows")); - registerLastDepart(); + if (!MsgHandler::getErrorInstance()->wasInformed()) { + if (myNet.addFlow(myVehicleParameter, OptionsCont::getOptions().getBool("randomize-flows"))) { + registerLastDepart(); + } else { + myErrorOutput->inform("Another flow with the id '" + myVehicleParameter->id + "' exists."); + } + } myVehicleParameter = 0; + myInsertStopEdgesAt = -1; } @@ -440,27 +543,57 @@ myActivePlan->openTag(SUMO_TAG_STOP); (*myActivePlan) << attrs; myActivePlan->closeTag(); + myActivePlanSize++; + return; + } + if (myActiveContainerPlan) { + myActiveContainerPlan->openTag(SUMO_TAG_STOP); + (*myActiveContainerPlan) << attrs; + myActiveContainerPlan->closeTag(); + myActiveContainerPlanSize++; return; } - bool ok = true; std::string errorSuffix; - if (myActiveRouteID != "") { - errorSuffix = " in route '" + myActiveRouteID + "'."; - } else { + if (myVehicleParameter != 0) { errorSuffix = " in vehicle '" + myVehicleParameter->id + "'."; + } else { + errorSuffix = " in route '" + myActiveRouteID + "'."; } SUMOVehicleParameter::Stop stop; - SUMOVehicleParserHelper::parseStop(stop, attrs); + bool ok = parseStop(stop, attrs, errorSuffix, myErrorOutput); + if (!ok) { + return; + } // try to parse the assigned bus stop - stop.busstop = attrs.getOpt(SUMO_ATTR_BUS_STOP, 0, ok, ""); - if (stop.busstop == "") { + ROEdge* edge = 0; + if (stop.busstop != "") { + const SUMOVehicleParameter::Stop* busstop = myNet.getBusStop(stop.busstop); + if (busstop == 0) { + myErrorOutput->inform("Unknown bus stop '" + stop.busstop + "'" + errorSuffix); + return; + } + stop.lane = busstop->lane; + stop.endPos = busstop->endPos; + stop.startPos = busstop->startPos; + edge = myNet.getEdge(stop.lane.substr(0, stop.lane.rfind('_'))); + } // try to parse the assigned container stop + else if (stop.containerstop != "") { + const SUMOVehicleParameter::Stop* containerstop = myNet.getContainerStop(stop.containerstop); + if (containerstop == 0) { + myErrorOutput->inform("Unknown container stop '" + stop.containerstop + "'" + errorSuffix); + } + stop.lane = containerstop->lane; + stop.endPos = containerstop->endPos; + stop.startPos = containerstop->startPos; + edge = myNet.getEdge(stop.lane.substr(0, stop.lane.rfind('_'))); + } else { // no, the lane and the position should be given stop.lane = attrs.getOpt(SUMO_ATTR_LANE, 0, ok, ""); if (!ok || stop.lane == "") { - myErrorOutput->inform("A stop must be placed on a bus stop or a lane" + errorSuffix); + myErrorOutput->inform("A stop must be placed on a bus stop, a container stop or a lane" + errorSuffix); return; } - ROEdge* edge = myNet.getEdge(stop.lane.substr(0, stop.lane.rfind('_'))); + edge = myNet.getEdge(stop.lane.substr(0, stop.lane.rfind('_'))); if (edge == 0) { myErrorOutput->inform("The lane '" + stop.lane + "' for a stop is not known" + errorSuffix); return; @@ -473,55 +606,20 @@ return; } } - - // get the standing duration - if (!attrs.hasAttribute(SUMO_ATTR_DURATION) && !attrs.hasAttribute(SUMO_ATTR_UNTIL)) { - stop.triggered = attrs.getOpt(SUMO_ATTR_TRIGGERED, 0, ok, true); - stop.duration = -1; - stop.until = -1; - } else { - stop.duration = attrs.getOptSUMOTimeReporting(SUMO_ATTR_DURATION, 0, ok, -1); - stop.until = attrs.getOptSUMOTimeReporting(SUMO_ATTR_UNTIL, 0, ok, -1); - if (!ok || (stop.duration < 0 && stop.until < 0)) { - myErrorOutput->inform("Invalid duration or end time is given for a stop" + errorSuffix); - return; - } - stop.triggered = attrs.getOpt(SUMO_ATTR_TRIGGERED, 0, ok, false); - } - stop.parking = attrs.getOpt(SUMO_ATTR_PARKING, 0, ok, stop.triggered); - if (!ok) { - myErrorOutput->inform("Invalid bool for 'triggered' or 'parking' for stop" + errorSuffix); - return; - } - - // expected persons - std::string expectedStr = attrs.getOpt(SUMO_ATTR_EXPECTED, 0, ok, ""); - std::set personIDs; - SUMOSAXAttributes::parseStringSet(expectedStr, personIDs); - stop.awaitedPersons = personIDs; - - const std::string idx = attrs.getOpt(SUMO_ATTR_INDEX, 0, ok, "end"); - if (idx == "end") { - stop.index = STOP_INDEX_END; - } else if (idx == "fit") { - stop.index = STOP_INDEX_FIT; - } else { - stop.index = attrs.get(SUMO_ATTR_INDEX, 0, ok); - if (!ok || stop.index < 0) { - myErrorOutput->inform("Invalid 'index' for stop" + errorSuffix); - return; - } - } if (myVehicleParameter != 0) { myVehicleParameter->stops.push_back(stop); } else { myActiveRouteStops.push_back(stop); } + if (myInsertStopEdgesAt >= 0) { + myActiveRoute.insert(myActiveRoute.begin() + myInsertStopEdgesAt, edge); + myInsertStopEdgesAt++; + } } void -RORouteHandler::parseEdges(const std::string& desc, std::vector& into, +RORouteHandler::parseEdges(const std::string& desc, ConstROEdgeVector& into, const std::string& rid) { if (desc[0] == BinaryFormatter::BF_ROUTE) { std::istringstream in(desc, std::ios::binary); @@ -533,8 +631,7 @@ const std::string id = st.next(); const ROEdge* edge = myNet.getEdge(id); if (edge == 0) { - myErrorOutput->inform("The edge '" + id + "' within the route " + rid + " is not known." - + "\n The route can not be build."); + myErrorOutput->inform("The edge '" + id + "' within the route " + rid + " is not known."); } else { into.push_back(edge); } @@ -543,4 +640,63 @@ } +bool +RORouteHandler::routePedestrian(const SUMOSAXAttributes& attrs, OutputDevice& plan) { + bool ok = true; + const char* id = myVehicleParameter->id.c_str(); + SUMOReal departPos = attrs.getOpt(SUMO_ATTR_DEPARTPOS, id, ok, 0); + SUMOReal arrivalPos = attrs.getOpt(SUMO_ATTR_ARRIVALPOS, id, ok, -NUMERICAL_EPS); + assert(!attrs.hasAttribute(SUMO_ATTR_EDGES)); + assert(myActiveRoute.size() == 0); + const std::string fromID = attrs.get(SUMO_ATTR_FROM, id, ok); + const std::string toID = attrs.get(SUMO_ATTR_TO, id, ok); + const ROEdge* from = myNet.getEdge(fromID); + if (from == 0) { + myErrorOutput->inform("The edge '" + fromID + "' within a walk of " + myVehicleParameter->id + " is not known." + + "\n The route can not be build."); + ok = false; + } + const ROEdge* to = myNet.getEdge(toID); + if (to == 0) { + myErrorOutput->inform("The edge '" + toID + "' within a walk of " + myVehicleParameter->id + " is not known." + + "\n The route can not be build."); + ok = false; + } + if (ok) { + if (myPedestrianRouter == 0) { + myPedestrianRouter = new ROPedestrianRouterDijkstra(); + } + myPedestrianRouter->compute(from, to, + SUMOVehicleParameter::interpretEdgePos(departPos, from->getLength(), SUMO_ATTR_DEPARTPOS, "person walking from " + fromID), + SUMOVehicleParameter::interpretEdgePos(arrivalPos, to->getLength(), SUMO_ATTR_ARRIVALPOS, "person walking to " + toID), + DEFAULT_PEDESTRIAN_SPEED, 0, 0, myActiveRoute); + if (myActiveRoute.empty()) { + myErrorOutput->inform("No connection found between '" + fromID + "' and '" + toID + "' for person '" + myVehicleParameter->id + "'."); + return false; + } + myActivePlan->openTag(SUMO_TAG_WALK); + if (attrs.hasAttribute(SUMO_ATTR_DEPARTPOS)) { + plan.writeAttr(SUMO_ATTR_DEPARTPOS, attrs.get(SUMO_ATTR_DEPARTPOS, id, ok)); + } + if (attrs.hasAttribute(SUMO_ATTR_ARRIVALPOS)) { + plan.writeAttr(SUMO_ATTR_ARRIVALPOS, attrs.get(SUMO_ATTR_ARRIVALPOS, id, ok)); + } + if (attrs.hasAttribute(SUMO_ATTR_DURATION)) { + plan.writeAttr(SUMO_ATTR_DURATION, attrs.getSUMOTimeReporting(SUMO_ATTR_DURATION, id, ok)); + } + if (attrs.hasAttribute(SUMO_ATTR_SPEED)) { + plan.writeAttr(SUMO_ATTR_SPEED, attrs.get(SUMO_ATTR_SPEED, id, ok)); + } + if (attrs.hasAttribute(SUMO_ATTR_BUS_STOP)) { + plan.writeAttr(SUMO_ATTR_BUS_STOP, attrs.get(SUMO_ATTR_BUS_STOP, id, ok)); + } + plan.writeAttr(SUMO_ATTR_EDGES, myActiveRoute); + myActivePlan->closeTag(); + myActivePlanSize++; + } + myActiveRoute.clear(); + return ok; +} + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RORouteHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RORouteHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/RORouteHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/RORouteHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 9 Jul 2001 -/// @version $Id: RORouteHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RORouteHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Parser and container for routes during their loading /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,6 +36,7 @@ #include #include #include +#include #include @@ -44,6 +45,7 @@ // =========================================================================== class OutputDevice_String; class ROEdge; +class ROLane; class RONet; class RORoute; class RORouteDef; @@ -102,8 +104,8 @@ * @param[in] attrs Attributes within the currently opened element * @exception ProcessError If something fails */ - void parseFromTo(std::string element, - const SUMOSAXAttributes& attrs); + void parseFromViaTo(std::string element, + const SUMOSAXAttributes& attrs); /** opens a type distribution for reading */ @@ -134,6 +136,9 @@ /// Ends the processing of a person void closePerson(); + /// Ends the processing of a container + void closeContainer(); + /// Ends the processing of a flow void closeFlow(); @@ -141,19 +146,35 @@ void addStop(const SUMOSAXAttributes& attrs); /// Parse edges from strings - void parseEdges(const std::string& desc, std::vector& into, + void parseEdges(const std::string& desc, ConstROEdgeVector& into, const std::string& rid); + /// @brief route a walking person and write the corresponding walk element (return whether sucessful) + bool routePedestrian(const SUMOSAXAttributes& attrs, OutputDevice& plan); + protected: + /// @brief the router for pedestrians + typedef PedestrianRouterDijkstra ROPedestrianRouterDijkstra; + ROPedestrianRouterDijkstra* myPedestrianRouter; + /// @brief The current route RONet& myNet; /// @brief The current route - std::vector myActiveRoute; + ConstROEdgeVector myActiveRoute; /// @brief The plan of the current person OutputDevice_String* myActivePlan; + /// @brief The plan of the current container + OutputDevice_String* myActiveContainerPlan; + + /// @brief The number of stages in myActivePlan + int myActivePlanSize; + + /// @brief The number of stages in myActiveContainerPlan + int myActiveContainerPlanSize; + /// @brief Information whether routes shall be repaired const bool myTryRepair; @@ -172,9 +193,6 @@ /// @brief The currently parsed route alternatives RORouteDef* myCurrentAlternatives; - /// @brief The currently parsed route costs - SUMOReal myCurrentCosts; - private: /// @brief Invalidated copy constructor RORouteHandler(const RORouteHandler& s); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROVehicleCont.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROVehicleCont.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROVehicleCont.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROVehicleCont.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: ROVehicleCont.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROVehicleCont.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A container for vehicles sorted by their departure time /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROVehicleCont.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROVehicleCont.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROVehicleCont.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROVehicleCont.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: ROVehicleCont.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROVehicleCont.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A container for vehicles sorted by their departure time /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROVehicle.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROVehicle.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROVehicle.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROVehicle.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Axel Wegener /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: ROVehicle.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROVehicle.cpp 18136 2015-03-24 15:10:45Z behrisch $ /// // A vehicle as used by router /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -42,6 +43,7 @@ #include "ROVehicle.h" #include "RORoute.h" #include "ROHelper.h" +#include "RONet.h" #ifdef CHECK_MEMORY_LEAKS #include @@ -52,16 +54,67 @@ // method definitions // =========================================================================== ROVehicle::ROVehicle(const SUMOVehicleParameter& pars, - RORouteDef* route, const SUMOVTypeParameter* type) - : myParameter(pars), myType(type), myRoute(route) {} + RORouteDef* route, const SUMOVTypeParameter* type, const RONet* net) + : myParameter(pars), myType(type), myRoute(route), myRoutingSuccess(false) { + myParameter.stops.clear(); + if (route != 0) { + for (std::vector::const_iterator s = route->getFirstRoute()->getStops().begin(); s != route->getFirstRoute()->getStops().end(); ++s) { + addStop(*s, net); + } + } + for (std::vector::const_iterator s = pars.stops.begin(); s != pars.stops.end(); ++s) { + addStop(*s, net); + } +} + + +void +ROVehicle::addStop(const SUMOVehicleParameter::Stop& stopPar, const RONet* net) { + const ROEdge* stopEdge = net->getEdge(stopPar.lane.substr(0, stopPar.lane.rfind("_"))); + if (stopEdge == 0) { + // warn here? + return; + } + // where to insert the stop + std::vector::iterator iter = myParameter.stops.begin(); + ConstROEdgeVector::iterator edgeIter = myStopEdges.begin(); + if (stopPar.index == STOP_INDEX_END || stopPar.index >= static_cast(myParameter.stops.size())) { + if (myParameter.stops.size() > 0) { + iter = myParameter.stops.end(); + edgeIter = myStopEdges.end(); + } + } else { + if (stopPar.index == STOP_INDEX_FIT) { + const ConstROEdgeVector edges = myRoute->getFirstRoute()->getEdgeVector(); + ConstROEdgeVector::const_iterator stopEdgeIt = std::find(edges.begin(), edges.end(), stopEdge); + if (stopEdgeIt == edges.end()) { + iter = myParameter.stops.end(); + edgeIter = myStopEdges.end(); + } else { + while (iter != myParameter.stops.end()) { + if (edgeIter > stopEdgeIt || (edgeIter == stopEdgeIt && iter->endPos >= stopPar.endPos)) { + break; + } + ++iter; + ++edgeIter; + } + } + } else { + iter += stopPar.index; + edgeIter += stopPar.index; + } + } + myParameter.stops.insert(iter, stopPar); + myStopEdges.insert(edgeIter, stopEdge); +} ROVehicle::~ROVehicle() {} void -ROVehicle::saveAllAsXML(OutputDevice& os, OutputDevice* const altos, - OutputDevice* const typeos, bool withExitTimes) const { +ROVehicle::saveTypeAsXML(OutputDevice& os, OutputDevice* const altos, + OutputDevice* const typeos) const { // check whether the vehicle's type was saved before if (myType != 0 && !myType->saved) { // ... save if not @@ -75,28 +128,24 @@ } myType->saved = true; } +} + +void +ROVehicle::saveAllAsXML(OutputDevice& os, bool asAlternatives, bool withExitTimes) const { // write the vehicle (new style, with included routes) myParameter.write(os, OptionsCont::getOptions()); - if (altos != 0) { - myParameter.write(*altos, OptionsCont::getOptions()); - } - // check whether the route shall be saved - if (!myRoute->isSaved()) { - myRoute->writeXMLDefinition(os, this, false, withExitTimes); - if (altos != 0) { - myRoute->writeXMLDefinition(*altos, this, true, withExitTimes); - } - } + // save the route + myRoute->writeXMLDefinition(os, this, asAlternatives, withExitTimes); myParameter.writeStops(os); - if (altos != 0) { - myParameter.writeStops(*altos); + for (std::map::const_iterator j = myParameter.getMap().begin(); j != myParameter.getMap().end(); ++j) { + os.openTag(SUMO_TAG_PARAM); + os.writeAttr(SUMO_ATTR_KEY, (*j).first); + os.writeAttr(SUMO_ATTR_VALUE, (*j).second); + os.closeTag(); } os.closeTag(); - if (altos != 0) { - altos->closeTag(); - } } @@ -106,15 +155,5 @@ } -ROVehicle* -ROVehicle::copy(const std::string& id, unsigned int depTime, - RORouteDef* newRoute) const { - SUMOVehicleParameter pars(myParameter); - pars.id = id; - pars.depart = depTime; - return new ROVehicle(pars, newRoute, myType); -} - - /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROVehicle.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROVehicle.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/router/ROVehicle.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/router/ROVehicle.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file ROVehicle.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: ROVehicle.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ROVehicle.h 18136 2015-03-24 15:10:45Z behrisch $ /// // A vehicle as used by router /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,10 +34,10 @@ #include #include +#include #include -#include -#include -#include +#include +#include // =========================================================================== @@ -45,7 +46,9 @@ class RORouteDef; class OutputDevice; class ROEdge; +class RONet; +typedef std::vector ConstROEdgeVector; // =========================================================================== // class definitions @@ -63,7 +66,8 @@ * @param[in] type The type of the vehicle */ ROVehicle(const SUMOVehicleParameter& pars, - RORouteDef* route, const SUMOVTypeParameter* type); + RORouteDef* route, const SUMOVTypeParameter* type, + const RONet* net); /// @brief Destructor @@ -101,50 +105,78 @@ } - /** @brief Returns the time the vehicle starts at + /** @brief Returns the time the vehicle starts at, 0 for triggered vehicles * * @return The vehicle's depart time */ SUMOTime getDepartureTime() const { + return MAX2(0, myParameter.depart); + } + + /** @brief Returns the time the vehicle starts at, -1 for triggered vehicles + * + * @return The vehicle's depart time + */ + SUMOTime getDepart() const { return myParameter.depart; } + const ConstROEdgeVector& getStopEdges() const { + return myStopEdges; + } /// @brief Returns the vehicle's maximum speed SUMOReal getMaxSpeed() const; inline SUMOVehicleClass getVClass() const { - return getType() != 0 ? getType()->vehicleClass : DEFAULT_VEH_CLASS; + return getType() != 0 ? getType()->vehicleClass : SVC_IGNORING; } - - /** @brief Saves the complete vehicle description. + /** @brief Returns an upper bound for the speed factor of this vehicle * - * Saves the vehicle type if it was not saved before. - * Saves the vehicle route if it was not saved before. - * Saves the vehicle itself. + * @return the maximum speed factor + */ + inline SUMOReal getChosenSpeedFactor() const { + return SUMOReal(2. * getType()->speedDev + 1.) * getType()->speedFactor; + } + + + /** @brief Saves the vehicle type if it was not saved before. * * @param[in] os The routes - output device to store the vehicle's description into * @param[in] altos The route alternatives - output device to store the vehicle's description into * @param[in] typeos The types - output device to store the vehicle types into + * @exception IOError If something fails (not yet implemented) + */ + void saveTypeAsXML(OutputDevice& os, OutputDevice* const altos, + OutputDevice* const typeos) const; + + /** @brief Saves the complete vehicle description. + * + * Saves the vehicle itself including the route and stops. + * + * @param[in] os The routes or alternatives output device to store the vehicle's description into + * @param[in] asAlternatives Whether the route shall be saved as route alternatives * @param[in] withExitTimes whether exit times for the edges shall be written * @exception IOError If something fails (not yet implemented) */ - void saveAllAsXML(OutputDevice& os, OutputDevice* const altos, - OutputDevice* const typeos, bool withExitTimes) const; + void saveAllAsXML(OutputDevice& os, bool asAlternatives, bool withExitTimes) const; + inline void setRoutingSuccess(const bool val) { + myRoutingSuccess = val; + } - /** @brief Returns a copy of the vehicle using a new id, departure time and route - * - * @param[in] id the new id to use - * @param[in] depTime The new vehicle's departure time - * @param[in] newRoute The new vehicle's route - * @return The new vehicle + inline bool getRoutingSuccess() const { + return myRoutingSuccess; + } +private: + /** @brief Adds a stop to this vehicle * - * @todo Is this used? What for if everything is replaced? + * @param[in] stopPar the stop paramters + * @param[in] net pointer to the network, used for edge retrieval */ - virtual ROVehicle* copy(const std::string& id, unsigned int depTime, RORouteDef* newRoute) const; + void addStop(const SUMOVehicleParameter::Stop& stopPar, const RONet* net); protected: @@ -157,6 +189,12 @@ /// @brief The route the vehicle takes RORouteDef* const myRoute; + /// @brief The edges where the vehicle stops + ConstROEdgeVector myStopEdges; + + /// @brief Whether the last routing was successful + bool myRoutingSuccess; + private: /// @brief Invalidated copy constructor diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/sumo_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/sumo_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/sumo_main.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/sumo_main.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Thimor Bohn /// @author Michael Behrisch /// @date Tue, 20 Nov 2001 -/// @version $Id: sumo_main.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: sumo_main.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Main for SUMO /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -65,6 +66,11 @@ #include #endif +#ifndef NO_TRACI +#include +#endif + + #ifdef CHECK_MEMORY_LEAKS #include #endif @@ -93,6 +99,11 @@ #endif MSNet* net = new MSNet(vc, new MSEventControl(), new MSEventControl(), new MSEventControl()); +#ifndef NO_TRACI + // need to init TraCI-Server before loading routes to catch VEHICLE_STATE_BUILT + TraCIServer::openSocket(std::map()); +#endif + NLEdgeControlBuilder eb; NLDetectorBuilder db(*net); NLJunctionControlBuilder jb(*net, db); @@ -116,7 +127,7 @@ OptionsCont& oc = OptionsCont::getOptions(); // give some application descriptions oc.setApplicationDescription("A microscopic road traffic simulation."); - oc.setApplicationName("sumo", "SUMO sumo Version " + (std::string)VERSION_STRING); + oc.setApplicationName("sumo", "SUMO Version " + getBuildName(VERSION_STRING)); int ret = 0; MSNet* net = 0; try { @@ -128,13 +139,13 @@ SystemFrame::close(); return 0; } - XMLSubSys::setValidation(oc.getBool("xml-validation")); + XMLSubSys::setValidation(oc.getString("xml-validation"), oc.getString("xml-validation.net")); MsgHandler::initOutputOptions(); if (!MSFrame::checkOptions()) { throw ProcessError(); } RandHelper::initRandGlobal(); - RandHelper::initRandGlobal(&MSVehicleControl::myVehicleParamsRNG); + RandHelper::initRandGlobal(MSRouteHandler::getParsingRNG()); // load the net net = load(oc); if (net != 0) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/tools/emissionsDrivingCycle_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/tools/emissionsDrivingCycle_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/tools/emissionsDrivingCycle_main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/tools/emissionsDrivingCycle_main.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,232 @@ +/****************************************************************************/ +/// @file emissionsDrivingCycle_main.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Wed, 21.08.2013 +/// @version $Id: emissionsDrivingCycle_main.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Main for an emissions calculator +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#ifdef HAVE_VERSION_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "TrajectoriesHandler.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// functions +// =========================================================================== + + +/* ------------------------------------------------------------------------- + * main + * ----------------------------------------------------------------------- */ +int +main(int argc, char** argv) { + // build options + OptionsCont& oc = OptionsCont::getOptions(); + // give some application descriptions + oc.setApplicationDescription("Computes emissions by driving a time line."); + oc.setApplicationName("emissionsDrivingCycle", "SUMO emissionsDrivingCycle Version " + getBuildName(VERSION_STRING)); + // add options + + SystemFrame::addConfigurationOptions(oc); + oc.addOptionSubTopic("Input"); + oc.doRegister("timeline-file", 't', new Option_FileName()); + oc.addSynonyme("timeline", "timeline-file"); + oc.addDescription("timeline-file", "Input", "Defines the file to read the driving cycle from."); + + oc.doRegister("netstate-file", 'n', new Option_FileName()); + oc.addSynonyme("netstate", "netstate-file"); + oc.addSynonyme("amitran", "netstate-file"); + oc.addDescription("netstate-file", "Input", "Defines the netstate, route and trajectory files to read the driving cycles from."); + + oc.doRegister("emission-class", 'e', new Option_String("unknown")); + oc.addDescription("emission-class", "Input", "Defines for which emission class the emissions shall be generated. "); + + + oc.addOptionSubTopic("Processing"); + oc.doRegister("compute-a", 'a', new Option_Bool(false)); + oc.addDescription("compute-a", "Processing", "If set, the acceleration is computed instead of being read from the file. "); + + oc.doRegister("skip-first", 's', new Option_Bool(false)); + oc.addDescription("skip-first", "Processing", "If set, the first line of the read file is skipped."); + + oc.doRegister("kmh", new Option_Bool(false)); + oc.addDescription("kmh", "Processing", "If set, the given speed is interpreted as being given in km/h."); + + oc.doRegister("have-slope", new Option_Bool(false)); + oc.addDescription("have-slope", "Processing", "If set, the fourth column is read and used as slope (in deg)."); + + oc.doRegister("slope", new Option_Float(0)); + oc.addDescription("slope", "Processing", "Sets a global slope (in deg) that is used if the file does not contain slope information."); + + oc.addOptionSubTopic("Output"); + oc.doRegister("output-file", 'o', new Option_String()); + oc.addSynonyme("output", "output-file"); + oc.addDescription("output", "Output", "Defines the file to write the emission cycle results into. "); + + oc.doRegister("emission-output", new Option_FileName()); + oc.addDescription("emission-output", "Output", "Save the emission values of each vehicle in XML"); + + oc.addOptionSubTopic("Emissions"); + oc.doRegister("phemlight-path", new Option_FileName("./PHEMlight/")); + oc.addDescription("phemlight-path", "Emissions", "Determines where to load PHEMlight definitions from."); + + SystemFrame::addReportOptions(oc); + oc.doRegister("quiet", 'q', new Option_Bool(false)); + oc.addDescription("quiet", "Report", "Not writing anything."); + + // run + int ret = 0; + bool quiet = false; + try { + // initialise the application system (messaging, xml, options) + XMLSubSys::init(); + OptionsIO::getOptions(true, argc, argv); + OptionsCont& oc = OptionsCont::getOptions(); + if (oc.processMetaOptions(argc < 2)) { + SystemFrame::close(); + return 0; + } + + quiet = oc.getBool("quiet"); + if (!oc.isSet("timeline-file") && !oc.isSet("netstate-file")) { + throw ProcessError("Either a timeline or a netstate / amitran file must be given."); + } + if (!oc.isSet("output-file") && (oc.isSet("timeline-file") || !oc.isSet("emission-output"))) { + throw ProcessError("The output file must be given."); + } + std::ostream* out = 0; + if (oc.isSet("output-file")) { + out = new std::ofstream(oc.getString("output-file").c_str()); + } + OutputDevice::createDeviceByOption("emission-output", "emission-export", "emission_file.xsd"); + OutputDevice* xmlOut = 0; + if (oc.isSet("emission-output")) { + xmlOut = &OutputDevice::getDeviceByOption("emission-output"); + } else if (out == 0) { + out = &std::cout; + } + + const SUMOEmissionClass defaultClass = PollutantsInterface::getClassByName(oc.getString("emission-class")); + TrajectoriesHandler handler(oc.getBool("compute-a"), defaultClass, oc.getFloat("slope"), out, xmlOut); + + if (oc.isSet("timeline-file")) { + bool skipFirst = oc.getBool("skip-first"); + const bool computeA = oc.getBool("compute-a"); + const bool inKMH = oc.getBool("kmh"); + const bool haveSlope = oc.getBool("have-slope"); + SUMOReal l = 0; + + LineReader lr(oc.getString("timeline-file")); + while (lr.hasMore()) { + std::string line = lr.readLine(); + if (skipFirst) { + skipFirst = false; + continue; + } + StringTokenizer st(StringUtils::prune(line), ";"); + if (st.size() < 2) { + throw ProcessError("Each line must at least include the time and the speed."); + } + try { + const SUMOReal t = TplConvert::_2SUMOReal(st.next().c_str()); + SUMOReal v = TplConvert::_2SUMOReal(st.next().c_str()); + if (inKMH) { + v /= 3.6; + } + l += v; + const SUMOReal a = !computeA && st.hasNext() ? TplConvert::_2SUMOReal(st.next().c_str()) : TrajectoriesHandler::INVALID_VALUE; + const SUMOReal s = haveSlope ? TplConvert::_2SUMOReal(st.next().c_str()) : TrajectoriesHandler::INVALID_VALUE; + handler.writeEmissions(*out, "", defaultClass, t, v, a, s); + } catch (EmptyData&) { + throw ProcessError("Missing an entry in line '" + line + "'."); + } catch (NumberFormatException&) { + throw ProcessError("Not numeric entry in line '" + line + "'."); + } + } + if (!quiet) { + std::cout << "sums" << std::endl + << "length:" << l << std::endl; + } + } + if (oc.isSet("netstate-file")) { + XMLSubSys::runParser(handler, oc.getString("netstate-file")); + } + if (!quiet) { + handler.writeSums(std::cout, ""); + } + } catch (InvalidArgument& e) { + MsgHandler::getErrorInstance()->inform(e.what()); + MsgHandler::getErrorInstance()->inform("Quitting (on error).", false); + ret = 1; + } catch (ProcessError& e) { + if (std::string(e.what()) != std::string("Process Error") && std::string(e.what()) != std::string("")) { + MsgHandler::getErrorInstance()->inform(e.what()); + } + MsgHandler::getErrorInstance()->inform("Quitting (on error).", false); + ret = 1; +#ifndef _DEBUG + } catch (...) { + MsgHandler::getErrorInstance()->inform("Quitting (on unknown error).", false); + ret = 1; +#endif + } + SystemFrame::close(); + if (ret == 0 && !quiet) { + std::cout << "Success." << std::endl; + } + return ret; +} + + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/tools/emissionsMap_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/tools/emissionsMap_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/tools/emissionsMap_main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/tools/emissionsMap_main.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,206 @@ +/****************************************************************************/ +/// @file emissionsMap_main.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Wed, 21.08.2013 +/// @version $Id: emissionsMap_main.cpp 17682 2015-01-23 07:27:34Z behrisch $ +/// +// Main for an emissions map writer +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2013 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#ifdef HAVE_VERSION_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// functions +// =========================================================================== + + +/* ------------------------------------------------------------------------- + * main + * ----------------------------------------------------------------------- */ +void single(const std::string& of, const std::string& className, SUMOEmissionClass c, + SUMOReal vMin, SUMOReal vMax, SUMOReal vStep, + SUMOReal aMin, SUMOReal aMax, SUMOReal aStep, + SUMOReal sMin, SUMOReal sMax, SUMOReal sStep, + bool verbose) { + if (verbose) { + WRITE_MESSAGE("Writing map of '" + className + "' into '" + of + "'."); + } + std::ofstream o(of.c_str()); + for (SUMOReal v = vMin; v <= vMax; v += vStep) { + for (SUMOReal a = aMin; a <= aMax; a += aStep) { + for (SUMOReal s = sMin; s <= sMax; s += sStep) { + const PollutantsInterface::Emissions result = PollutantsInterface::computeAll(c, v, a, s); + o << v << ";" << a << ";" << s << ";" << "CO" << ";" << result.CO << std::endl; + o << v << ";" << a << ";" << s << ";" << "CO2" << ";" << result.CO2 << std::endl; + o << v << ";" << a << ";" << s << ";" << "HC" << ";" << result.HC << std::endl; + o << v << ";" << a << ";" << s << ";" << "PMx" << ";" << result.PMx << std::endl; + o << v << ";" << a << ";" << s << ";" << "NOx" << ";" << result.NOx << std::endl; + o << v << ";" << a << ";" << s << ";" << "fuel" << ";" << result.fuel << std::endl; + } + } + } +} + + + + +int +main(int argc, char** argv) { + // build options + OptionsCont& oc = OptionsCont::getOptions(); + // give some application descriptions + oc.setApplicationDescription("Builds and writes an emissions map."); + oc.setApplicationName("emissionsMap", "SUMO emissionsMap Version " + getBuildName(VERSION_STRING)); + // add options + SystemFrame::addConfigurationOptions(oc); + oc.addOptionSubTopic("Processing"); + oc.doRegister("iterate", 'i', new Option_Bool(false)); + oc.addDescription("iterate", "Processing", "If set, maps for all available emissions are written."); + + oc.doRegister("emission-class", 'e', new Option_String()); + oc.addDescription("emission-class", "Processing", "Defines the name of the emission class to generate the map for."); + + oc.doRegister("v-min", new Option_Float(0.)); + oc.addDescription("v-min", "Processing", "Defines the minimum velocity boundary of the map to generate (in m/s)."); + oc.doRegister("v-max", new Option_Float(50.)); + oc.addDescription("v-max", "Processing", "Defines the maximum velocity boundary of the map to generate (in m/s)."); + oc.doRegister("v-step", new Option_Float(2.)); + oc.addDescription("v-step", "Processing", "Defines the velocity step size (in m/s)."); + oc.doRegister("a-min", new Option_Float(-4.)); + oc.addDescription("a-min", "Processing", "Defines the minimum acceleration boundary of the map to generate (in m/s^2)."); + oc.doRegister("a-max", new Option_Float(4.)); + oc.addDescription("a-max", "Processing", "Defines the maximum acceleration boundary of the map to generate (in m/s^2)."); + oc.doRegister("a-step", new Option_Float(.5)); + oc.addDescription("a-step", "Processing", "Defines the acceleration step size (in m/s^2)."); + oc.doRegister("s-min", new Option_Float(-10.)); + oc.addDescription("s-min", "Processing", "Defines the minimum slope boundary of the map to generate (in deg)."); + oc.doRegister("s-max", new Option_Float(10.)); + oc.addDescription("s-max", "Processing", "Defines the maximum slope boundary of the map to generate (in deg)."); + oc.doRegister("s-step", new Option_Float(1.)); + oc.addDescription("s-step", "Processing", "Defines the slope step size (in deg)."); + + oc.addOptionSubTopic("Output"); + oc.doRegister("output-file", 'o', new Option_String()); + oc.addSynonyme("output", "output-file"); + oc.addDescription("output", "Output", "Defines the file (or the path if --iterate was set) to write the map(s) into."); + + oc.addOptionSubTopic("Emissions"); + oc.doRegister("phemlight-path", new Option_FileName("./PHEMlight/")); + oc.addDescription("phemlight-path", "Emissions", "Determines where to load PHEMlight definitions from."); + + SystemFrame::addReportOptions(oc); + + // run + int ret = 0; + try { + // initialise the application system (messaging, xml, options) + XMLSubSys::init(); + OptionsIO::getOptions(true, argc, argv); + OptionsCont& oc = OptionsCont::getOptions(); + if (oc.processMetaOptions(argc < 2)) { + SystemFrame::close(); + return 0; + } + + SUMOReal vMin = oc.getFloat("v-min"); + SUMOReal vMax = oc.getFloat("v-max"); + SUMOReal vStep = oc.getFloat("v-step"); + SUMOReal aMin = oc.getFloat("a-min"); + SUMOReal aMax = oc.getFloat("a-max"); + SUMOReal aStep = oc.getFloat("a-step"); + SUMOReal sMin = oc.getFloat("s-min"); + SUMOReal sMax = oc.getFloat("s-max"); + SUMOReal sStep = oc.getFloat("s-step"); + if (!oc.getBool("iterate")) { + if (!oc.isSet("emission-class")) { + throw ProcessError("The emission class (-e) must be given."); + } + if (!oc.isSet("output-file")) { + throw ProcessError("The output file (-o) must be given."); + } + const SUMOEmissionClass c = PollutantsInterface::getClassByName(oc.getString("emission-class")); + single(oc.getString("output-file"), oc.getString("emission-class"), + c, vMin, vMax, vStep, aMin, aMax, aStep, sMin, sMax, sStep, oc.getBool("verbose")); + } else { + if (!oc.isSet("output-file")) { + oc.set("output-file", "./"); + } + const std::vector classes = PollutantsInterface::getAllClasses(); + for (std::vector::const_iterator ci = classes.begin(); ci != classes.end(); ++ci) { + SUMOEmissionClass c = *ci; + single(oc.getString("output-file") + PollutantsInterface::getName(c) + ".csv", PollutantsInterface::getName(c), + c, vMin, vMax, vStep, aMin, aMax, aStep, sMin, sMax, sStep, oc.getBool("verbose")); + } + } + } catch (InvalidArgument& e) { + MsgHandler::getErrorInstance()->inform(e.what()); + MsgHandler::getErrorInstance()->inform("Quitting (on error).", false); + ret = 1; + } catch (ProcessError& e) { + if (std::string(e.what()) != std::string("Process Error") && std::string(e.what()) != std::string("")) { + MsgHandler::getErrorInstance()->inform(e.what()); + } + MsgHandler::getErrorInstance()->inform("Quitting (on error).", false); + ret = 1; +#ifndef _DEBUG + } catch (...) { + MsgHandler::getErrorInstance()->inform("Quitting (on unknown error).", false); + ret = 1; +#endif + } + SystemFrame::close(); + if (ret == 0) { + std::cout << "Success." << std::endl; + } + return ret; +} + + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/tools/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/tools/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/tools/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/tools/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,28 @@ +if CHECK_MEMORY_LEAKS +MEM_LIBS = ../foreign/nvwa/libnvwa.a +endif + +bin_PROGRAMS = emissionsDrivingCycle emissionsMap + +emissionsDrivingCycle_SOURCES = emissionsDrivingCycle_main.cpp \ +TrajectoriesHandler.cpp TrajectoriesHandler.h + +emissionsDrivingCycle_LDFLAGS = $(XERCES_LDFLAGS) + +emissionsDrivingCycle_LDADD = ../utils/options/liboptions.a \ +../utils/xml/libxml.a \ +../utils/geom/libgeom.a \ +../utils/emissions/libemissions.a \ +../utils/common/libcommon.a \ +../utils/importio/libimportio.a \ +../utils/iodevices/libiodevices.a \ +../foreign/tcpip/libtcpip.a \ +$(MEM_LIBS) \ +-l$(LIB_XERCES) + + +emissionsMap_SOURCES = emissionsMap_main.cpp + +emissionsMap_LDFLAGS = $(XERCES_LDFLAGS) + +emissionsMap_LDADD = $(emissionsDrivingCycle_LDADD) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/tools/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/tools/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/tools/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/tools/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,704 @@ +# Makefile.in generated by automake 1.13.4 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +bin_PROGRAMS = emissionsDrivingCycle$(EXEEXT) emissionsMap$(EXEEXT) +subdir = src/tools +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_emissionsDrivingCycle_OBJECTS = \ + emissionsDrivingCycle_main.$(OBJEXT) \ + TrajectoriesHandler.$(OBJEXT) +emissionsDrivingCycle_OBJECTS = $(am_emissionsDrivingCycle_OBJECTS) +emissionsDrivingCycle_DEPENDENCIES = ../utils/options/liboptions.a \ + ../utils/xml/libxml.a ../utils/geom/libgeom.a \ + ../utils/emissions/libemissions.a ../utils/common/libcommon.a \ + ../utils/importio/libimportio.a \ + ../utils/iodevices/libiodevices.a ../foreign/tcpip/libtcpip.a \ + $(MEM_LIBS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +emissionsDrivingCycle_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) $(emissionsDrivingCycle_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_emissionsMap_OBJECTS = emissionsMap_main.$(OBJEXT) +emissionsMap_OBJECTS = $(am_emissionsMap_OBJECTS) +am__DEPENDENCIES_1 = ../utils/options/liboptions.a \ + ../utils/xml/libxml.a ../utils/geom/libgeom.a \ + ../utils/emissions/libemissions.a ../utils/common/libcommon.a \ + ../utils/importio/libimportio.a \ + ../utils/iodevices/libiodevices.a ../foreign/tcpip/libtcpip.a \ + $(MEM_LIBS) +emissionsMap_DEPENDENCIES = $(am__DEPENDENCIES_1) +emissionsMap_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(emissionsMap_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(emissionsDrivingCycle_SOURCES) $(emissionsMap_SOURCES) +DIST_SOURCES = $(emissionsDrivingCycle_SOURCES) \ + $(emissionsMap_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_CPPFLAGS = @AM_CPPFLAGS@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ +FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ +GDAL_LDFLAGS = @GDAL_LDFLAGS@ +GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_XERCES = @LIB_XERCES@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OSG_LIBS = @OSG_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJ_LDFLAGS = @PROJ_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XERCES_CFLAGS = @XERCES_CFLAGS@ +XERCES_LDFLAGS = @XERCES_LDFLAGS@ +XERCES_LIBS = @XERCES_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@CHECK_MEMORY_LEAKS_TRUE@MEM_LIBS = ../foreign/nvwa/libnvwa.a +emissionsDrivingCycle_SOURCES = emissionsDrivingCycle_main.cpp \ +TrajectoriesHandler.cpp TrajectoriesHandler.h + +emissionsDrivingCycle_LDFLAGS = $(XERCES_LDFLAGS) +emissionsDrivingCycle_LDADD = ../utils/options/liboptions.a \ +../utils/xml/libxml.a \ +../utils/geom/libgeom.a \ +../utils/emissions/libemissions.a \ +../utils/common/libcommon.a \ +../utils/importio/libimportio.a \ +../utils/iodevices/libiodevices.a \ +../foreign/tcpip/libtcpip.a \ +$(MEM_LIBS) \ +-l$(LIB_XERCES) + +emissionsMap_SOURCES = emissionsMap_main.cpp +emissionsMap_LDFLAGS = $(XERCES_LDFLAGS) +emissionsMap_LDADD = $(emissionsDrivingCycle_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/tools/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/tools/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +emissionsDrivingCycle$(EXEEXT): $(emissionsDrivingCycle_OBJECTS) $(emissionsDrivingCycle_DEPENDENCIES) $(EXTRA_emissionsDrivingCycle_DEPENDENCIES) + @rm -f emissionsDrivingCycle$(EXEEXT) + $(AM_V_CXXLD)$(emissionsDrivingCycle_LINK) $(emissionsDrivingCycle_OBJECTS) $(emissionsDrivingCycle_LDADD) $(LIBS) + +emissionsMap$(EXEEXT): $(emissionsMap_OBJECTS) $(emissionsMap_DEPENDENCIES) $(EXTRA_emissionsMap_DEPENDENCIES) + @rm -f emissionsMap$(EXEEXT) + $(AM_V_CXXLD)$(emissionsMap_LINK) $(emissionsMap_OBJECTS) $(emissionsMap_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TrajectoriesHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emissionsDrivingCycle_main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emissionsMap_main.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/tools/TrajectoriesHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/tools/TrajectoriesHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/tools/TrajectoriesHandler.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/tools/TrajectoriesHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,187 @@ +/****************************************************************************/ +/// @file TrajectoriesHandler.cpp +/// @author Michael Behrisch +/// @date 14.03.2014 +/// @version $Id: TrajectoriesHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// An XML-Handler for amitran and netstate trajectories +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "TrajectoriesHandler.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +TrajectoriesHandler::TrajectoriesHandler(const bool computeA, const SUMOEmissionClass defaultClass, + const SUMOReal defaultSlope, std::ostream* stdOut, OutputDevice* xmlOut) + : SUMOSAXHandler(""), myComputeA(computeA), myDefaultClass(defaultClass), + myDefaultSlope(defaultSlope), myStdOut(stdOut), myXMLOut(xmlOut), myCurrentTime(-1), myStepSize(TS) {} + + +TrajectoriesHandler::~TrajectoriesHandler() {} + + +void +TrajectoriesHandler::myStartElement(int element, + const SUMOSAXAttributes& attrs) { + bool ok = true; + switch (element) { + case SUMO_TAG_TRAJECTORIES: + myStepSize = attrs.getFloat("timeStepSize") / 1000.; + break; + case SUMO_TAG_TIMESTEP: + myCurrentTime = attrs.getSUMOTimeReporting(SUMO_ATTR_TIME, 0, ok); + break; + case SUMO_TAG_VEHICLE: + if (attrs.hasAttribute(SUMO_ATTR_SPEED)) { + writeEmissions(std::cout, attrs.getString(SUMO_ATTR_ID), myDefaultClass, myCurrentTime, attrs.getFloat(SUMO_ATTR_SPEED)); + } else { + const std::string acId = attrs.getString(SUMO_ATTR_ACTORCONFIG); + const std::string id = attrs.getString(SUMO_ATTR_ID); + if (myEmissionClassByType.count(acId) == 0) { + WRITE_WARNING("Unknown actor configuration '" + acId + "' for vehicle '" + id + "'!"); + } else { + myEmissionClassByVehicle[id] = myEmissionClassByType.count(acId) > 0 ? myEmissionClassByType[acId] : myDefaultClass; + } + } + break; + case SUMO_TAG_ACTORCONFIG: { + const std::string id = attrs.getString(SUMO_ATTR_ID); + const std::string vClass = attrs.getString(SUMO_ATTR_VEHICLECLASS); + const std::string fuel = attrs.getString(SUMO_ATTR_FUEL); + const std::string eClass = attrs.getString(SUMO_ATTR_EMISSIONCLASS); + const SUMOReal weight = attrs.getOpt(SUMO_ATTR_WEIGHT, id.c_str(), ok, 0.) * 10.; + myEmissionClassByType[id] = PollutantsInterface::getClass(myDefaultClass, vClass, fuel, eClass, weight); + break; + } + case SUMO_TAG_MOTIONSTATE: { + const std::string id = attrs.getString(SUMO_ATTR_VEHICLE); + if (myEmissionClassByVehicle.count(id) == 0) { + WRITE_WARNING("Motion state for unknown vehicle '" + id + "'!"); + myEmissionClassByVehicle[id] = myDefaultClass; + } + const SUMOEmissionClass c = myEmissionClassByVehicle[id]; + const SUMOReal v = attrs.getFloat(SUMO_ATTR_SPEED) / 100.; + const SUMOReal a = attrs.hasAttribute(SUMO_ATTR_ACCELERATION) ? attrs.get(SUMO_ATTR_ACCELERATION, id.c_str(), ok) / 1000. : INVALID_VALUE; + const SUMOReal s = attrs.hasAttribute(SUMO_ATTR_SLOPE) ? RAD2DEG(asin(attrs.get(SUMO_ATTR_SLOPE, id.c_str(), ok) / 10000.)) : INVALID_VALUE; + const SUMOTime time = attrs.getOpt(SUMO_ATTR_TIME, id.c_str(), ok, INVALID_VALUE); + if (myXMLOut != 0) { + writeXMLEmissions(id, c, time, v, a, s); + } + if (myStdOut != 0) { + writeEmissions(*myStdOut, id, c, time, v, a, s); + } + break; + } + default: + break; + } +} + + +const PollutantsInterface::Emissions +TrajectoriesHandler::computeEmissions(const std::string id, const SUMOEmissionClass c, + const SUMOReal v, SUMOReal& a, SUMOReal& s) { + if (myComputeA) { + if (myLastV.count(id) == 0) { + a = 0.; + } else { + a = v - myLastV[id]; + } + myLastV[id] = v; + } + if (a == INVALID_VALUE) { + throw ProcessError("Acceleration information is missing; try running with --compute-a."); + } + if (s == INVALID_VALUE) { + s = myDefaultSlope; + } + const PollutantsInterface::Emissions result = PollutantsInterface::computeAll(c, v, a, s); + mySums[id].addScaled(result, myStepSize); + if (id != "") { + mySums[""].addScaled(result, myStepSize); + } + return result; +} + + +void +TrajectoriesHandler::writeEmissions(std::ostream& o, const std::string id, + const SUMOEmissionClass c, + const SUMOReal t, const SUMOReal v, + SUMOReal a, SUMOReal s) { + const PollutantsInterface::Emissions e = computeEmissions(id, c, v, a, s); + o << t << ";" << v << ";" << a << ";" << s + << ";" << e.CO << ";" << e.CO2 << ";" << e.HC << ";" << e.PMx << ";" << e.NOx << ";" << e.fuel << std::endl; +} + + +void +TrajectoriesHandler::writeXMLEmissions(const std::string id, + const SUMOEmissionClass c, + const SUMOTime t, const SUMOReal v, + SUMOReal a, SUMOReal s) { + if (myCurrentTime != t) { + if (myCurrentTime != -1) { + myXMLOut->closeTag(); + } + myCurrentTime = t; + myXMLOut->openTag(SUMO_TAG_TIMESTEP).writeAttr(SUMO_ATTR_TIME, time2string(t)); + } + const PollutantsInterface::Emissions e = computeEmissions(id, c, v, a, s); + myXMLOut->openTag("vehicle").writeAttr("id", id).writeAttr("eclass", PollutantsInterface::getName(c)); + myXMLOut->writeAttr("CO2", e.CO2).writeAttr("CO", e.CO).writeAttr("HC", e.HC).writeAttr("NOx", e.NOx); + myXMLOut->writeAttr("PMx", e.PMx).writeAttr("fuel", e.fuel); + myXMLOut->writeAttr("speed", v).closeTag(); +} + + +void +TrajectoriesHandler::writeSums(std::ostream& o, const std::string id) { + o << "CO:" << mySums[id].CO << std::endl + << "CO2:" << mySums[id].CO2 << std::endl + << "HC:" << mySums[id].HC << std::endl + << "NOx:" << mySums[id].NOx << std::endl + << "PMx:" << mySums[id].PMx << std::endl + << "fuel:" << mySums[id].fuel << std::endl; +} + + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/tools/TrajectoriesHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/tools/TrajectoriesHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/tools/TrajectoriesHandler.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/tools/TrajectoriesHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,126 @@ +/****************************************************************************/ +/// @file TrajectoriesHandler.h +/// @author Michael Behrisch +/// @date 14.03.2014 +/// @version $Id: TrajectoriesHandler.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// An XML-Handler for amitran and netstate trajectories +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef TrajectoriesHandler_h +#define TrajectoriesHandler_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class TrajectoriesHandler + * @brief An XML-Handler for amitran and netstate trajectories + * + * This SUMOSAXHandler parses vehicles and their speeds. + */ +class TrajectoriesHandler : public SUMOSAXHandler { +public: + static const int INVALID_VALUE = -999999; + +public: + /** @brief Constructor + * + * @param[in] file The file that will be processed + */ + TrajectoriesHandler(const bool computeA, const SUMOEmissionClass defaultClass, + const SUMOReal defaultSlope, std::ostream* stdOut, OutputDevice* xmlOut); + + + /// @brief Destructor + ~TrajectoriesHandler(); + + const PollutantsInterface::Emissions computeEmissions(const std::string id, + const SUMOEmissionClass c, const SUMOReal v, + SUMOReal& a, SUMOReal& s); + + void writeEmissions(std::ostream& o, const std::string id, + const SUMOEmissionClass c, + const SUMOReal t, const SUMOReal v, + SUMOReal a = INVALID_VALUE, SUMOReal s = INVALID_VALUE); + + void writeXMLEmissions(const std::string id, + const SUMOEmissionClass c, + const SUMOTime t, const SUMOReal v, + SUMOReal a = INVALID_VALUE, SUMOReal s = INVALID_VALUE); + + void writeSums(std::ostream& o, const std::string id); + + +protected: + /// @name inherited from GenericSAXHandler + //@{ + + /** @brief Called when an opening-tag occurs + * + * Processes vehicle and motionState elements. + * + * @param[in] element The enum of the currently opened element + * @param[in] attrs Attributes of the currently opened element + * @exception ProcessError If an error within the parsed file occurs + * @see GenericSAXHandler::myStartElement + */ + void myStartElement(int element, + const SUMOSAXAttributes& attrs); + //@} + + +private: + const bool myComputeA; + const SUMOEmissionClass myDefaultClass; + const SUMOReal myDefaultSlope; + std::ostream* myStdOut; + OutputDevice* myXMLOut; + std::map myLastV; + SUMOTime myCurrentTime; + SUMOReal myStepSize; + std::map mySums; + std::map myEmissionClassByType; + std::map myEmissionClassByVehicle; + + +private: + /// @brief invalidated copy constructor + TrajectoriesHandler(const TrajectoriesHandler& s); + + /// @brief invalidated assignment operator + TrajectoriesHandler& operator=(const TrajectoriesHandler& s); + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ noinst_LIBRARIES = libtraciserver.a libtraciserver_a_SOURCES = TraCIConstants.h \ -TraCIException.h TraCIRTree.h \ +TraCIException.h \ TraCIServer.h TraCIServer.cpp \ TraCIServerAPI_Edge.h TraCIServerAPI_Edge.cpp \ TraCIServerAPI_InductionLoop.h TraCIServerAPI_InductionLoop.cpp \ TraCIServerAPI_Junction.h TraCIServerAPI_Junction.cpp \ TraCIServerAPI_Lane.h TraCIServerAPI_Lane.cpp \ TraCIServerAPI_MeMeDetector.h TraCIServerAPI_MeMeDetector.cpp \ +TraCIServerAPI_ArealDetector.h TraCIServerAPI_ArealDetector.cpp \ +TraCIServerAPI_Person.h TraCIServerAPI_Person.cpp \ TraCIServerAPI_POI.h TraCIServerAPI_POI.cpp \ TraCIServerAPI_Polygon.h TraCIServerAPI_Polygon.cpp \ TraCIServerAPI_Route.h TraCIServerAPI_Route.cpp \ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/traci-server -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,6 +92,10 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libtraciserver_a_AR = $(AR) $(ARFLAGS) libtraciserver_a_LIBADD = am_libtraciserver_a_OBJECTS = TraCIServer.$(OBJEXT) \ @@ -55,36 +104,94 @@ TraCIServerAPI_Junction.$(OBJEXT) \ TraCIServerAPI_Lane.$(OBJEXT) \ TraCIServerAPI_MeMeDetector.$(OBJEXT) \ - TraCIServerAPI_POI.$(OBJEXT) TraCIServerAPI_Polygon.$(OBJEXT) \ + TraCIServerAPI_ArealDetector.$(OBJEXT) \ + TraCIServerAPI_Person.$(OBJEXT) TraCIServerAPI_POI.$(OBJEXT) \ + TraCIServerAPI_Polygon.$(OBJEXT) \ TraCIServerAPI_Route.$(OBJEXT) \ TraCIServerAPI_Simulation.$(OBJEXT) \ TraCIServerAPI_TLS.$(OBJEXT) TraCIServerAPI_Vehicle.$(OBJEXT) \ TraCIServerAPI_VehicleType.$(OBJEXT) libtraciserver_a_OBJECTS = $(am_libtraciserver_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libtraciserver_a_SOURCES) DIST_SOURCES = $(libtraciserver_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -93,6 +200,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -119,9 +227,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -132,10 +244,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -231,13 +339,15 @@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libtraciserver.a libtraciserver_a_SOURCES = TraCIConstants.h \ -TraCIException.h TraCIRTree.h \ +TraCIException.h \ TraCIServer.h TraCIServer.cpp \ TraCIServerAPI_Edge.h TraCIServerAPI_Edge.cpp \ TraCIServerAPI_InductionLoop.h TraCIServerAPI_InductionLoop.cpp \ TraCIServerAPI_Junction.h TraCIServerAPI_Junction.cpp \ TraCIServerAPI_Lane.h TraCIServerAPI_Lane.cpp \ TraCIServerAPI_MeMeDetector.h TraCIServerAPI_MeMeDetector.cpp \ +TraCIServerAPI_ArealDetector.h TraCIServerAPI_ArealDetector.cpp \ +TraCIServerAPI_Person.h TraCIServerAPI_Person.cpp \ TraCIServerAPI_POI.h TraCIServerAPI_POI.cpp \ TraCIServerAPI_Polygon.h TraCIServerAPI_Polygon.cpp \ TraCIServerAPI_Route.h TraCIServerAPI_Route.cpp \ @@ -283,10 +393,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libtraciserver.a: $(libtraciserver_a_OBJECTS) $(libtraciserver_a_DEPENDENCIES) - -rm -f libtraciserver.a - $(libtraciserver_a_AR) libtraciserver.a $(libtraciserver_a_OBJECTS) $(libtraciserver_a_LIBADD) - $(RANLIB) libtraciserver.a + +libtraciserver.a: $(libtraciserver_a_OBJECTS) $(libtraciserver_a_DEPENDENCIES) $(EXTRA_libtraciserver_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtraciserver.a + $(AM_V_AR)$(libtraciserver_a_AR) libtraciserver.a $(libtraciserver_a_OBJECTS) $(libtraciserver_a_LIBADD) + $(AM_V_at)$(RANLIB) libtraciserver.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -295,12 +406,14 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_ArealDetector.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_Edge.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_InductionLoop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_Junction.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_Lane.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_MeMeDetector.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_POI.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_Person.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_Polygon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_Route.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_Simulation.Po@am__quote@ @@ -309,25 +422,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIServerAPI_VehicleType.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -335,26 +448,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -366,15 +468,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -383,6 +481,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -431,10 +544,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -519,18 +637,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIConstants.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIConstants.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIConstants.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIConstants.h 2015-04-17 00:20:29.000000000 +0000 @@ -8,13 +8,16 @@ /// @author Tino Morenz /// @author Michael Behrisch /// @author Christoph Sommer +/// @author Mario Krumnow +/// @author Jakob Erdmann +/// @author Laura Bieker /// @date 2007/10/24 -/// @version $Id: TraCIConstants.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIConstants.h 18095 2015-03-17 09:39:00Z behrisch $ /// /// holds codes used for TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -31,7 +34,7 @@ // **************************************** // VERSION // **************************************** -#define TRACI_VERSION 6 +#define TRACI_VERSION 9 // **************************************** @@ -58,9 +61,6 @@ // command: change target #define CMD_CHANGETARGET 0x31 -// command: add vehicle -#define CMD_ADDVEHICLE 0x74 - // command: close sumo #define CMD_CLOSE 0x7F @@ -78,17 +78,17 @@ // response: subscribe induction loop (e1) variable #define RESPONSE_SUBSCRIBE_INDUCTIONLOOP_VARIABLE 0xe0 -// command: subscribe areal detector (e3) context +// command: subscribe multi-entry/multi-exit detector (e3) context #define CMD_SUBSCRIBE_MULTI_ENTRY_EXIT_DETECTOR_CONTEXT 0x81 -// response: subscribe areal detector (e3) context +// response: subscribe multi-entry/multi-exit detector (e3) context #define RESPONSE_SUBSCRIBE_MULTI_ENTRY_EXIT_DETECTOR_CONTEXT 0x91 // command: get multi-entry/multi-exit detector (e3) variable #define CMD_GET_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE 0xa1 -// response: get areal detector (e3) variable +// response: get multi-entry/multi-exit detector (e3) variable #define RESPONSE_GET_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE 0xb1 // command: subscribe multi-entry/multi-exit detector (e3) variable #define CMD_SUBSCRIBE_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE 0xd1 -// response: subscribe areal detector (e3) variable +// response: subscribe multi-entry/multi-exit detector (e3) variable #define RESPONSE_SUBSCRIBE_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE 0xe1 // command: subscribe traffic lights context @@ -256,6 +256,34 @@ // response: subscribe GUI variable #define RESPONSE_SUBSCRIBE_GUI_VARIABLE 0xec +// command: subscribe areal detector (e2) context +#define CMD_SUBSCRIBE_AREAL_DETECTOR_CONTEXT 0x8d +// response: subscribe areal detector (e2) context +#define RESPONSE_SUBSCRIBE_AREAL_DETECTOR_CONTEXT 0x9d +// command: get areal detector (e2) variable +#define CMD_GET_AREAL_DETECTOR_VARIABLE 0xad +// response: get areal detector (e2) variable +#define RESPONSE_GET_AREAL_DETECTOR_VARIABLE 0xbd +// command: subscribe areal detector (e2) variable +#define CMD_SUBSCRIBE_AREAL_DETECTOR_VARIABLE 0xdd +// response: subscribe areal detector (e2) variable +#define RESPONSE_SUBSCRIBE_AREAL_DETECTOR_VARIABLE 0xed + +// command: subscribe person context +#define CMD_SUBSCRIBE_PERSON_CONTEXT 0x8e +// response: subscribe person context +#define RESPONSE_SUBSCRIBE_PERSON_CONTEXT 0x9e +// command: get person variable +#define CMD_GET_PERSON_VARIABLE 0xae +// response: get person variable +#define RESPONSE_GET_PERSON_VARIABLE 0xbe +// command: set person variable +#define CMD_SET_PERSON_VARIABLE 0xce +// command: subscribe person variable +#define CMD_SUBSCRIBE_PERSON_VARIABLE 0xde +// response: subscribe person variable +#define RESPONSE_SUBSCRIBE_PERSON_VARIABLE 0xee + // **************************************** // POSITION REPRESENTATIONS @@ -395,6 +423,12 @@ // entry times #define LAST_STEP_VEHICLE_DATA 0x17 +// last step jam length in vehicles +#define JAM_LENGTH_VEHICLE 0x18 + +// last step jam length in meters +#define JAM_LENGTH_METERS 0x19 + // traffic light states, encoded as rRgGyYoO tuple (get: traffic lights) #define TL_RED_YELLOW_GREEN_STATE 0x20 @@ -432,6 +466,9 @@ // assumed time to next switch (get: traffic lights) #define TL_NEXT_SWITCH 0x2d +// current state, using external signal names (get: traffic lights) +#define TL_EXTERNAL_STATE 0x2e + // outgoing link number (get: lanes) @@ -459,6 +496,9 @@ // position (2D) (get: vehicle, poi, set: poi) #define VAR_POSITION 0x42 +// position (3D) (get: vehicle, poi, set: poi) +#define VAR_POSITION3D 0x39 + // angle (get: vehicle) #define VAR_ANGLE 0x43 @@ -546,6 +586,8 @@ // speed deviation (set: vehicle) #define VAR_SPEED_DEVIATION 0x5f + + // speed without TraCI influence (get: vehicle) #define VAR_SPEED_WITHOUT_TRACI 0xb1 @@ -562,6 +604,13 @@ // value = stopped + 2 * parking + 4 * triggered #define VAR_STOPSTATE 0xb5 +// how lane changing is performed (set: vehicle) +#define VAR_LANECHANGE_MODE 0xb6 + +// maximum speed regarding max speed on the current lane and speed factor (get: vehicle) +#define VAR_ALLOWED_SPEED 0xb7 + + // current CO2 emission of a node (get: vehicle, lane, edge) #define VAR_CO2EMISSION 0x60 @@ -585,9 +634,15 @@ // current person number (get: vehicle) #define VAR_PERSON_NUMBER 0x67 + +// number of persons waiting at a defined bus stop (get: simulation) #define VAR_BUS_STOP_WAITING 0x67 +// current leader together with gap (get: vehicle) +#define VAR_LEADER 0x68 +//current waiting time (get: vehicle, lane) +#define VAR_WAITING_TIME 0x7a // current time step (get: simulation) #define VAR_TIME_STEP 0x70 @@ -631,12 +686,42 @@ // minimum number of expected vehicles (get: simulation) #define VAR_MIN_EXPECTED_VEHICLES 0x7d +// number of vehicles starting to park (get: simulation) +#define VAR_STOP_STARTING_VEHICLES_NUMBER 0x68 + +// ids of vehicles starting to park (get: simulation) +#define VAR_STOP_STARTING_VEHICLES_IDS 0x69 + +// number of vehicles ending to park (get: simulation) +#define VAR_STOP_ENDING_VEHICLES_NUMBER 0x6a + +// ids of vehicles ending to park (get: simulation) +#define VAR_STOP_ENDING_VEHICLES_IDS 0x6b + +// number of vehicles starting to park (get: simulation) +#define VAR_PARKING_STARTING_VEHICLES_NUMBER 0x6c + +// ids of vehicles starting to park (get: simulation) +#define VAR_PARKING_STARTING_VEHICLES_IDS 0x6d + +// number of vehicles ending to park (get: simulation) +#define VAR_PARKING_ENDING_VEHICLES_NUMBER 0x6e + +// ids of vehicles ending to park (get: simulation) +#define VAR_PARKING_ENDING_VEHICLES_IDS 0x6f + +// clears the simulation of all not inserted vehicles (set: simulation) +#define CMD_CLEAR_PENDING_VEHICLES 0x94 + +// sets/retrieves abstract parameter +#define VAR_PARAMETER 0x7e + // add an instance (poi, polygon, vehicle, route) #define ADD 0x80 -// remove an instance (poi, polygon) +// remove an instance (poi, polygon, vehicle) #define REMOVE 0x81 // convert coordinates @@ -645,6 +730,11 @@ // distance between points or vehicles #define DISTANCE_REQUEST 0x83 +//the current driving distance +#define VAR_DISTANCE 0x84 + +// add a fully specified instance (vehicle) +#define ADD_FULL 0x85 // force rerouting based on travel time (vehicles) #define CMD_REROUTE_TRAVELTIME 0x90 diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIException.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIException.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIException.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIException.h 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2007/10/24 -/// @version $Id: TraCIException.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIException.h 18095 2015-03-17 09:39:00Z behrisch $ /// /// Exception thrown by TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,7 +45,6 @@ /** * @class TraCIException */ -namespace traci { class TraCIException : public std::runtime_error { public: /** constructor */ @@ -53,8 +52,6 @@ : std::runtime_error(what) {} }; -} - #endif #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIRTree.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIRTree.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIRTree.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIRTree.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,153 +0,0 @@ -/****************************************************************************/ -/// @file TraCIRTree.h -/// @author Daniel Krajzewicz -/// @date 27.10.2008 -/// @version $Id: TraCIRTree.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// A RT-tree for efficient storing of SUMO's GL-objects -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef TraCIRTree_h -#define TraCIRTree_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include - -//#include "RTree.h" - - -// specialized implementation for speedup and avoiding warnings -template<> -inline float RTree::RectSphericalVolume(Rect* a_rect) { - ASSERT(a_rect); - const float extent0 = a_rect->m_max[0] - a_rect->m_min[0]; - const float extent1 = a_rect->m_max[1] - a_rect->m_min[1]; - return .78539816f * (extent0 * extent0 + extent1 * extent1); -} - - -// =========================================================================== -// class definitions -// =========================================================================== -/** @class TraCIRTree - * @brief A RT-tree for efficient storing of SUMO's GL-objects - * - * This class specialises the used RT-tree implementation from "rttree.h" and - * extends it by a mutex for avoiding parallel change and traversal of the tree. - */ -class TraCIRTree : private RTree, public Boundary { -public: - /// @brief Constructor - TraCIRTree() - : RTree(&Named::addTo) { - } - - - /// @brief Destructor - ~TraCIRTree() { - } - - - /** @brief Insert entry - * @param a_min Min of bounding rect - * @param a_max Max of bounding rect - * @param a_dataId Positive Id of data. Maybe zero, but negative numbers not allowed. - * @see RTree::Insert - */ - void Insert(const float a_min[2], const float a_max[2], Named* a_dataId) { - //AbstractMutex::ScopedLocker locker(myLock); - RTree::Insert(a_min, a_max, a_dataId); - } - - - /** @brief Remove entry - * @param a_min Min of bounding rect - * @param a_max Max of bounding rect - * @param a_dataId Positive Id of data. Maybe zero, but negative numbers not allowed. - * @see RTree::Remove - */ - void Remove(const float a_min[2], const float a_max[2], Named* a_dataId) { - //AbstractMutex::ScopedLocker locker(myLock); - RTree::Remove(a_min, a_max, a_dataId); - } - - - /** @brief Find all within search rectangle - * @param a_min Min of search bounding rect - * @param a_max Max of search bounding rect - * @param a_searchResult Search result array. Caller should set grow size. Function will reset, not append to array. - * @param a_resultCallback Callback function to return result. Callback should return 'true' to continue searching - * @param a_context User context to pass as parameter to a_resultCallback - * @return Returns the number of entries found - * @see RTree::Search - */ - int Search(const float a_min[2], const float a_max[2], const Named::StoringVisitor& c) { - //AbstractMutex::ScopedLocker locker(myLock); - return RTree::Search(a_min, a_max, c); - } - - - /** @brief Adds an additional object (detector/shape/trigger) for visualisation - * @param[in] o The object to add - * @param[in] b The object's boundary - */ - void addObject(Named* o, Boundary& b) { - const float cmin[2] = {(float) b.xmin(), (float) b.ymin()}; - const float cmax[2] = {(float) b.xmax(), (float) b.ymax()}; - Insert(cmin, cmax, o); - } - - - /** @brief Adds an additional object (detector/shape/trigger) for visualisation - * @param[in] o The object to add - * @param[in] p The object's position - */ - void addObject(Named* o, Position& p) { - Boundary b; - b.add(p); - addObject(o, b); - } - - - /** @brief Removes an additional object (detector/shape/trigger) from being visualised - * @param[in] o The object to remove - */ - void removeAdditionalGLObject(Named* o, Boundary& b) { - const float cmin[2] = {(float) b.xmin(), (float) b.ymin()}; - const float cmax[2] = {(float) b.xmax(), (float) b.ymax()}; - Remove(cmin, cmax, o); - } - - -protected: - /// @brief A mutex avoiding parallel change and traversal of the tree - //MFXMutex myLock; - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_ArealDetector.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_ArealDetector.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_ArealDetector.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_ArealDetector.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,128 @@ +/****************************************************************************/ +/// @file TraCIServerAPI_AreaDetector.cpp +/// @author Mario Krumnow +/// @author Robbin Blokpoel +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 03.02.2014 +/// @version $Id: TraCIServerAPI_ArealDetector.cpp 17682 2015-01-23 07:27:34Z behrisch $ +/// +// APIs for getting/setting areal detector values via TraCI +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#ifndef NO_TRACI + +#include "TraCIConstants.h" +#include +#include "TraCIServerAPI_ArealDetector.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +bool +TraCIServerAPI_ArealDetector::processGet(TraCIServer& server, tcpip::Storage& inputStorage, + tcpip::Storage& outputStorage) { + // variable & id + int variable = inputStorage.readUnsignedByte(); + std::string id = inputStorage.readString(); + // check variable + if (variable != ID_LIST && variable != ID_COUNT && variable != JAM_LENGTH_VEHICLE && variable != JAM_LENGTH_METERS && + variable != LAST_STEP_VEHICLE_NUMBER && variable != LAST_STEP_MEAN_SPEED && variable != LAST_STEP_VEHICLE_ID_LIST + && variable != LAST_STEP_VEHICLE_HALTING_NUMBER && variable != ID_COUNT && variable != LAST_STEP_OCCUPANCY) { + return server.writeErrorStatusCmd(CMD_GET_AREAL_DETECTOR_VARIABLE, "Get Areal Detector Variable: unsupported variable specified", outputStorage); + } + + // begin response building + tcpip::Storage tempMsg; + // response-code, variableID, objectID + tempMsg.writeUnsignedByte(RESPONSE_GET_AREAL_DETECTOR_VARIABLE); + tempMsg.writeUnsignedByte(variable); + tempMsg.writeString(id); + if (variable == ID_LIST) { + std::vector ids; + MSNet::getInstance()->getDetectorControl().getTypedDetectors(SUMO_TAG_LANE_AREA_DETECTOR).insertIDs(ids); + tempMsg.writeUnsignedByte(TYPE_STRINGLIST); + tempMsg.writeStringList(ids); + } else if (variable == ID_COUNT) { + std::vector ids; + MSNet::getInstance()->getDetectorControl().getTypedDetectors(SUMO_TAG_LANE_AREA_DETECTOR).insertIDs(ids); + tempMsg.writeUnsignedByte(TYPE_INTEGER); + tempMsg.writeInt((int) ids.size()); + } else { + MSE2Collector* e2 = static_cast(MSNet::getInstance()->getDetectorControl().getTypedDetectors(SUMO_TAG_LANE_AREA_DETECTOR).get(id)); + if (e2 == 0) { + return server.writeErrorStatusCmd(CMD_GET_AREAL_DETECTOR_VARIABLE, "Areal detector '" + id + "' is not known", outputStorage); + } + std::vector ids; + switch (variable) { + case ID_LIST: + break; + case LAST_STEP_VEHICLE_NUMBER: + tempMsg.writeUnsignedByte(TYPE_INTEGER); + tempMsg.writeInt((int) e2->getCurrentVehicleNumber()); + break; + case LAST_STEP_MEAN_SPEED: + tempMsg.writeUnsignedByte(TYPE_DOUBLE); + tempMsg.writeDouble(e2->getCurrentMeanSpeed()); + break; + case LAST_STEP_VEHICLE_ID_LIST: + tempMsg.writeUnsignedByte(TYPE_STRINGLIST); + ids = e2->getCurrentVehicleIDs(); + tempMsg.writeStringList(ids); + break; + case LAST_STEP_VEHICLE_HALTING_NUMBER: + tempMsg.writeUnsignedByte(TYPE_INTEGER); + tempMsg.writeInt(e2->getCurrentHaltingNumber()); + break; + case JAM_LENGTH_VEHICLE: + tempMsg.writeUnsignedByte(TYPE_INTEGER); + tempMsg.writeInt((int) e2->getCurrentJamLengthInVehicles()); + break; + case JAM_LENGTH_METERS: + tempMsg.writeUnsignedByte(TYPE_DOUBLE); + tempMsg.writeDouble(e2->getCurrentJamLengthInMeters()); + break; + case LAST_STEP_OCCUPANCY: + tempMsg.writeUnsignedByte(TYPE_DOUBLE); + tempMsg.writeDouble(e2->getCurrentOccupancy()); + break; + default: + break; + } + } + server.writeStatusCmd(CMD_GET_AREAL_DETECTOR_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeResponseWithLength(outputStorage, tempMsg); + return true; +} + +#endif + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_ArealDetector.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_ArealDetector.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_ArealDetector.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_ArealDetector.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,76 @@ +/****************************************************************************/ +/// @file TraCIServerAPI_AreaDetector.h +/// @author Mario Krumnow +/// @author Michael Behrisch +/// @date 15.09.2013 +/// @version $Id: TraCIServerAPI_ArealDetector.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// APIs for getting/setting areal detector values via TraCI +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef TraCIServerAPI_ArealDetector_h +#define TraCIServerAPI_ArealDetector_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#ifndef NO_TRACI + +#include "TraCIException.h" +#include "TraCIServer.h" +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class TraCIServerAPI_AreaDetector + * @brief APIs for getting/setting multi-entry/multi-exit detector values via TraCI + */ +class TraCIServerAPI_ArealDetector { +public: + /** @brief Processes a get value command (Command 0xa1: Get AreaDetector Variable) + * + * @param[in] server The TraCI-server-instance which schedules this request + * @param[in] inputStorage The storage to read the command from + * @param[out] outputStorage The storage to write the result to + */ + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, + tcpip::Storage& outputStorage); + + +private: + /// @brief invalidated copy constructor + TraCIServerAPI_ArealDetector(const TraCIServerAPI_ArealDetector& s); + + /// @brief invalidated assignment operator + TraCIServerAPI_ArealDetector& operator=(const TraCIServerAPI_ArealDetector& s); + + +}; + + +#endif + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Edge.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Edge.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Edge.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Edge.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,13 +5,14 @@ /// @author Jerome Haerri /// @author Michael Behrisch /// @author Laura Bieker +/// @author Mario Krumnow /// @date Sept 2002 -/// @version $Id: TraCIServerAPI_Edge.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_Edge.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // APIs for getting/setting edge values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -43,7 +44,7 @@ #include "TraCIConstants.h" #include "TraCIServerAPI_Edge.h" #include -#include +#include #ifdef CHECK_MEMORY_LEAKS #include @@ -51,12 +52,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace traci; - - -// =========================================================================== // method definitions // =========================================================================== bool @@ -68,10 +63,10 @@ // check variable if (variable != ID_LIST && variable != VAR_EDGE_TRAVELTIME && variable != VAR_EDGE_EFFORT && variable != VAR_CURRENT_TRAVELTIME && variable != VAR_CO2EMISSION && variable != VAR_COEMISSION && variable != VAR_HCEMISSION && variable != VAR_PMXEMISSION - && variable != VAR_NOXEMISSION && variable != VAR_FUELCONSUMPTION && variable != VAR_NOISEEMISSION + && variable != VAR_NOXEMISSION && variable != VAR_FUELCONSUMPTION && variable != VAR_NOISEEMISSION && variable != VAR_WAITING_TIME && variable != LAST_STEP_VEHICLE_NUMBER && variable != LAST_STEP_MEAN_SPEED && variable != LAST_STEP_OCCUPANCY && variable != LAST_STEP_VEHICLE_HALTING_NUMBER && variable != LAST_STEP_LENGTH - && variable != LAST_STEP_VEHICLE_ID_LIST && variable != ID_COUNT) { + && variable != LAST_STEP_VEHICLE_ID_LIST && variable != ID_COUNT && variable != VAR_PARAMETER) { return server.writeErrorStatusCmd(CMD_GET_EDGE_VARIABLE, "Get Edge Variable: unsupported variable specified", outputStorage); } // begin response building @@ -105,7 +100,7 @@ } tempMsg.writeUnsignedByte(TYPE_DOUBLE); SUMOReal value; - if (!MSNet::getInstance()->getWeightsStorage().retrieveExistingTravelTime(e, 0, time, value)) { + if (!MSNet::getInstance()->getWeightsStorage().retrieveExistingTravelTime(e, time, value)) { tempMsg.writeDouble(-1); } else { tempMsg.writeDouble(value); @@ -120,7 +115,7 @@ } tempMsg.writeUnsignedByte(TYPE_DOUBLE); SUMOReal value; - if (!MSNet::getInstance()->getWeightsStorage().retrieveExistingEffort(e, 0, time, value)) { + if (!MSNet::getInstance()->getWeightsStorage().retrieveExistingEffort(e, time, value)) { tempMsg.writeDouble(-1); } else { tempMsg.writeDouble(value); @@ -131,6 +126,16 @@ tempMsg.writeUnsignedByte(TYPE_DOUBLE); tempMsg.writeDouble(e->getCurrentTravelTime()); break; + case VAR_WAITING_TIME: { + SUMOReal wtime = 0; + const std::vector& lanes = e->getLanes(); + for (std::vector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) { + wtime += (*i)->getWaitingSeconds(); + } + tempMsg.writeUnsignedByte(TYPE_DOUBLE); + tempMsg.writeDouble(wtime); + } + break; case LAST_STEP_VEHICLE_ID_LIST: { std::vector vehIDs; const std::vector& lanes = e->getLanes(); @@ -149,7 +154,7 @@ SUMOReal sum = 0; const std::vector& lanes = e->getLanes(); for (std::vector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) { - sum += (*i)->getHBEFA_CO2Emissions(); + sum += (*i)->getCO2Emissions(); } tempMsg.writeUnsignedByte(TYPE_DOUBLE); tempMsg.writeDouble(sum); @@ -159,7 +164,7 @@ SUMOReal sum = 0; const std::vector& lanes = e->getLanes(); for (std::vector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) { - sum += (*i)->getHBEFA_COEmissions(); + sum += (*i)->getCOEmissions(); } tempMsg.writeUnsignedByte(TYPE_DOUBLE); tempMsg.writeDouble(sum); @@ -169,7 +174,7 @@ SUMOReal sum = 0; const std::vector& lanes = e->getLanes(); for (std::vector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) { - sum += (*i)->getHBEFA_HCEmissions(); + sum += (*i)->getHCEmissions(); } tempMsg.writeUnsignedByte(TYPE_DOUBLE); tempMsg.writeDouble(sum); @@ -179,7 +184,7 @@ SUMOReal sum = 0; const std::vector& lanes = e->getLanes(); for (std::vector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) { - sum += (*i)->getHBEFA_PMxEmissions(); + sum += (*i)->getPMxEmissions(); } tempMsg.writeUnsignedByte(TYPE_DOUBLE); tempMsg.writeDouble(sum); @@ -189,7 +194,7 @@ SUMOReal sum = 0; const std::vector& lanes = e->getLanes(); for (std::vector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) { - sum += (*i)->getHBEFA_NOxEmissions(); + sum += (*i)->getNOxEmissions(); } tempMsg.writeUnsignedByte(TYPE_DOUBLE); tempMsg.writeDouble(sum); @@ -199,7 +204,7 @@ SUMOReal sum = 0; const std::vector& lanes = e->getLanes(); for (std::vector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) { - sum += (*i)->getHBEFA_FuelConsumption(); + sum += (*i)->getFuelConsumption(); } tempMsg.writeUnsignedByte(TYPE_DOUBLE); tempMsg.writeDouble(sum); @@ -243,7 +248,7 @@ SUMOReal sum = 0; const std::vector& lanes = e->getLanes(); for (std::vector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) { - sum += (*i)->getOccupancy(); + sum += (*i)->getNettoOccupancy(); } tempMsg.writeUnsignedByte(TYPE_DOUBLE); tempMsg.writeDouble(sum / (SUMOReal) lanes.size()); @@ -285,6 +290,15 @@ } } break; + case VAR_PARAMETER: { + std::string paramName = ""; + if (!server.readTypeCheckingString(inputStorage, paramName)) { + return server.writeErrorStatusCmd(CMD_GET_EDGE_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); + } + tempMsg.writeUnsignedByte(TYPE_STRING); + tempMsg.writeString(e->getParameter(paramName, "")); + } + break; default: break; } @@ -301,7 +315,7 @@ std::string warning = ""; // additional description for response // variable int variable = inputStorage.readUnsignedByte(); - if (variable != VAR_EDGE_TRAVELTIME && variable != VAR_EDGE_EFFORT && variable != VAR_MAXSPEED) { + if (variable != VAR_EDGE_TRAVELTIME && variable != VAR_EDGE_EFFORT && variable != VAR_MAXSPEED && variable != VAR_PARAMETER) { return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, "Change Edge State: unsupported variable specified", outputStorage); } // id @@ -416,6 +430,23 @@ } } break; + case VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { + return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, "A compound object is needed for setting a parameter.", outputStorage); + } + //readt itemNo + inputStorage.readInt(); + std::string name; + if (!server.readTypeCheckingString(inputStorage, name)) { + return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, "The name of the parameter must be given as a string.", outputStorage); + } + std::string value; + if (!server.readTypeCheckingString(inputStorage, value)) { + return server.writeErrorStatusCmd(CMD_SET_EDGE_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); + } + e->addParameter(name, value); + } + break; default: break; } @@ -438,22 +469,6 @@ return true; } - -TraCIRTree* -TraCIServerAPI_Edge::getTree() { - TraCIRTree* t = new TraCIRTree(); - const std::vector& edges = MSNet::getInstance()->getEdgeControl().getEdges(); - for (std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { - const std::vector& lanes = (*i)->getLanes(); - Boundary b; - for (std::vector::const_iterator j = lanes.begin(); j != lanes.end(); ++j) { - b.add((*j)->getShape().getBoxBoundary()); - } - t->addObject(*i, b); - } - return t; -} - #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Edge.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Edge.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Edge.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Edge.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_Edge.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_Edge.h 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting edge values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -52,7 +52,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processGet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -62,7 +62,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processSet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processSet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -74,12 +74,6 @@ static bool getShape(const std::string& id, PositionVector& shape); - /** @brief Returns a tree filled with edge instances - * @return The rtree of edges - */ - static TraCIRTree* getTree(); - - private: /// @brief invalidated copy constructor TraCIServerAPI_Edge(const TraCIServerAPI_Edge& s); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_InductionLoop.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_InductionLoop.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_InductionLoop.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_InductionLoop.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Laura Bieker /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_InductionLoop.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_InductionLoop.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting induction loop values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2009-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,7 +36,6 @@ #include "TraCIConstants.h" #include #include -#include #include "TraCIServerAPI_InductionLoop.h" #ifdef CHECK_MEMORY_LEAKS @@ -44,12 +44,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace traci; - - -// =========================================================================== // method definitions // =========================================================================== bool @@ -84,7 +78,7 @@ tempMsg.writeUnsignedByte(TYPE_INTEGER); tempMsg.writeInt((int) ids.size()); } else { - MSInductLoop* il = static_cast(MSNet::getInstance()->getDetectorControl().getTypedDetectors(SUMO_TAG_INDUCTION_LOOP).get(id)); + MSInductLoop* il = dynamic_cast(MSNet::getInstance()->getDetectorControl().getTypedDetectors(SUMO_TAG_INDUCTION_LOOP).get(id)); if (il == 0) { return server.writeErrorStatusCmd(CMD_GET_INDUCTIONLOOP_VARIABLE, "Induction loop '" + id + "' is not known", outputStorage); } @@ -177,14 +171,16 @@ } -TraCIRTree* +NamedRTree* TraCIServerAPI_InductionLoop::getTree() { - TraCIRTree* t = new TraCIRTree(); + NamedRTree* t = new NamedRTree(); const std::map& dets = MSNet::getInstance()->getDetectorControl().getTypedDetectors(SUMO_TAG_INDUCTION_LOOP).getMyMap(); for (std::map::const_iterator i = dets.begin(); i != dets.end(); ++i) { MSInductLoop* il = static_cast((*i).second); Position p = il->getLane()->getShape().positionAtOffset(il->getPosition()); - t->addObject(il, p); + const float cmin[2] = {(float) p.x(), (float) p.y()}; + const float cmax[2] = {(float) p.x(), (float) p.y()}; + t->Insert(cmin, cmax, il); } return t; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_InductionLoop.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_InductionLoop.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_InductionLoop.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_InductionLoop.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_InductionLoop.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_InductionLoop.h 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting induction loop values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -53,7 +53,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processGet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -66,9 +66,9 @@ /** @brief Returns a tree filled with inductive loop instances - * @return The rtree of inductive loop + * @return The rtree of inductive loops */ - static TraCIRTree* getTree(); + static NamedRTree* getTree(); private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Junction.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Junction.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Junction.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Junction.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,15 @@ /// @author Daniel Krajzewicz /// @author Laura Bieker /// @author Michael Behrisch +/// @author Mario Krumnow +/// @author Jakob Erdmann /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_Junction.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_Junction.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting junction values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2009-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,12 +47,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace traci; - - -// =========================================================================== // method definitions // =========================================================================== bool @@ -60,7 +56,7 @@ int variable = inputStorage.readUnsignedByte(); std::string id = inputStorage.readString(); // check variable - if (variable != ID_LIST && variable != VAR_POSITION && variable != ID_COUNT) { + if (variable != ID_LIST && variable != VAR_POSITION && variable != ID_COUNT && variable != VAR_SHAPE) { return server.writeErrorStatusCmd(CMD_GET_JUNCTION_VARIABLE, "Get Junction Variable: unsupported variable specified", outputStorage); } // begin response building @@ -92,6 +88,15 @@ tempMsg.writeDouble(j->getPosition().x()); tempMsg.writeDouble(j->getPosition().y()); break; + case VAR_SHAPE: + tempMsg.writeUnsignedByte(TYPE_POLYGON); + tempMsg.writeUnsignedByte((int)MIN2(static_cast(255), j->getShape().size())); + for (unsigned int iPoint = 0; iPoint < MIN2(static_cast(255), j->getShape().size()); ++iPoint) { + tempMsg.writeDouble(j->getShape()[iPoint].x()); + tempMsg.writeDouble(j->getShape()[iPoint].y()); + } + break; + default: break; } @@ -101,7 +106,6 @@ return true; } - bool TraCIServerAPI_Junction::getPosition(const std::string& id, Position& p) { MSJunction* j = MSNet::getInstance()->getJunctionControl().get(id); @@ -113,13 +117,15 @@ } -TraCIRTree* +NamedRTree* TraCIServerAPI_Junction::getTree() { - TraCIRTree* t = new TraCIRTree(); + NamedRTree* t = new NamedRTree(); const std::map& junctions = MSNet::getInstance()->getJunctionControl().getMyMap(); for (std::map::const_iterator i = junctions.begin(); i != junctions.end(); ++i) { Boundary b = (*i).second->getShape().getBoxBoundary(); - t->addObject((*i).second, b); + const float cmin[2] = {(float) b.xmin(), (float) b.ymin()}; + const float cmax[2] = {(float) b.xmax(), (float) b.ymax()}; + t->Insert(cmin, cmax, (*i).second); } return t; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Junction.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Junction.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Junction.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Junction.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_Junction.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_Junction.h 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting junction values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -53,7 +53,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processGet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -65,10 +65,10 @@ static bool getPosition(const std::string& id, Position& p); - /** @brief Returns a tree filled with inductive loop instances - * @return The rtree of inductive loop + /** @brief Returns a tree filled with junction instances + * @return The rtree of junctions */ - static TraCIRTree* getTree(); + static NamedRTree* getTree(); private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Lane.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Lane.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Lane.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Lane.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,13 +4,14 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @author Laura Bieker +/// @author Mario Krumnow /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_Lane.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: TraCIServerAPI_Lane.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // APIs for getting/setting lane values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2009-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -38,6 +39,7 @@ #include #include #include "TraCIConstants.h" +#include "TraCIServer.h" #include "TraCIServerAPI_Lane.h" #ifdef CHECK_MEMORY_LEAKS @@ -46,12 +48,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace traci; - - -// =========================================================================== // method definitions // =========================================================================== bool @@ -64,11 +60,13 @@ if (variable != ID_LIST && variable != LANE_LINK_NUMBER && variable != LANE_EDGE_ID && variable != VAR_LENGTH && variable != VAR_MAXSPEED && variable != LANE_LINKS && variable != VAR_SHAPE && variable != VAR_CO2EMISSION && variable != VAR_COEMISSION && variable != VAR_HCEMISSION && variable != VAR_PMXEMISSION - && variable != VAR_NOXEMISSION && variable != VAR_FUELCONSUMPTION && variable != VAR_NOISEEMISSION + && variable != VAR_NOXEMISSION && variable != VAR_FUELCONSUMPTION && variable != VAR_NOISEEMISSION && variable != VAR_WAITING_TIME && variable != LAST_STEP_MEAN_SPEED && variable != LAST_STEP_VEHICLE_NUMBER && variable != LAST_STEP_VEHICLE_ID_LIST && variable != LAST_STEP_OCCUPANCY && variable != LAST_STEP_VEHICLE_HALTING_NUMBER && variable != LAST_STEP_LENGTH && variable != VAR_CURRENT_TRAVELTIME - && variable != LANE_ALLOWED && variable != LANE_DISALLOWED && variable != VAR_WIDTH && variable != ID_COUNT) { + && variable != LANE_ALLOWED && variable != LANE_DISALLOWED && variable != VAR_WIDTH && variable != ID_COUNT + && variable != VAR_PARAMETER + ) { return server.writeErrorStatusCmd(CMD_GET_LANE_VARIABLE, "Get Lane Variable: unsupported variable specified", outputStorage); } // begin response building @@ -139,11 +137,12 @@ // opened tempContent.writeUnsignedByte(TYPE_UBYTE); const SUMOReal speed = MIN2(lane->getSpeedLimit(), link->getLane()->getSpeedLimit()); - tempContent.writeUnsignedByte(link->opened(currTime, speed, speed, DEFAULT_VEH_LENGTH, 0.0, DEFAULT_VEH_DECEL, 0) ? 1 : 0); + tempContent.writeUnsignedByte(link->opened(currTime, speed, speed, SUMOVTypeParameter::getDefault().length, + SUMOVTypeParameter::getDefault().impatience, SUMOVTypeParameter::getDefaultDecel(), 0) ? 1 : 0); ++cnt; // approaching foe tempContent.writeUnsignedByte(TYPE_UBYTE); - tempContent.writeUnsignedByte(link->hasApproachingFoe(currTime, currTime, 0) ? 1 : 0); + tempContent.writeUnsignedByte(link->hasApproachingFoe(currTime, currTime, 0, SUMOVTypeParameter::getDefaultDecel()) ? 1 : 0); ++cnt; // state (not implemented, yet) tempContent.writeUnsignedByte(TYPE_STRING); @@ -165,14 +164,14 @@ case LANE_ALLOWED: { tempMsg.writeUnsignedByte(TYPE_STRINGLIST); SVCPermissions permissions = lane->getPermissions(); - if (permissions == SVCFreeForAll) { // special case: write nothing + if (permissions == SVCAll) { // special case: write nothing permissions = 0; } - tempMsg.writeStringList(getAllowedVehicleClassNamesList(permissions)); + tempMsg.writeStringList(getVehicleClassNamesList(permissions)); } case LANE_DISALLOWED: { tempMsg.writeUnsignedByte(TYPE_STRINGLIST); - tempMsg.writeStringList(getAllowedVehicleClassNamesList(~(lane->getPermissions()))); // negation yields disallowed + tempMsg.writeStringList(getVehicleClassNamesList(~(lane->getPermissions()))); // negation yields disallowed } break; case VAR_SHAPE: @@ -185,27 +184,27 @@ break; case VAR_CO2EMISSION: tempMsg.writeUnsignedByte(TYPE_DOUBLE); - tempMsg.writeDouble(lane->getHBEFA_CO2Emissions()); + tempMsg.writeDouble(lane->getCO2Emissions()); break; case VAR_COEMISSION: tempMsg.writeUnsignedByte(TYPE_DOUBLE); - tempMsg.writeDouble(lane->getHBEFA_COEmissions()); + tempMsg.writeDouble(lane->getCOEmissions()); break; case VAR_HCEMISSION: tempMsg.writeUnsignedByte(TYPE_DOUBLE); - tempMsg.writeDouble(lane->getHBEFA_HCEmissions()); + tempMsg.writeDouble(lane->getHCEmissions()); break; case VAR_PMXEMISSION: tempMsg.writeUnsignedByte(TYPE_DOUBLE); - tempMsg.writeDouble(lane->getHBEFA_PMxEmissions()); + tempMsg.writeDouble(lane->getPMxEmissions()); break; case VAR_NOXEMISSION: tempMsg.writeUnsignedByte(TYPE_DOUBLE); - tempMsg.writeDouble(lane->getHBEFA_NOxEmissions()); + tempMsg.writeDouble(lane->getNOxEmissions()); break; case VAR_FUELCONSUMPTION: tempMsg.writeUnsignedByte(TYPE_DOUBLE); - tempMsg.writeDouble(lane->getHBEFA_FuelConsumption()); + tempMsg.writeDouble(lane->getFuelConsumption()); break; case VAR_NOISEEMISSION: tempMsg.writeUnsignedByte(TYPE_DOUBLE); @@ -232,7 +231,7 @@ break; case LAST_STEP_OCCUPANCY: tempMsg.writeUnsignedByte(TYPE_DOUBLE); - tempMsg.writeDouble(lane->getOccupancy()); + tempMsg.writeDouble(lane->getNettoOccupancy()); break; case LAST_STEP_VEHICLE_HALTING_NUMBER: { int halting = 0; @@ -262,6 +261,11 @@ lane->releaseVehicles(); } break; + case VAR_WAITING_TIME: { + tempMsg.writeUnsignedByte(TYPE_DOUBLE); + tempMsg.writeDouble(lane->getWaitingSeconds()); + } + break; case VAR_CURRENT_TRAVELTIME: { SUMOReal meanSpeed = lane->getMeanSpeed(); tempMsg.writeUnsignedByte(TYPE_DOUBLE); @@ -276,6 +280,15 @@ tempMsg.writeUnsignedByte(TYPE_DOUBLE); tempMsg.writeDouble(lane->getWidth()); break; + case VAR_PARAMETER: { + std::string paramName = ""; + if (!server.readTypeCheckingString(inputStorage, paramName)) { + return server.writeErrorStatusCmd(RESPONSE_GET_LANE_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); + } + tempMsg.writeUnsignedByte(TYPE_STRING); + tempMsg.writeString(lane->getParameter(paramName, "")); + } + break; default: break; } @@ -292,7 +305,8 @@ std::string warning = ""; // additional description for response // variable int variable = inputStorage.readUnsignedByte(); - if (variable != VAR_MAXSPEED && variable != VAR_LENGTH && variable != LANE_ALLOWED && variable != LANE_DISALLOWED) { + if (variable != VAR_MAXSPEED && variable != VAR_LENGTH && variable != LANE_ALLOWED && variable != LANE_DISALLOWED + && variable != VAR_PARAMETER) { return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "Change Lane State: unsupported variable specified", outputStorage); } // id @@ -337,6 +351,23 @@ l->getEdge().rebuildAllowedLanes(); } break; + case VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { + return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "A compound object is needed for setting a parameter.", outputStorage); + } + //readt itemNo + inputStorage.readInt(); + std::string name; + if (!server.readTypeCheckingString(inputStorage, name)) { + return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "The name of the parameter must be given as a string.", outputStorage); + } + std::string value; + if (!server.readTypeCheckingString(inputStorage, value)) { + return server.writeErrorStatusCmd(CMD_SET_LANE_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); + } + l->addParameter(name, value); + } + break; default: break; } @@ -356,21 +387,38 @@ } -TraCIRTree* -TraCIServerAPI_Lane::getTree() { - TraCIRTree* t = new TraCIRTree(); - const std::vector& edges = MSNet::getInstance()->getEdgeControl().getEdges(); - for (std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { - const std::vector& lanes = (*i)->getLanes(); - for (std::vector::const_iterator j = lanes.begin(); j != lanes.end(); ++j) { - Boundary b = (*j)->getShape().getBoxBoundary(); - b.grow(3.); - t->addObject(*j, b); +void +TraCIServerAPI_Lane::StoringVisitor::add(const MSLane* const l) const { + switch (myDomain) { + case CMD_GET_VEHICLE_VARIABLE: { + const MSLane::VehCont& vehs = l->getVehiclesSecure(); + for (MSLane::VehCont::const_iterator j = vehs.begin(); j != vehs.end(); ++j) { + if (myShape.distance((*j)->getPosition()) <= myRange) { + myIDs.insert((*j)->getID()); + } + } + l->releaseVehicles(); } + break; + case CMD_GET_EDGE_VARIABLE: { + if (myShape.size() != 1 || l->getShape().distance(myShape[0]) <= myRange) { + myIDs.insert(l->getEdge().getID()); + } + } + break; + case CMD_GET_LANE_VARIABLE: { + if (myShape.size() != 1 || l->getShape().distance(myShape[0]) <= myRange) { + myIDs.insert(l->getID()); + } + } + break; + default: + break; + } - return t; } + #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Lane.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Lane.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Lane.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Lane.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file TraCIServerAPI_Lane.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_Lane.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_Lane.h 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting lane values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2009-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,12 +34,16 @@ #ifndef NO_TRACI -#include "TraCIException.h" -#include "TraCIServer.h" #include // =========================================================================== +// class declarations +// =========================================================================== +class TraCIServer; + + +// =========================================================================== // class definitions // =========================================================================== /** @@ -53,7 +58,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processGet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -63,7 +68,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processSet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processSet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -76,10 +81,35 @@ static bool getShape(const std::string& id, PositionVector& shape); - /** @brief Returns a tree filled with inductive loop instances - * @return The rtree of inductive loop + /** @class StoringVisitor + * @brief Allows to store the object; used as context while traveling the rtree in TraCI */ - static TraCIRTree* getTree(); + class StoringVisitor { + public: + /// @brief Constructor + StoringVisitor(std::set& ids, const PositionVector& shape, + const SUMOReal range, const int domain) + : myIDs(ids), myShape(shape), myRange(range), myDomain(domain) {} + + /// @brief Destructor + ~StoringVisitor() {} + + /// @brief Adds the given object to the container + void add(const MSLane* const l) const; + + /// @brief The container + std::set& myIDs; + const PositionVector& myShape; + const SUMOReal myRange; + const int myDomain; + + private: + /// @brief invalidated copy constructor + StoringVisitor(const StoringVisitor& src); + + /// @brief invalidated assignment operator + StoringVisitor& operator=(const StoringVisitor& src); + }; private: @@ -93,9 +123,29 @@ }; +#define LANE_RTREE_QUAL RTree + +template<> +inline float LANE_RTREE_QUAL::RectSphericalVolume(Rect* a_rect) { + ASSERT(a_rect); + const float extent0 = a_rect->m_max[0] - a_rect->m_min[0]; + const float extent1 = a_rect->m_max[1] - a_rect->m_min[1]; + return .78539816f * (extent0 * extent0 + extent1 * extent1); +} + +template<> +inline LANE_RTREE_QUAL::Rect LANE_RTREE_QUAL::CombineRect(Rect* a_rectA, Rect* a_rectB) { + ASSERT(a_rectA && a_rectB); + Rect newRect; + newRect.m_min[0] = rtree_min(a_rectA->m_min[0], a_rectB->m_min[0]); + newRect.m_max[0] = rtree_max(a_rectA->m_max[0], a_rectB->m_max[0]); + newRect.m_min[1] = rtree_min(a_rectA->m_min[1], a_rectB->m_min[1]); + newRect.m_max[1] = rtree_max(a_rectA->m_max[1], a_rectB->m_max[1]); + return newRect; +} + #endif #endif /****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_MeMeDetector.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_MeMeDetector.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_MeMeDetector.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_MeMeDetector.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_MeMeDetector.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_MeMeDetector.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting multi-entry/multi-exit detector values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,7 +33,6 @@ #include "TraCIConstants.h" #include -#include #include "TraCIServerAPI_MeMeDetector.h" #ifdef CHECK_MEMORY_LEAKS @@ -42,12 +41,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace traci; - - -// =========================================================================== // method definitions // =========================================================================== bool @@ -88,7 +81,7 @@ break; case LAST_STEP_VEHICLE_NUMBER: tempMsg.writeUnsignedByte(TYPE_INTEGER); - tempMsg.writeInt((int) e3->getVehiclesWithin()); + tempMsg.writeInt(e3->getVehiclesWithin()); break; case LAST_STEP_MEAN_SPEED: tempMsg.writeUnsignedByte(TYPE_DOUBLE); @@ -102,7 +95,7 @@ break; case LAST_STEP_VEHICLE_HALTING_NUMBER: tempMsg.writeUnsignedByte(TYPE_INTEGER); - tempMsg.writeInt((int) e3->getCurrentHaltingNumber()); + tempMsg.writeInt(e3->getCurrentHaltingNumber()); break; default: break; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_MeMeDetector.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_MeMeDetector.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_MeMeDetector.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_MeMeDetector.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_MeMeDetector.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_MeMeDetector.h 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting multi-entry/multi-exit detector values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -53,7 +53,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processGet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Person.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Person.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Person.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Person.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,234 @@ +/****************************************************************************/ +/// @file TraCIServerAPI_Person.cpp +/// @author Daniel Krajzewicz +/// @date 26.05.2014 +/// @version $Id: TraCIServerAPI_Person.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// APIs for getting/setting person values via TraCI +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#ifndef NO_TRACI + +#include +#include +#include +#include +#include "TraCIConstants.h" +#include "TraCIServer.h" +#include "TraCIServerAPI_Person.h" +#include "TraCIServerAPI_VehicleType.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +bool +TraCIServerAPI_Person::processGet(TraCIServer& server, tcpip::Storage& inputStorage, + tcpip::Storage& outputStorage) { + // variable + int variable = inputStorage.readUnsignedByte(); + std::string id = inputStorage.readString(); + // check variable + if (variable != ID_LIST && variable != ID_COUNT + && variable != VAR_POSITION && variable != VAR_POSITION3D && variable != VAR_ANGLE && variable != VAR_SPEED + && variable != VAR_ROAD_ID && variable != VAR_LANEPOSITION + && variable != VAR_WIDTH && variable != VAR_LENGTH && variable != VAR_MINGAP + && variable != VAR_TYPE && variable != VAR_SHAPECLASS && variable != VAR_COLOR + && variable != VAR_WAITING_TIME && variable != VAR_PARAMETER + ) { + return server.writeErrorStatusCmd(CMD_GET_PERSON_VARIABLE, "Get Person Variable: unsupported variable specified", outputStorage); + } + // begin response building + tcpip::Storage tempMsg; + // response-code, variableID, objectID + tempMsg.writeUnsignedByte(RESPONSE_GET_PERSON_VARIABLE); + tempMsg.writeUnsignedByte(variable); + tempMsg.writeString(id); + MSPersonControl& c = MSNet::getInstance()->getPersonControl(); + if (variable == ID_LIST || variable == ID_COUNT) { + if (variable == ID_LIST) { + std::vector ids; + for (MSPersonControl::constVehIt i = c.loadedPersonsBegin(); i != c.loadedPersonsEnd(); ++i) { + ids.push_back((*i).first); + } + tempMsg.writeUnsignedByte(TYPE_STRINGLIST); + tempMsg.writeStringList(ids); + } else { + tempMsg.writeUnsignedByte(TYPE_INTEGER); + tempMsg.writeInt((int) c.size()); + } + } else { + MSPerson* p = c.get(id); + if (p == 0) { + return server.writeErrorStatusCmd(CMD_GET_PERSON_VARIABLE, "Person '" + id + "' is not known", outputStorage); + } + switch (variable) { + case VAR_POSITION: { + tempMsg.writeUnsignedByte(POSITION_2D); + tempMsg.writeDouble(p->getPosition().x()); + tempMsg.writeDouble(p->getPosition().y()); + } + break; + case VAR_POSITION3D: + tempMsg.writeUnsignedByte(POSITION_3D); + tempMsg.writeDouble(p->getPosition().x()); + tempMsg.writeDouble(p->getPosition().y()); + tempMsg.writeDouble(p->getPosition().z()); + break; + case VAR_ANGLE: + tempMsg.writeUnsignedByte(TYPE_DOUBLE); + tempMsg.writeDouble(p->getAngle()); + break; + case VAR_SPEED: + tempMsg.writeUnsignedByte(TYPE_DOUBLE); + tempMsg.writeDouble(p->getSpeed()); + break; + case VAR_ROAD_ID: + tempMsg.writeUnsignedByte(TYPE_STRING); + tempMsg.writeString(p->getEdge()->getID()); + break; + case VAR_LANEPOSITION: + tempMsg.writeUnsignedByte(TYPE_DOUBLE); + tempMsg.writeDouble(p->getEdgePos()); + break; + case VAR_COLOR: + tempMsg.writeUnsignedByte(TYPE_COLOR); + tempMsg.writeUnsignedByte(p->getParameter().color.red()); + tempMsg.writeUnsignedByte(p->getParameter().color.green()); + tempMsg.writeUnsignedByte(p->getParameter().color.blue()); + tempMsg.writeUnsignedByte(p->getParameter().color.alpha()); + break; + case VAR_WAITING_TIME: + tempMsg.writeUnsignedByte(TYPE_DOUBLE); + tempMsg.writeDouble(p->getWaitingSeconds()); + break; + case VAR_TYPE: + tempMsg.writeUnsignedByte(TYPE_STRING); + tempMsg.writeString(p->getVehicleType().getID()); + break; + case VAR_PARAMETER: { + std::string paramName = ""; + if (!server.readTypeCheckingString(inputStorage, paramName)) { + return server.writeErrorStatusCmd(CMD_GET_PERSON_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); + } + tempMsg.writeUnsignedByte(TYPE_STRING); + tempMsg.writeString(p->getParameter().getParameter(paramName, "")); + } + default: + TraCIServerAPI_VehicleType::getVariable(variable, p->getVehicleType(), tempMsg); + break; + } + } + server.writeStatusCmd(CMD_GET_PERSON_VARIABLE, RTYPE_OK, "", outputStorage); + server.writeResponseWithLength(outputStorage, tempMsg); + return true; +} + + +bool +TraCIServerAPI_Person::processSet(TraCIServer& server, tcpip::Storage& inputStorage, + tcpip::Storage& outputStorage) { + std::string warning = ""; // additional description for response + // variable + int variable = inputStorage.readUnsignedByte(); + if (variable != VAR_PARAMETER + ) { + return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Change Person State: unsupported variable specified", outputStorage); + } + // id + MSPersonControl& c = MSNet::getInstance()->getPersonControl(); + std::string id = inputStorage.readString(); + MSPerson* p = c.get(id); + if (p == 0) { + return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "Person '" + id + "' is not known", outputStorage); + } + // process + switch (variable) { + case VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { + return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "A compound object is needed for setting a parameter.", outputStorage); + } + //readt itemNo + inputStorage.readInt(); + std::string name; + if (!server.readTypeCheckingString(inputStorage, name)) { + return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "The name of the parameter must be given as a string.", outputStorage); + } + std::string value; + if (!server.readTypeCheckingString(inputStorage, value)) { + return server.writeErrorStatusCmd(CMD_SET_PERSON_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); + } + ((SUMOVehicleParameter&) p->getParameter()).addParameter(name, value); + } + break; + default: + /* + try { + if (!TraCIServerAPI_VehicleType::setVariable(CMD_SET_PERSON_VARIABLE, variable, getSingularType(v), server, inputStorage, outputStorage)) { + return false; + } + } catch (ProcessError& e) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, e.what(), outputStorage); + } + */ + break; + } + server.writeStatusCmd(CMD_SET_PERSON_VARIABLE, RTYPE_OK, warning, outputStorage); + return true; +} + + +bool +TraCIServerAPI_Person::getPosition(const std::string& id, Position& p) { + MSPerson* person = dynamic_cast(MSNet::getInstance()->getPersonControl().get(id)); + if (person == 0) { + return false; + } + p = person->getPosition(); + return true; +} + + +/* +MSVehicleType& +TraCIServerAPI_Person::getSingularType(MSPerson* const person) { + const MSVehicleType& oType = person->getVehicleType(); + std::string newID = oType.getID().find('@') == std::string::npos ? oType.getID() + "@" + person->getID() : oType.getID(); + MSVehicleType* type = MSVehicleType::build(newID, &oType); + person->replaceVehicleType(type); + return *type; +} +*/ + + + +#endif + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Person.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Person.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Person.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Person.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,98 @@ +/****************************************************************************/ +/// @file TraCIServerAPI_Person.h +/// @author Daniel Krajzewicz +/// @date 26.05.2014 +/// @version $Id: TraCIServerAPI_Person.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// APIs for getting/setting person values via TraCI +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef TraCIServerAPI_Person_h +#define TraCIServerAPI_Person_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#ifndef NO_TRACI + +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class TraCIServer; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class TraCIServerAPI_Person + * @brief APIs for getting/setting person values via TraCI + */ +class TraCIServerAPI_Person { +public: + /** @brief Processes a get value command (Command 0xae: Get Person Variable) + * + * @param[in] server The TraCI-server-instance which schedules this request + * @param[in] inputStorage The storage to read the command from + * @param[out] outputStorage The storage to write the result to + */ + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, + tcpip::Storage& outputStorage); + + + /** @brief Processes a set value command (Command 0xce: Change Person State) + * + * @param[in] server The TraCI-server-instance which schedules this request + * @param[in] inputStorage The storage to read the command from + * @param[out] outputStorage The storage to write the result to + */ + static bool processSet(TraCIServer& server, tcpip::Storage& inputStorage, + tcpip::Storage& outputStorage); + + + /** @brief Returns the named persons's position + * @param[in] id The id of the searched person + * @param[out] p The position, if the person is on the network + * @return Whether the person is known + */ + static bool getPosition(const std::string& id, Position& p); + +private: + //static MSVehicleType& getSingularType(MSPerson* const person); + +private: + /// @brief invalidated copy constructor + TraCIServerAPI_Person(const TraCIServerAPI_Person& s); + + /// @brief invalidated assignment operator + TraCIServerAPI_Person& operator=(const TraCIServerAPI_Person& s); + + +}; + + +#endif + +#endif + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_POI.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_POI.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_POI.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_POI.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Laura Bieker /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_POI.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_POI.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // APIs for getting/setting POI values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 20019-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -44,12 +45,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace traci; - - -// =========================================================================== // method definitions // =========================================================================== bool @@ -59,7 +54,8 @@ int variable = inputStorage.readUnsignedByte(); std::string id = inputStorage.readString(); // check variable - if (variable != ID_LIST && variable != VAR_TYPE && variable != VAR_COLOR && variable != VAR_POSITION && variable != ID_COUNT) { + if (variable != ID_LIST && variable != VAR_TYPE && variable != VAR_COLOR && variable != VAR_POSITION && variable != ID_COUNT + && variable != VAR_PARAMETER) { return server.writeErrorStatusCmd(CMD_GET_POI_VARIABLE, "Get PoI Variable: unsupported variable specified", outputStorage); } // begin response building @@ -102,6 +98,15 @@ tempMsg.writeDouble(p->x()); tempMsg.writeDouble(p->y()); break; + case VAR_PARAMETER: { + std::string paramName = ""; + if (!server.readTypeCheckingString(inputStorage, paramName)) { + return server.writeErrorStatusCmd(CMD_GET_POI_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); + } + tempMsg.writeUnsignedByte(TYPE_STRING); + tempMsg.writeString(p->getParameter(paramName, "")); + } + break; default: break; } @@ -119,7 +124,7 @@ // variable int variable = inputStorage.readUnsignedByte(); if (variable != VAR_TYPE && variable != VAR_COLOR && variable != VAR_POSITION - && variable != ADD && variable != REMOVE) { + && variable != ADD && variable != REMOVE && variable != VAR_PARAMETER) { return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "Change PoI State: unsupported variable specified", outputStorage); } // id @@ -199,6 +204,23 @@ } } break; + case VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { + return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "A compound object is needed for setting a parameter.", outputStorage); + } + //readt itemNo + inputStorage.readInt(); + std::string name; + if (!server.readTypeCheckingString(inputStorage, name)) { + return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "The name of the parameter must be given as a string.", outputStorage); + } + std::string value; + if (!server.readTypeCheckingString(inputStorage, value)) { + return server.writeErrorStatusCmd(CMD_SET_POI_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); + } + p->addParameter(name, value); + } + break; default: break; } @@ -224,13 +246,15 @@ } -TraCIRTree* +NamedRTree* TraCIServerAPI_POI::getTree() { - TraCIRTree* t = new TraCIRTree(); + NamedRTree* t = new NamedRTree(); ShapeContainer& shapeCont = MSNet::getInstance()->getShapeContainer(); const std::map& pois = shapeCont.getPOIs().getMyMap(); for (std::map::const_iterator i = pois.begin(); i != pois.end(); ++i) { - t->addObject((*i).second, *(*i).second); + const float cmin[2] = {(float)(*i).second->x(), (float)(*i).second->y()}; + const float cmax[2] = {(float)(*i).second->x(), (float)(*i).second->y()}; + t->Insert(cmin, cmax, (*i).second); } return t; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_POI.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_POI.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_POI.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_POI.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_POI.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_POI.h 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting POI values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -53,7 +53,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processGet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -63,7 +63,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processSet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processSet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -75,10 +75,10 @@ static bool getPosition(const std::string& id, Position& p); - /** @brief Returns a tree filled with inductive loop instances - * @return The rtree of inductive loop + /** @brief Returns a tree filled with PoI instances + * @return The rtree of PoIs */ - static TraCIRTree* getTree(); + static NamedRTree* getTree(); private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Polygon.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Polygon.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Polygon.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Polygon.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,15 @@ /// @author Daniel Krajzewicz /// @author Laura Bieker /// @author Michael Behrisch +/// @author Jakob Erdmann +/// @author Christoph Sommer /// @date Sept 2002 -/// @version $Id: TraCIServerAPI_Polygon.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_Polygon.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // APIs for getting/setting polygon values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,12 +47,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace traci; - - -// =========================================================================== // method definitions // =========================================================================== bool @@ -61,7 +57,7 @@ std::string id = inputStorage.readString(); // check variable if (variable != ID_LIST && variable != VAR_TYPE && variable != VAR_COLOR && variable != VAR_SHAPE && variable != VAR_FILL - && variable != ID_COUNT) { + && variable != ID_COUNT && variable != VAR_PARAMETER) { return server.writeErrorStatusCmd(CMD_GET_POLYGON_VARIABLE, "Get Polygon Variable: unsupported variable specified", outputStorage); } // begin response building @@ -111,6 +107,15 @@ tempMsg.writeUnsignedByte(TYPE_UBYTE); tempMsg.writeUnsignedByte(p->getFill() ? 1 : 0); break; + case VAR_PARAMETER: { + std::string paramName = ""; + if (!server.readTypeCheckingString(inputStorage, paramName)) { + return server.writeErrorStatusCmd(CMD_GET_POLYGON_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); + } + tempMsg.writeUnsignedByte(TYPE_STRING); + tempMsg.writeString(p->getParameter(paramName, "")); + } + break; default: break; } @@ -128,7 +133,7 @@ // variable int variable = inputStorage.readUnsignedByte(); if (variable != VAR_TYPE && variable != VAR_COLOR && variable != VAR_SHAPE && variable != VAR_FILL - && variable != ADD && variable != REMOVE) { + && variable != ADD && variable != REMOVE && variable != VAR_PARAMETER) { return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "Change Polygon State: unsupported variable specified", outputStorage); } // id @@ -220,6 +225,23 @@ } } break; + case VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { + return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "A compound object is needed for setting a parameter.", outputStorage); + } + //readt itemNo + inputStorage.readInt(); + std::string name; + if (!server.readTypeCheckingString(inputStorage, name)) { + return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "The name of the parameter must be given as a string.", outputStorage); + } + std::string value; + if (!server.readTypeCheckingString(inputStorage, value)) { + return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); + } + p->addParameter(name, value); + } + break; default: break; } @@ -245,14 +267,16 @@ } -TraCIRTree* +NamedRTree* TraCIServerAPI_Polygon::getTree() { - TraCIRTree* t = new TraCIRTree(); + NamedRTree* t = new NamedRTree(); ShapeContainer& shapeCont = MSNet::getInstance()->getShapeContainer(); const std::map& polygons = shapeCont.getPolygons().getMyMap(); for (std::map::const_iterator i = polygons.begin(); i != polygons.end(); ++i) { Boundary b = (*i).second->getShape().getBoxBoundary(); - t->addObject((*i).second, b); + const float cmin[2] = {(float) b.xmin(), (float) b.ymin()}; + const float cmax[2] = {(float) b.xmax(), (float) b.ymax()}; + t->Insert(cmin, cmax, (*i).second); } return t; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Polygon.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Polygon.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Polygon.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Polygon.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_Polygon.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_Polygon.h 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting polygon values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -53,7 +53,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processGet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -63,7 +63,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processSet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processSet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -76,10 +76,10 @@ static bool getShape(const std::string& id, PositionVector& shape); - /** @brief Returns a tree filled with inductive loop instances - * @return The rtree of inductive loop + /** @brief Returns a tree filled with polygon instances + * @return The rtree of polygons */ - static TraCIRTree* getTree(); + static NamedRTree* getTree(); private: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Route.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Route.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Route.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Route.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Laura Bieker /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_Route.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_Route.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // APIs for getting/setting route values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -44,12 +44,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace traci; - - -// =========================================================================== // method definitions // =========================================================================== bool @@ -59,7 +53,7 @@ int variable = inputStorage.readUnsignedByte(); std::string id = inputStorage.readString(); // check variable - if (variable != ID_LIST && variable != VAR_EDGES && variable != ID_COUNT) { + if (variable != ID_LIST && variable != VAR_EDGES && variable != ID_COUNT && variable != VAR_PARAMETER) { return server.writeErrorStatusCmd(CMD_GET_ROUTE_VARIABLE, "Get Route Variable: unsupported variable specified", outputStorage); } // begin response building @@ -92,6 +86,15 @@ tempMsg.writeString((*i)->getID()); } break; + case VAR_PARAMETER: { + std::string paramName = ""; + if (!server.readTypeCheckingString(inputStorage, paramName)) { + return server.writeErrorStatusCmd(CMD_GET_ROUTE_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); + } + tempMsg.writeUnsignedByte(TYPE_STRING); + tempMsg.writeString(r->getParameter(paramName, "")); + } + break; default: break; } @@ -108,11 +111,18 @@ std::string warning = ""; // additional description for response // variable int variable = inputStorage.readUnsignedByte(); - if (variable != ADD) { + if (variable != ADD && variable != VAR_PARAMETER) { return server.writeErrorStatusCmd(CMD_SET_ROUTE_VARIABLE, "Change Route State: unsupported variable specified", outputStorage); } // id std::string id = inputStorage.readString(); + const MSRoute* r = 0; + if (variable != ADD) { + r = MSRoute::dictionary(id); + if (r == 0) { + return server.writeErrorStatusCmd(CMD_SET_ROUTE_VARIABLE, "Route '" + id + "' is not known", outputStorage); + } + } // process switch (variable) { case ADD: { @@ -121,7 +131,7 @@ return server.writeErrorStatusCmd(CMD_SET_ROUTE_VARIABLE, "A string list is needed for adding a new route.", outputStorage); } //read itemNo - MSEdgeVector edges; + ConstMSEdgeVector edges; for (std::vector::const_iterator i = edgeIDs.begin(); i != edgeIDs.end(); ++i) { MSEdge* edge = MSEdge::dictionary(*i); if (edge == 0) { @@ -130,11 +140,28 @@ edges.push_back(edge); } const std::vector stops; - if (!MSRoute::dictionary(id, new MSRoute(id, edges, 1, 0, stops))) { + if (!MSRoute::dictionary(id, new MSRoute(id, edges, true, 0, stops))) { return server.writeErrorStatusCmd(CMD_SET_ROUTE_VARIABLE, "Could not add route.", outputStorage); } } break; + case VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { + return server.writeErrorStatusCmd(CMD_SET_ROUTE_VARIABLE, "A compound object is needed for setting a parameter.", outputStorage); + } + //readt itemNo + inputStorage.readInt(); + std::string name; + if (!server.readTypeCheckingString(inputStorage, name)) { + return server.writeErrorStatusCmd(CMD_SET_ROUTE_VARIABLE, "The name of the parameter must be given as a string.", outputStorage); + } + std::string value; + if (!server.readTypeCheckingString(inputStorage, value)) { + return server.writeErrorStatusCmd(CMD_SET_ROUTE_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); + } + ((MSRoute*) r)->addParameter(name, value); + } + break; default: break; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Route.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Route.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Route.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Route.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_Route.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_Route.h 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting route values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -53,7 +53,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processGet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -63,7 +63,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processSet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processSet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Simulation.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Simulation.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Simulation.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Simulation.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Sept 2002 -/// @version $Id: TraCIServerAPI_Simulation.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_Simulation.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting edge values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -50,12 +50,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace traci; - - -// =========================================================================== // method definitions // =========================================================================== bool @@ -75,6 +69,10 @@ && variable != VAR_MIN_EXPECTED_VEHICLES && variable != POSITION_CONVERSION && variable != DISTANCE_REQUEST && variable != VAR_BUS_STOP_WAITING + && variable != VAR_PARKING_STARTING_VEHICLES_NUMBER && variable != VAR_PARKING_STARTING_VEHICLES_IDS + && variable != VAR_PARKING_ENDING_VEHICLES_NUMBER && variable != VAR_PARKING_ENDING_VEHICLES_IDS + && variable != VAR_STOP_STARTING_VEHICLES_NUMBER && variable != VAR_STOP_STARTING_VEHICLES_IDS + && variable != VAR_STOP_ENDING_VEHICLES_NUMBER && variable != VAR_STOP_ENDING_VEHICLES_IDS ) { return server.writeErrorStatusCmd(CMD_GET_SIM_VARIABLE, "Get Simulation Variable: unsupported variable specified", outputStorage); } @@ -90,66 +88,63 @@ tempMsg.writeUnsignedByte(TYPE_INTEGER); tempMsg.writeInt(MSNet::getInstance()->getCurrentTimeStep()); break; - case VAR_LOADED_VEHICLES_NUMBER: { - const std::vector& ids = server.getVehicleStateChanges().find(MSNet::VEHICLE_STATE_BUILT)->second; - tempMsg.writeUnsignedByte(TYPE_INTEGER); - tempMsg.writeInt((int) ids.size()); - } - break; + case VAR_LOADED_VEHICLES_NUMBER: + writeVehicleStateNumber(server, tempMsg, MSNet::VEHICLE_STATE_BUILT); + break; case VAR_LOADED_VEHICLES_IDS: { const std::vector& ids = server.getVehicleStateChanges().find(MSNet::VEHICLE_STATE_BUILT)->second; tempMsg.writeUnsignedByte(TYPE_STRINGLIST); tempMsg.writeStringList(ids); } break; - case VAR_DEPARTED_VEHICLES_NUMBER: { - const std::vector& ids = server.getVehicleStateChanges().find(MSNet::VEHICLE_STATE_DEPARTED)->second; - tempMsg.writeUnsignedByte(TYPE_INTEGER); - tempMsg.writeInt((int) ids.size()); - } - break; - case VAR_DEPARTED_VEHICLES_IDS: { - const std::vector& ids = server.getVehicleStateChanges().find(MSNet::VEHICLE_STATE_DEPARTED)->second; - tempMsg.writeUnsignedByte(TYPE_STRINGLIST); - tempMsg.writeStringList(ids); - } - break; - case VAR_TELEPORT_STARTING_VEHICLES_NUMBER: { - const std::vector& ids = server.getVehicleStateChanges().find(MSNet::VEHICLE_STATE_STARTING_TELEPORT)->second; - tempMsg.writeUnsignedByte(TYPE_INTEGER); - tempMsg.writeInt((int) ids.size()); - } - break; - case VAR_TELEPORT_STARTING_VEHICLES_IDS: { - const std::vector& ids = server.getVehicleStateChanges().find(MSNet::VEHICLE_STATE_STARTING_TELEPORT)->second; - tempMsg.writeUnsignedByte(TYPE_STRINGLIST); - tempMsg.writeStringList(ids); - } - break; - case VAR_TELEPORT_ENDING_VEHICLES_NUMBER: { - const std::vector& ids = server.getVehicleStateChanges().find(MSNet::VEHICLE_STATE_ENDING_TELEPORT)->second; - tempMsg.writeUnsignedByte(TYPE_INTEGER); - tempMsg.writeInt((int) ids.size()); - } - break; - case VAR_TELEPORT_ENDING_VEHICLES_IDS: { - const std::vector& ids = server.getVehicleStateChanges().find(MSNet::VEHICLE_STATE_ENDING_TELEPORT)->second; - tempMsg.writeUnsignedByte(TYPE_STRINGLIST); - tempMsg.writeStringList(ids); - } - break; - case VAR_ARRIVED_VEHICLES_NUMBER: { - const std::vector& ids = server.getVehicleStateChanges().find(MSNet::VEHICLE_STATE_ARRIVED)->second; - tempMsg.writeUnsignedByte(TYPE_INTEGER); - tempMsg.writeInt((int) ids.size()); - } - break; - case VAR_ARRIVED_VEHICLES_IDS: { - const std::vector& ids = server.getVehicleStateChanges().find(MSNet::VEHICLE_STATE_ARRIVED)->second; - tempMsg.writeUnsignedByte(TYPE_STRINGLIST); - tempMsg.writeStringList(ids); - } - break; + case VAR_DEPARTED_VEHICLES_NUMBER: + writeVehicleStateNumber(server, tempMsg, MSNet::VEHICLE_STATE_DEPARTED); + break; + case VAR_DEPARTED_VEHICLES_IDS: + writeVehicleStateIDs(server, tempMsg, MSNet::VEHICLE_STATE_DEPARTED); + break; + case VAR_TELEPORT_STARTING_VEHICLES_NUMBER: + writeVehicleStateNumber(server, tempMsg, MSNet::VEHICLE_STATE_STARTING_TELEPORT); + break; + case VAR_TELEPORT_STARTING_VEHICLES_IDS: + writeVehicleStateIDs(server, tempMsg, MSNet::VEHICLE_STATE_STARTING_TELEPORT); + break; + case VAR_TELEPORT_ENDING_VEHICLES_NUMBER: + writeVehicleStateNumber(server, tempMsg, MSNet::VEHICLE_STATE_ENDING_TELEPORT); + break; + case VAR_TELEPORT_ENDING_VEHICLES_IDS: + writeVehicleStateIDs(server, tempMsg, MSNet::VEHICLE_STATE_ENDING_TELEPORT); + break; + case VAR_ARRIVED_VEHICLES_NUMBER: + writeVehicleStateNumber(server, tempMsg, MSNet::VEHICLE_STATE_ARRIVED); + break; + case VAR_ARRIVED_VEHICLES_IDS: + writeVehicleStateIDs(server, tempMsg, MSNet::VEHICLE_STATE_ARRIVED); + break; + case VAR_PARKING_STARTING_VEHICLES_NUMBER: + writeVehicleStateNumber(server, tempMsg, MSNet::VEHICLE_STATE_STARTING_PARKING); + break; + case VAR_PARKING_STARTING_VEHICLES_IDS: + writeVehicleStateIDs(server, tempMsg, MSNet::VEHICLE_STATE_STARTING_PARKING); + break; + case VAR_PARKING_ENDING_VEHICLES_NUMBER: + writeVehicleStateNumber(server, tempMsg, MSNet::VEHICLE_STATE_ENDING_PARKING); + break; + case VAR_PARKING_ENDING_VEHICLES_IDS: + writeVehicleStateIDs(server, tempMsg, MSNet::VEHICLE_STATE_ENDING_PARKING); + break; + case VAR_STOP_STARTING_VEHICLES_NUMBER: + writeVehicleStateNumber(server, tempMsg, MSNet::VEHICLE_STATE_STARTING_STOP); + break; + case VAR_STOP_STARTING_VEHICLES_IDS: + writeVehicleStateIDs(server, tempMsg, MSNet::VEHICLE_STATE_STARTING_STOP); + break; + case VAR_STOP_ENDING_VEHICLES_NUMBER: + writeVehicleStateNumber(server, tempMsg, MSNet::VEHICLE_STATE_ENDING_STOP); + break; + case VAR_STOP_ENDING_VEHICLES_IDS: + writeVehicleStateIDs(server, tempMsg, MSNet::VEHICLE_STATE_ENDING_STOP); + break; case VAR_DELTA_T: tempMsg.writeUnsignedByte(TYPE_INTEGER); tempMsg.writeInt(DELTA_T); @@ -212,6 +207,52 @@ } +bool +TraCIServerAPI_Simulation::processSet(TraCIServer& server, tcpip::Storage& inputStorage, + tcpip::Storage& outputStorage) { + std::string warning = ""; // additional description for response + // variable + int variable = inputStorage.readUnsignedByte(); + if (variable != CMD_CLEAR_PENDING_VEHICLES) { + return server.writeErrorStatusCmd(CMD_SET_SIM_VARIABLE, "Set Simulation Variable: unsupported variable specified", outputStorage); + } + // id + std::string id = inputStorage.readString(); + // process + switch (variable) { + case CMD_CLEAR_PENDING_VEHICLES: { + //clear any pending vehicle insertions + std::string route; + if (!server.readTypeCheckingString(inputStorage, route)) { + return server.writeErrorStatusCmd(CMD_SET_SIM_VARIABLE, "A string is needed for clearing pending vehicles.", outputStorage); + } + MSNet::getInstance()->getInsertionControl().clearPendingVehicles(route); + } + break; + default: + break; + } + server.writeStatusCmd(CMD_SET_SIM_VARIABLE, RTYPE_OK, warning, outputStorage); + return true; +} + + +void +TraCIServerAPI_Simulation::writeVehicleStateNumber(TraCIServer& server, tcpip::Storage& outputStorage, MSNet::VehicleState state) { + const std::vector& ids = server.getVehicleStateChanges().find(state)->second; + outputStorage.writeUnsignedByte(TYPE_INTEGER); + outputStorage.writeInt((int) ids.size()); +} + + +void +TraCIServerAPI_Simulation::writeVehicleStateIDs(TraCIServer& server, tcpip::Storage& outputStorage, MSNet::VehicleState state) { + const std::vector& ids = server.getVehicleStateChanges().find(state)->second; + outputStorage.writeUnsignedByte(TYPE_STRINGLIST); + outputStorage.writeStringList(ids); +} + + std::pair TraCIServerAPI_Simulation::convertCartesianToRoadMap(Position pos) { std::pair result; @@ -253,7 +294,7 @@ bool -TraCIServerAPI_Simulation::commandPositionConversion(traci::TraCIServer& server, tcpip::Storage& inputStorage, +TraCIServerAPI_Simulation::commandPositionConversion(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage, int commandId) { std::pair roadPos; Position cartesianPos; @@ -287,7 +328,9 @@ SUMOReal pos = inputStorage.readDouble(); int laneIdx = inputStorage.readUnsignedByte(); try { + // convert edge,offset,laneIdx to cartesian position cartesianPos = geoPos = getLaneChecking(roadID, laneIdx, pos)->getShape().positionAtOffset(pos); + z = cartesianPos.z(); GeoConvHelper::getFinal().cartesian2geo(geoPos); } catch (TraCIException& e) { server.writeStatusCmd(commandId, RTYPE_ERR, e.what()); @@ -308,7 +351,7 @@ switch (destPosType) { case POSITION_ROADMAP: { - // convert road map to 3D position + // convert cartesion position to edge,offset,lane_index roadPos = convertCartesianToRoadMap(cartesianPos); // write result that is added to response msg outputStorage.writeUnsignedByte(POSITION_ROADMAP); @@ -344,7 +387,7 @@ /****************************************************************************/ bool -TraCIServerAPI_Simulation::commandDistanceRequest(traci::TraCIServer& server, tcpip::Storage& inputStorage, +TraCIServerAPI_Simulation::commandDistanceRequest(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage, int commandId) { Position pos1; Position pos2; @@ -372,7 +415,7 @@ pos1.set(p1x, p1y); } if (posType == POSITION_3D) { - inputStorage.readDouble(); // z value is ignored + inputStorage.readDouble();// z value is ignored } roadPos1 = convertCartesianToRoadMap(pos1); break; @@ -402,7 +445,7 @@ pos2.set(p2x, p2y); } if (posType == POSITION_3D) { - inputStorage.readDouble(); // z value is ignored + inputStorage.readDouble();// z value is ignored } roadPos2 = convertCartesianToRoadMap(pos2); break; @@ -421,7 +464,7 @@ // same edge distance = roadPos2.second - roadPos1.second; } else { - MSEdgeVector newRoute; + ConstMSEdgeVector newRoute; MSNet::getInstance()->getRouterTT().compute( &roadPos1.first->getEdge(), &roadPos2.first->getEdge(), 0, MSNet::getInstance()->getCurrentTimeStep(), newRoute); MSRoute route("", newRoute, false, 0, std::vector()); @@ -437,6 +480,7 @@ return true; } + #endif /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Simulation.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Simulation.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Simulation.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Simulation.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_Simulation.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_Simulation.h 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting edge values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -50,19 +50,29 @@ */ class TraCIServerAPI_Simulation { public: - /** @brief Processes a get value command (Command 0xaa: Get Edge Variable) + /** @brief Processes a get value command (Command 0xab: Get Simulation Variable) * * @param[in] server The TraCI-server-instance which schedules this request * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processGet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); + /** @brief Processes a set value command (Command 0xcb: Set Simulation Variable) + * + * @param[in] server The TraCI-server-instance which schedules this request + * @param[in] inputStorage The storage to read the command from + * @param[out] outputStorage The storage to write the result to + */ + static bool processSet(TraCIServer& server, tcpip::Storage& inputStorage, + tcpip::Storage& outputStorage); + + /** * Converts a cartesian position to the closest road map position * - * @param pos cartesian position that is to be converted + * @param pos cartesian position that is to be converted * @return the closest road map position to the cartesian position */ static std::pair convertCartesianToRoadMap(Position pos); @@ -75,12 +85,15 @@ */ static const MSLane* getLaneChecking(std::string roadID, int laneIndex, SUMOReal pos); - static bool commandPositionConversion(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool commandPositionConversion(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage, int commandId); - static bool commandDistanceRequest(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool commandDistanceRequest(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage, int commandId); + static void writeVehicleStateNumber(TraCIServer& server, tcpip::Storage& outputStorage, MSNet::VehicleState state); + static void writeVehicleStateIDs(TraCIServer& server, tcpip::Storage& outputStorage, MSNet::VehicleState state); + private: /// @brief invalidated copy constructor TraCIServerAPI_Simulation(const TraCIServerAPI_Simulation& s); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_TLS.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_TLS.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_TLS.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_TLS.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Laura Bieker /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_TLS.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_TLS.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // APIs for getting/setting traffic light values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2009-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,6 +36,7 @@ #include "TraCIConstants.h" #include #include +#include #include "TraCIServerAPI_TLS.h" #ifdef CHECK_MEMORY_LEAKS @@ -43,12 +45,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace traci; - - -// =========================================================================== // method definitions // =========================================================================== bool @@ -61,7 +57,8 @@ if (variable != ID_LIST && variable != TL_RED_YELLOW_GREEN_STATE && variable != TL_COMPLETE_DEFINITION_RYG && variable != TL_CONTROLLED_LANES && variable != TL_CONTROLLED_LINKS && variable != TL_CURRENT_PHASE && variable != TL_CURRENT_PROGRAM - && variable != TL_NEXT_SWITCH && variable != TL_PHASE_DURATION && variable != ID_COUNT) { + && variable != TL_NEXT_SWITCH && variable != TL_PHASE_DURATION && variable != ID_COUNT + && variable != VAR_PARAMETER && variable != TL_EXTERNAL_STATE) { return server.writeErrorStatusCmd(CMD_GET_TL_VARIABLE, "Get TLS Variable: unsupported variable specified", outputStorage); } // begin response building @@ -145,7 +142,7 @@ } break; case TL_CONTROLLED_LANES: { - const MSTrafficLightLogic::LaneVectorVector& lanes = vars.getActive()->getLanes(); + const MSTrafficLightLogic::LaneVectorVector& lanes = vars.getActive()->getLaneVectors(); tempMsg.writeUnsignedByte(TYPE_STRINGLIST); std::vector laneIDs; for (MSTrafficLightLogic::LaneVectorVector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) { @@ -158,7 +155,7 @@ } break; case TL_CONTROLLED_LINKS: { - const MSTrafficLightLogic::LaneVectorVector& lanes = vars.getActive()->getLanes(); + const MSTrafficLightLogic::LaneVectorVector& lanes = vars.getActive()->getLaneVectors(); const MSTrafficLightLogic::LinkVectorVector& links = vars.getActive()->getLinks(); // tempMsg.writeUnsignedByte(TYPE_COMPOUND); @@ -213,9 +210,75 @@ tempMsg.writeUnsignedByte(TYPE_INTEGER); tempMsg.writeInt((int) vars.getActive()->getNextSwitchTime()); break; + case VAR_PARAMETER: { + std::string paramName = ""; + if (!server.readTypeCheckingString(inputStorage, paramName)) { + return server.writeErrorStatusCmd(CMD_GET_TL_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); + } + tempMsg.writeUnsignedByte(TYPE_STRING); + tempMsg.writeString(vars.getActive()->getParameter(paramName, "")); + } + break; case TL_CONTROLLED_JUNCTIONS: { } break; + case TL_EXTERNAL_STATE: { + MSTrafficLightLogic* tls = vars.getActive(); + const std::string& state = tls->getCurrentPhaseDef().getState(); + const std::map& params = tls->getMap(); + unsigned int num = 0; + for (std::map::const_iterator i = params.begin(); i != params.end(); ++i) { + if ("connection:" == (*i).first.substr(0, 11)) { + ++num; + } + } + + tempMsg.writeUnsignedByte(TYPE_COMPOUND); + tempMsg.writeUnsignedByte(TYPE_INTEGER); + tempMsg.writeInt(num * 2); + for (std::map::const_iterator i = params.begin(); i != params.end(); ++i) { + if ("connection:" != (*i).first.substr(0, 11)) { + continue; + } + tempMsg.writeUnsignedByte(TYPE_STRING); + tempMsg.writeString((*i).second); // foreign id + std::string connection = (*i).first.substr(11); + std::string from, to; + size_t b = connection.find("->"); + if (b == std::string::npos) { + from = connection; + } else { + from = connection.substr(0, b); + to = connection.substr(b + 2); + } + bool denotesEdge = from.find("_") == std::string::npos; + MSLane* fromLane = 0; + const MSTrafficLightLogic::LaneVectorVector& lanes = tls->getLaneVectors(); + MSTrafficLightLogic::LaneVectorVector::const_iterator j = lanes.begin(); + for (; j != lanes.end() && fromLane == 0;) { + for (MSTrafficLightLogic::LaneVector::const_iterator k = (*j).begin(); k != (*j).end() && fromLane == 0;) { + if (denotesEdge && (*k)->getEdge().getID() == from) { + fromLane = *k; + } else if (!denotesEdge && (*k)->getID() == from) { + fromLane = *k; + } + if (fromLane == 0) { + ++k; + } + } + if (fromLane == 0) { + ++j; + } + } + if (fromLane == 0) { + return server.writeErrorStatusCmd(CMD_GET_TL_VARIABLE, "Could not find edge or lane '" + from + "' in traffic light '" + id + "'.", outputStorage); + } + int pos = (int)std::distance(lanes.begin(), j); + tempMsg.writeUnsignedByte(TYPE_UBYTE); + tempMsg.writeUnsignedByte(state[pos]); // state + } + } + break; default: break; } @@ -232,8 +295,9 @@ std::string warning = ""; // additional description for response // variable int variable = inputStorage.readUnsignedByte(); - if (variable != TL_PHASE_INDEX && variable != TL_PROGRAM - && variable != TL_PHASE_DURATION && variable != TL_RED_YELLOW_GREEN_STATE && variable != TL_COMPLETE_PROGRAM_RYG) { + if (variable != TL_PHASE_INDEX && variable != TL_PROGRAM && variable != TL_PHASE_DURATION + && variable != TL_RED_YELLOW_GREEN_STATE && variable != TL_COMPLETE_PROGRAM_RYG + && variable != VAR_PARAMETER) { return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "Change TLS State: unsupported variable specified", outputStorage); } std::string id = inputStorage.readString(); @@ -282,20 +346,7 @@ if (!server.readTypeCheckingString(inputStorage, state)) { return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "The phase must be given as a string.", outputStorage); } - // build only once... - if (vars.getLogic("online") == 0) { - MSPhaseDefinition* phase = new MSPhaseDefinition(DELTA_T, state); - std::vector phases; - phases.push_back(phase); - MSTrafficLightLogic* logic = new MSSimpleTrafficLightLogic(tlsControl, id, "online", phases, 0, cTime + DELTA_T, std::map()); - vars.addLogic("online", logic, true, true); - } else { - MSPhaseDefinition nphase(DELTA_T, state); - *(static_cast(vars.getLogic("online"))->getPhases()[0]) = nphase; - } - // @note: this assumes logic "online" is still active - vars.getActive()->setTrafficLightSignals(MSNet::getInstance()->getCurrentTimeStep()); - vars.executeOnSwitchActions(); + vars.setStateInstantiatingOnline(tlsControl, state); } break; case TL_COMPLETE_PROGRAM_RYG: { @@ -352,8 +403,23 @@ } else { static_cast(vars.getLogic(subid))->setPhases(phases, index); } - vars.getActive()->setTrafficLightSignals(MSNet::getInstance()->getCurrentTimeStep()); - vars.executeOnSwitchActions(); + } + break; + case VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { + return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "A compound object is needed for setting a parameter.", outputStorage); + } + //readt itemNo + inputStorage.readInt(); + std::string name; + if (!server.readTypeCheckingString(inputStorage, name)) { + return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "The name of the parameter must be given as a string.", outputStorage); + } + std::string value; + if (!server.readTypeCheckingString(inputStorage, value)) { + return server.writeErrorStatusCmd(CMD_SET_TL_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); + } + vars.getActive()->addParameter(name, value); } break; default: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_TLS.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_TLS.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_TLS.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_TLS.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_TLS.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_TLS.h 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting traffic light values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -53,7 +53,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processGet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -63,7 +63,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processSet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processSet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Vehicle.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Vehicle.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Vehicle.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Vehicle.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,13 +5,15 @@ /// @author Christoph Sommer /// @author Michael Behrisch /// @author Bjoern Hendriks +/// @author Mario Krumnow +/// @author Jakob Erdmann /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_Vehicle.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: TraCIServerAPI_Vehicle.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // APIs for getting/setting vehicle values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2009-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -40,13 +42,13 @@ #include #include #include -#include +#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "TraCIConstants.h" #include "TraCIServerAPI_Simulation.h" #include "TraCIServerAPI_Vehicle.h" @@ -56,16 +58,16 @@ #include #endif // CHECK_MEMORY_LEAKS +//#define DEBUG_VTD 1 +//#define DEBUG_VTD_ANGLE 1 + // =========================================================================== -// used namespaces +// static member variables // =========================================================================== -using namespace traci; - - - std::map > TraCIServerAPI_Vehicle::gVTDMap; + // =========================================================================== // method definitions // =========================================================================== @@ -76,22 +78,26 @@ int variable = inputStorage.readUnsignedByte(); std::string id = inputStorage.readString(); // check variable - if (variable != ID_LIST && variable != VAR_SPEED && variable != VAR_SPEED_WITHOUT_TRACI && variable != VAR_POSITION && variable != VAR_ANGLE + if (variable != ID_LIST && variable != VAR_SPEED && variable != VAR_SPEED_WITHOUT_TRACI + && variable != VAR_POSITION && variable != VAR_ANGLE && variable != VAR_POSITION3D && variable != VAR_ROAD_ID && variable != VAR_LANE_ID && variable != VAR_LANE_INDEX && variable != VAR_TYPE && variable != VAR_ROUTE_ID && variable != VAR_COLOR && variable != VAR_LANEPOSITION - && variable != VAR_CO2EMISSION && variable != VAR_COEMISSION && variable != VAR_HCEMISSION && variable != VAR_PMXEMISSION + && variable != VAR_CO2EMISSION && variable != VAR_COEMISSION + && variable != VAR_HCEMISSION && variable != VAR_PMXEMISSION && variable != VAR_NOXEMISSION && variable != VAR_FUELCONSUMPTION && variable != VAR_NOISEEMISSION - && variable != VAR_PERSON_NUMBER + && variable != VAR_PERSON_NUMBER && variable != VAR_LEADER && variable != VAR_EDGE_TRAVELTIME && variable != VAR_EDGE_EFFORT && variable != VAR_ROUTE_VALID && variable != VAR_EDGES - && variable != VAR_SIGNALS + && variable != VAR_SIGNALS && variable != VAR_DISTANCE && variable != VAR_LENGTH && variable != VAR_MAXSPEED && variable != VAR_VEHICLECLASS - && variable != VAR_SPEED_FACTOR && variable != VAR_SPEED_DEVIATION && variable != VAR_EMISSIONCLASS + && variable != VAR_SPEED_FACTOR && variable != VAR_SPEED_DEVIATION + && variable != VAR_ALLOWED_SPEED && variable != VAR_EMISSIONCLASS && variable != VAR_WIDTH && variable != VAR_MINGAP && variable != VAR_SHAPECLASS && variable != VAR_ACCEL && variable != VAR_DECEL && variable != VAR_IMPERFECTION && variable != VAR_TAU && variable != VAR_BEST_LANES && variable != DISTANCE_REQUEST - && variable != ID_COUNT && variable != VAR_STOPSTATE + && variable != ID_COUNT && variable != VAR_STOPSTATE && variable != VAR_WAITING_TIME + && variable != VAR_PARAMETER ) { return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Get Vehicle Variable: unsupported variable specified", outputStorage); } @@ -141,6 +147,12 @@ tempMsg.writeDouble(onRoad ? v->getPosition().x() : INVALID_DOUBLE_VALUE); tempMsg.writeDouble(onRoad ? v->getPosition().y() : INVALID_DOUBLE_VALUE); break; + case VAR_POSITION3D: + tempMsg.writeUnsignedByte(POSITION_3D); + tempMsg.writeDouble(onRoad ? v->getPosition().x() : INVALID_DOUBLE_VALUE); + tempMsg.writeDouble(onRoad ? v->getPosition().y() : INVALID_DOUBLE_VALUE); + tempMsg.writeDouble(onRoad ? v->getPosition().z() : INVALID_DOUBLE_VALUE); + break; case VAR_ANGLE: tempMsg.writeUnsignedByte(TYPE_DOUBLE); tempMsg.writeDouble(onRoad ? v->getAngle() : INVALID_DOUBLE_VALUE); @@ -183,42 +195,60 @@ break; case VAR_CO2EMISSION: tempMsg.writeUnsignedByte(TYPE_DOUBLE); - tempMsg.writeDouble(onRoad ? HelpersHBEFA::computeCO2(v->getVehicleType().getEmissionClass(), v->getSpeed(), v->getAcceleration()) : INVALID_DOUBLE_VALUE); + tempMsg.writeDouble(onRoad ? v->getCO2Emissions() : INVALID_DOUBLE_VALUE); break; case VAR_COEMISSION: tempMsg.writeUnsignedByte(TYPE_DOUBLE); - tempMsg.writeDouble(onRoad ? HelpersHBEFA::computeCO(v->getVehicleType().getEmissionClass(), v->getSpeed(), v->getAcceleration()) : INVALID_DOUBLE_VALUE); + tempMsg.writeDouble(onRoad ? v->getCOEmissions() : INVALID_DOUBLE_VALUE); break; case VAR_HCEMISSION: tempMsg.writeUnsignedByte(TYPE_DOUBLE); - tempMsg.writeDouble(onRoad ? HelpersHBEFA::computeHC(v->getVehicleType().getEmissionClass(), v->getSpeed(), v->getAcceleration()) : INVALID_DOUBLE_VALUE); + tempMsg.writeDouble(onRoad ? v->getHCEmissions() : INVALID_DOUBLE_VALUE); break; case VAR_PMXEMISSION: tempMsg.writeUnsignedByte(TYPE_DOUBLE); - tempMsg.writeDouble(onRoad ? HelpersHBEFA::computePMx(v->getVehicleType().getEmissionClass(), v->getSpeed(), v->getAcceleration()) : INVALID_DOUBLE_VALUE); + tempMsg.writeDouble(onRoad ? v->getPMxEmissions() : INVALID_DOUBLE_VALUE); break; case VAR_NOXEMISSION: tempMsg.writeUnsignedByte(TYPE_DOUBLE); - tempMsg.writeDouble(onRoad ? HelpersHBEFA::computeNOx(v->getVehicleType().getEmissionClass(), v->getSpeed(), v->getAcceleration()) : INVALID_DOUBLE_VALUE); + tempMsg.writeDouble(onRoad ? v->getNOxEmissions() : INVALID_DOUBLE_VALUE); break; case VAR_FUELCONSUMPTION: tempMsg.writeUnsignedByte(TYPE_DOUBLE); - tempMsg.writeDouble(onRoad ? HelpersHBEFA::computeFuel(v->getVehicleType().getEmissionClass(), v->getSpeed(), v->getAcceleration()) : INVALID_DOUBLE_VALUE); + tempMsg.writeDouble(onRoad ? v->getFuelConsumption() : INVALID_DOUBLE_VALUE); break; case VAR_NOISEEMISSION: tempMsg.writeUnsignedByte(TYPE_DOUBLE); - tempMsg.writeDouble(onRoad ? HelpersHarmonoise::computeNoise(v->getVehicleType().getEmissionClass(), v->getSpeed(), v->getAcceleration()) : INVALID_DOUBLE_VALUE); + tempMsg.writeDouble(onRoad ? v->getHarmonoise_NoiseEmissions() : INVALID_DOUBLE_VALUE); break; case VAR_PERSON_NUMBER: tempMsg.writeUnsignedByte(TYPE_INTEGER); tempMsg.writeInt(v->getPersonNumber()); break; + case VAR_LEADER: { + double dist = 0; + if (!server.readTypeCheckingDouble(inputStorage, dist)) { + return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Leader retrieval requires a double.", outputStorage); + } + std::pair leaderInfo = v->getLeader(dist); + tempMsg.writeUnsignedByte(TYPE_COMPOUND); + tempMsg.writeInt(2); + tempMsg.writeUnsignedByte(TYPE_STRING); + tempMsg.writeString(leaderInfo.first != 0 ? leaderInfo.first->getID() : ""); + tempMsg.writeUnsignedByte(TYPE_DOUBLE); + tempMsg.writeDouble(leaderInfo.second); + } + break; + case VAR_WAITING_TIME: + tempMsg.writeUnsignedByte(TYPE_DOUBLE); + tempMsg.writeDouble(v->getWaitingSeconds()); + break; case VAR_EDGE_TRAVELTIME: { if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Retrieval of travel time requires a compound object.", outputStorage); + return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of travel time requires a compound object.", outputStorage); } if (inputStorage.readInt() != 2) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Retrieval of travel time requires time, and edge as parameter.", outputStorage); + return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of travel time requires time, and edge as parameter.", outputStorage); } // time SUMOTime time = 0; @@ -237,7 +267,7 @@ // retrieve tempMsg.writeUnsignedByte(TYPE_DOUBLE); SUMOReal value; - if (!v->getWeightsStorage().retrieveExistingTravelTime(edge, 0, time, value)) { + if (!v->getWeightsStorage().retrieveExistingTravelTime(edge, time, value)) { tempMsg.writeDouble(INVALID_DOUBLE_VALUE); } else { tempMsg.writeDouble(value); @@ -247,10 +277,10 @@ break; case VAR_EDGE_EFFORT: { if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Retrieval of travel time requires a compound object.", outputStorage); + return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of travel time requires a compound object.", outputStorage); } if (inputStorage.readInt() != 2) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Retrieval of travel time requires time, and edge as parameter.", outputStorage); + return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of travel time requires time, and edge as parameter.", outputStorage); } // time SUMOTime time = 0; @@ -269,7 +299,7 @@ // retrieve tempMsg.writeUnsignedByte(TYPE_DOUBLE); SUMOReal value; - if (!v->getWeightsStorage().retrieveExistingEffort(edge, 0, time, value)) { + if (!v->getWeightsStorage().retrieveExistingEffort(edge, time, value)) { tempMsg.writeDouble(INVALID_DOUBLE_VALUE); } else { tempMsg.writeDouble(value); @@ -323,7 +353,9 @@ ++cnt; std::vector bestContIDs; for (std::vector::const_iterator j = lq.bestContinuations.begin(); j != lq.bestContinuations.end(); ++j) { - bestContIDs.push_back((*j)->getID()); + if ((*j) != 0) { + bestContIDs.push_back((*j)->getID()); + } } tempContent.writeUnsignedByte(TYPE_STRINGLIST); tempContent.writeStringList(bestContIDs); @@ -342,11 +374,37 @@ tempMsg.writeUnsignedByte(b); } break; + case VAR_DISTANCE: { + tempMsg.writeUnsignedByte(TYPE_DOUBLE); + SUMOReal distance = onRoad ? v->getRoute().getDistanceBetween(0, v->getPositionOnLane(), v->getRoute().getEdges()[0], &v->getLane()->getEdge()) : INVALID_DOUBLE_VALUE; + if (distance == std::numeric_limits::max()) { + distance = INVALID_DOUBLE_VALUE; + } + tempMsg.writeDouble(distance); + } + break; case DISTANCE_REQUEST: if (!commandDistanceRequest(server, inputStorage, tempMsg, v)) { return false; } break; + case VAR_ALLOWED_SPEED: + tempMsg.writeUnsignedByte(TYPE_DOUBLE); + tempMsg.writeDouble(onRoad ? v->getLane()->getVehicleMaxSpeed(v) : INVALID_DOUBLE_VALUE); + break; + case VAR_SPEED_FACTOR: + tempMsg.writeUnsignedByte(TYPE_DOUBLE); + tempMsg.writeDouble(v->getChosenSpeedFactor()); + break; + case VAR_PARAMETER: { + std::string paramName = ""; + if (!server.readTypeCheckingString(inputStorage, paramName)) { + return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); + } + tempMsg.writeUnsignedByte(TYPE_STRING); + tempMsg.writeString(v->getParameter().getParameter(paramName, "")); + } + break; default: TraCIServerAPI_VehicleType::getVariable(variable, v->getVehicleType(), tempMsg); break; @@ -366,24 +424,24 @@ int variable = inputStorage.readUnsignedByte(); if (variable != CMD_STOP && variable != CMD_CHANGELANE && variable != CMD_SLOWDOWN && variable != CMD_CHANGETARGET && variable != CMD_RESUME - && variable != VAR_ROUTE_ID && variable != VAR_ROUTE + && variable != VAR_TYPE && variable != VAR_ROUTE_ID && variable != VAR_ROUTE && variable != VAR_EDGE_TRAVELTIME && variable != VAR_EDGE_EFFORT && variable != CMD_REROUTE_TRAVELTIME && variable != CMD_REROUTE_EFFORT && variable != VAR_SIGNALS && variable != VAR_MOVE_TO && variable != VAR_LENGTH && variable != VAR_MAXSPEED && variable != VAR_VEHICLECLASS - && variable != VAR_SPEED_FACTOR && variable != VAR_SPEED_DEVIATION && variable != VAR_EMISSIONCLASS + && variable != VAR_SPEED_FACTOR && variable != VAR_EMISSIONCLASS && variable != VAR_WIDTH && variable != VAR_MINGAP && variable != VAR_SHAPECLASS && variable != VAR_ACCEL && variable != VAR_DECEL && variable != VAR_IMPERFECTION - && variable != VAR_TAU + && variable != VAR_TAU && variable != VAR_LANECHANGE_MODE && variable != VAR_SPEED && variable != VAR_SPEEDSETMODE && variable != VAR_COLOR - && variable != ADD && variable != REMOVE - && variable != VAR_MOVE_TO_VTD + && variable != ADD && variable != ADD_FULL && variable != REMOVE + && variable != VAR_MOVE_TO_VTD && variable != VAR_PARAMETER/* && variable != VAR_SPEED_TIME_LINE && variable != VAR_LANE_TIME_LINE*/ ) { return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Change Vehicle State: unsupported variable specified", outputStorage); } // id std::string id = inputStorage.readString(); - const bool shouldExist = variable != ADD; + const bool shouldExist = variable != ADD && variable != ADD_FULL; SUMOVehicle* sumoVehicle = MSNet::getInstance()->getVehicleControl().getVehicle(id); if (sumoVehicle == 0) { if (shouldExist) { @@ -424,6 +482,7 @@ // optional stop flags bool parking = false; bool triggered = false; + bool containerTriggered = false; if (compoundSize == 5) { int stopFlags; if (!server.readTypeCheckingByte(inputStorage, stopFlags)) { @@ -434,20 +493,21 @@ } // check if (pos < 0) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Position on lane must not be negative", outputStorage); + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Position on lane must not be negative.", outputStorage); } // get the actual lane that is referenced by laneIndex MSEdge* road = MSEdge::dictionary(roadId); if (road == 0) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Unable to retrieve road with given id", outputStorage); + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Unable to retrieve road with given id.", outputStorage); } const std::vector& allLanes = road->getLanes(); if ((laneIndex < 0) || laneIndex >= (int)(allLanes.size())) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "No lane existing with such id on the given road", outputStorage); + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "No lane with index '" + toString(laneIndex) + "' on road '" + roadId + "'.", outputStorage); } // Forward command to vehicle - if (!v->addTraciStop(allLanes[laneIndex], pos, 0, waitTime, parking, triggered)) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Vehicle is too close or behind the stop on " + allLanes[laneIndex]->getID(), outputStorage); + std::string error; + if (!v->addTraciStop(allLanes[laneIndex], pos, 0, waitTime, parking, triggered, containerTriggered, error)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, error, outputStorage); } } break; @@ -460,6 +520,10 @@ server.writeStatusCmd(CMD_SET_VEHICLE_VARIABLE, RTYPE_ERR, "Resuming should obtain an empty compound object.", outputStorage); return false; } + if (!static_cast(v)->hasStops()) { + server.writeStatusCmd(CMD_SET_VEHICLE_VARIABLE, RTYPE_ERR, "Failed to resume vehicle '" + v->getID() + "', it has no stops.", outputStorage); + return false; + } if (!static_cast(v)->resumeFromStopping()) { MSVehicle::Stop& sto = (static_cast(v))->getNextStop(); std::ostringstream strs; @@ -468,7 +532,7 @@ strs << ", edge:" << (*sto.edge)->getID(); strs << ", startPos: " << sto.startPos; std::string posStr = strs.str(); - server.writeStatusCmd(CMD_SET_VEHICLE_VARIABLE, RTYPE_ERR, "Failed to resume a non parking vehicle: " + v->getID() + ", " + posStr, outputStorage); + server.writeStatusCmd(CMD_SET_VEHICLE_VARIABLE, RTYPE_ERR, "Failed to resume a non parking vehicle '" + v->getID() + "', " + posStr, outputStorage); return false; } } @@ -491,6 +555,34 @@ return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The second lane change parameter must be the duration given as an integer.", outputStorage); } if ((laneIndex < 0) || (laneIndex >= (int)(v->getEdge()->getLanes().size()))) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "No lane with index '" + toString(laneIndex) + "' on road '" + v->getEdge()->getID() + "'.", outputStorage); + } + // Forward command to vehicle + std::vector > laneTimeLine; + laneTimeLine.push_back(std::make_pair(MSNet::getInstance()->getCurrentTimeStep(), laneIndex)); + laneTimeLine.push_back(std::make_pair(MSNet::getInstance()->getCurrentTimeStep() + stickyTime, laneIndex)); + v->getInfluencer().setLaneTimeLine(laneTimeLine); + } + break; + /* + case VAR_LANE_TIME_LINE: { + if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Lane change needs a compound object description.", outputStorage); + } + if (inputStorage.readInt() != 2) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Lane change needs a compound object description of two items.", outputStorage); + } + // Lane ID + int laneIndex = 0; + if (!server.readTypeCheckingByte(inputStorage, laneIndex)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The first lane change parameter must be the lane index given as a byte.", outputStorage); + } + // stickyTime + SUMOTime stickyTime = 0; + if (!server.readTypeCheckingInt(inputStorage, stickyTime)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The second lane change parameter must be the duration given as an integer.", outputStorage); + } + if ((laneIndex < 0) || (laneIndex >= (int)(v->getEdge()->getLanes().size()))) { return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "No lane existing with given id on the current road", outputStorage); } // Forward command to vehicle @@ -503,6 +595,7 @@ v->getLaneChangeModel().requestLaneChange(req); } break; + */ case CMD_SLOWDOWN: { if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Slow down needs a compound object description.", outputStorage); @@ -521,7 +614,7 @@ if (!server.readTypeCheckingInt(inputStorage, duration)) { return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The second slow down parameter must be the duration given as an integer.", outputStorage); } - if (duration < 0) { + if (duration < 0 || STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) + STEPS2TIME(duration) > STEPS2TIME(SUMOTime_MAX - DELTA_T)) { return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Invalid time interval", outputStorage); } std::vector > speedTimeLine; @@ -540,8 +633,8 @@ return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Can not retrieve road with ID " + edgeID, outputStorage); } // build a new route between the vehicle's current edge and destination edge - MSEdgeVector newRoute; - const MSEdge* currentEdge = v->getEdge(); + ConstMSEdgeVector newRoute; + const MSEdge* currentEdge = v->getRerouteOrigin(); MSNet::getInstance()->getRouterTT().compute( currentEdge, destEdge, (const MSVehicle * const) v, MSNet::getInstance()->getCurrentTimeStep(), newRoute); // replace the vehicle's route by the new one @@ -550,6 +643,18 @@ } } break; + case VAR_TYPE: { + std::string vTypeID; + if (!server.readTypeCheckingString(inputStorage, vTypeID)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The vehicle type id must be given as a string.", outputStorage); + } + MSVehicleType* vehicleType = MSNet::getInstance()->getVehicleControl().getVType(vTypeID); + if (vehicleType == 0) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The vehicle type '" + vTypeID + "' is not known.", outputStorage); + } + v->replaceVehicleType(vehicleType); + } + break; case VAR_ROUTE_ID: { std::string rid; if (!server.readTypeCheckingString(inputStorage, rid)) { @@ -569,7 +674,7 @@ if (!server.readTypeCheckingStringList(inputStorage, edgeIDs)) { return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "A route must be defined as a list of edge ids.", outputStorage); } - std::vector edges; + ConstMSEdgeVector edges; MSEdge::parseEdgesList(edgeIDs, edges, ""); if (!v->replaceRouteEdges(edges, v->getLane() == 0)) { return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Route replacement failed for " + v->getID(), outputStorage); @@ -792,7 +897,7 @@ std::vector > speedTimeLine; if (speed >= 0) { speedTimeLine.push_back(std::make_pair(MSNet::getInstance()->getCurrentTimeStep(), speed)); - speedTimeLine.push_back(std::make_pair(SUMOTime_MAX, speed)); + speedTimeLine.push_back(std::make_pair(SUMOTime_MAX - DELTA_T, speed)); } v->getInfluencer().setSpeedTimeLine(speedTimeLine); } @@ -805,12 +910,22 @@ v->getInfluencer().setConsiderSafeVelocity((speedMode & 1) != 0); v->getInfluencer().setConsiderMaxAcceleration((speedMode & 2) != 0); v->getInfluencer().setConsiderMaxDeceleration((speedMode & 4) != 0); + v->getInfluencer().setRespectJunctionPriority((speedMode & 8) != 0); + v->getInfluencer().setEmergencyBrakeRedLight((speedMode & 16) != 0); + } + break; + case VAR_LANECHANGE_MODE: { + int laneChangeMode = 0; + if (!server.readTypeCheckingInt(inputStorage, laneChangeMode)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting lane change mode requires an integer.", outputStorage); + } + v->getInfluencer().setLaneChangeMode(laneChangeMode); } break; case VAR_COLOR: { RGBColor col; if (!server.readTypeCheckingColor(inputStorage, col)) { - return server.writeErrorStatusCmd(CMD_SET_POLYGON_VARIABLE, "The color must be given using the according type.", outputStorage); + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The color must be given using the according type.", outputStorage); } v->getParameter().color.set(col.red(), col.green(), col.blue(), col.alpha()); v->getParameter().setParameter |= VEHPARS_COLOR_SET; @@ -856,6 +971,8 @@ return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Invalid departure time.", outputStorage); } vehicleParams.departProcedure = (DepartDefinition)proc; + } else if (vehicleParams.depart < MSNet::getInstance()->getCurrentTimeStep()) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Departure time in the past.", outputStorage); } double pos; @@ -865,7 +982,7 @@ vehicleParams.departPos = pos; if (vehicleParams.departPos < 0) { const int proc = static_cast(-vehicleParams.departPos); - if (proc >= static_cast(DEPART_POS_DEF_MAX)) { + if (fabs(proc + vehicleParams.departPos) > NUMERICAL_EPS || proc >= static_cast(DEPART_POS_DEF_MAX) || proc == static_cast(DEPART_POS_GIVEN)) { return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Invalid departure position.", outputStorage); } vehicleParams.departPosProcedure = (DepartPosDefinition)proc; @@ -902,10 +1019,120 @@ vehicleParams.departLaneProcedure = DEPART_LANE_GIVEN; } - SUMOVehicleParameter* params = new SUMOVehicleParameter(); - *params = vehicleParams; + SUMOVehicleParameter* params = new SUMOVehicleParameter(vehicleParams); + try { + SUMOVehicle* vehicle = MSNet::getInstance()->getVehicleControl().buildVehicle(params, route, vehicleType, true, false); + MSNet::getInstance()->getVehicleControl().addVehicle(vehicleParams.id, vehicle); + MSNet::getInstance()->getInsertionControl().add(vehicle); + } catch (ProcessError& e) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, e.what(), outputStorage); + } + } + break; + case ADD_FULL: { + if (v != 0) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The vehicle " + id + " to add already exists.", outputStorage); + } + if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Adding a vehicle requires a compound object.", outputStorage); + } + if (inputStorage.readInt() != 14) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Adding a fully specified vehicle needs fourteen parameters.", outputStorage); + } + SUMOVehicleParameter vehicleParams; + vehicleParams.id = id; + + std::string routeID; + if (!server.readTypeCheckingString(inputStorage, routeID)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Second parameter (route) requires a string.", outputStorage); + } + const MSRoute* route = MSRoute::dictionary(routeID); + if (!route) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Invalid route '" + routeID + "' for vehicle: '" + id + "'", outputStorage); + } + + std::string vTypeID; + if (!server.readTypeCheckingString(inputStorage, vTypeID)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "First parameter (type) requires a string.", outputStorage); + } + MSVehicleType* vehicleType = MSNet::getInstance()->getVehicleControl().getVType(vTypeID); + if (!vehicleType) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Invalid type '" + vTypeID + "' for vehicle '" + id + "'", outputStorage); + } + + std::string helper; + std::string error; + if (!server.readTypeCheckingString(inputStorage, helper)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Third parameter (depart) requires an string.", outputStorage); + } + if (!SUMOVehicleParameter::parseDepart(helper, "vehicle", id, vehicleParams.depart, vehicleParams.departProcedure, error)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, error, outputStorage); + } + if (vehicleParams.departProcedure == DEPART_GIVEN && vehicleParams.depart < MSNet::getInstance()->getCurrentTimeStep()) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Departure time in the past.", outputStorage); + } + + if (!server.readTypeCheckingString(inputStorage, helper)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Fourth parameter (depart lane) requires a string.", outputStorage); + } + if (!SUMOVehicleParameter::parseDepartLane(helper, "vehicle", id, vehicleParams.departLane, vehicleParams.departLaneProcedure, error)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, error, outputStorage); + } + if (!server.readTypeCheckingString(inputStorage, helper)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Fifth parameter (depart position) requires a string.", outputStorage); + } + if (!SUMOVehicleParameter::parseDepartPos(helper, "vehicle", id, vehicleParams.departPos, vehicleParams.departPosProcedure, error)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, error, outputStorage); + } + if (!server.readTypeCheckingString(inputStorage, helper)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Sixth parameter (depart speed) requires a string.", outputStorage); + } + if (!SUMOVehicleParameter::parseDepartSpeed(helper, "vehicle", id, vehicleParams.departSpeed, vehicleParams.departSpeedProcedure, error)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, error, outputStorage); + } + + if (!server.readTypeCheckingString(inputStorage, helper)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Seventh parameter (arrival lane) requires a string.", outputStorage); + } + if (!SUMOVehicleParameter::parseArrivalLane(helper, "vehicle", id, vehicleParams.arrivalLane, vehicleParams.arrivalLaneProcedure, error)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, error, outputStorage); + } + if (!server.readTypeCheckingString(inputStorage, helper)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Eighth parameter (arrival position) requires a string.", outputStorage); + } + if (!SUMOVehicleParameter::parseArrivalPos(helper, "vehicle", id, vehicleParams.arrivalPos, vehicleParams.arrivalPosProcedure, error)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, error, outputStorage); + } + if (!server.readTypeCheckingString(inputStorage, helper)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Ninth parameter (arrival speed) requires a string.", outputStorage); + } + if (!SUMOVehicleParameter::parseArrivalSpeed(helper, "vehicle", id, vehicleParams.arrivalSpeed, vehicleParams.arrivalSpeedProcedure, error)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, error, outputStorage); + } + + if (!server.readTypeCheckingString(inputStorage, vehicleParams.fromTaz)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Tenth parameter (from taz) requires a string.", outputStorage); + } + if (!server.readTypeCheckingString(inputStorage, vehicleParams.toTaz)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Eleventh parameter (to taz) requires a string.", outputStorage); + } + if (!server.readTypeCheckingString(inputStorage, vehicleParams.line)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Twelth parameter (line) requires a string.", outputStorage); + } + + int num; + if (!server.readTypeCheckingInt(inputStorage, num)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "13th parameter (person capacity) requires an int.", outputStorage); + } + vehicleParams.personCapacity = num; + if (!server.readTypeCheckingInt(inputStorage, num)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "14th parameter (person number) requires an int.", outputStorage); + } + vehicleParams.personNumber = num; + + SUMOVehicleParameter* params = new SUMOVehicleParameter(vehicleParams); try { - SUMOVehicle* vehicle = MSNet::getInstance()->getVehicleControl().buildVehicle(params, route, vehicleType); + SUMOVehicle* vehicle = MSNet::getInstance()->getVehicleControl().buildVehicle(params, route, vehicleType, true, false); MSNet::getInstance()->getVehicleControl().addVehicle(vehicleParams.id, vehicle); MSNet::getInstance()->getInsertionControl().add(vehicle); } catch (ProcessError& e) { @@ -955,8 +1182,8 @@ if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting VTD vehicle requires a compound object.", outputStorage); } - if (inputStorage.readInt() != 4) { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting VTD vehicle should obtain: edgeID, lane, x, y.", outputStorage); + if (inputStorage.readInt() != 5) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting VTD vehicle should obtain: edgeID, lane, x, y, angle.", outputStorage); } // edge ID std::string edgeID; @@ -969,7 +1196,7 @@ return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The second parameter for setting a VTD vehicle must be lane given as an int.", outputStorage); } // x - double x = 0, y = 0; + double x = 0, y = 0, angle = 0; if (!server.readTypeCheckingDouble(inputStorage, x)) { return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The third parameter for setting a VTD vehicle must be the x-position given as a double.", outputStorage); } @@ -977,6 +1204,10 @@ if (!server.readTypeCheckingDouble(inputStorage, y)) { return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The fourth parameter for setting a VTD vehicle must be the y-position given as a double.", outputStorage); } + // angle + if (!server.readTypeCheckingDouble(inputStorage, angle)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The fifth parameter for setting a VTD vehicle must be the angle given as a double.", outputStorage); + } // process if (!v->isOnRoad()) { break; @@ -987,48 +1218,65 @@ laneNum = -laneNum; } Position pos(x, y); + angle *= -1.; + if (fabs(angle) > 180.) { + angle = 180. - angle; + } Position vehPos = v->getPosition(); v->getBestLanes(); - bool report = server.vtdDebug(); - if (report) { - std::cout << std::endl << "begin vehicle " << v->getID() << " vehPos:" << vehPos << " lane:" << v->getLane()->getID() << std::endl; - } - if (report) { - std::cout << " want pos:" << pos << " edge:" << edgeID << " laneNum:" << laneNum << std::endl; - } - - MSEdgeVector edgesA, edgesB, edgesC; - MSLane* laneA, *laneB, *laneC; - laneA = laneB = laneC = 0; - SUMOReal lanePosA, lanePosB, lanePosC; - SUMOReal bestDistanceA, bestDistanceB, bestDistanceC; - bestDistanceA = bestDistanceB = bestDistanceC = 1000.;//pos.distanceSquaredTo2D(vehPos); - int routeOffsetA, routeOffsetB, routeOffsetC; - routeOffsetA = routeOffsetB = routeOffsetC = 0; +#ifdef DEBUG_VTD + std::cout << std::endl << "begin vehicle " << v->getID() << " vehPos:" << vehPos << " lane:" << v->getLane()->getID() << std::endl; + std::cout << " want pos:" << pos << " edge:" << edgeID << " laneNum:" << laneNum << " angle:" << angle << std::endl; +#endif + + ConstMSEdgeVector edges; + MSLane* lane = 0; + SUMOReal lanePos; + SUMOReal bestDistance = std::numeric_limits::max(); + int routeOffset = 0; // case a): edge/lane is known and matches route - bool aFound = vtdMap_matchingEdgeLane(pos, origID, *v, server.vtdDebug(), bestDistanceA, &laneA, lanePosA, routeOffsetA, edgesA); - // case b): position is at route, should be somewhere near to it - bool bFound = vtdMap_matchingRoutePosition(pos, origID, *v, server.vtdDebug(), bestDistanceB, &laneB, lanePosB, routeOffsetB, edgesB); - // case c) nearest matching lane - bool cFound = vtdMap_matchingNearest(pos, origID, *v, server, server.vtdDebug(), bestDistanceC, &laneC, lanePosC, routeOffsetC, edgesC); + bool dFound = vtdMap(pos, origID, angle, *v, server, bestDistance, &lane, lanePos, routeOffset, edges); // - SUMOReal maxRouteDistance = 50; + SUMOReal maxRouteDistance = 100; + /* if (cFound && (bestDistanceA > maxRouteDistance && bestDistanceC > maxRouteDistance)) { // both route-based approach yield in a position too far away from the submitted --> new route!? server.setVTDControlled(v, laneC, lanePosC, routeOffsetC, edgesC); } else { - // use the best we have - if (bFound) { - server.setVTDControlled(v, laneB, lanePosB, routeOffsetB, edgesB); - } else if (aFound) { - server.setVTDControlled(v, laneA, lanePosA, routeOffsetA, edgesA); - } else if (cFound) { - server.setVTDControlled(v, laneC, lanePosC, routeOffsetC, edgesC); - } else { - return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Could not map vehicle.", outputStorage); - } + */ + // use the best we have + if (dFound && maxRouteDistance > bestDistance) { + server.setVTDControlled(v, lane, lanePos, routeOffset, edges, MSNet::getInstance()->getCurrentTimeStep()); + } else { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Could not map vehicle '" + id + "'.", outputStorage); + } + //} + } + break; + case VAR_SPEED_FACTOR: { + double factor = 0; + if (!server.readTypeCheckingDouble(inputStorage, factor)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "Setting speed factor requires a double.", outputStorage); } + v->setChosenSpeedFactor(factor); + } + break; + case VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "A compound object is needed for setting a parameter.", outputStorage); + } + //readt itemNo + inputStorage.readInt(); + std::string name; + if (!server.readTypeCheckingString(inputStorage, name)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The name of the parameter must be given as a string.", outputStorage); + } + std::string value; + if (!server.readTypeCheckingString(inputStorage, value)) { + return server.writeErrorStatusCmd(CMD_SET_VEHICLE_VARIABLE, "The value of the parameter must be given as a string.", outputStorage); + } + ((SUMOVehicleParameter&) v->getParameter()).addParameter(name, value); } break; default: @@ -1047,202 +1295,136 @@ bool -TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(const Position& pos, const std::string& origID, MSVehicle& v, bool report, - SUMOReal& bestDistance, MSLane** lane, SUMOReal& lanePos, int& routeOffset, MSEdgeVector& edges) { - const std::map >& vtdMap = getOrBuildVTDMap(); - if (vtdMap.find(origID) == vtdMap.end()) { - if (report) { - std::cout << " a failed - lane not in map" << std::endl; - } - return false; - } - const std::vector& lanes = vtdMap.find(origID)->second; - for (std::vector::const_iterator i = lanes.begin(); i != lanes.end() && bestDistance > POSITION_EPS; ++i) { - MSLane* l = *i; - SUMOReal dist = l->getShape().distance(pos); - if (report) { - std::cout << " a at lane " << l->getID() << " dist:" << dist << " best:" << bestDistance << std::endl; - } - if (dist < bestDistance) { - bestDistance = dist; - *lane = l; - } - } - MSLane* pni = *lane; - while (pni != 0 && pni->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL && pni->getIncomingLanes().size() != 0) { - pni = pni->getIncomingLanes()[0].lane; - } - if (pni == 0 || pni->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { - // not found - if (report) { - std::cout << " a failed - no incoming lane" << std::endl; - } - return false; - } - const MSEdgeVector& tedges = v.getRoute().getEdges(); - MSEdgeVector::const_iterator p = std::find(tedges.begin() + v.getRoutePosition(), tedges.end(), &pni->getEdge()); - if (p != tedges.end()) { - lanePos = MAX2(SUMOReal(0), MIN2(SUMOReal((*lane)->getLength() - POSITION_EPS), (*lane)->getShape().nearest_offset_to_point2D(pos, false))); - routeOffset = (int)(std::distance(tedges.begin(), p) - v.getRoutePosition()); - if (report) { - std::cout << " a ok lane:" << (*lane)->getID() << " lanePos:" << lanePos << " routeOffset:" << routeOffset << std::endl; +TraCIServerAPI_Vehicle::vtdMap(const Position& pos, const std::string& origID, const SUMOReal angle, MSVehicle& v, TraCIServer& server, + SUMOReal& bestDistance, MSLane** lane, SUMOReal& lanePos, int& routeOffset, ConstMSEdgeVector& edges) { + SUMOReal speed = pos.distanceTo2D(v.getPosition()); // !!!v.getSpeed(); + std::set into; + PositionVector shape; + shape.push_back(pos); + server.collectObjectsInRange(CMD_GET_EDGE_VARIABLE, shape, speed * 2, into); + SUMOReal maxDist = 0; + std::map lane2utility; + for (std::set::const_iterator j = into.begin(); j != into.end(); ++j) { + MSEdge* e = MSEdge::dictionary(*j); + const MSEdge* prevEdge = 0; + const MSEdge* nextEdge = 0; + MSEdge::EdgeBasicFunction ef = e->getPurpose(); + bool onRoute = false; + if (ef != MSEdge::EDGEFUNCTION_INTERNAL) { + const ConstMSEdgeVector& ev = v.getRoute().getEdges(); + unsigned int routePosition = v.getRoutePosition(); + if (v.getLane()->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { + ++routePosition; + } + ConstMSEdgeVector::const_iterator edgePos = std::find(ev.begin() + routePosition, ev.end(), e); + onRoute = edgePos != ev.end(); + if (edgePos == ev.end() - 1 && v.getEdge() == e) { + onRoute &= v.getEdge()->getLanes()[0]->getLength() > v.getPositionOnLane() + SPEED2DIST(speed); + } + prevEdge = e; + nextEdge = !onRoute || edgePos == ev.end() - 1 ? 0 : *(edgePos + 1); + } else { + prevEdge = e; + while (prevEdge != 0 && prevEdge->getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { + MSLane* l = prevEdge->getLanes()[0]; + l = l->getLogicalPredecessorLane(); + prevEdge = l == 0 ? 0 : &l->getEdge(); + } + const ConstMSEdgeVector& ev = v.getRoute().getEdges(); + ConstMSEdgeVector::const_iterator prevEdgePos = std::find(ev.begin() + v.getRoutePosition(), ev.end(), prevEdge); + if (prevEdgePos != ev.end() && ev.size() > 1 && prevEdgePos != ev.end() - 1) { + const MSJunction* junction = e->getFromJunction(); + const ConstMSEdgeVector& outgoing = junction->getOutgoing(); + ConstMSEdgeVector::const_iterator nextEdgePos = std::find(outgoing.begin(), outgoing.end(), *(ev.begin() + v.getRoutePosition() + 1)); + if (nextEdgePos != outgoing.end()) { + nextEdge = *nextEdgePos; + onRoute = true; + } + } } - return true; - } - if (report) { - std::cout << " a failed - route position beyond route length" << std::endl; - } - return false; -} -bool -TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(const Position& pos, const std::string& origID, MSVehicle& v, bool report, - SUMOReal& bestDistance, MSLane** lane, SUMOReal& lanePos, int& routeOffset, MSEdgeVector& edges) { - - int lastBestRouteEdge = 0; - int lastRouteEdge = 0; - MSLane* bestRouteLane = 0; - const std::vector& bestLaneConts = v.getBestLanesContinuation(v.getLane()); - for (std::vector::const_iterator i = bestLaneConts.begin(); i != bestLaneConts.end() && bestDistance > POSITION_EPS; ++i) { - MSEdge& e = (*i)->getEdge(); - if (i != bestLaneConts.begin() && e.getPurpose() != MSEdge::EDGEFUNCTION_INTERNAL) { - ++lastRouteEdge; - } - const std::vector& lanes = e.getLanes(); - for (std::vector::const_iterator k = lanes.begin(); k != lanes.end() && bestDistance > POSITION_EPS; ++k) { - MSLane* cl = *k; - SUMOReal dist = cl->getShape().distance(pos); - if (report) { - std::cout << " b at lane " << cl->getID() << " dist:" << dist << " best:" << bestDistance << std::endl; - } - if (dist < bestDistance) { - bestDistance = dist; - *lane = cl; - lastBestRouteEdge = lastRouteEdge; - if (e.getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { - bestRouteLane = *i; + const std::vector& lanes = e->getLanes(); + for (std::vector::const_iterator k = lanes.begin(); k != lanes.end(); ++k) { + MSLane* lane = *k; + SUMOReal off = lane->getShape().nearest_offset_to_point2D(pos); + SUMOReal langle = 180.; + SUMOReal dist = 1000.; + if (off >= 0) { + dist = lane->getShape().distance(pos); + if (dist > lane->getLength()) { // this is a workaround + // a SmartDB, running at :49_2 delivers off=~9.24 while dist>24.? + dist = 1000.; } else { - bestRouteLane = *lane; + langle = lane->getShape().rotationDegreeAtOffset(off); } } + maxDist = MAX2(maxDist, dist); + bool sameEdge = &lane->getEdge() == &v.getLane()->getEdge() && v.getEdge()->getLanes()[0]->getLength() > v.getPositionOnLane() + SPEED2DIST(speed); + const MSEdge* rNextEdge = nextEdge; + if (rNextEdge == 0 && lane->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { + MSLane* next = lane->getLinkCont()[0]->getLane(); + rNextEdge = next == 0 ? 0 : &next->getEdge(); + } +#ifdef DEBUG_VTD_ANGLE + std::cout << lane->getID() << ": " << langle << " " << off << std::endl; +#endif + lane2utility[lane] = LaneUtility( + dist, GeomHelper::getMinAngleDiff(angle, langle), + lane->getParameter("origId", "") == origID, + onRoute, sameEdge, prevEdge, rNextEdge); } } - if (bestRouteLane == 0) { - if (report) { - std::cout << " b failed - no best route lane" << std::endl; - } - return false; - } - lanePos = MAX2(SUMOReal(0), MIN2(SUMOReal(bestRouteLane->getLength() - POSITION_EPS), bestRouteLane->getShape().nearest_offset_to_point2D(pos, false))); - routeOffset = lastBestRouteEdge; - if (report) { - std::cout << " b ok lane " << bestRouteLane->getID() << " lanePos:" << lanePos << " best:" << lastBestRouteEdge << std::endl; - } - return true; -} - -bool -TraCIServerAPI_Vehicle::vtdMap_matchingNearest(const Position& pos, const std::string& origID, MSVehicle& v, traci::TraCIServer& server, bool report, - SUMOReal& bestDistance, MSLane** lane, SUMOReal& lanePos, int& routeOffset, MSEdgeVector& edges) { - unsigned int r = 0; - SUMOReal minDist = 1 << (11); - MSLane* minDistLane = 0; - MSLane* nameMatchingLane = 0; - SUMOReal minDistNameMatchingLane = 1 << (11); - for (; minDistLane == 0 && r < 10 && nameMatchingLane == 0; ++r) { - std::set into; - PositionVector shape; - shape.push_back(pos); - server.collectObjectsInRange(CMD_GET_EDGE_VARIABLE, shape, 1 << r, into); - for (std::set::const_iterator j = into.begin(); j != into.end(); ++j) { - MSEdge* e = MSEdge::dictionary(*j); - const std::vector& lanes = e->getLanes(); - for (std::vector::const_iterator k = lanes.begin(); k != lanes.end(); ++k) { - MSLane* lane = *k; - SUMOReal dist = lane->getShape().distance(pos); - if (lane->knowsParameter("origId")) { - if (lane->getParameter("origId", "") == origID) { - if (dist < minDistNameMatchingLane) { - minDistNameMatchingLane = dist; - nameMatchingLane = lane; - } - } - } - if (dist < minDist) { - minDist = dist; - minDistLane = lane; - } - } + SUMOReal bestValue = 0; + MSLane* bestLane = 0; + for (std::map::iterator i = lane2utility.begin(); i != lane2utility.end(); ++i) { + MSLane* l = (*i).first; + const LaneUtility& u = (*i).second; + SUMOReal distN = u.dist > 999 ? -10 : 1. - (u.dist / maxDist); + SUMOReal angleDiffN = 1. - (u.angleDiff / 180.); + SUMOReal idN = u.ID ? 1 : 0; + SUMOReal onRouteN = u.onRoute ? 1 : 0; + SUMOReal sameEdgeN = u.sameEdge ? MIN2(v.getEdge()->getLength() / speed, (SUMOReal)1.) : 0; + SUMOReal value = distN * .5 + + angleDiffN * 0 /*.5 */ + + idN * .5 + + onRouteN * 0.5 + + sameEdgeN * 0.5 + ; +#ifdef DEBUG_VTD + std::cout << " x; l:" << l->getID() << " d:" << u.dist << " dN:" << distN << " aD:" << angleDiffN << + " ID:" << idN << " oRN:" << onRouteN << " sEN:" << sameEdgeN << " value:" << value << std::endl; +#endif + if (value > bestValue || bestLane == 0) { + bestValue = value; + bestLane = l; } } - *lane = nameMatchingLane != 0 ? nameMatchingLane : minDistLane; - if (lane == 0) { - if (report) { - std::cout << " c failed - no matching lane" << std::endl; - } + if (bestLane == 0) { return false; } - lanePos = (*lane)->interpolateGeometryPosToLanePos((*lane)->getShape().nearest_offset_to_point2D(pos, false)); - if (*lane == v.getLane()) { - routeOffset = 0; - if (report) { - std::cout << " c ok, on same lane" << std::endl; - } - return true; - } - MSEdge& destinationEdge = (*lane)->getEdge(); - MSEdge* routePos = &destinationEdge; - while (routePos->getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL) { - routePos = &routePos->getLanes()[0]->getLogicalPredecessorLane()->getEdge(); - } - r = 0; - const MSRoute& route = v.getRoute(); - unsigned int c = v.getRoutePosition(); - unsigned int l = (int)route.getEdges().size(); - unsigned int rindex = 0; - bool found = false; - while (!found && ((int)(c - r) >= 0 || c + r < l)) { - if ((int)(c - r) >= 0 && route[c - r] == routePos) { - rindex = c - r; - found = true; - } - if (c + r < l && route[c + r] == routePos) { - rindex = c + r; - found = true; - } - ++r; - } - if (found) { - // the matching lane is part of the route - routeOffset = rindex - v.getRoutePosition(); - if (report) { - std::cout << " c ok, on a different edge of same route" << std::endl; - } - return true; - } - // build new route - MSLane* firstLane = *lane; - if (destinationEdge.getPurpose() != MSEdge::EDGEFUNCTION_INTERNAL) { - edges.push_back(&destinationEdge); + const LaneUtility& u = lane2utility.find(bestLane)->second; + bestDistance = u.dist; + *lane = bestLane; + lanePos = bestLane->getShape().nearest_offset_to_point2D(pos); + const MSEdge* prevEdge = u.prevEdge; + if (u.onRoute) { + const ConstMSEdgeVector& ev = v.getRoute().getEdges(); + ConstMSEdgeVector::const_iterator prevEdgePos = std::find(ev.begin() + v.getRoutePosition(), ev.end(), prevEdge); + routeOffset = (int)std::distance(ev.begin(), prevEdgePos) - v.getRoutePosition(); } else { - firstLane = (*lane)->getLogicalPredecessorLane(); - edges.push_back(&firstLane->getEdge()); - } - const MSLinkCont& lc = firstLane->getLinkCont(); - if (lc.size() != 0 && lc[0]->getLane() != 0) { - edges.push_back(&lc[0]->getLane()->getEdge()); - } - if (report) { - std::cout << " c ok, on a different route" << std::endl; + edges.push_back(prevEdge); + if (u.nextEdge != 0) { + edges.push_back(u.nextEdge); + } + routeOffset = 0; } return true; } - bool -TraCIServerAPI_Vehicle::commandDistanceRequest(traci::TraCIServer& server, tcpip::Storage& inputStorage, +TraCIServerAPI_Vehicle::commandDistanceRequest(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage, const MSVehicle* v) { if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { return server.writeErrorStatusCmd(CMD_GET_VEHICLE_VARIABLE, "Retrieval of distance requires a compound object.", outputStorage); @@ -1274,7 +1456,7 @@ pos.set(p1x, p1y); } if (posType == POSITION_3D) { - inputStorage.readDouble(); // z value is ignored + inputStorage.readDouble(); // z value is ignored } roadPos = TraCIServerAPI_Simulation::convertCartesianToRoadMap(pos); break; @@ -1332,8 +1514,8 @@ const std::map >& TraCIServerAPI_Vehicle::getOrBuildVTDMap() { if (gVTDMap.size() == 0) { - const std::vector& edges = MSNet::getInstance()->getEdgeControl().getEdges(); - for (std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + const MSEdgeVector& edges = MSNet::getInstance()->getEdgeControl().getEdges(); + for (MSEdgeVector::const_iterator i = edges.begin(); i != edges.end(); ++i) { const std::vector& lanes = (*i)->getLanes(); for (std::vector::const_iterator j = lanes.begin(); j != lanes.end(); ++j) { if ((*j)->knowsParameter("origId")) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Vehicle.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Vehicle.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Vehicle.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_Vehicle.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_Vehicle.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_Vehicle.h 18096 2015-03-17 09:50:59Z behrisch $ /// // APIs for getting/setting vehicle values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -54,7 +54,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processGet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -64,7 +64,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processSet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processSet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -77,23 +77,36 @@ private: - static bool commandDistanceRequest(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool commandDistanceRequest(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage, const MSVehicle* v); static MSVehicleType& getSingularType(SUMOVehicle* const veh); static const std::map >& getOrBuildVTDMap(); - static bool vtdMap_matchingEdgeLane(const Position& pos, const std::string& origID, MSVehicle& v, bool report, - SUMOReal& bestDistance, MSLane** lane, SUMOReal& lanePos, int& routeOffset, MSEdgeVector& edges); - static bool vtdMap_matchingRoutePosition(const Position& pos, const std::string& origID, MSVehicle& v, bool report, - SUMOReal& bestDistance, MSLane** lane, SUMOReal& lanePos, int& routeOffset, MSEdgeVector& edges); - static bool vtdMap_matchingNearest(const Position& pos, const std::string& origID, MSVehicle& v, traci::TraCIServer& server, bool report, - SUMOReal& bestDistance, MSLane** lane, SUMOReal& lanePos, int& routeOffset, MSEdgeVector& edges); + static bool vtdMap(const Position& pos, const std::string& origID, const SUMOReal angle, MSVehicle& v, TraCIServer& server, + SUMOReal& bestDistance, MSLane** lane, SUMOReal& lanePos, int& routeOffset, ConstMSEdgeVector& edges); static std::map > gVTDMap; + class LaneUtility { + public: + LaneUtility(SUMOReal dist_, SUMOReal angleDiff_, bool ID_, bool onRoute_, bool sameEdge_, const MSEdge* prevEdge_, const MSEdge* nextEdge_) : + dist(dist_), angleDiff(angleDiff_), ID(ID_), onRoute(onRoute_), sameEdge(sameEdge_), prevEdge(prevEdge_), nextEdge(nextEdge_) {} + LaneUtility() {} + ~LaneUtility() {} + + SUMOReal dist; + SUMOReal angleDiff; + bool ID; + bool onRoute; + bool sameEdge; + const MSEdge* prevEdge; + const MSEdge* nextEdge; + }; + + private: /// @brief invalidated copy constructor TraCIServerAPI_Vehicle(const TraCIServerAPI_Vehicle& s); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_VehicleType.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_VehicleType.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_VehicleType.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_VehicleType.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_VehicleType.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_VehicleType.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // APIs for getting/setting vehicle type values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,6 +34,7 @@ #ifndef NO_TRACI #include +#include #include #include #include "TraCIConstants.h" @@ -45,12 +46,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace traci; - - -// =========================================================================== // method definitions // =========================================================================== bool @@ -63,7 +58,8 @@ if (variable != ID_LIST && variable != VAR_LENGTH && variable != VAR_MAXSPEED && variable != VAR_ACCEL && variable != VAR_DECEL && variable != VAR_TAU && variable != VAR_VEHICLECLASS && variable != VAR_EMISSIONCLASS && variable != VAR_SHAPECLASS && variable != VAR_SPEED_FACTOR && variable != VAR_SPEED_DEVIATION && variable != VAR_IMPERFECTION - && variable != VAR_MINGAP && variable != VAR_WIDTH && variable != VAR_COLOR && variable != ID_COUNT) { + && variable != VAR_MINGAP && variable != VAR_WIDTH && variable != VAR_COLOR && variable != ID_COUNT + && variable != VAR_PARAMETER) { return server.writeErrorStatusCmd(CMD_GET_VEHICLETYPE_VARIABLE, "Get Vehicle Type Variable: unsupported variable specified", outputStorage); } // begin response building @@ -88,7 +84,20 @@ if (v == 0) { return server.writeErrorStatusCmd(CMD_GET_VEHICLETYPE_VARIABLE, "Vehicle type '" + id + "' is not known", outputStorage); } - getVariable(variable, *v, tempMsg); + switch (variable) { + case VAR_PARAMETER: { + std::string paramName = ""; + if (!server.readTypeCheckingString(inputStorage, paramName)) { + return server.writeErrorStatusCmd(CMD_GET_VEHICLETYPE_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage); + } + tempMsg.writeUnsignedByte(TYPE_STRING); + tempMsg.writeString(v->getParameter().getParameter(paramName, "")); + } + break; + default: + getVariable(variable, *v, tempMsg); + break; + } } server.writeStatusCmd(CMD_GET_VEHICLETYPE_VARIABLE, RTYPE_OK, "", outputStorage); server.writeResponseWithLength(outputStorage, tempMsg); @@ -140,7 +149,7 @@ break; case VAR_EMISSIONCLASS: tempMsg.writeUnsignedByte(TYPE_STRING); - tempMsg.writeString(getVehicleEmissionTypeName(v.getEmissionClass())); + tempMsg.writeString(PollutantsInterface::getName(v.getEmissionClass())); break; case VAR_SHAPECLASS: tempMsg.writeUnsignedByte(TYPE_STRING); @@ -173,7 +182,7 @@ && variable != VAR_SPEED_FACTOR && variable != VAR_SPEED_DEVIATION && variable != VAR_EMISSIONCLASS && variable != VAR_WIDTH && variable != VAR_MINGAP && variable != VAR_SHAPECLASS && variable != VAR_ACCEL && variable != VAR_DECEL && variable != VAR_IMPERFECTION - && variable != VAR_TAU && variable != VAR_COLOR + && variable != VAR_TAU && variable != VAR_COLOR && variable != VAR_PARAMETER ) { return server.writeErrorStatusCmd(CMD_SET_VEHICLETYPE_VARIABLE, "Change Vehicle Type State: unsupported variable specified", outputStorage); } @@ -198,7 +207,7 @@ bool TraCIServerAPI_VehicleType::setVariable(const int cmd, const int variable, - MSVehicleType& v, traci::TraCIServer& server, + MSVehicleType& v, TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage) { switch (variable) { case VAR_LENGTH: { @@ -206,7 +215,7 @@ if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting length requires a double.", outputStorage); } - if (value == 0.0 || fabs(value) == std::numeric_limits::infinity()) { + if (value <= 0.0 || fabs(value) == std::numeric_limits::infinity()) { return server.writeErrorStatusCmd(cmd, "Invalid length.", outputStorage); } v.setLength(value); @@ -217,7 +226,7 @@ if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting maximum speed requires a double.", outputStorage); } - if (value == 0.0 || fabs(value) == std::numeric_limits::infinity()) { + if (value <= 0.0 || fabs(value) == std::numeric_limits::infinity()) { return server.writeErrorStatusCmd(cmd, "Invalid maximum speed.", outputStorage); } v.setMaxSpeed(value); @@ -228,7 +237,11 @@ if (!server.readTypeCheckingString(inputStorage, vclass)) { return server.writeErrorStatusCmd(cmd, "Setting vehicle class requires a string.", outputStorage); } - v.setVClass(getVehicleClassID(vclass)); + try { + v.setVClass(getVehicleClassID(vclass)); + } catch (InvalidArgument e) { + return server.writeErrorStatusCmd(cmd, "Unknown vehicle class '" + vclass + "'.", outputStorage); + } } break; case VAR_SPEED_FACTOR: { @@ -236,6 +249,9 @@ if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting speed factor requires a double.", outputStorage); } + if (value <= 0.0 || fabs(value) == std::numeric_limits::infinity()) { + return server.writeErrorStatusCmd(cmd, "Invalid speed factor.", outputStorage); + } v.setSpeedFactor(value); } break; @@ -244,6 +260,9 @@ if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting speed deviation requires a double.", outputStorage); } + if (value < 0.0 || fabs(value) == std::numeric_limits::infinity()) { + return server.writeErrorStatusCmd(cmd, "Invalid speed deviation.", outputStorage); + } v.setSpeedDeviation(value); } break; @@ -252,7 +271,11 @@ if (!server.readTypeCheckingString(inputStorage, eclass)) { return server.writeErrorStatusCmd(cmd, "Setting emission class requires a string.", outputStorage); } - v.setEmissionClass(getVehicleEmissionTypeID(eclass)); + try { + v.setEmissionClass(PollutantsInterface::getClassByName(eclass)); + } catch (InvalidArgument e) { + return server.writeErrorStatusCmd(cmd, "Unknown emission class '" + eclass + "'.", outputStorage); + } } break; case VAR_WIDTH: { @@ -260,6 +283,9 @@ if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting width requires a double.", outputStorage); } + if (value <= 0.0 || fabs(value) == std::numeric_limits::infinity()) { + return server.writeErrorStatusCmd(cmd, "Invalid width.", outputStorage); + } v.setWidth(value); } break; @@ -268,6 +294,9 @@ if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting minimum gap requires a double.", outputStorage); } + if (value < 0.0 || fabs(value) == std::numeric_limits::infinity()) { + return server.writeErrorStatusCmd(cmd, "Invalid minimum gap.", outputStorage); + } v.setMinGap(value); } break; @@ -276,7 +305,11 @@ if (!server.readTypeCheckingString(inputStorage, sclass)) { return server.writeErrorStatusCmd(cmd, "Setting vehicle shape requires a string.", outputStorage); } - v.setShape(getVehicleShapeID(sclass)); + try { + v.setShape(getVehicleShapeID(sclass)); + } catch (InvalidArgument e) { + return server.writeErrorStatusCmd(cmd, "Unknown vehicle shape " + sclass + "'.", outputStorage); + } } break; case VAR_ACCEL: { @@ -284,6 +317,9 @@ if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting acceleration requires a double.", outputStorage); } + if (value < 0.0 || fabs(value) == std::numeric_limits::infinity()) { + return server.writeErrorStatusCmd(cmd, "Invalid acceleration.", outputStorage); + } v.getCarFollowModel().setMaxAccel(value); } break; @@ -292,6 +328,9 @@ if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting deceleration requires a double.", outputStorage); } + if (value < 0.0 || fabs(value) == std::numeric_limits::infinity()) { + return server.writeErrorStatusCmd(cmd, "Invalid deceleration.", outputStorage); + } v.getCarFollowModel().setMaxDecel(value); } break; @@ -300,6 +339,9 @@ if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting driver imperfection requires a double.", outputStorage); } + if (value < 0.0 || fabs(value) == std::numeric_limits::infinity()) { + return server.writeErrorStatusCmd(cmd, "Invalid driver imperfection.", outputStorage); + } v.getCarFollowModel().setImperfection(value); } break; @@ -308,6 +350,9 @@ if (!server.readTypeCheckingDouble(inputStorage, value)) { return server.writeErrorStatusCmd(cmd, "Setting headway time requires a double.", outputStorage); } + if (value < 0.0 || fabs(value) == std::numeric_limits::infinity()) { + return server.writeErrorStatusCmd(cmd, "Invalid headway time.", outputStorage); + } v.getCarFollowModel().setHeadwayTime(value); } break; @@ -319,6 +364,23 @@ v.setColor(col); } break; + case VAR_PARAMETER: { + if (inputStorage.readUnsignedByte() != TYPE_COMPOUND) { + return server.writeErrorStatusCmd(cmd, "A compound object is needed for setting a parameter.", outputStorage); + } + //readt itemNo + inputStorage.readInt(); + std::string name; + if (!server.readTypeCheckingString(inputStorage, name)) { + return server.writeErrorStatusCmd(cmd, "The name of the parameter must be given as a string.", outputStorage); + } + std::string value; + if (!server.readTypeCheckingString(inputStorage, value)) { + return server.writeErrorStatusCmd(cmd, "The value of the parameter must be given as a string.", outputStorage); + } + ((SUMOVTypeParameter&) v.getParameter()).addParameter(name, value); + } + break; default: break; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_VehicleType.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_VehicleType.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServerAPI_VehicleType.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServerAPI_VehicleType.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 07.05.2009 -/// @version $Id: TraCIServerAPI_VehicleType.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServerAPI_VehicleType.h 18095 2015-03-17 09:39:00Z behrisch $ /// // APIs for getting/setting vehicle type values via TraCI /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -53,7 +53,7 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processGet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processGet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); @@ -72,14 +72,14 @@ * @param[in] inputStorage The storage to read the command from * @param[out] outputStorage The storage to write the result to */ - static bool processSet(traci::TraCIServer& server, tcpip::Storage& inputStorage, + static bool processSet(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); /** @brief Processes a set value for the given type */ static bool setVariable(const int cmd, const int variable, - MSVehicleType& v, traci::TraCIServer& server, + MSVehicleType& v, TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServer.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServer.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServer.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServer.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -9,13 +9,14 @@ /// @author Tino Morenz /// @author Laura Bieker /// @author Michael Behrisch +/// @author Mario Krumnow /// @date 2007/10/24 -/// @version $Id: TraCIServer.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServer.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// /// TraCI server used to control sumo by a remote TraCI client (e.g., ns2) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -51,13 +52,11 @@ #include #include #include -#include +#include #include #include #include -#include -#include -#include +#include #include #include #include @@ -78,6 +77,7 @@ #include "TraCIServerAPI_Junction.h" #include "TraCIServerAPI_Lane.h" #include "TraCIServerAPI_MeMeDetector.h" +#include "TraCIServerAPI_ArealDetector.h" #include "TraCIServerAPI_TLS.h" #include "TraCIServerAPI_Vehicle.h" #include "TraCIServerAPI_VehicleType.h" @@ -86,6 +86,7 @@ #include "TraCIServerAPI_Polygon.h" #include "TraCIServerAPI_Edge.h" #include "TraCIServerAPI_Simulation.h" +#include "TraCIServerAPI_Person.h" #ifdef CHECK_MEMORY_LEAKS #include @@ -93,11 +94,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -namespace traci { - -// =========================================================================== // static member definitions // =========================================================================== TraCIServer* TraCIServer::myInstance = 0; @@ -107,8 +103,8 @@ // =========================================================================== // method definitions // =========================================================================== -TraCIServer::TraCIServer(int port) - : mySocket(0), myTargetTime(0), myDoingSimStep(false), myHaveWarnedDeprecation(false), myAmEmbedded(port == 0) { +TraCIServer::TraCIServer(const SUMOTime begin, const int port) + : mySocket(0), myTargetTime(begin), myDoingSimStep(false), myAmEmbedded(port == 0), myLaneTree(0) { myVehicleStateChanges[MSNet::VEHICLE_STATE_BUILT] = std::vector(); myVehicleStateChanges[MSNet::VEHICLE_STATE_DEPARTED] = std::vector(); @@ -116,10 +112,16 @@ myVehicleStateChanges[MSNet::VEHICLE_STATE_ENDING_TELEPORT] = std::vector(); myVehicleStateChanges[MSNet::VEHICLE_STATE_ARRIVED] = std::vector(); myVehicleStateChanges[MSNet::VEHICLE_STATE_NEWROUTE] = std::vector(); + myVehicleStateChanges[MSNet::VEHICLE_STATE_STARTING_PARKING] = std::vector(); + myVehicleStateChanges[MSNet::VEHICLE_STATE_ENDING_PARKING] = std::vector(); + myVehicleStateChanges[MSNet::VEHICLE_STATE_STARTING_STOP] = std::vector(); + myVehicleStateChanges[MSNet::VEHICLE_STATE_ENDING_STOP] = std::vector(); MSNet::getInstance()->addVehicleStateListener(this); myExecutors[CMD_GET_INDUCTIONLOOP_VARIABLE] = &TraCIServerAPI_InductionLoop::processGet; + myExecutors[CMD_GET_AREAL_DETECTOR_VARIABLE] = &TraCIServerAPI_ArealDetector::processGet; myExecutors[CMD_GET_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE] = &TraCIServerAPI_MeMeDetector::processGet; + myExecutors[CMD_GET_TL_VARIABLE] = &TraCIServerAPI_TLS::processGet; myExecutors[CMD_SET_TL_VARIABLE] = &TraCIServerAPI_TLS::processSet; myExecutors[CMD_GET_LANE_VARIABLE] = &TraCIServerAPI_Lane::processGet; @@ -138,6 +140,11 @@ myExecutors[CMD_GET_EDGE_VARIABLE] = &TraCIServerAPI_Edge::processGet; myExecutors[CMD_SET_EDGE_VARIABLE] = &TraCIServerAPI_Edge::processSet; myExecutors[CMD_GET_SIM_VARIABLE] = &TraCIServerAPI_Simulation::processGet; + myExecutors[CMD_SET_SIM_VARIABLE] = &TraCIServerAPI_Simulation::processSet; + myExecutors[CMD_GET_PERSON_VARIABLE] = &TraCIServerAPI_Person::processGet; + myExecutors[CMD_SET_PERSON_VARIABLE] = &TraCIServerAPI_Person::processSet; + + myParameterSizes[VAR_LEADER] = 9; myDoCloseConnection = false; @@ -167,21 +174,24 @@ mySocket->close(); delete mySocket; } - for (std::map::const_iterator i = myObjects.begin(); i != myObjects.end(); ++i) { + for (std::map::const_iterator i = myObjects.begin(); i != myObjects.end(); ++i) { delete(*i).second; } + delete myLaneTree; } // ---------- Initialisation and Shutdown void TraCIServer::openSocket(const std::map& execs) { - if (myInstance == 0) { - if (!myDoCloseConnection && OptionsCont::getOptions().getInt("remote-port") != 0) { - myInstance = new traci::TraCIServer(OptionsCont::getOptions().getInt("remote-port")); - for (std::map::const_iterator i = execs.begin(); i != execs.end(); ++i) { - myInstance->myExecutors[i->first] = i->second; - } + if (myInstance != 0) { + return; + } + if (!myDoCloseConnection && OptionsCont::getOptions().getInt("remote-port") != 0) { + myInstance = new TraCIServer(string2time(OptionsCont::getOptions().getString("begin")), + OptionsCont::getOptions().getInt("remote-port")); + for (std::map::const_iterator i = execs.begin(); i != execs.end(); ++i) { + myInstance->myExecutors[i->first] = i->second; } } } @@ -189,11 +199,12 @@ void TraCIServer::close() { - if (myInstance != 0) { - delete myInstance; - myInstance = 0; - myDoCloseConnection = true; + if (myInstance == 0) { + return; } + delete myInstance; + myInstance = 0; + myDoCloseConnection = true; } @@ -204,11 +215,13 @@ void -TraCIServer::setVTDControlled(MSVehicle* v, MSLane* l, SUMOReal pos, int edgeOffset, MSEdgeVector route) { +TraCIServer::setVTDControlled(MSVehicle* v, MSLane* l, SUMOReal pos, int edgeOffset, ConstMSEdgeVector route, + SUMOTime t) { myVTDControlledVehicles[v->getID()] = v; - v->getInfluencer().setVTDControlled(true, l, pos, edgeOffset, route); + v->getInfluencer().setVTDControlled(true, l, pos, edgeOffset, route, t); } + void TraCIServer::postProcessVTD() { for (std::map::const_iterator i = myVTDControlledVehicles.begin(); i != myVTDControlledVehicles.end(); ++i) { @@ -222,34 +235,23 @@ } -bool -TraCIServer::vtdDebug() const { - return true; -} - - // ---------- Initialisation and Shutdown void TraCIServer::vehicleStateChanged(const SUMOVehicle* const vehicle, MSNet::VehicleState to) { - if (myDoCloseConnection || OptionsCont::getOptions().getInt("remote-port") == 0) { - return; + if (!myDoCloseConnection) { + myVehicleStateChanges[to].push_back(vehicle->getID()); } - myVehicleStateChanges[to].push_back(vehicle->getID()); } void TraCIServer::processCommandsUntilSimStep(SUMOTime step) { + if (myInstance == 0) { + return; + } try { - if (myInstance == 0) { - if (!myDoCloseConnection && OptionsCont::getOptions().getInt("remote-port") != 0) { - myInstance = new traci::TraCIServer(OptionsCont::getOptions().getInt("remote-port")); - } else { - return; - } - } if (myInstance->myAmEmbedded || step < myInstance->myTargetTime) { return; } @@ -319,7 +321,7 @@ if (!PyArg_ParseTuple(args, "s#", &msg, &size)) { return NULL; } - std::string result = traci::TraCIServer::execute(std::string(msg, size)); + std::string result = TraCIServer::execute(std::string(msg, size)); return Py_BuildValue("s#", result.c_str(), result.size()); } @@ -337,7 +339,7 @@ try { if (myInstance == 0) { if (!myDoCloseConnection) { - myInstance = new traci::TraCIServer(); + myInstance = new TraCIServer(string2time(OptionsCont::getOptions().getString("begin"))); } else { return ""; } @@ -365,7 +367,19 @@ Py_Initialize(); Py_InitModule("traciemb", EmbMethods); if (pyFile.length() > 3 && !pyFile.compare(pyFile.length() - 3, 3, ".py")) { + PyObject* sys_path, *path; + char pathstr[] = "path"; + sys_path = PySys_GetObject(pathstr); + if (sys_path == NULL || !PyList_Check(sys_path)) { + throw ProcessError("Could not access python sys.path!"); + } + path = PyString_FromString(FileHelpers::getFilePath(pyFile).c_str()); + PyList_Insert(sys_path, 0, path); + Py_DECREF(path); FILE* pFile = fopen(pyFile.c_str(), "r"); + if (pFile == NULL) { + throw ProcessError("Failed to load \"" + pyFile + "\"!"); + } PyRun_SimpleFile(pFile, pyFile.c_str()); fclose(pFile); } else { @@ -412,24 +426,21 @@ if (myAmEmbedded) { MSNet::getInstance()->simulationStep(); postProcessSimulationStep2(); + for (std::map >::iterator i = myInstance->myVehicleStateChanges.begin(); i != myInstance->myVehicleStateChanges.end(); ++i) { + (*i).second.clear(); + } } return commandId; } case CMD_CLOSE: success = commandCloseConnection(); break; - case CMD_ADDVEHICLE: - if (!myHaveWarnedDeprecation) { - WRITE_WARNING("Using old TraCI API, please update your client!"); - myHaveWarnedDeprecation = true; - } - success = commandAddVehicle(); - break; case CMD_SUBSCRIBE_INDUCTIONLOOP_VARIABLE: case CMD_SUBSCRIBE_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE: case CMD_SUBSCRIBE_TL_VARIABLE: case CMD_SUBSCRIBE_LANE_VARIABLE: case CMD_SUBSCRIBE_VEHICLE_VARIABLE: + case CMD_SUBSCRIBE_PERSON_VARIABLE: case CMD_SUBSCRIBE_VEHICLETYPE_VARIABLE: case CMD_SUBSCRIBE_ROUTE_VARIABLE: case CMD_SUBSCRIBE_POI_VARIABLE: @@ -438,13 +449,14 @@ case CMD_SUBSCRIBE_EDGE_VARIABLE: case CMD_SUBSCRIBE_SIM_VARIABLE: case CMD_SUBSCRIBE_GUI_VARIABLE: - success = addObjectVariableSubscription(commandId); + success = addObjectVariableSubscription(commandId, false); break; case CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT: case CMD_SUBSCRIBE_MULTI_ENTRY_EXIT_DETECTOR_CONTEXT: case CMD_SUBSCRIBE_TL_CONTEXT: case CMD_SUBSCRIBE_LANE_CONTEXT: case CMD_SUBSCRIBE_VEHICLE_CONTEXT: + case CMD_SUBSCRIBE_PERSON_CONTEXT: case CMD_SUBSCRIBE_VEHICLETYPE_CONTEXT: case CMD_SUBSCRIBE_ROUTE_CONTEXT: case CMD_SUBSCRIBE_POI_CONTEXT: @@ -453,7 +465,7 @@ case CMD_SUBSCRIBE_EDGE_CONTEXT: case CMD_SUBSCRIBE_SIM_CONTEXT: case CMD_SUBSCRIBE_GUI_CONTEXT: - success = addObjectContextSubscription(commandId); + success = addObjectVariableSubscription(commandId, true); break; default: writeStatusCmd(commandId, RTYPE_NOTIMPLEMENTED, "Command not implemented in sumo"); @@ -512,7 +524,8 @@ int noActive = 0; for (std::vector::iterator i = mySubscriptions.begin(); i != mySubscriptions.end();) { const Subscription& s = *i; - bool isArrivedVehicle = (s.commandId == CMD_SUBSCRIBE_VEHICLE_VARIABLE) && (find(myVehicleStateChanges[MSNet::VEHICLE_STATE_ARRIVED].begin(), myVehicleStateChanges[MSNet::VEHICLE_STATE_ARRIVED].end(), s.id) != myVehicleStateChanges[MSNet::VEHICLE_STATE_ARRIVED].end()); + bool isArrivedVehicle = (s.commandId == CMD_SUBSCRIBE_VEHICLE_VARIABLE || s.commandId == CMD_SUBSCRIBE_VEHICLE_CONTEXT) + && (find(myVehicleStateChanges[MSNet::VEHICLE_STATE_ARRIVED].begin(), myVehicleStateChanges[MSNet::VEHICLE_STATE_ARRIVED].end(), s.id) != myVehicleStateChanges[MSNet::VEHICLE_STATE_ARRIVED].end()); if ((s.endTime < t) || isArrivedVehicle) { i = mySubscriptions.erase(i); continue; @@ -524,95 +537,22 @@ ++noActive; } myOutputStorage.writeInt(noActive); - for (std::vector::iterator i = mySubscriptions.begin(); i != mySubscriptions.end(); ++i) { + for (std::vector::iterator i = mySubscriptions.begin(); i != mySubscriptions.end();) { const Subscription& s = *i; if (s.beginTime > t) { + ++i; continue; } tcpip::Storage into; std::string errors; - processSingleSubscription(s, into, errors); + bool ok = processSingleSubscription(s, into, errors); myOutputStorage.writeStorage(into); - } -} - - -bool -TraCIServer::commandAddVehicle() { - - // read parameters - std::string vehicleId = myInputStorage.readString(); - std::string vehicleTypeId = myInputStorage.readString(); - std::string routeId = myInputStorage.readString(); - std::string laneId = myInputStorage.readString(); - SUMOReal insertionPosition = myInputStorage.readFloat(); - SUMOReal insertionSpeed = myInputStorage.readFloat(); - - // find vehicleType - MSVehicleType* vehicleType = MSNet::getInstance()->getVehicleControl().getVType(vehicleTypeId); - if (!vehicleType) { - return writeErrorStatusCmd(CMD_ADDVEHICLE, "Invalid vehicleTypeId: '" + vehicleTypeId + "'", myOutputStorage); - } - - // find route - const MSRoute* route = MSRoute::dictionary(routeId); - if (!route) { - return writeErrorStatusCmd(CMD_ADDVEHICLE, "Invalid routeId: '" + routeId + "'", myOutputStorage); - } - - // find lane - MSLane* lane; - if (laneId != "") { - lane = MSLane::dictionary(laneId); - if (!lane) { - return writeErrorStatusCmd(CMD_ADDVEHICLE, "Invalid laneId: '" + laneId + "'", myOutputStorage); - } - } else { - lane = route->getEdges()[0]->getLanes()[0]; - if (!lane) { - return writeErrorStatusCmd(CMD_STOP, "Could not find first lane of first edge in routeId '" + routeId + "'", myOutputStorage); + if (ok) { + ++i; + } else { + i = mySubscriptions.erase(i); } } - - if (&lane->getEdge() != *route->begin()) { - return writeErrorStatusCmd(CMD_STOP, "The route must start at the edge the lane starts at.", myOutputStorage); - } - - // build vehicle - SUMOVehicleParameter* vehicleParams = new SUMOVehicleParameter(); - vehicleParams->id = vehicleId; - vehicleParams->depart = MSNet::getInstance()->getCurrentTimeStep() + 1; - MSVehicle* vehicle = static_cast(MSNet::getInstance()->getVehicleControl().buildVehicle(vehicleParams, route, vehicleType)); - if (vehicle == NULL) { - return writeErrorStatusCmd(CMD_STOP, "Could not build vehicle", myOutputStorage); - } - - // calculate speed - float clippedInsertionSpeed; - if (insertionSpeed < 0) { - clippedInsertionSpeed = (float) MIN2(lane->getVehicleMaxSpeed(vehicle), vehicle->getMaxSpeed()); - } else { - clippedInsertionSpeed = (float) MIN3(lane->getVehicleMaxSpeed(vehicle), vehicle->getMaxSpeed(), insertionSpeed); - } - - // insert vehicle into the dictionary - if (!MSNet::getInstance()->getVehicleControl().addVehicle(vehicle->getID(), vehicle)) { - return writeErrorStatusCmd(CMD_ADDVEHICLE, "Could not add vehicle to VehicleControl", myOutputStorage); - } - - // try to emit - if (!lane->isInsertionSuccess(vehicle, clippedInsertionSpeed, insertionPosition, true)) { - MSNet::getInstance()->getVehicleControl().deleteVehicle(vehicle); - return writeErrorStatusCmd(CMD_ADDVEHICLE, "Could not insert vehicle", myOutputStorage); - } - - // exec callback - vehicle->onDepart(); - - // create a reply message - writeStatusCmd(CMD_ADDVEHICLE, RTYPE_OK, ""); - - return true; } @@ -625,9 +565,9 @@ void TraCIServer::writeStatusCmd(int commandId, int status, const std::string& description, tcpip::Storage& outputStorage) { if (status == RTYPE_ERR) { - WRITE_ERROR("Answered with error to command " + toString(commandId) + ": " + description); + WRITE_ERROR("Answered with error to command " + toHex(commandId, 2) + ": " + description); } else if (status == RTYPE_NOTIMPLEMENTED) { - WRITE_ERROR("Requested command not implemented (" + toString(commandId) + "): " + description); + WRITE_ERROR("Requested command not implemented (" + toHex(commandId, 2) + "): " + description); } outputStorage.writeUnsignedByte(1 + 1 + 1 + 4 + static_cast(description.length())); // command length outputStorage.writeUnsignedByte(commandId); // command type @@ -688,58 +628,64 @@ case CMD_SUBSCRIBE_INDUCTIONLOOP_CONTEXT: if (TraCIServerAPI_InductionLoop::getPosition(id, p)) { shape.push_back(p); - break; + return true; } - return false; + break; case CMD_SUBSCRIBE_MULTI_ENTRY_EXIT_DETECTOR_CONTEXT: - return false; + break; case CMD_SUBSCRIBE_TL_CONTEXT: - return false; + break; case CMD_SUBSCRIBE_LANE_CONTEXT: if (TraCIServerAPI_Lane::getShape(id, shape)) { - break; + return true; } - return false; + break; case CMD_SUBSCRIBE_VEHICLE_CONTEXT: if (TraCIServerAPI_Vehicle::getPosition(id, p)) { shape.push_back(p); - break; + return true; } - return false; + break; + case CMD_SUBSCRIBE_PERSON_CONTEXT: + if (TraCIServerAPI_Person::getPosition(id, p)) { + shape.push_back(p); + return true; + } + break; case CMD_SUBSCRIBE_VEHICLETYPE_CONTEXT: - return false; + break; case CMD_SUBSCRIBE_ROUTE_CONTEXT: - return false; + break; case CMD_SUBSCRIBE_POI_CONTEXT: if (TraCIServerAPI_POI::getPosition(id, p)) { shape.push_back(p); - break; + return true; } return false; case CMD_SUBSCRIBE_POLYGON_CONTEXT: if (TraCIServerAPI_Polygon::getShape(id, shape)) { - break; + return true; } - return false; + break; case CMD_SUBSCRIBE_JUNCTION_CONTEXT: if (TraCIServerAPI_Junction::getPosition(id, p)) { shape.push_back(p); - break; + return true; } - return false; + break; case CMD_SUBSCRIBE_EDGE_CONTEXT: if (TraCIServerAPI_Edge::getShape(id, shape)) { - break; + return true; } - return false; + break; case CMD_SUBSCRIBE_SIM_CONTEXT: return false; case CMD_SUBSCRIBE_GUI_CONTEXT: - return false; + break; default: - return false; + break; } - return true; + return false; } void @@ -750,21 +696,14 @@ case CMD_GET_INDUCTIONLOOP_VARIABLE: myObjects[CMD_GET_INDUCTIONLOOP_VARIABLE] = TraCIServerAPI_InductionLoop::getTree(); break; - case CMD_GET_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE: - break; - case CMD_GET_TL_VARIABLE: - break; + case CMD_GET_EDGE_VARIABLE: case CMD_GET_LANE_VARIABLE: - myObjects[CMD_GET_LANE_VARIABLE] = TraCIServerAPI_Lane::getTree(); - break; case CMD_GET_VEHICLE_VARIABLE: - if (myObjects.find(CMD_GET_LANE_VARIABLE) == myObjects.end()) { - myObjects[CMD_GET_LANE_VARIABLE] = TraCIServerAPI_Lane::getTree(); - } - break; - case CMD_GET_VEHICLETYPE_VARIABLE: - break; - case CMD_GET_ROUTE_VARIABLE: + myObjects[CMD_GET_EDGE_VARIABLE] = 0; + myObjects[CMD_GET_LANE_VARIABLE] = 0; + myObjects[CMD_GET_VEHICLE_VARIABLE] = 0; + myLaneTree = new LANE_RTREE_QUAL(&MSLane::visit); + MSLane::fill(*myLaneTree); break; case CMD_GET_POI_VARIABLE: myObjects[CMD_GET_POI_VARIABLE] = TraCIServerAPI_POI::getTree(); @@ -775,13 +714,6 @@ case CMD_GET_JUNCTION_VARIABLE: myObjects[CMD_GET_JUNCTION_VARIABLE] = TraCIServerAPI_Junction::getTree(); break; - case CMD_GET_EDGE_VARIABLE: - myObjects[CMD_GET_EDGE_VARIABLE] = TraCIServerAPI_Edge::getTree(); - break; - case CMD_GET_SIM_VARIABLE: - break; - case CMD_GET_GUI_VARIABLE: - break; default: break; } @@ -790,76 +722,21 @@ const float cmin[2] = {(float) b.xmin(), (float) b.ymin()}; const float cmax[2] = {(float) b.xmax(), (float) b.ymax()}; switch (domain) { - case CMD_GET_INDUCTIONLOOP_VARIABLE: { - Named::StoringVisitor sv(into); - myObjects[CMD_GET_INDUCTIONLOOP_VARIABLE]->Search(cmin, cmax, sv); - } - break; - case CMD_GET_MULTI_ENTRY_EXIT_DETECTOR_VARIABLE: - break; - case CMD_GET_TL_VARIABLE: - break; - case CMD_GET_LANE_VARIABLE: { - Named::StoringVisitor sv(into); - myObjects[CMD_GET_LANE_VARIABLE]->Search(cmin, cmax, sv); - if (shape.size() == 1) { - for (std::set::iterator i = into.begin(); i != into.end();) { - const MSLane* const l = MSLane::dictionary(*i); - if (l->getShape().distance(shape[0]) > range) { - into.erase(i++); - } else { - ++i; - } - } - } - } - break; - case CMD_GET_VEHICLE_VARIABLE: { - std::set tmp; - Named::StoringVisitor sv(tmp); - myObjects[CMD_GET_LANE_VARIABLE]->Search(cmin, cmax, sv); - for (std::set::const_iterator i = tmp.begin(); i != tmp.end(); ++i) { - MSLane* l = MSLane::dictionary(*i); - if (l != 0) { - const MSLane::VehCont& vehs = l->getVehiclesSecure(); - for (MSLane::VehCont::const_iterator j = vehs.begin(); j != vehs.end(); ++j) { - if (shape.distance((*j)->getPosition()) <= range) { - into.insert((*j)->getID()); - } - } - l->releaseVehicles(); - } - } - } - break; - case CMD_GET_VEHICLETYPE_VARIABLE: - break; - case CMD_GET_ROUTE_VARIABLE: - break; - case CMD_GET_POI_VARIABLE: { - Named::StoringVisitor sv(into); - myObjects[CMD_GET_POI_VARIABLE]->Search(cmin, cmax, sv); - } - break; - case CMD_GET_POLYGON_VARIABLE: { - Named::StoringVisitor sv(into); - myObjects[CMD_GET_POLYGON_VARIABLE]->Search(cmin, cmax, sv); - } - break; + case CMD_GET_INDUCTIONLOOP_VARIABLE: + case CMD_GET_POI_VARIABLE: + case CMD_GET_POLYGON_VARIABLE: case CMD_GET_JUNCTION_VARIABLE: { Named::StoringVisitor sv(into); - myObjects[CMD_GET_JUNCTION_VARIABLE]->Search(cmin, cmax, sv); + myObjects[domain]->Search(cmin, cmax, sv); } break; - case CMD_GET_EDGE_VARIABLE: { - Named::StoringVisitor sv(into); - myObjects[CMD_GET_EDGE_VARIABLE]->Search(cmin, cmax, sv); + case CMD_GET_EDGE_VARIABLE: + case CMD_GET_LANE_VARIABLE: + case CMD_GET_VEHICLE_VARIABLE: { + TraCIServerAPI_Lane::StoringVisitor sv(into, shape, range, domain); + myLaneTree->Search(cmin, cmax, sv); } break; - case CMD_GET_SIM_VARIABLE: - break; - case CMD_GET_GUI_VARIABLE: - break; default: break; } @@ -871,70 +748,72 @@ std::string& errors) { bool ok = true; tcpip::Storage outputStorage; - int getCommandId = s.contextVars ? s.contextDomain : s.commandId - 0x30; + const int getCommandId = s.contextVars ? s.contextDomain : s.commandId - 0x30; std::set objIDs; if (s.contextVars) { - getCommandId = s.contextDomain; PositionVector shape; if (!findObjectShape(s.commandId, s.id, shape)) { return false; } collectObjectsInRange(s.contextDomain, shape, s.range, objIDs); } else { - getCommandId = s.commandId - 0x30; objIDs.insert(s.id); } - + const int numVars = s.contextVars && s.variables.size() == 1 && s.variables[0] == ID_LIST ? 0 : (int)s.variables.size(); for (std::set::iterator j = objIDs.begin(); j != objIDs.end(); ++j) { if (s.contextVars) { outputStorage.writeString(*j); } - for (std::vector::const_iterator i = s.variables.begin(); i != s.variables.end(); ++i) { - tcpip::Storage message; - message.writeUnsignedByte(*i); - message.writeString(*j); - tcpip::Storage tmpOutput; - if (myExecutors.find(getCommandId) != myExecutors.end()) { - ok &= myExecutors[getCommandId](*this, message, tmpOutput); - } else { - writeStatusCmd(s.commandId, RTYPE_NOTIMPLEMENTED, "Unsupported command specified", tmpOutput); - ok = false; - } - // copy response part - if (ok) { - int length = tmpOutput.readUnsignedByte(); - while (--length > 0) { - tmpOutput.readUnsignedByte(); - } - int lengthLength = 1; - length = tmpOutput.readUnsignedByte(); - if (length == 0) { - lengthLength = 5; - length = tmpOutput.readInt(); + if (numVars > 0) { + std::vector >::const_iterator k = s.parameters.begin(); + for (std::vector::const_iterator i = s.variables.begin(); i != s.variables.end(); ++i, ++k) { + tcpip::Storage message; + message.writeUnsignedByte(*i); + message.writeString(*j); + message.writePacket(*k); + tcpip::Storage tmpOutput; + if (myExecutors.find(getCommandId) != myExecutors.end()) { + ok &= myExecutors[getCommandId](*this, message, tmpOutput); + } else { + writeStatusCmd(s.commandId, RTYPE_NOTIMPLEMENTED, "Unsupported command specified", tmpOutput); + ok = false; } - //read responseType - tmpOutput.readUnsignedByte(); - int variable = tmpOutput.readUnsignedByte(); - std::string id = tmpOutput.readString(); - outputStorage.writeUnsignedByte(variable); - outputStorage.writeUnsignedByte(RTYPE_OK); - length -= (lengthLength + 1 + 4 + (int)id.length()); - while (--length > 0) { - outputStorage.writeUnsignedByte(tmpOutput.readUnsignedByte()); + // copy response part + if (ok) { + int length = tmpOutput.readUnsignedByte(); + while (--length > 0) { + tmpOutput.readUnsignedByte(); + } + int lengthLength = 1; + length = tmpOutput.readUnsignedByte(); + if (length == 0) { + lengthLength = 5; + length = tmpOutput.readInt(); + } + //read responseType + tmpOutput.readUnsignedByte(); + int variable = tmpOutput.readUnsignedByte(); + std::string id = tmpOutput.readString(); + outputStorage.writeUnsignedByte(variable); + outputStorage.writeUnsignedByte(RTYPE_OK); + length -= (lengthLength + 1 + 4 + (int)id.length()); + while (--length > 0) { + outputStorage.writeUnsignedByte(tmpOutput.readUnsignedByte()); + } + } else { + //read length + tmpOutput.readUnsignedByte(); + //read cmd + tmpOutput.readUnsignedByte(); + //read status + tmpOutput.readUnsignedByte(); + std::string msg = tmpOutput.readString(); + outputStorage.writeUnsignedByte(*i); + outputStorage.writeUnsignedByte(RTYPE_ERR); + outputStorage.writeUnsignedByte(TYPE_STRING); + outputStorage.writeString(msg); + errors = errors + msg; } - } else { - //read length - tmpOutput.readUnsignedByte(); - //read cmd - tmpOutput.readUnsignedByte(); - //read status - tmpOutput.readUnsignedByte(); - std::string msg = tmpOutput.readString(); - outputStorage.writeUnsignedByte(*i); - outputStorage.writeUnsignedByte(RTYPE_ERR); - outputStorage.writeUnsignedByte(TYPE_STRING); - outputStorage.writeString(msg); - errors = errors + msg; } } } @@ -949,7 +828,7 @@ if (s.contextVars) { writeInto.writeUnsignedByte(s.contextDomain); } - writeInto.writeUnsignedByte((int)(s.variables.size())); + writeInto.writeUnsignedByte(numVars); if (s.contextVars) { writeInto.writeInt((int)objIDs.size()); } @@ -961,14 +840,22 @@ bool -TraCIServer::addObjectVariableSubscription(int commandId) { - SUMOTime beginTime = myInputStorage.readInt(); - SUMOTime endTime = myInputStorage.readInt(); - std::string id = myInputStorage.readString(); - int no = myInputStorage.readUnsignedByte(); +TraCIServer::addObjectVariableSubscription(const int commandId, const bool hasContext) { + const SUMOTime beginTime = myInputStorage.readInt(); + const SUMOTime endTime = myInputStorage.readInt(); + const std::string id = myInputStorage.readString(); + const int domain = hasContext ? myInputStorage.readUnsignedByte() : 0; + const SUMOReal range = hasContext ? myInputStorage.readDouble() : 0.; + const int num = myInputStorage.readUnsignedByte(); std::vector variables; - for (int i = 0; i < no; ++i) { - variables.push_back(myInputStorage.readUnsignedByte()); + std::vector > parameters; + for (int i = 0; i < num; ++i) { + const int varID = myInputStorage.readUnsignedByte(); + variables.push_back(varID); + parameters.push_back(std::vector()); + for (int j = 0; j < myParameterSizes[varID]; j++) { + parameters.back().push_back(myInputStorage.readChar()); + } } // check subscribe/unsubscribe if (variables.size() == 0) { @@ -976,30 +863,7 @@ return true; } // process subscription - Subscription s(commandId, id, variables, beginTime, endTime, false, 0, 0); - initialiseSubscription(s); - return true; -} - - -bool -TraCIServer::addObjectContextSubscription(int commandId) { - SUMOTime beginTime = myInputStorage.readInt(); - SUMOTime endTime = myInputStorage.readInt(); - std::string id = myInputStorage.readString(); - int domain = myInputStorage.readUnsignedByte(); - SUMOReal range = myInputStorage.readDouble(); - int no = myInputStorage.readUnsignedByte(); - std::vector variables; - for (int i = 0; i < no; ++i) { - variables.push_back(myInputStorage.readUnsignedByte()); - } - // check subscribe/unsubscribe - if (variables.size() == 0) { - removeSubscription(commandId, id, -1); - return true; - } - Subscription s(commandId, id, variables, beginTime, endTime, true, domain, range); + Subscription s(commandId, id, variables, parameters, beginTime, endTime, hasContext, domain, range); initialiseSubscription(s); return true; } @@ -1133,6 +997,4 @@ return true; } -} - #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServer.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServer.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci-server/TraCIServer.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci-server/TraCIServer.h 2015-04-17 00:20:29.000000000 +0000 @@ -9,12 +9,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date 2007/10/24 -/// @version $Id: TraCIServer.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIServer.h 18096 2015-03-17 09:50:59Z behrisch $ /// /// TraCI server used to control sumo by a remote TraCI client /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -57,7 +57,7 @@ #include #include #include "TraCIException.h" -#include "TraCIRTree.h" +#include #include #include @@ -68,15 +68,13 @@ // =========================================================================== // class definitions // =========================================================================== -namespace traci { - /** @class TraCIServer * @brief TraCI server used to control sumo by a remote TraCI client */ class TraCIServer : public MSNet::VehicleStateListener { public: /// @brief Definition of a method to be called for serving an associated commandID - typedef bool(*CmdExecutor)(traci::TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); + typedef bool(*CmdExecutor)(TraCIServer& server, tcpip::Storage& inputStorage, tcpip::Storage& outputStorage); SUMOTime getTargetTime() { @@ -111,12 +109,11 @@ /// @brief process all commands until a simulation step is wanted static void processCommandsUntilSimStep(SUMOTime step); - void setVTDControlled(MSVehicle* v, MSLane* l, SUMOReal pos, int edgeOffset, MSEdgeVector route); + void setVTDControlled(MSVehicle* v, MSLane* l, SUMOReal pos, int edgeOffset, ConstMSEdgeVector route, + SUMOTime t); void postProcessVTD(); - bool vtdDebug() const; - #ifdef HAVE_PYTHON @@ -261,11 +258,12 @@ bool readTypeCheckingPolygon(tcpip::Storage& inputStorage, PositionVector& into); /// @} + private: /** @brief Constructor * @param[in] port The port to listen to (to open) */ - TraCIServer(int port = 0); + TraCIServer(const SUMOTime begin, const int port = 0); /// @brief Destructor @@ -291,25 +289,13 @@ /** @brief Handles subscriptions to send after a simstep2 command */ void postProcessSimulationStep2(); - - - /** @brief Adds a vehicle - * @deprecated Vehicles shall be inserted using the vehicle-API - */ - bool commandAddVehicle(); /// @} - - - int dispatchCommand(); - - - private: /// @brief Singleton instance of the server static TraCIServer* myInstance; @@ -333,15 +319,15 @@ /// @todo: What is this for? bool myDoingSimStep; - /// @brief Whether the usage of deprecated methods was already reported - bool myHaveWarnedDeprecation; - /// @brief Whether the server runs in embedded mode const bool myAmEmbedded; /// @brief Map of commandIds -> their executors; applicable if the executor applies to the method footprint std::map myExecutors; + /// @brief Map of variable ids to the size of the parameter in bytes + std::map myParameterSizes; + std::map myVTDControlledVehicles; @@ -360,9 +346,10 @@ * @param[in] contextDomainArg The domain ID of the context * @param[in] rangeArg The range of the context */ - Subscription(int commandIdArg, const std::string& idArg, const std::vector& variablesArg, + Subscription(int commandIdArg, const std::string& idArg, + const std::vector& variablesArg, const std::vector >& paramsArg, SUMOTime beginTimeArg, SUMOTime endTimeArg, bool contextVarsArg, int contextDomainArg, SUMOReal rangeArg) - : commandId(commandIdArg), id(idArg), variables(variablesArg), beginTime(beginTimeArg), endTime(endTimeArg), + : commandId(commandIdArg), id(idArg), variables(variablesArg), parameters(paramsArg), beginTime(beginTimeArg), endTime(endTimeArg), contextVars(contextVarsArg), contextDomain(contextDomainArg), range(rangeArg) {} /// @brief commandIdArg The command id of the subscription @@ -371,6 +358,8 @@ std::string id; /// @brief The subscribed variables std::vector variables; + /// @brief The parameters for the subscribed variables + std::vector > parameters; /// @brief The begin time of the subscription SUMOTime beginTime; /// @brief The end time of the subscription @@ -391,12 +380,14 @@ std::map > myVehicleStateChanges; /// @brief A storage of objects - std::map myObjects; + std::map myObjects; + + /// @brief A storage of lanes + LANE_RTREE_QUAL* myLaneTree; private: - bool addObjectVariableSubscription(int commandId); - bool addObjectContextSubscription(int commandId); + bool addObjectVariableSubscription(const int commandId, const bool hasContext); void initialiseSubscription(const Subscription& s); void removeSubscription(int commandId, const std::string& identity, int domain); bool processSingleSubscription(const TraCIServer::Subscription& s, tcpip::Storage& writeInto, @@ -412,8 +403,6 @@ }; -} - #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci_testclient/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci_testclient/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci_testclient/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci_testclient/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -37,7 +81,8 @@ target_triplet = @target@ @TRACI_TRUE@bin_PROGRAMS = TraCITestClient$(EXEEXT) subdir = src/traci_testclient -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -58,30 +103,86 @@ @TRACI_TRUE@ ../utils/common/libcommon.a \ @TRACI_TRUE@ ../utils/traci/libtraci.a \ @TRACI_TRUE@ ../foreign/tcpip/libtcpip.a $(MEM_LIBS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(TraCITestClient_SOURCES) DIST_SOURCES = $(am__TraCITestClient_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -90,6 +191,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -116,9 +218,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -129,10 +235,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -268,14 +370,19 @@ $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -296,7 +403,8 @@ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -309,9 +417,10 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -TraCITestClient$(EXEEXT): $(TraCITestClient_OBJECTS) $(TraCITestClient_DEPENDENCIES) + +TraCITestClient$(EXEEXT): $(TraCITestClient_OBJECTS) $(TraCITestClient_DEPENDENCIES) $(EXTRA_TraCITestClient_DEPENDENCIES) @rm -f TraCITestClient$(EXEEXT) - $(CXXLINK) $(TraCITestClient_OBJECTS) $(TraCITestClient_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(TraCITestClient_OBJECTS) $(TraCITestClient_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -323,25 +432,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tracitestclient_main.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -349,26 +458,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -380,15 +478,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -397,6 +491,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -448,10 +557,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -535,19 +649,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci_testclient/TraCITestClient.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci_testclient/TraCITestClient.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci_testclient/TraCITestClient.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci_testclient/TraCITestClient.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,13 +5,14 @@ /// @author Laura Bieker /// @author Axel Wegener /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date 2008/04/07 -/// @version $Id: TraCITestClient.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCITestClient.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// /// A test execution class /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -52,12 +53,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace testclient; - - -// =========================================================================== // method definitions // =========================================================================== TraCITestClient::TraCITestClient(std::string outputFileName) @@ -422,7 +417,7 @@ // ---------- Conversion helper int TraCITestClient::setValueTypeDependant(tcpip::Storage& into, std::ifstream& defFile, std::stringstream& msg) { - std::string dataTypeS, valueS; + std::string dataTypeS; defFile >> dataTypeS; if (dataTypeS == "") { into.writeUnsignedByte(REQUEST_AIRDIST); @@ -443,36 +438,47 @@ } return 4 + 4 + 4 + numVars; } - defFile >> valueS; + int valI; + double valF; if (dataTypeS == "") { + defFile >> valI; into.writeUnsignedByte(TYPE_INTEGER); - into.writeInt(atoi(valueS.c_str())); + into.writeInt(valI); return 4 + 1; } else if (dataTypeS == "") { + defFile >> valI; into.writeUnsignedByte(TYPE_BYTE); - into.writeByte(atoi(valueS.c_str())); + into.writeByte(valI); return 1 + 1; } else if (dataTypeS == "") { + defFile >> valI; into.writeUnsignedByte(TYPE_UBYTE); - into.writeUnsignedByte(atoi(valueS.c_str())); + into.writeUnsignedByte(valI); return 1 + 1; } else if (dataTypeS == "") { + defFile >> valF; into.writeUnsignedByte(TYPE_FLOAT); - into.writeFloat(float(atof(valueS.c_str()))); + into.writeFloat(float(valF)); return 4 + 1; } else if (dataTypeS == "") { + defFile >> valF; into.writeUnsignedByte(TYPE_DOUBLE); - into.writeDouble(atof(valueS.c_str())); + into.writeDouble(valF); return 8 + 1; } else if (dataTypeS == "") { + std::string valueS; + defFile >> valueS; + if (valueS == "\"\"") { + valueS = ""; + } into.writeUnsignedByte(TYPE_STRING); into.writeString(valueS); return 4 + 1 + (int) valueS.length(); } else if (dataTypeS == "") { std::vector slValue; - int number = atoi(valueS.c_str()); + defFile >> valI; int length = 1 + 4; - for (int i = 0; i < number; ++i) { + for (int i = 0; i < valI; ++i) { std::string tmp; defFile >> tmp; slValue.push_back(tmp); @@ -482,55 +488,60 @@ into.writeStringList(slValue); return length; } else if (dataTypeS == "") { - int number = atoi(valueS.c_str()); + defFile >> valI; into.writeUnsignedByte(TYPE_COMPOUND); - into.writeInt(number); + into.writeInt(valI); int length = 1 + 4; - for (int i = 0; i < number; ++i) { + for (int i = 0; i < valI; ++i) { length += setValueTypeDependant(into, defFile, msg); } return length; } else if (dataTypeS == "") { + defFile >> valI; into.writeUnsignedByte(TYPE_COLOR); - into.writeUnsignedByte(atoi(valueS.c_str())); + into.writeUnsignedByte(valI); for (int i = 0; i < 3; ++i) { - defFile >> valueS; - into.writeUnsignedByte(atoi(valueS.c_str())); + defFile >> valI; + into.writeUnsignedByte(valI); } return 1 + 4; } else if (dataTypeS == "") { + defFile >> valF; into.writeUnsignedByte(POSITION_2D); - into.writeDouble(atof(valueS.c_str())); - defFile >> valueS; - into.writeDouble(atof(valueS.c_str())); + into.writeDouble(valF); + defFile >> valF; + into.writeDouble(valF); return 1 + 8 + 8; } else if (dataTypeS == "") { + defFile >> valF; into.writeUnsignedByte(POSITION_3D); - into.writeDouble(atof(valueS.c_str())); - defFile >> valueS; - into.writeDouble(atof(valueS.c_str())); - defFile >> valueS; - into.writeDouble(atof(valueS.c_str())); + into.writeDouble(valF); + defFile >> valF; + into.writeDouble(valF); + defFile >> valF; + into.writeDouble(valF); return 1 + 8 + 8 + 8; } else if (dataTypeS == "") { + std::string valueS; + defFile >> valueS; into.writeUnsignedByte(POSITION_ROADMAP); into.writeString(valueS); int length = 1 + 8 + (int) valueS.length(); - defFile >> valueS; - into.writeDouble(atof(valueS.c_str())); - defFile >> valueS; - into.writeUnsignedByte(atoi(valueS.c_str())); + defFile >> valF; + into.writeDouble(valF); + defFile >> valI; + into.writeUnsignedByte(valI); return length + 4 + 1; } else if (dataTypeS == "") { + defFile >> valI; into.writeUnsignedByte(TYPE_POLYGON); - int number = atoi(valueS.c_str()); - into.writeUnsignedByte(number); + into.writeUnsignedByte(valI); int length = 1 + 1; - for (int i = 0; i < number; ++i) { - std::string x, y; + for (int i = 0; i < valI; ++i) { + double x, y; defFile >> x >> y; - into.writeDouble(atof(x.c_str())); - into.writeDouble(atof(y.c_str())); + into.writeDouble(x); + into.writeDouble(y); length += 8 + 8; } return length; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci_testclient/TraCITestClient.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci_testclient/TraCITestClient.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci_testclient/TraCITestClient.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci_testclient/TraCITestClient.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Axel Wegener /// @author Michael Behrisch /// @date 2008/04/07 -/// @version $Id: TraCITestClient.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCITestClient.h 18095 2015-03-17 09:39:00Z behrisch $ /// /// A test execution class /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,8 +35,6 @@ #include -namespace testclient { - // =========================================================================== // class definitions // =========================================================================== @@ -191,6 +189,4 @@ }; -} - #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci_testclient/tracitestclient_main.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci_testclient/tracitestclient_main.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/traci_testclient/tracitestclient_main.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/traci_testclient/tracitestclient_main.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Daniel Krajzewicz /// @date 2008/04/07 -/// @version $Id: tracitestclient_main.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: tracitestclient_main.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// /// Main method for TraCITestClient /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -38,12 +38,6 @@ // =========================================================================== -// used namespaces -// =========================================================================== -using namespace testclient; - - -// =========================================================================== // method definitions // =========================================================================== int main(int argc, char* argv[]) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/AbstractMutex.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/AbstractMutex.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/AbstractMutex.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/AbstractMutex.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2005-07-12 -/// @version $Id: AbstractMutex.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AbstractMutex.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An abstract class for encapsulating mutex implementations /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/AStarRouter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/AStarRouter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/AStarRouter.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/AStarRouter.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,300 +0,0 @@ -/****************************************************************************/ -/// @file AStarRouter.h -/// @author Jakob Erdmann -/// @date January 2012 -/// @version $Id: AStarRouter.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// A* Algorithm using euclidean distance heuristic. -// Based on DijkstraRouterTT. For routing by effort a novel heuristic would be needed. -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef AStarRouterTT_h -#define AStarRouterTT_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "SUMOAbstractRouter.h" - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class AStarRouterTT - * @brief Computes the shortest path through a network using the Dijkstra algorithm. - * - * The template parameters are: - * @param E The edge class to use (MSEdge/ROEdge) - * @param V The vehicle class to use (MSVehicle/ROVehicle) - * @param PF The prohibition function to use (prohibited_withRestrictions/prohibited_noRestrictions) - * @param EC The class to retrieve the effort for an edge from - * - * The router is edge-based. It must know the number of edges for internal reasons - * and whether a missing connection between two given edges (unbuild route) shall - * be reported as an error or as a warning. - * - */ -template -class AStarRouterTTBase : public SUMOAbstractRouter, public PF { - using SUMOAbstractRouter::startQuery; - using SUMOAbstractRouter::endQuery; - -public: - /// Constructor - AStarRouterTTBase(size_t noE, bool unbuildIsWarning): - SUMOAbstractRouter("AStarRouter"), - myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()) { - for (size_t i = 0; i < noE; i++) { - myEdgeInfos.push_back(EdgeInfo(i)); - } - } - - /// Destructor - virtual ~AStarRouterTTBase() {} - - /** - * @struct EdgeInfo - * A definition about a route's edge with the effort needed to reach it and - * the information about the previous edge. - */ - class EdgeInfo { - public: - /// Constructor - EdgeInfo(size_t id) : - edge(E::dictionary(id)), - traveltime(std::numeric_limits::max()), - heuristicTime(std::numeric_limits::max()), - prev(0), - visited(false) - {} - - /// The current edge - const E* edge; - - /// Effort to reach the edge - SUMOReal traveltime; - - /// Estimated time to reach the edge (traveltime + lower bound on remaining time) - SUMOReal heuristicTime; - - /// The previous edge - EdgeInfo* prev; - - /// The previous edge - bool visited; - - inline void reset() { - // heuristicTime is set before adding to the frontier, thus no reset is needed - traveltime = std::numeric_limits::max(); - visited = false; - } - - }; - - /** - * @class EdgeInfoComparator - * Class to compare (and so sort) nodes by their effort - */ - class EdgeInfoComparator { - public: - /// Comparing method - bool operator()(const EdgeInfo* nod1, const EdgeInfo* nod2) const { - if (nod1->heuristicTime == nod2->heuristicTime) { - return nod1->edge->getNumericalID() > nod2->edge->getNumericalID(); - } - return nod1->heuristicTime > nod2->heuristicTime; - } - }; - - virtual SUMOReal getEffort(const E* const e, const V* const v, SUMOReal t) const = 0; - - - void init() { - // all EdgeInfos touched in the previous query are either in myFrontierList or myFound: clean those up - for (typename std::vector::iterator i = myFrontierList.begin(); i != myFrontierList.end(); i++) { - (*i)->reset(); - } - myFrontierList.clear(); - for (typename std::vector::iterator i = myFound.begin(); i != myFound.end(); i++) { - (*i)->reset(); - } - myFound.clear(); - } - - - /** @brief Builds the route between the given edges using the minimum travel time */ - virtual void compute(const E* from, const E* to, const V* const vehicle, - SUMOTime msTime, std::vector& into) { - assert(from != 0 && to != 0); - startQuery(); - const SUMOReal time = STEPS2TIME(msTime); - init(); - // add begin node - EdgeInfo* const fromInfo = &(myEdgeInfos[from->getNumericalID()]); - fromInfo->traveltime = 0; - fromInfo->prev = 0; - myFrontierList.push_back(fromInfo); - // loop - int num_visited = 0; - while (!myFrontierList.empty()) { - num_visited += 1; - // use the node with the minimal length - EdgeInfo* const minimumInfo = myFrontierList.front(); - const E* const minEdge = minimumInfo->edge; - pop_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); - myFrontierList.pop_back(); - myFound.push_back(minimumInfo); - // check whether the destination node was already reached - if (minEdge == to) { - buildPathFrom(minimumInfo, into); - endQuery(num_visited); - // DEBUG - //std::cout << "visited " + toString(num_visited) + " edges (final path length: " + toString(into.size()) + ")\n"; - return; - } - minimumInfo->visited = true; - const SUMOReal traveltime = minimumInfo->traveltime + getEffort(minEdge, vehicle, time + minimumInfo->traveltime); - // check all ways from the node with the minimal length - unsigned int i = 0; - const unsigned int length_size = minEdge->getNoFollowing(); - for (i = 0; i < length_size; i++) { - const E* const follower = minEdge->getFollower(i); - EdgeInfo* const followerInfo = &(myEdgeInfos[follower->getNumericalID()]); - // check whether it can be used - if (PF::operator()(follower, vehicle)) { - continue; - } - const SUMOReal oldEffort = followerInfo->traveltime; - if (!followerInfo->visited && traveltime < oldEffort) { - // admissible A* heuristic: straight line distance at maximum speed - const SUMOReal heuristic_remaining = minEdge->getDistanceTo(to) / vehicle->getMaxSpeed(); - followerInfo->traveltime = traveltime; - followerInfo->heuristicTime = traveltime + heuristic_remaining; - followerInfo->prev = minimumInfo; - if (oldEffort == std::numeric_limits::max()) { - myFrontierList.push_back(followerInfo); - push_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); - } else { - push_heap(myFrontierList.begin(), - find(myFrontierList.begin(), myFrontierList.end(), followerInfo) + 1, - myComparator); - } - } - } - } - endQuery(num_visited); - myErrorMsgHandler->inform("No connection between '" + from->getID() + "' and '" + to->getID() + "' found."); - } - - - SUMOReal recomputeCosts(const std::vector& edges, const V* const v, SUMOTime msTime) const { - const SUMOReal time = STEPS2TIME(msTime); - SUMOReal costs = 0; - for (typename std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { - if (PF::operator()(*i, v)) { - return -1; - } - costs += getEffort(*i, v, time + costs); - } - return costs; - } - -public: - /// Builds the path from marked edges - void buildPathFrom(EdgeInfo* rbegin, std::vector& edges) { - std::deque tmp; - while (rbegin != 0) { - tmp.push_front((E*) rbegin->edge); // !!! - rbegin = rbegin->prev; - } - std::copy(tmp.begin(), tmp.end(), std::back_inserter(edges)); - } - -protected: - /// The container of edge information - std::vector myEdgeInfos; - - /// A container for reusage of the min edge heap - std::vector myFrontierList; - /// @brief list of visited Edges (for resetting) - std::vector myFound; - - EdgeInfoComparator myComparator; - - /// @brief the handler for routing errors - MsgHandler* const myErrorMsgHandler; - -}; - - -template -class AStarRouterTT_ByProxi : public AStarRouterTTBase { -public: - /// Type of the function that is used to retrieve the edge effort. - typedef SUMOReal(* Operation)(const E* const, const V* const, SUMOReal); - - AStarRouterTT_ByProxi(size_t noE, bool unbuildIsWarningOnly, Operation operation): - AStarRouterTTBase(noE, unbuildIsWarningOnly), - myOperation(operation) {} - - inline SUMOReal getEffort(const E* const e, const V* const v, SUMOReal t) const { - return (*myOperation)(e, v, t); - } - -private: - /// @brief The object's operation to perform. - Operation myOperation; -}; - - -template -class AStarRouterTT_Direct : public AStarRouterTTBase { -public: - /// Type of the function that is used to retrieve the edge effort. - typedef SUMOReal(E::* Operation)(const V* const, SUMOReal) const; - - AStarRouterTT_Direct(size_t noE, bool unbuildIsWarningOnly, Operation operation) - : AStarRouterTTBase(noE, unbuildIsWarningOnly), myOperation(operation) {} - - inline SUMOReal getEffort(const E* const e, const V* const v, SUMOReal t) const { - return (e->*myOperation)(v, t); - } - -private: - Operation myOperation; -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/Command.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/Command.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/Command.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/Command.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Christian Roessel /// @author Daniel Krajzewicz /// @date Thu, 20 Dec 2001 -/// @version $Id: Command.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Command.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Base (microsim) event class /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/DijkstraRouterEffort.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/DijkstraRouterEffort.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/DijkstraRouterEffort.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/DijkstraRouterEffort.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,313 +0,0 @@ -/****************************************************************************/ -/// @file DijkstraRouterEffort.h -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date Mon, 25 July 2005 -/// @version $Id: DijkstraRouterEffort.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Dijkstra shortest path algorithm using other values -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef DijkstraRouterEffort_h -#define DijkstraRouterEffort_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "SUMOAbstractRouter.h" - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class DijkstraRouterEffort - * @brief Computes the shortest path through a network using the Dijkstra algorithm. - * - * The template parameters are: - * @param E The edge class to use (MSEdge/ROEdge) - * @param V The vehicle class to use (MSVehicle/ROVehicle) - * @param PF The prohibition function to use (prohibited_withRestrictions/prohibited_noRestrictions) - * @param EC The class to retrieve the effort for an edge from - * - * The router is edge-based. It must know the number of edges for internal reasons - * and whether a missing connection between two given edges (unbuild route) shall - * be reported as an error or as a warning. - * - */ -template -class DijkstraRouterEffortBase : public SUMOAbstractRouter, public PF { - using SUMOAbstractRouter::startQuery; - using SUMOAbstractRouter::endQuery; - -public: - /// Constructor - DijkstraRouterEffortBase(size_t noE, bool unbuildIsWarning) : - SUMOAbstractRouter("DijkstraRouterEffort"), - myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()) { - for (size_t i = 0; i < noE; i++) { - myEdgeInfos.push_back(EdgeInfo(i)); - } - } - - /// Destructor - virtual ~DijkstraRouterEffortBase() { } - - /** - * @struct EdgeInfo - * A definition about a route's edge with the effort needed to reach it and - * the information about the previous edge. - */ - class EdgeInfo { - public: - /// Constructor - EdgeInfo(size_t id) - : edge(E::dictionary(id)), effort(std::numeric_limits::max()), leaveTime(0), prev(0), visited(false) {} - - /// The current edge - const E* edge; - - /// Effort to reach the edge - SUMOReal effort; - - /// The time the vehicle leaves the edge - SUMOReal leaveTime; - - /// The previous edge - EdgeInfo* prev; - - /// The previous edge - bool visited; - - inline void reset() { - effort = std::numeric_limits::max(); - visited = false; - } - }; - - /** - * @class EdgeInfoByEffortComparator - * Class to compare (and so sort) nodes by their effort - */ - class EdgeInfoByEffortComparator { - public: - /// Comparing method - bool operator()(EdgeInfo* nod1, EdgeInfo* nod2) const { - if (nod1->effort == nod2->effort) { - return nod1->edge->getNumericalID() > nod2->edge->getNumericalID(); - } - return nod1->effort > nod2->effort; - } - }; - - virtual SUMOReal getEffort(const E* const e, const V* const v, SUMOReal t) const = 0; - virtual SUMOReal getTravelTime(const E* const e, const V* const v, SUMOReal t) const = 0; - - - void init() { - // all EdgeInfos touched in the previous query are either in myFrontierList or myFound: clean those up - for (typename std::vector::iterator i = myFrontierList.begin(); i != myFrontierList.end(); i++) { - (*i)->reset(); - } - myFrontierList.clear(); - for (typename std::vector::iterator i = myFound.begin(); i != myFound.end(); i++) { - (*i)->reset(); - } - myFound.clear(); - } - - - /** @brief Builds the route between the given edges using the minimum effort at the given time - The definition of the effort depends on the wished routing scheme */ - virtual void compute(const E* from, const E* to, const V* const vehicle, - SUMOTime msTime, std::vector& into) { - assert(from != 0 && to != 0); - startQuery(); - init(); - // add begin node - EdgeInfo* const fromInfo = &(myEdgeInfos[from->getNumericalID()]); - fromInfo->effort = 0; - fromInfo->prev = 0; - fromInfo->leaveTime = STEPS2TIME(msTime); - myFrontierList.push_back(fromInfo); - // loop - int num_visited = 0; - while (!myFrontierList.empty()) { - num_visited += 1; - // use the node with the minimal length - EdgeInfo* const minimumInfo = myFrontierList.front(); - const E* const minEdge = minimumInfo->edge; - pop_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); - myFrontierList.pop_back(); - myFound.push_back(minimumInfo); - // check whether the destination node was already reached - if (minEdge == to) { - buildPathFrom(minimumInfo, into); - endQuery(num_visited); - return; - } - minimumInfo->visited = true; - const SUMOReal effort = minimumInfo->effort + getEffort(minEdge, vehicle, minimumInfo->leaveTime); - const SUMOReal leaveTime = minimumInfo->leaveTime + getTravelTime(minEdge, vehicle, minimumInfo->leaveTime); - // check all ways from the node with the minimal length - unsigned int i = 0; - const unsigned int length_size = minEdge->getNoFollowing(); - for (i = 0; i < length_size; i++) { - const E* const follower = minEdge->getFollower(i); - EdgeInfo* const followerInfo = &(myEdgeInfos[follower->getNumericalID()]); - // check whether it can be used - if (PF::operator()(follower, vehicle)) { - continue; - } - const SUMOReal oldEffort = followerInfo->effort; - if (!followerInfo->visited && effort < oldEffort) { - followerInfo->effort = effort; - followerInfo->leaveTime = leaveTime; - followerInfo->prev = minimumInfo; - if (oldEffort == std::numeric_limits::max()) { - myFrontierList.push_back(followerInfo); - push_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); - } else { - push_heap(myFrontierList.begin(), - find(myFrontierList.begin(), myFrontierList.end(), followerInfo) + 1, - myComparator); - } - } - } - } - endQuery(num_visited); - myErrorMsgHandler->inform("No connection between '" + from->getID() + "' and '" + to->getID() + "' found."); - } - - - SUMOReal recomputeCosts(const std::vector& edges, const V* const v, SUMOTime msTime) const { - SUMOReal costs = 0; - SUMOReal t = STEPS2TIME(msTime); - for (typename std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { - if (PF::operator()(*i, v)) { - return -1; - } - costs += getEffort(*i, v, t); - t += getTravelTime(*i, v, t); - } - return costs; - } - -public: - /// Builds the path from marked edges - void buildPathFrom(EdgeInfo* rbegin, std::vector& edges) { - std::deque tmp; - while (rbegin != 0) { - tmp.push_front((E*) rbegin->edge); // !!! - rbegin = rbegin->prev; - } - std::copy(tmp.begin(), tmp.end(), std::back_inserter(edges)); - } - -protected: - /// The container of edge information - std::vector myEdgeInfos; - - /// A container for reusage of the min edge heap - std::vector myFrontierList; - /// @brief list of visited Edges (for resetting) - std::vector myFound; - - EdgeInfoByEffortComparator myComparator; - - /// @brief the handler for routing errors - MsgHandler* const myErrorMsgHandler; - -}; - - -template -class DijkstraRouterEffort_ByProxi : public DijkstraRouterEffortBase { -public: - /// Type of the function that is used to retrieve the edge effort. - typedef SUMOReal(* Operation)(const E* const, const V* const, SUMOReal); - - DijkstraRouterEffort_ByProxi(size_t noE, bool unbuildIsWarningOnly, Operation effortOperation, Operation ttOperation): - DijkstraRouterEffortBase(noE, unbuildIsWarningOnly), - myEffortOperation(effortOperation), - myTTOperation(ttOperation) {} - - inline SUMOReal getEffort(const E* const e, const V* const v, SUMOReal t) const { - return (*myEffortOperation)(e, v, t); - } - - inline SUMOReal getTravelTime(const E* const e, const V* const v, SUMOReal t) const { - return (*myTTOperation)(e, v, t); - } - -private: - /// @brief The object's operation to perform for obtaining the effort - Operation myEffortOperation; - - /// @brief The object's operation to perform for obtaining the travel time - Operation myTTOperation; - -}; - - -template -class DijkstraRouterEffort_Direct : public DijkstraRouterEffortBase { -public: - /// Type of the function that is used to retrieve the edge effort. - typedef SUMOReal(E::* Operation)(const V* const, SUMOReal) const; - - DijkstraRouterEffort_Direct(size_t noE, bool unbuildIsWarningOnly, Operation effortOperation, Operation ttOperation) - : DijkstraRouterEffortBase(noE, unbuildIsWarningOnly), - myEffortOperation(effortOperation), myTTOperation(ttOperation) {} - - inline SUMOReal getEffort(const E* const e, const V* const v, SUMOReal t) const { - return (e->*myEffortOperation)(v, t); - } - - inline SUMOReal getTravelTime(const E* const e, const V* const v, SUMOReal t) const { - return (e->*myTTOperation)(v, t); - } - -private: - /// @brief The object's operation to perform for obtaining the effort - Operation myEffortOperation; - - /// @brief The object's operation to perform for obtaining the travel time - Operation myTTOperation; - - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/DijkstraRouterTT.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/DijkstraRouterTT.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/DijkstraRouterTT.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/DijkstraRouterTT.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,306 +0,0 @@ -/****************************************************************************/ -/// @file DijkstraRouterTT.h -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date Mon, 25 July 2005 -/// @version $Id: DijkstraRouterTT.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Dijkstra shortest path algorithm using travel time -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef DijkstraRouterTT_h -#define DijkstraRouterTT_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "SUMOAbstractRouter.h" - -//#define DijkstraRouterTT_DEBUG_QUERY -//#define DijkstraRouterTT_DEBUG_QUERY_PERF - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class DijkstraRouterTT - * @brief Computes the shortest path through a network using the Dijkstra algorithm. - * - * The template parameters are: - * @param E The edge class to use (MSEdge/ROEdge) - * @param V The vehicle class to use (MSVehicle/ROVehicle) - * @param PF The prohibition function to use (prohibited_withRestrictions/prohibited_noRestrictions) - * @param EC The class to retrieve the effort for an edge from - * - * The router is edge-based. It must know the number of edges for internal reasons - * and whether a missing connection between two given edges (unbuild route) shall - * be reported as an error or as a warning. - * - */ -template -class DijkstraRouterTTBase : public SUMOAbstractRouter, public PF { - using SUMOAbstractRouter::startQuery; - using SUMOAbstractRouter::endQuery; - -public: - /// Constructor - DijkstraRouterTTBase(size_t noE, bool unbuildIsWarning) : - SUMOAbstractRouter("DijkstraRouterTT"), - myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()) { - for (size_t i = 0; i < noE; i++) { - myEdgeInfos.push_back(EdgeInfo(i)); - } - } - - /// Destructor - virtual ~DijkstraRouterTTBase() { } - - /** - * @struct EdgeInfo - * A definition about a route's edge with the effort needed to reach it and - * the information about the previous edge. - */ - class EdgeInfo { - public: - /// Constructor - EdgeInfo(size_t id) - : edge(E::dictionary(id)), traveltime(std::numeric_limits::max()), prev(0), visited(false) {} - - /// The current edge - const E* edge; - - /// Effort to reach the edge - SUMOReal traveltime; - - /// The previous edge - EdgeInfo* prev; - - /// The previous edge - bool visited; - - inline void reset() { - traveltime = std::numeric_limits::max(); - visited = false; - } - }; - - /** - * @class EdgeInfoByEffortComparator - * Class to compare (and so sort) nodes by their effort - */ - class EdgeInfoByTTComparator { - public: - /// Comparing method - bool operator()(const EdgeInfo* nod1, const EdgeInfo* nod2) const { - if (nod1->traveltime == nod2->traveltime) { - return nod1->edge->getNumericalID() > nod2->edge->getNumericalID(); - } - return nod1->traveltime > nod2->traveltime; - } - }; - - virtual SUMOReal getEffort(const E* const e, const V* const v, SUMOReal t) const = 0; - - - void init() { - // all EdgeInfos touched in the previous query are either in myFrontierList or myFound: clean those up - for (typename std::vector::iterator i = myFrontierList.begin(); i != myFrontierList.end(); i++) { - (*i)->reset(); - } - myFrontierList.clear(); - for (typename std::vector::iterator i = myFound.begin(); i != myFound.end(); i++) { - (*i)->reset(); - } - myFound.clear(); - } - - - /** @brief Builds the route between the given edges using the minimum effort at the given time - The definition of the effort depends on the wished routing scheme */ - virtual void compute(const E* from, const E* to, const V* const vehicle, - SUMOTime msTime, std::vector& into) { - assert(from != 0 && to != 0); - startQuery(); - const SUMOReal time = STEPS2TIME(msTime); - init(); - // add begin node - EdgeInfo* const fromInfo = &(myEdgeInfos[from->getNumericalID()]); - fromInfo->traveltime = 0; - fromInfo->prev = 0; - myFrontierList.push_back(fromInfo); - // loop - int num_visited = 0; - while (!myFrontierList.empty()) { - num_visited += 1; - // use the node with the minimal length - EdgeInfo* const minimumInfo = myFrontierList.front(); - const E* const minEdge = minimumInfo->edge; - pop_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); - myFrontierList.pop_back(); - myFound.push_back(minimumInfo); -#ifdef DijkstraRouterTT_DEBUG_QUERY - std::cout << "DEBUG: hit '" << minEdge->getID() << "' Q: "; - for (typename std::vector::iterator it = myFrontierList.begin(); it != myFrontierList.end(); it++) { - std::cout << (*it)->traveltime << "," << (*it)->edge->getID() << " "; - } - std::cout << "\n"; -#endif - // check whether the destination node was already reached - if (minEdge == to) { - buildPathFrom(minimumInfo, into); - endQuery(num_visited); -#ifdef DijkstraRouterTT_DEBUG_QUERY_PERF - std::cout << "visited " + toString(num_visited) + " edges (final path length: " + toString(into.size()) + ")\n"; -#endif - return; - } - minimumInfo->visited = true; - const SUMOReal traveltime = minimumInfo->traveltime + getEffort(minEdge, vehicle, time + minimumInfo->traveltime); - // check all ways from the node with the minimal length - unsigned int i = 0; - const unsigned int length_size = minEdge->getNoFollowing(); - for (i = 0; i < length_size; i++) { - const E* const follower = minEdge->getFollower(i); - EdgeInfo* const followerInfo = &(myEdgeInfos[follower->getNumericalID()]); - // check whether it can be used - if (PF::operator()(follower, vehicle)) { - continue; - } - const SUMOReal oldEffort = followerInfo->traveltime; - if (!followerInfo->visited && traveltime < oldEffort) { - followerInfo->traveltime = traveltime; - followerInfo->prev = minimumInfo; - if (oldEffort == std::numeric_limits::max()) { - myFrontierList.push_back(followerInfo); - push_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); - } else { - push_heap(myFrontierList.begin(), - find(myFrontierList.begin(), myFrontierList.end(), followerInfo) + 1, - myComparator); - } - } - } - } - endQuery(num_visited); -#ifdef DijkstraRouterTT_DEBUG_QUERY_PERF - std::cout << "visited " + toString(num_visited) + " edges (final path length: " + toString(into.size()) + ")\n"; -#endif - myErrorMsgHandler->inform("No connection between '" + from->getID() + "' and '" + to->getID() + "' found."); - } - - - SUMOReal recomputeCosts(const std::vector& edges, const V* const v, SUMOTime msTime) const { - const SUMOReal time = STEPS2TIME(msTime); - SUMOReal costs = 0; - for (typename std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { - if (PF::operator()(*i, v)) { - return -1; - } - costs += getEffort(*i, v, time + costs); - } - return costs; - } - -public: - /// Builds the path from marked edges - void buildPathFrom(EdgeInfo* rbegin, std::vector& edges) { - std::deque tmp; - while (rbegin != 0) { - tmp.push_front((E*) rbegin->edge); // !!! - rbegin = rbegin->prev; - } - std::copy(tmp.begin(), tmp.end(), std::back_inserter(edges)); - } - -protected: - /// The container of edge information - std::vector myEdgeInfos; - - /// A container for reusage of the min edge heap - std::vector myFrontierList; - /// @brief list of visited Edges (for resetting) - std::vector myFound; - - EdgeInfoByTTComparator myComparator; - - /// @brief the handler for routing errors - MsgHandler* const myErrorMsgHandler; -}; - - -template -class DijkstraRouterTT_ByProxi : public DijkstraRouterTTBase { -public: - /// Type of the function that is used to retrieve the edge effort. - typedef SUMOReal(* Operation)(const E* const, const V* const, SUMOReal); - - DijkstraRouterTT_ByProxi(size_t noE, bool unbuildIsWarningOnly, Operation operation): - DijkstraRouterTTBase(noE, unbuildIsWarningOnly), - myOperation(operation) {} - - inline SUMOReal getEffort(const E* const e, const V* const v, SUMOReal t) const { - return (*myOperation)(e, v, t); - } - -private: - /// @brief The object's operation to perform. - Operation myOperation; - - -}; - - -template -class DijkstraRouterTT_Direct : public DijkstraRouterTTBase { -public: - /// Type of the function that is used to retrieve the edge effort. - typedef SUMOReal(E::* Operation)(const V* const, SUMOReal) const; - - DijkstraRouterTT_Direct(size_t noE, bool unbuildIsWarningOnly, Operation operation) - : DijkstraRouterTTBase(noE, unbuildIsWarningOnly), myOperation(operation) {} - - inline SUMOReal getEffort(const E* const e, const V* const v, SUMOReal t) const { - return (e->*myOperation)(v, t); - } - -private: - Operation myOperation; - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/FileHelpers.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/FileHelpers.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/FileHelpers.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/FileHelpers.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 17 Dec 2001 -/// @version $Id: FileHelpers.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: FileHelpers.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Functions for an easier usage of files /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,6 +34,7 @@ // this is how fox does it in xincs.h #include #define access _access +#define R_OK 4 /* Test for read permission. */ #else #include #endif @@ -54,7 +55,7 @@ // file access functions // --------------------------------------------------------------------------- bool -FileHelpers::exists(std::string path) { +FileHelpers::isReadable(std::string path) { if (path.length() == 0) { return false; } @@ -64,7 +65,7 @@ if (path.length() == 0) { return false; } - return access(path.c_str(), 0) != -1; + return access(path.c_str(), R_OK) == 0; } @@ -135,6 +136,16 @@ } +std::string +FileHelpers::prependToLastPathComponent(const std::string& prefix, const std::string& path) { + size_t sep_index = path.find_last_of("\\/"); + if (sep_index == std::string::npos) { + return prefix + path; + } else { + return path.substr(0, sep_index + 1) + prefix + path.substr(sep_index + 1); + } +} + // --------------------------------------------------------------------------- // binary reading/writing functions // --------------------------------------------------------------------------- diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/FileHelpers.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/FileHelpers.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/FileHelpers.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/FileHelpers.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file FileHelpers.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Mon, 17 Dec 2001 -/// @version $Id: FileHelpers.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: FileHelpers.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Functions for an easier usage of files /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -50,12 +51,12 @@ /// @name file access functions //@{ - /** @brief Checks whether the given file exists + /** @brief Checks whether the given file is readable * * @param[in] path The path to the file that shall be examined - * @return Whether the named file exists + * @return Whether the named file is readable */ - static bool exists(std::string path); + static bool isReadable(std::string path); //@} @@ -124,6 +125,10 @@ */ static std::string checkForRelativity(const std::string& filename, const std::string& basePath); + + /// @brief prepend the given prefix to the last path component of the given file path + static std::string prependToLastPathComponent(const std::string& prefix, const std::string& path); + //@} @@ -226,11 +231,11 @@ E prev = edges.front(); for (typename std::vector::const_iterator i = edges.begin() + 1; i != edges.end(); ++i) { unsigned int idx = 0; - for (; idx < prev->getNoFollowing(); ++idx) { + for (; idx < prev->getNumSuccessors(); ++idx) { if (idx > 15) { break; } - if (prev->getFollower(idx) == (*i)) { + if (prev->getSuccessors()[idx] == (*i)) { follow.push_back(idx); if (idx > maxFollow) { maxFollow = idx; @@ -238,7 +243,7 @@ break; } } - if (idx > 15 || idx == prev->getNoFollowing()) { + if (idx > 15 || idx == prev->getNumSuccessors()) { follow.clear(); break; } @@ -299,10 +304,10 @@ field = 0; } unsigned int followIndex = (data >> ((numFields - field - 1) * bits)) & mask; - if (followIndex >= prev->getNoFollowing()) { + if (followIndex >= prev->getNumSuccessors()) { throw ProcessError("Invalid follower index in route '" + rid + "'!"); } - prev = prev->getFollower(followIndex); + prev = prev->getSuccessors()[followIndex]; edges.push_back(prev); field++; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/HelpersHarmonoise.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/HelpersHarmonoise.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/HelpersHarmonoise.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/HelpersHarmonoise.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,152 +0,0 @@ -/****************************************************************************/ -/// @file HelpersHarmonoise.cpp -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date Mon, 10.05.2004 -/// @version $Id: HelpersHarmonoise.cpp 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Noise data collector for edges/lanes -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include "HelpersHarmonoise.h" -#include -#include - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// static definitions -// =========================================================================== -// --------------------------------------------------------------------------- -// vehicle class noise emission coefficients -// --------------------------------------------------------------------------- -// rolling component, light vehicles, alpha -double -HelpersHarmonoise::myR_A_C1_Parameter[27] = { 69.9, 69.9, 69.9, 74.9, 74.9, 74.9, 77.3, 77.5, 78.1, 78.3, 78.9, 77.8, 78.5, 81.9, 84.1, 86.5, 88.6, 88.2, 87.6, 85.8, 82.8, 80.2, 77.6, 75.0, 72.8, 70.4, 67.9 }; - -// rolling component, light vehicles, beta -double -HelpersHarmonoise::myR_B_C1_Parameter[27] = { 33.0, 33.0, 33.0, 15.2, 15.2, 15.2, 41.0, 41.2, 42.3, 41.8, 38.6, 35.5, 31.7, 21.5, 21.2, 23.5, 29.1, 33.5, 34.1, 35.1, 36.4, 37.4, 38.9, 39.7, 39.7, 39.7, 39.7 }; - - -// rolling component, heavy vehicles, alpha -double -HelpersHarmonoise::myR_A_C3_Parameter[27] = { 80.5, 80.5, 80.5, 82.5, 83.5, 83.5, 86.5, 88.3, 88.7, 88.3, 91.4, 92.2, 96.0, 98.1, 97.8, 98.4, 97.2, 94.6, 95.9, 90.5, 87.1, 85.1, 83.2, 81.3, 81.3, 81.3, 81.3 }; - -// rolling component, heavy vehicles, beta -double -HelpersHarmonoise::myR_B_C3_Parameter[27] = { 33.0, 33.0, 33.0, 30.0, 30.0, 30.0, 41.0, 41.2, 42.3, 41.8, 38.6, 35.5, 31.7, 21.5, 21.2, 23.5, 29.1, 33.5, 34.1, 35.1, 36.4, 37.4, 38.9, 39.7, 39.7, 39.7, 39.7 }; - - - -// traction component, light vehicles, alpha -double -HelpersHarmonoise::myT_A_C1_Parameter[27] = { 90.0, 92.0, 89.0, 91.0, 92.4, 94.8, 90.8, 86.8, 86.2, 84.5, 84.5, 84.8, 83.5, 81.8, 81.4, 79.0, 79.2, 81.4, 85.5, 85.8, 85.2, 82.9, 81.0, 78.2, 77.2, 75.2, 74.2 }; - -// traction component, light vehicles, beta -double -HelpersHarmonoise::myT_B_C1_Parameter[27] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4 }; - - -// traction component, heavy vehicles, alpha -double -HelpersHarmonoise::myT_A_C3_Parameter[27] = { 97.7, 97.3, 98.2, 103.3, 109.5, 104.3, 99.8, 100.2, 98.9, 99.5, 100.7, 101.2, 100.6, 100.2, 97.4, 97.1, 97.8, 97.3, 95.8, 94.9, 92.7, 90.6, 89.9, 87.9, 85.9, 83.8, 82.2 }; - -// traction component, heavy vehicles, beta -double -HelpersHarmonoise::myT_B_C3_Parameter[27] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7 }; - - -// --------------------------------------------------------------------------- -// A-weighted correction for octave bands -// --------------------------------------------------------------------------- -double -HelpersHarmonoise::myAOctaveBandCorrection[27] = { -44.7, -39.4, -34.6, -30.2, -26.2, -22.5, -19.1, -16.1, -13.4, - -10.9, -8.6, -6.6, -4.8, -3.2, -1.9, -0.8, 0.0, +0.6, - +1.0, +1.2, +1.3, +1.2, +1.0, +0.5, -0.1, -1.1, -2.5 - }; - - - -double -mySurfaceCorrection[27] = { 0.7, 0.2, 3.6, -1.0, -1.8, -0.1, -0.9, -0.7, -1.1, -0.5, -1.5, - -2.4, -3.0, -4.6, -5.8, -6.5, -7.9, -7.8, -7.2, -6.3, -5.6, - -5.5, -4.8, -4.3 - }; - - -// =========================================================================== -// method definitions -// =========================================================================== -SUMOReal -HelpersHarmonoise::computeNoise(SUMOEmissionClass c, double v, double a) { - double* alphaT, *betaT, *alphaR, *betaR; - double ac = 0; - if (c >= SVE_HDV_3_1 && c <= SVE_HDV_12_12) { - alphaT = myT_A_C3_Parameter; - betaT = myT_B_C3_Parameter; - alphaR = myR_A_C3_Parameter; - betaR = myR_B_C3_Parameter; - ac = 5.6; - } else if (c != SVE_ZERO_EMISSIONS) { - alphaT = myT_A_C1_Parameter; - betaT = myT_B_C1_Parameter; - alphaR = myR_A_C1_Parameter; - betaR = myR_B_C1_Parameter; - ac = 4.4; - } else { - return 0; - } - // - double L_low = 0; - double L_high = 0; - v = v * 3.6; - double s = -30.;// - for (unsigned int i = 0; i < 27; ++i) { - double crc_low = alphaR[i] + betaR[i] * log10(v / 70.) + 10.*log10(.8); // + mySurfaceCorrection[i]; - double ctc_low = alphaT[i] + betaT[i] * ((v - 70.) / 70.) + a * ac + 10.*log10(.2); - double Li_low = 10. * log10(pow(10., (crc_low / 10.)) + pow(10., (ctc_low / 10.))); - Li_low += s; - double crc_high = alphaR[i] + betaR[i] * log10(v / 70.) + 10.*log10(.2); // + mySurfaceCorrection[i]; - double ctc_high = alphaT[i] + betaT[i] * ((v - 70.) / 70.) + a * ac + 10.*log10(.8); - double Li_high = 10. * log10(pow(10., (crc_high / 10.)) + pow(10., (ctc_high / 10.))); - Li_high += s; - L_low += pow(10., (Li_low + myAOctaveBandCorrection[i]) / 10.); - L_high += pow(10., (Li_high + myAOctaveBandCorrection[i]) / 10.); - } - L_low = (10. * log10(L_low)); - L_high = (10. * log10(L_high)); - SUMOReal v1 = (SUMOReal)(10. * log10(pow(10., L_low / 10.) + pow(10., L_high / 10.))); - return v1; -} - - - - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/HelpersHarmonoise.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/HelpersHarmonoise.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/HelpersHarmonoise.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/HelpersHarmonoise.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,113 +0,0 @@ -/****************************************************************************/ -/// @file HelpersHarmonoise.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date Mon, 10.05.2004 -/// @version $Id: HelpersHarmonoise.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Helper methods for Harmonoise-based noise emission computation -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef HelpersHarmonoise_h -#define HelpersHarmonoise_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include "StdDefs.h" -#include "SUMOVehicleClass.h" -#include -#include - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class HelpersHarmonoise - * @brief Helper methods for Harmonoise-based noise emission computation - * - * The stored values compute the recepted noise of either passenger or heavy - * duty vehicles for a distance of 10m from the noise source. - */ -class HelpersHarmonoise { -public: - /** @brief Returns the noise produced by the a vehicle of the given type at the given speed - * - * @param[in] c The vehicle emission class - * @param[in] v The vehicle's current velocity - * @param[in] a The vehicle's current acceleration - * @return The noise produced by the vehicle of the given class running with v and a - */ - static SUMOReal computeNoise(SUMOEmissionClass c, double v, double a); - - - /** @brief Computes the resulting noise - * - * @param[in] val The sum of converted vehicle noises ( pow(10., (/10.)) ) - * @return The resulting sum - */ - inline static SUMOReal sum(SUMOReal val) { - return SUMOReal(10. * log10(val)); - } - - -private: - /// @name vehicle class noise emission coefficients - /// @{ - - /// @brief rolling component, light vehicles, alpha - static double myR_A_C1_Parameter[27]; - - /// @brief rolling component, light vehicles, beta - static double myR_B_C1_Parameter[27]; - - /// @brief rolling component, heavy vehicles, alpha - static double myR_A_C3_Parameter[27]; - - /// @brief rolling component, heavy vehicles, beta - static double myR_B_C3_Parameter[27]; - - /// @brief traction component, light vehicles, alpha - static double myT_A_C1_Parameter[27]; - - /// @brief traction component, light vehicles, beta - static double myT_B_C1_Parameter[27]; - - /// @brief traction component, heavy vehicles, alpha - static double myT_A_C3_Parameter[27]; - - /// @brief traction component, heavy vehicles, beta - static double myT_B_C3_Parameter[27]; - /// @} - - - /// @brief A-weighted correction for octave bands - static double myAOctaveBandCorrection[27]; - - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/HelpersHBEFA.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/HelpersHBEFA.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/HelpersHBEFA.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/HelpersHBEFA.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,235 +0,0 @@ -/****************************************************************************/ -/// @file HelpersHBEFA.cpp -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date Mon, 10.05.2004 -/// @version $Id: HelpersHBEFA.cpp 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Helper methods for HBEFA-based emission computation -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include "HelpersHBEFA.h" -#include -#include - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// static definitions -// =========================================================================== -// --------------------------------------------------------------------------- -// offsets to the pollutant parameter -// --------------------------------------------------------------------------- -#define CO2_OFFSET 0 -#define CO_OFFSET 6 -#define HC_OFFSET 12 -#define FUEL_OFFSET 18 -#define NOx_OFFSET 24 -#define PMx_OFFSET 30 - - -// --------------------------------------------------------------------------- -// function parameter -// --------------------------------------------------------------------------- -double -HelpersHBEFA::myFunctionParameter[42][36] = { - // HDV; 3 clusters - // vehicle class#1/3 - { 4245.223, 154.6451, 1.927562, 541.2383, -4.550742, 0.04188938, 28.93721, 0.2037537, -0.003240476, 0.4930771, 0.008678762, -0.000121619, 13.32557, 0.01322119, 0.000700762, 0.095335, 0.001058381, -1.49E-05, 1337.078, 48.70711, 0.6071061, 170.4687, -1.433304, 0.01319348, 57.36627, 1.608585, -0.01356748, 5.374104, -0.04497662, 0.000340619, 4.261253, 0.02554976, 0.000149429, 0.03476595, 0.000966905, -8.29E-06 }, - // vehicle class#2/3 - { 7532.393, 296.2907, 4.776591, 894.9408, -4.454462, 0.01506321, 64.0142, 0.4218208, -0.003186929, 0.7000011, 0.01569257, -0.000193357, 30.24542, 0.0187745, 0.002567214, -0.08659921, 0.008306071, -7.94E-05, 2372.407, 93.3199, 1.504438, 281.8711, -1.40298, 0.004744429, 61.59909, 4.076068, 0.02217579, 12.79584, -0.09531593, 0.0005145, 11.43318, 0.08889879, 0.001239571, 0.09093043, 0.003454929, -3.71E-05 }, - // vehicle class#3/3 - { 4379.343, 326.7668, 5.13858, 1169.737, -10.36215, 0.05391863, 29.17327, 0.4384759, -0.02571725, 2.691101, -0.04257238, 0.000198563, 16.04012, 0.03122069, 0.00159475, 0.05119362, 0.003245125, -3.17E-05, 1262.193, 104.5547, 1.425356, 377.4979, -3.555124, 0.01910588, 89.55158, 3.046639, -0.01640881, 10.66656, -0.1096889, 0.00056675, 3.948798, 0.04236512, -0.000316063, 0.1628317, -0.001558937, 5.44E-06 }, - - // HDV; 6 clusters - // vehicle class#1/6 - { 3829.748, 147.9749, 1.777084, 529.3666, -4.567272, 0.04292206, 24.49617, 0.2063578, -0.004779611, 0.6274923, 0.0059385, -0.000108111, 11.84365, 0.01288211, 0.000403278, 0.1121517, 0.0004725, -1.07E-05, 1206.22, 46.60628, 0.5597114, 166.7297, -1.438511, 0.01351872, 56.05184, 1.508194, -0.01516956, 5.135625, -0.04351839, 0.000334778, 3.190084, 0.02395894, -0.000195444, 0.05076006, 0.000514056, -5.33E-06 }, - // vehicle class#2/6 - { 3727.514, 345.2813, 4.893428, 1096.787, -7.416957, 0.0280765, 23.77369, 0.4555801, -0.034993, 2.557392, -0.03645875, 0.000147667, 14.29555, 0.03184967, 0.00198025, 0.031253, 0.004242667, -4.20E-05, 1174.02, 108.75, 1.541237, 345.4448, -2.33605, 0.008842917, 77.83577, 3.005416, -0.030789, 10.1406, -0.09853533, 0.000451083, 2.518828, 0.03534608, -0.000696833, 0.1587361, -0.00135225, 2.25E-06 }, - // vehicle class#3/6 - { 5537.632, 269.8361, 5.648917, 1380.937, -19.34676, 0.1321773, 43.83397, 0.3016793, 0.005988, 1.782886, -0.02033733, 6.80E-05, 15.04026, 0.044756, -0.000785667, 0.2291307, -0.001645333, 1.20E-05, 1318.267, 91.26118, 1.02786, 467.6024, -7.150377, 0.04931933, 138.8276, 2.776265, 0.01352733, 8.819582, -0.07310133, 0.000410333, 5.781037, 0.04107233, 0.000997667, 0.1459517, -0.000726, 3.67E-06 }, - // vehicle class#4/6 - { 8985.25, 326.1776, 5.51268, 936.401, -3.526856, 0.004997833, 57.74254, 0.4314542, -0.01708467, 1.511672, -0.004765667, -7.15E-05, 26.43911, 0.006439667, 0.0025045, -0.1147438, 0.007911667, -7.13E-05, 2830, 102.7331, 1.736277, 294.9295, -1.110821, 0.001574167, 67.78939, 4.951368, 0.04244583, 14.74165, -0.09469333, 0.000439667, 10.07179, 0.1157227, -0.001297, 0.268713, -2.00E-04, -1.17E-05 }, - // vehicle class#5/6 - { 8726.428, 275.3837, 6.54939, 1411.54, -18.75068, 0.129248, 49.98624, 0.643615, -0.009524, 7.020251, -0.182641, 0.001201, 39.97457, -0.016933, 0.00411, -0.24333, 0.005946, -3.90E-05, 2152.048, 94.09162, 1.227265, 491.8213, -7.398254, 0.051621, 82.31324, 4.352434, 0.066345, 22.51904, -0.353294, 0.002424, 15.61173, 0.130472, 0.000312, 0.262619, -0.006538, 4.90E-05 }, - // vehicle class#6/6 - { 6523.294, 252.2728, 3.844317, 795.2882, -4.959638, 0.02617982, 65.1358, 0.3528321, 0.006897636, -0.01911436, 0.02942282, -0.000262364, 30.13205, 0.02454291, 0.002579182, -0.04914736, 0.007503273, -7.30E-05, 2054.581, 79.45602, 1.210808, 250.4845, -1.56209, 0.008245727, 59.21904, 3.089958, 0.003992818, 10.10062, -0.08431282, 0.000517455, 11.9726, 0.05959373, 0.002890182, -0.04753164, 0.005511, -4.79E-05 }, - - // HDV; 12 clusters - // vehicle class#1/12 - { 3777.914, 169.7948, 3.01701, 543.2617, -3.400868, 0.0276416, 19.79026, 0.2745816, -0.0136666, 1.042812, -0.0014014, -9.20E-05, 9.638248, 0.0117292, 0.001148, 0.0133902, 0.0024412, -2.24E-05, 1189.894, 53.47867, 0.9502392, 171.106, -1.071139, 0.008706, 58.3618, 1.905507, -0.0215914, 6.81565, -0.0627068, 0.0003704, 2.117546, 0.025472, -0.0003838, 0.0913152, -0.0002838, -1.80E-06 }, - // vehicle class#2/12 - { 1178.094, 98.07191, 0.6434853, 426.1617, -4.274885, 0.044156, 15.48074, 0.09682383, 0.000677833, 0.3069623, 0.0079665, -1.00E-04, 5.973097, 0.010058, 6.57E-05, 0.1382332, -0.001090833, 2.33E-06, 371.0531, 30.88879, 0.2026728, 134.2242, -1.346421, 0.01390733, 31.4823, 0.9752208, -0.001955667, 3.105738, -0.0124115, 0.0001845, 2.479061, 0.01418067, 7.65E-05, 0.03521683, 0.000487, -4.00E-06 }, - // vehicle class#3/12 - { 6037.502, 199.516, 2.957913, 629.6518, -4.367862, 0.0330238, 52.84091, 0.207839, 0.0033912, -0.2037164, 0.023461, -0.0001992, 21.73357, 0.0174904, 0.0026086, -0.0220608, 0.0052594, -4.76E-05, 1901.576, 62.83969, 0.9316262, 198.3155, -1.375705, 0.0104012, 56.82231, 2.241451, -0.0022442, 7.06951, -0.0568268, 0.0003946, 10.51586, 0.0366152, 0.0022762, -0.064026, 0.00404, -3.06E-05 }, - // vehicle class#4/12 - { 8346.313, 348.7957, 5.807692, 1002.669, -3.506569, -0.0024172, 57.5509, 0.4551868, -0.0191538, 1.673864, -0.0076502, -5.58E-05, 26.84843, 0.0092324, 0.002566, -0.1306032, 0.008825, -8.14E-05, 2628.76, 109.8569, 1.829195, 315.8013, -1.104431, -0.0007612, 57.11903, 5.282892, 0.0435782, 15.82654, -0.1004152, 0.000397, 9.997718, 0.1217238, -0.0013438, 0.2949876, -0.000472, -1.12E-05 }, - // vehicle class#5/12 - { 3945.002, 329.6897, 4.977738, 1029.128, -6.415743, 0.0229038, 26.09977, 0.460142, -0.0298806, 2.09053, -0.0254042, 7.76E-05, 13.81196, 0.0336372, 0.0022038, 0.0607028, 0.0034944, -3.80E-05, 1242.52, 103.8393, 1.567791, 324.1347, -2.020706, 0.0072138, 77.98345, 3.659314, -0.0167726, 13.28484, -0.141909, 0.0008374, 2.076544, 0.0586858, -0.0011186, 0.1913528, -0.0018984, 7.80E-06 }, - // vehicle class#6/12 - { 5146.604, 349.9846, 4.580544, 1128.035, -7.741384, 0.0275195, 58.78087, 0.4532422, -0.00607075, 0.731588, 0.00848925, -0.0001165, 27.23363, 0.046362, 0.0041685, -0.05372075, 0.00929775, -9.15E-05, 1620.978, 110.2314, 1.44269, 355.2865, -2.43823, 0.00866775, 49.73242, 3.702976, 0.010858, 12.32118, -0.1082213, 0.000542, 12.76151, 0.0733965, 0.003513, -0.006429, 0.00553575, -5.53E-05 }, - // vehicle class#7/12 - { 2468.366, 107.175, -0.454992, 531.0585, -6.0537, 0.0568685, 43.43802, 0.304624, 0.0032445, 0.290372, 0.0214735, -0.000149, 27.72425, 0.0096335, -0.00146, 0.5241775, -0.005529, 4.00E-06, 777.4382, 33.75592, -0.1433045, 167.2625, -1.906677, 0.017911, 19.87989, 1.605028, -0.0052925, 6.956905, -0.070429, 0.000715, 7.821013, 0.05183, -0.0001675, -0.0195895, 0.003644, -2.20E-05 }, - // vehicle class#8/12 - { 8158.499, 174.8699, 3.850001, 524.2941, -1.627882, 0.01411133, 84.22954, 0.4076163, 0.02642967, -0.7384697, 0.06290667, -0.000519667, 43.00436, 0.002628, 0.000444, -0.09107867, 0.0082, -8.30E-05, 2569.606, 55.07713, 1.212599, 165.132, -0.5127187, 0.004444667, 66.97121, 3.209013, 0.002880333, 10.74906, -0.08791767, 0.000667, 11.84367, 0.06905167, 0.002679333, -0.07983067, 0.007327667, -6.03E-05 }, - // vehicle class#9/12 - { 8726.428, 275.3837, 6.54939, 1411.54, -18.75068, 0.129248, 49.98624, 0.643615, -0.009524, 7.020251, -0.182641, 0.001201, 39.97457, -0.016933, 0.00411, -0.24333, 0.005946, -3.90E-05, 2152.048, 94.09162, 1.227265, 491.8213, -7.398254, 0.051621, 82.31324, 4.352434, 0.066345, 22.51904, -0.353294, 0.002424, 15.61173, 0.130472, 0.000312, 0.262619, -0.006538, 4.90E-05 }, - // vehicle class#10/12 - { 3572.165, 356.4182, 4.833206, 1145.116, -8.13211, 0.03177129, 22.1122, 0.4523216, -0.03864471, 2.890864, -0.04435486, 0.000197714, 14.64097, 0.03057286, 0.001820571, 0.01021743, 0.004777143, -4.49E-05, 1125.091, 112.2577, 1.522269, 360.6663, -2.561295, 0.01000657, 77.73029, 2.538346, -0.04080071, 7.894712, -0.06755414, 0.000175143, 2.834744, 0.01867486, -0.000395571, 0.1354384, -0.000962143, -1.71E-06 }, - // vehicle class#11/12 - { 5537.632, 269.8361, 5.648917, 1380.937, -19.34676, 0.1321773, 43.83397, 0.3016793, 0.005988, 1.782886, -0.02033733, 6.80E-05, 15.04026, 0.044756, -0.000785667, 0.2291307, -0.001645333, 1.20E-05, 1318.267, 91.26118, 1.02786, 467.6024, -7.150377, 0.04931933, 138.8276, 2.776265, 0.01352733, 8.819582, -0.07310133, 0.000410333, 5.781037, 0.04107233, 0.000997667, 0.1459517, -0.000726, 3.67E-06 }, - // vehicle class#12/12 - { 9345.47, 215.5508, 3.122979, 662.6306, -5.589131, 0.0536472, 37.07944, 0.2540546, -0.0062166, 0.8912752, 0.003296, -0.0001206, 16.58738, 0.0150562, 0.0007128, 0.019276, 0.002339, -1.48E-05, 2943.455, 67.89001, 0.983615, 208.7025, -1.760356, 0.0168968, 115.4133, 2.039132, -0.0205846, 5.871867, -0.0534446, 0.000368, 3.860352, 0.0345176, -0.000893, 0.0969626, -0.0004166, -1.00E-06 }, - - - // passenger & light delivery; 7 clusters - // vehicle class#1/7 - { 996.9682, 20.5008, 2.105255, 402.9621, -6.851369, 0.058854, 103.3263, 6.420582, -0.069665, 26.63126, -1.679889, 0.020307, 28.34217, 0.11478, 0.003321, 2.221844, -0.035114, 0.000203, 314.0057, 6.456945, 0.663072, 126.9172, -2.157912, 0.018537, -17.87872, 0.225347, 0.032447, 2.951223, -0.008134, 0.000136, 0, 0, 0, 0, 0, 0 }, - // vehicle class#2/7 - { 568.4164, 28.98654, 2.392379, 444.6236, -7.96483, 0.0713965, -30.73332, 2.72593, 0.1847705, 13.13587, -0.8342, 0.010139, 0.260599, 0.047499, 0.003201, 0.5008775, -0.017732, 0.000178, 179.0288, 9.12962, 0.753505, 140.0389, -2.508608, 0.0224875, -9.310931, 0.1564435, 0.025312, 1.814603, -0.039666, 0.0004675, 0, 0, 0, 0, 0, 0 }, - // vehicle class#3/7 - { 1555.28, 18.8412, 1.537082, 283.4023, -3.814485, 0.02828925, 92.07023, 1.368063, 0.047582, 1.272534, -0.1242364, 0.0018055, 12.88685, 0.02722013, 0.00503425, -0.09635513, 0.004566, -1.45E-05, 487.6871, 5.943571, 0.4862617, 89.2316, -1.20423, 0.008945125, -3.764286, 0.06886613, 0.01050787, 0.951383, -0.01077775, 0.00013075, 0, 0, 0, 0, 0, 0 }, - // vehicle class#4/7 - { 1638.562, 18.58688, 1.864623, 336.5175, -4.873515, 0.0352435, 200.8571, 2.721256, 0.0261325, -3.045024, 0.0110325, 0.0016485, 23.9455, 0.118374, 0.0010025, 1.515319, -0.01325, 5.10E-05, 516.0826, 5.854136, 0.587283, 105.9898, -1.534965, 0.0111, -18.26806, 0.194389, 0.027705, 3.746524, -0.0380975, 0.000291, 0, 0, 0, 0, 0, 0 }, - // vehicle class#5/7 - { -1003.894, 28.99975, 1.52799, 415.6817, -6.270028, 0.0435848, 2.427614, 0.0026388, 0.004946, 0.7214286, -0.0114684, 5.56E-05, 0.0985086, 0.006085, 5.60E-06, 0.1458242, -0.0024438, 1.10E-05, -316.1871, 9.133779, 0.4812568, 130.9234, -1.974812, 0.0137276, -2.200042, 0.0711052, 0.0060012, 1.097767, -0.0172668, 0.0001186, 0.3387628, 0.0045714, 0.0018894, 0.053204, -0.00066, 9.40E-06 }, - // vehicle class#6/7 - { -1460.657, 38.54555, 2.587558, 550.0553, -9.270113, 0.073572, 2.30828, 0.00579875, 0.00612125, 1.01166, -0.02122225, 0.000138, -0.3680555, 0.00952975, 0.0002195, 0.3670983, -0.0078245, 4.23E-05, -460.0494, 12.14033, 0.814979, 173.2458, -2.919721, 0.023172, -5.03414, 0.114594, 0.01239625, 2.15876, -0.045757, 0.00037375, -0.5019018, 0.00714925, 0.00287175, 0.1692208, -0.003773, 3.75E-05 }, - // vehicle class#7/7 - { 2166.094, 19.70297, 1.127945, 124.9567, -0.9551173, 0.013322, 22.93762, 0.3453138, 0.0340968, -1.141499, -0.0123665, 0.00048415, 1.257912, 0.0073757, 0.000494, -0.0051317, -0.00024665, 6.55E-06, 682.2344, 6.205661, 0.3552582, 39.35645, -0.3008244, 0.00419595, 3.022236, 0.0405486, 0.0033863, 0.2024628, -0.00173205, 3.28E-05, 0.07654135, 0.00089725, 0.00037255, 0.0085828, -7.94E-05, 1.50E-06 }, - - - // passenger & light delivery; 14 clusters - // vehicle class#1/14 - { 895.048, 28.01939, 2.268731, 353.5948, -6.013789, 0.060184, -78.42317, 2.252056, 0.204949, 11.88813, -0.729578, 0.00895, -0.198061, 0.029691, 0.001663, 0.228178, -0.009928, 0.00011, 281.9048, 8.825005, 0.714561, 111.3684, -1.894107, 0.018956, -0.840184, 0.128177, 0.022964, 0.090339, 0.006234, 0.00013, 0, 0, 0, 0, 0, 0 }, - // vehicle class#2/14 - { 996.9682, 20.5008, 2.105255, 402.9621, -6.851369, 0.058854, 103.3263, 6.420582, -0.069665, 26.63126, -1.679889, 0.020307, 28.34217, 0.11478, 0.003321, 2.221844, -0.035114, 0.000203, 314.0057, 6.456945, 0.663072, 126.9172, -2.157912, 0.018537, -17.87872, 0.225347, 0.032447, 2.951223, -0.008134, 0.000136, 0, 0, 0, 0, 0, 0 }, - // vehicle class#3/14 - { 241.7848, 29.95369, 2.516027, 535.6524, -9.915872, 0.082609, 16.95654, 3.199804, 0.164592, 14.38362, -0.938822, 0.011328, 0.719259, 0.065307, 0.004739, 0.773577, -0.025536, 0.000246, 76.1527, 9.434234, 0.792449, 168.7094, -3.123109, 0.026019, -17.78168, 0.18471, 0.02766, 3.538866, -0.085566, 0.000805, 0, 0, 0, 0, 0, 0 }, - // vehicle class#4/14 - { 1766.366, 28.86222, 1.009348, 179.9436, -1.995637, 0.021407, 9.519505, -0.0001735, 0.004417, 0.2940755, -0.003349, 7.50E-06, 2.614778, 0.008488, -4.90E-05, 0.0952845, -0.0017875, 7.50E-06, 556.3357, 9.090463, 0.3179045, 56.67517, -0.628547, 0.0067425, 11.64171, 0.092567, 0.004931, 0.1218405, 0.0027595, 1.85E-05, 0.477455, 0.002826, 0.001173, 0.01824, -0.000236, 5.00E-06 }, - // vehicle class#5/14 - { -1460.657, 38.54555, 2.587558, 550.0553, -9.270113, 0.073572, 0.851137, 0.002138, 0.002257, 0.3730315, -0.0078255, 5.10E-05, -0.191191, 0.00495, 0.000114, 0.1906935, -0.0040645, 2.20E-05, -460.0494, 12.14033, 0.814979, 173.2458, -2.919721, 0.023172, -2.918474, 0.066434, 0.0071865, 1.251511, -0.026527, 0.0002165, -0.1795185, 0.002557, 0.001027, 0.0605265, -0.0013495, 1.35E-05 }, - // vehicle class#6/14 - { -1460.657, 38.54555, 2.587558, 550.0553, -9.270113, 0.073572, 2.772362, 0.006964667, 0.007352, 1.215055, -0.025489, 0.000165667, -0.421911, 0.01092433, 0.000251667, 0.4208137, -0.008969333, 4.83E-05, -460.0494, 12.14033, 0.814979, 173.2458, -2.919721, 0.023172, -5.467097, 0.1244497, 0.01346233, 2.344422, -0.04969233, 0.000406, -0.5896773, 0.008399667, 0.003374, 0.198815, -0.004433, 4.40E-05 }, - // vehicle class#7/14 - { 1524.712, 19.83281, 1.526236, 246.8718, -2.755203, 0.02236, 125.3404, 0.8948317, 0.082081, -4.478419, 0.01717675, 0.00072175, 15.07328, 0.028836, 0.00394, -0.469072, 0.00669525, -1.45E-05, 480.2241, 6.246555, 0.480704, 77.75491, -0.8677803, 0.0070425, -2.985925, 0.0615315, 0.0086275, 0.6688392, -0.01133175, 0.000145, 0, 0, 0, 0, 0, 0 }, - // vehicle class#8/14 - { 1315.659, 19.85449, 0.8501516, 125.5445, -1.234241, 0.01365757, 6.445969, -0.001671, 0.001951714, -0.021213, 0.001361143, -1.47E-05, 0.9530063, 0.003198571, -8.14E-06, 0.037985, -0.000763286, 3.57E-06, 414.3807, 6.253384, 0.2677641, 39.54159, -0.3887376, 0.004301714, 6.52896, 0.06100229, 0.003692571, 0.1800367, -0.000521571, 3.26E-05, 0.08227386, 0.001756143, 0.000729286, 0.01931086, -0.000159286, 2.86E-06 }, - // vehicle class#9/14 - { 2389.721, 16.02631, 1.210326, 114.4709, -0.6800661, 0.01103857, 26.19008, 0.6217411, 0.05579343, -3.591721, 0.029783, 0.000538857, 1.040033, 0.010627, 0.000763571, -0.07915957, 0.001320571, 2.00E-06, 752.668, 5.047656, 0.3812051, 36.05382, -0.214194, 0.003476857, -0.4058774, 0.01190943, 0.002148571, 0.1531723, -0.002129143, 2.30E-05, 0, 0, 0, 0, 0, 0 }, - // vehicle class#10/14 - { -889.7033, 26.6133, 1.263098, 382.0882, -5.520007, 0.036088, 2.837958, 0.00280475, 0.00566125, 0.8156385, -0.01252825, 5.78E-05, 0.167109, 0.00646775, -1.93E-05, 0.1384215, -0.00212, 8.75E-06, -280.2215, 8.382141, 0.3978262, 120.3428, -1.738585, 0.0113665, -2.224633, 0.07692125, 0.00620775, 1.146896, -0.01680775, 0.00010925, 0.453569, 0.00528525, 0.0021895, 0.05635125, -0.0005985, 9.50E-06 }, - // vehicle class#11/14 - { 1160.041, 15.96945, 1.472322, 264.6607, -3.900594, 0.0307155, 99.29707, 3.146305, -0.0568605, 8.132381, -0.382831, 0.004678, 19.00645, 0.037976, 0.0099855, 0.4603955, 0.0078325, -5.60E-05, 356.7081, 5.067087, 0.4722905, 83.24187, -1.239802, 0.0098145, -6.34454, 0.1020615, 0.0158925, 1.428825, -0.0007645, 6.80E-05, 0, 0, 0, 0, 0, 0 }, - // vehicle class#12/14 - { 1638.562, 18.58688, 1.864623, 336.5175, -4.873515, 0.0352435, 200.8571, 2.721256, 0.0261325, -3.045024, 0.0110325, 0.0016485, 23.9455, 0.118374, 0.0010025, 1.515319, -0.01325, 5.10E-05, 516.0826, 5.854136, 0.587283, 105.9898, -1.534965, 0.0111, -18.26806, 0.194389, 0.027705, 3.746524, -0.0380975, 0.000291, 0, 0, 0, 0, 0, 0 }, - // vehicle class#13/14 - { 4090.07, 23.34377, 1.661025, 94.17165, 0.1407857, 0.010964, 74.75966, 0.458661, 0.06031533, -2.345069, -0.02632067, 0.000755, 1.535461, 0.003798333, 0.000544, -0.06322367, 0.000545667, 2.67E-06, 1288.211, 7.352367, 0.5231577, 29.66036, 0.044342, 0.003453, -1.500043, 0.014919, 0.002562, 0.2383583, -0.002585, 2.33E-05, 0, 0, 0, 0, 0, 0 }, - // vehicle class#14/14 - { 1868.198, 18.1992, 1.460284, 309.0113, -4.609052, 0.03110133, 7.862757, 0.7542397, 0.08466433, 6.912267, -0.2255383, 0.001978333, 2.053268, 0.01627633, 0.002533667, 0.1231153, -0.004271333, 4.10E-05, 588.409, 5.73203, 0.4599317, 97.32639, -1.45167, 0.009795667, -2.227221, 0.05712633, 0.009019333, 0.9453647, -0.01773867, 0.000163, 0, 0, 0, 0, 0, 0 } -}; - - -// =========================================================================== -// method definitions -// =========================================================================== -SUMOReal -HelpersHBEFA::computeCO(SUMOEmissionClass c, double v, double a) { - return compute(c, CO_OFFSET, v, a); -} - - -SUMOReal -HelpersHBEFA::computeCO2(SUMOEmissionClass c, double v, double a) { - return compute(c, CO2_OFFSET, v, a); -} - - -SUMOReal -HelpersHBEFA::computeHC(SUMOEmissionClass c, double v, double a) { - return compute(c, HC_OFFSET, v, a); -} - - -SUMOReal -HelpersHBEFA::computeNOx(SUMOEmissionClass c, double v, double a) { - return compute(c, NOx_OFFSET, v, a); -} - - -SUMOReal -HelpersHBEFA::computePMx(SUMOEmissionClass c, double v, double a) { - return compute(c, PMx_OFFSET, v, a); -} - - -SUMOReal -HelpersHBEFA::computeFuel(SUMOEmissionClass c, double v, double a) { - return compute(c, FUEL_OFFSET, v, a) / 790.; -} - - -SUMOReal -HelpersHBEFA::computeDefaultCO(SUMOEmissionClass c, double v, double a, SUMOReal tt) { - return (compute(c, CO_OFFSET, v, 0) + compute(c, CO_OFFSET, v - a, a)) * tt / 2.; -} - - -SUMOReal -HelpersHBEFA::computeDefaultCO2(SUMOEmissionClass c, double v, double a, SUMOReal tt) { - return (compute(c, CO2_OFFSET, v, 0) + compute(c, CO2_OFFSET, v - a, a)) * tt / 2.; -} - - -SUMOReal -HelpersHBEFA::computeDefaultHC(SUMOEmissionClass c, double v, double a, SUMOReal tt) { - return (compute(c, HC_OFFSET, v, 0) + compute(c, HC_OFFSET, v - a, a)) * tt / 2.; -} - - -SUMOReal -HelpersHBEFA::computeDefaultNOx(SUMOEmissionClass c, double v, double a, SUMOReal tt) { - return (compute(c, NOx_OFFSET, v, 0) + compute(c, NOx_OFFSET, v - a, a)) * tt / 2.; -} - - -SUMOReal -HelpersHBEFA::computeDefaultPMx(SUMOEmissionClass c, double v, double a, SUMOReal tt) { - return (compute(c, PMx_OFFSET, v, 0) + compute(c, PMx_OFFSET, v - a, a)) * tt / 2.; -} - - -SUMOReal -HelpersHBEFA::computeDefaultFuel(SUMOEmissionClass c, double v, double a, SUMOReal tt) { - return (compute(c, FUEL_OFFSET, v, 0) + compute(c, FUEL_OFFSET, v - a, a)) * tt / 2. / 790.; -} - - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/HelpersHBEFA.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/HelpersHBEFA.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/HelpersHBEFA.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/HelpersHBEFA.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,225 +0,0 @@ -/****************************************************************************/ -/// @file HelpersHBEFA.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date Mon, 10.05.2004 -/// @version $Id: HelpersHBEFA.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Helper methods for HBEFA-based emission computation -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef HelpersHBEFA_h -#define HelpersHBEFA_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include "StdDefs.h" -#include "SUMOVehicleClass.h" -#include -#include - - -// =========================================================================== -// definitions -// =========================================================================== -#ifndef PI -#define PI 3.1415926535897932384626433832795 -#endif - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class HelpersHBEFA - * @brief Helper methods for HBEFA-based emission computation - * - * The parameter are stored per vehicle class; 6*6 parameter are used, sorted by - * the pollutant (CO2, CO, HC, fuel, NOx, PMx), and the function part - * (c0, cav1, cav2, c1, c2, c3). - */ -class HelpersHBEFA { -public: - /** @brief Returns the amount of emitted CO given the vehicle type and state (in mg/s) - * @param[in] c The vehicle emission class - * @param[in] v The vehicle's current velocity - * @param[in] a The vehicle's current acceleration - * @return The amount of CO emitted by the given vehicle class when moving with the given velocity and acceleration [mg/s] - */ - static SUMOReal computeCO(SUMOEmissionClass c, double v, double a); - - - /** @brief Returns the amount of emitted CO2 given the vehicle type and state (in mg/s) - * @param[in] c The vehicle emission class - * @param[in] v The vehicle's current velocity - * @param[in] a The vehicle's current acceleration - * @return The amount of CO2 emitted by the given vehicle class when moving with the given velocity and acceleration [mg/s] - */ - static SUMOReal computeCO2(SUMOEmissionClass c, double v, double a); - - - /** @brief Returns the amount of emitted HC given the vehicle type and state (in mg/s) - * @param[in] c The vehicle emission class - * @param[in] v The vehicle's current velocity - * @param[in] a The vehicle's current acceleration - * @return The amount of HC emitted by the given vehicle class when moving with the given velocity and acceleration [mg/s] - */ - static SUMOReal computeHC(SUMOEmissionClass c, double v, double a); - - - /** @brief Returns the amount of emitted NOx given the vehicle type and state (in mg/s) - * @param[in] c The vehicle emission class - * @param[in] v The vehicle's current velocity - * @param[in] a The vehicle's current acceleration - * @return The amount of NOx emitted by the given vehicle class when moving with the given velocity and acceleration [mg/s] - */ - static SUMOReal computeNOx(SUMOEmissionClass c, double v, double a); - - - /** @brief Returns the amount of emitted PMx given the vehicle type and state (in mg/s) - * @param[in] c The vehicle emission class - * @param[in] v The vehicle's current velocity - * @param[in] a The vehicle's current acceleration - * @return The amount of PMx emitted by the given vehicle class when moving with the given velocity and acceleration [mg/s] - */ - static SUMOReal computePMx(SUMOEmissionClass c, double v, double a); - - - /** @brief Returns the amount of consumed fuel given the vehicle type and state (in ml/s) - * - * As the general function returns mg/s, this implementation scales with 790 (average density of fuel) - * - * @param[in] c The vehicle emission class - * @param[in] v The vehicle's current velocity - * @param[in] a The vehicle's current acceleration - * @return The amount of fuel consumed by the given vehicle class when moving with the given velocity and acceleration [ml/s] - */ - static SUMOReal computeFuel(SUMOEmissionClass c, double v, double a); - - - /** @brief Returns the amount of emitted CO given the vehicle type and default values for the state (in mg) - * @param[in] c The vehicle emission class - * @param[in] v The vehicle's average velocity - * @param[in] a The vehicle's average acceleration - * @param{in] tt the time the vehicle travels - * @return The amount of CO emitted by the given vehicle class [mg] - */ - static SUMOReal computeDefaultCO(SUMOEmissionClass c, double v, double a, SUMOReal tt); - - - /** @brief Returns the amount of emitted CO2 given the vehicle type and default values for the state (in mg) - * @param[in] c The vehicle emission class - * @param[in] v The vehicle's average velocity - * @param[in] a The vehicle's average acceleration - * @param{in] tt the time the vehicle travels - * @return The amount of CO2 emitted by the given vehicle class [mg] - */ - static SUMOReal computeDefaultCO2(SUMOEmissionClass c, double v, double a, SUMOReal tt); - - - /** @brief Returns the amount of emitted HC given the vehicle type and default values for the state (in mg) - * @param[in] c The vehicle emission class - * @param[in] v The vehicle's average velocity - * @param[in] a The vehicle's average acceleration - * @param{in] tt the time the vehicle travels - * @return The amount of HC emitted by the given vehicle class [mg] - */ - static SUMOReal computeDefaultHC(SUMOEmissionClass c, double v, double a, SUMOReal tt); - - - /** @brief Returns the amount of emitted NOx given the vehicle type and default values for the state (in mg) - * @param[in] c The vehicle emission class - * @param[in] v The vehicle's average velocity - * @param[in] a The vehicle's average acceleration - * @param{in] tt the time the vehicle travels - * @return The amount of NOx emitted by the given vehicle class [mg] - */ - static SUMOReal computeDefaultNOx(SUMOEmissionClass c, double v, double a, SUMOReal tt); - - - /** @brief Returns the amount of emitted PMx given the vehicle type and default values for the state (in mg) - * @param[in] c The vehicle emission class - * @param[in] v The vehicle's average velocity - * @param[in] a The vehicle's average acceleration - * @param{in] tt the time the vehicle travels - * @return The amount of PMx emitted by the given vehicle class [mg] - */ - static SUMOReal computeDefaultPMx(SUMOEmissionClass c, double v, double a, SUMOReal tt); - - - /** @brief Returns the amount of fuel given the vehicle type and default values for the state (in ml) - * @param[in] c The vehicle emission class - * @param[in] v The vehicle's average velocity - * @param[in] a The vehicle's average acceleration - * @param{in] tt the time the vehicle travels - * @return The amount of fuel emitted by the given vehicle class [ml] - */ - static SUMOReal computeDefaultFuel(SUMOEmissionClass c, double v, double a, SUMOReal tt); - - -private: - /** @brief Computes the emitted pollutant amount using the given speed and acceleration - * - * As the functions are defining emissions(in g)/hour, the function's result is normed - * by 3.6 (seconds in an hour/1000) yielding mg/s. Negative acceleration - * results directly in zero emission. - * - * @param[in] c emission class for the function parameters to use - * @param[in] offset the offset in the function parameters for the correct pollutant - * @param[in] v The vehicle's current velocity - * @param[in] a The vehicle's current acceleration - */ - static inline SUMOReal compute(SUMOEmissionClass c, const int offset, double v, const double a) { - switch (c) { - case SVE_ZERO_EMISSIONS: - return 0.; - case SVE_UNKNOWN: - c = SVE_P_LDV_7_7; - break; - default: - break; - } - v *= 3.6; - if (c > 42) { - const double* f = myFunctionParameter[c - 42] + offset; - return (SUMOReal) MAX2((f[0] + f[3] * v + f[4] * v * v + f[5] * v * v * v) / 3.6, 0.); - } - if (a < 0.) { - return 0.; - } - const double* f = myFunctionParameter[c] + offset; - const double alpha = asin(a / 9.81) * 180. / PI; - return (SUMOReal) MAX2((f[0] + f[1] * alpha * v + f[2] * alpha * alpha * v + f[3] * v + f[4] * v * v + f[5] * v * v * v) / 3.6, 0.); - } - - -private: - /// @brief The function parameter - static double myFunctionParameter[42][36]; - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/IDSupplier.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/IDSupplier.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/IDSupplier.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/IDSupplier.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: IDSupplier.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: IDSupplier.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A class that generates enumerated and prefixed string-ids /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/IDSupplier.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/IDSupplier.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/IDSupplier.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/IDSupplier.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: IDSupplier.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: IDSupplier.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A class that generates enumerated and prefixed string-ids /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/InstancePool.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/InstancePool.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/InstancePool.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/InstancePool.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,116 +0,0 @@ -/****************************************************************************/ -/// @file InstancePool.h -/// @author Daniel Krajzewicz -/// @date Fri, 29.04.2005 -/// @version $Id: InstancePool.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// A pool of resuable instances -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef InstancePool_h -#define InstancePool_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class InstancePool - * @brief A pool of resuable instances - */ -template -class InstancePool { -public: - /** @brief Constructor - * - * @param[in] deleteOnQuit Information whether stored instances shall be deleted when this container is deleted - */ - InstancePool(bool deleteOnQuit) : myDeleteOnQuit(deleteOnQuit) { } - - - /// @brief Destructor - ~InstancePool() { - typedef typename std::vector::iterator It; - if (myDeleteOnQuit) { - for (It i = myFreeInstances.begin(); i != myFreeInstances.end(); i++) { - delete *i; - } - } - } - - - /** @brief Returns a free instance or 0 if no such exists - * - * If any free instance is stored, it is returned and removed from - * the storage. If no one is stored, 0 is returned. - * - * @return A free instance or 0 if no such exists - */ - T* getFreeInstance() { - if (myFreeInstances.size() == 0) { - return 0; - } else { - T* instance = myFreeInstances.back(); - myFreeInstances.pop_back(); - return instance; - } - } - - - /** @brief Adds a free, reusable instance - * - * @param[in] instance An instance to add - */ - void addFreeInstance(T* instance) { - myFreeInstances.push_back(instance); - } - - - /** @brief Adds some free, reusable instances - * - * @param[in] instances A vector of instances to add - */ - void addFreeInstances(const std::vector instances) { - std::copy(instances.begin(), instances.end(), - std::back_inserter(myFreeInstances)); - } - - -private: - /// @brief List of reusable instances - std::vector myFreeInstances; - - /// @brief Information whether the stored instances shall be deleted - bool myDeleteOnQuit; - - -}; - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -1,31 +1,24 @@ noinst_LIBRARIES = libcommon.a -EXTRA_DIST = StdDefs.h VectorHelper.h Command.h \ -NamedObjectCont.h StaticCommand.h RandomDistributor.h \ -SUMOAbstractRouter.h DijkstraRouterTT.h DijkstraRouterEffort.h \ -AStarRouter.h \ -SUMOVehicle.h \ -WrappingCommand.h ValueRetriever.h ValueSource.h \ -StringBijection.h - libcommon_a_SOURCES = AbstractMutex.h \ +Command.h \ FileHelpers.cpp FileHelpers.h \ -HelpersHarmonoise.cpp HelpersHarmonoise.h \ -HelpersHBEFA.cpp HelpersHBEFA.h \ -InstancePool.h \ IDSupplier.h IDSupplier.cpp \ -Named.h Parameterised.cpp Parameterised.h \ -StringTokenizer.cpp StringTokenizer.h \ -StringUtils.cpp StringUtils.h UtilExceptions.h \ MsgHandler.h MsgHandler.cpp \ -RGBColor.cpp RGBColor.h RandHelper.h RandHelper.cpp \ -SUMOTime.cpp SUMOTime.h \ -SystemFrame.cpp SystemFrame.h SysUtils.h SysUtils.cpp \ -SUMOVehicleParameter.cpp SUMOVehicleParameter.h \ -SUMOVTypeParameter.cpp SUMOVTypeParameter.h \ MsgRetrievingFunction.h \ +Named.h NamedObjectCont.h NamedRTree.h \ +Parameterised.cpp Parameterised.h \ +RandHelper.h RandHelper.cpp RandomDistributor.h \ +RGBColor.cpp RGBColor.h \ +StaticCommand.h StdDefs.h StdDefs.cpp \ +StringBijection.h \ +StringTokenizer.cpp StringTokenizer.h \ +StringUtils.cpp StringUtils.h \ +SUMOTime.cpp SUMOTime.h \ SUMOVehicleClass.cpp SUMOVehicleClass.h \ -ToString.h TplConvert.h \ -ValueTimeLine.h - - +SystemFrame.cpp SystemFrame.h \ +SysUtils.h SysUtils.cpp \ +ToString.h TplConvert.h UtilExceptions.h \ +ValueRetriever.h ValueSource.h \ +ValueTimeLine.h VectorHelper.h \ +WrappingCommand.h diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/common -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,41 +92,99 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libcommon_a_AR = $(AR) $(ARFLAGS) libcommon_a_LIBADD = -am_libcommon_a_OBJECTS = FileHelpers.$(OBJEXT) \ - HelpersHarmonoise.$(OBJEXT) HelpersHBEFA.$(OBJEXT) \ - IDSupplier.$(OBJEXT) Parameterised.$(OBJEXT) \ +am_libcommon_a_OBJECTS = FileHelpers.$(OBJEXT) IDSupplier.$(OBJEXT) \ + MsgHandler.$(OBJEXT) Parameterised.$(OBJEXT) \ + RandHelper.$(OBJEXT) RGBColor.$(OBJEXT) StdDefs.$(OBJEXT) \ StringTokenizer.$(OBJEXT) StringUtils.$(OBJEXT) \ - MsgHandler.$(OBJEXT) RGBColor.$(OBJEXT) RandHelper.$(OBJEXT) \ - SUMOTime.$(OBJEXT) SystemFrame.$(OBJEXT) SysUtils.$(OBJEXT) \ - SUMOVehicleParameter.$(OBJEXT) SUMOVTypeParameter.$(OBJEXT) \ - SUMOVehicleClass.$(OBJEXT) + SUMOTime.$(OBJEXT) SUMOVehicleClass.$(OBJEXT) \ + SystemFrame.$(OBJEXT) SysUtils.$(OBJEXT) libcommon_a_OBJECTS = $(am_libcommon_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libcommon_a_SOURCES) DIST_SOURCES = $(libcommon_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -90,6 +193,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -116,9 +220,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -129,10 +237,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -227,33 +331,28 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libcommon.a -EXTRA_DIST = StdDefs.h VectorHelper.h Command.h \ -NamedObjectCont.h StaticCommand.h RandomDistributor.h \ -SUMOAbstractRouter.h DijkstraRouterTT.h DijkstraRouterEffort.h \ -AStarRouter.h \ -SUMOVehicle.h \ -WrappingCommand.h ValueRetriever.h ValueSource.h \ -StringBijection.h - libcommon_a_SOURCES = AbstractMutex.h \ +Command.h \ FileHelpers.cpp FileHelpers.h \ -HelpersHarmonoise.cpp HelpersHarmonoise.h \ -HelpersHBEFA.cpp HelpersHBEFA.h \ -InstancePool.h \ IDSupplier.h IDSupplier.cpp \ -Named.h Parameterised.cpp Parameterised.h \ -StringTokenizer.cpp StringTokenizer.h \ -StringUtils.cpp StringUtils.h UtilExceptions.h \ MsgHandler.h MsgHandler.cpp \ -RGBColor.cpp RGBColor.h RandHelper.h RandHelper.cpp \ -SUMOTime.cpp SUMOTime.h \ -SystemFrame.cpp SystemFrame.h SysUtils.h SysUtils.cpp \ -SUMOVehicleParameter.cpp SUMOVehicleParameter.h \ -SUMOVTypeParameter.cpp SUMOVTypeParameter.h \ MsgRetrievingFunction.h \ +Named.h NamedObjectCont.h NamedRTree.h \ +Parameterised.cpp Parameterised.h \ +RandHelper.h RandHelper.cpp RandomDistributor.h \ +RGBColor.cpp RGBColor.h \ +StaticCommand.h StdDefs.h StdDefs.cpp \ +StringBijection.h \ +StringTokenizer.cpp StringTokenizer.h \ +StringUtils.cpp StringUtils.h \ +SUMOTime.cpp SUMOTime.h \ SUMOVehicleClass.cpp SUMOVehicleClass.h \ -ToString.h TplConvert.h \ -ValueTimeLine.h +SystemFrame.cpp SystemFrame.h \ +SysUtils.h SysUtils.cpp \ +ToString.h TplConvert.h UtilExceptions.h \ +ValueRetriever.h ValueSource.h \ +ValueTimeLine.h VectorHelper.h \ +WrappingCommand.h all: all-am @@ -292,10 +391,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libcommon.a: $(libcommon_a_OBJECTS) $(libcommon_a_DEPENDENCIES) - -rm -f libcommon.a - $(libcommon_a_AR) libcommon.a $(libcommon_a_OBJECTS) $(libcommon_a_LIBADD) - $(RANLIB) libcommon.a + +libcommon.a: $(libcommon_a_OBJECTS) $(libcommon_a_DEPENDENCIES) $(EXTRA_libcommon_a_DEPENDENCIES) + $(AM_V_at)-rm -f libcommon.a + $(AM_V_AR)$(libcommon_a_AR) libcommon.a $(libcommon_a_OBJECTS) $(libcommon_a_LIBADD) + $(AM_V_at)$(RANLIB) libcommon.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -304,42 +404,39 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileHelpers.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HelpersHBEFA.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HelpersHarmonoise.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IDSupplier.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MsgHandler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Parameterised.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RGBColor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RandHelper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOTime.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOVTypeParameter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOVehicleClass.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOVehicleParameter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StdDefs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StringTokenizer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StringUtils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SysUtils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SystemFrame.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -347,26 +444,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -378,15 +464,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -395,6 +477,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -443,10 +540,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -531,18 +633,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/MsgHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/MsgHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/MsgHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/MsgHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Tue, 17 Jun 2003 -/// @version $Id: MsgHandler.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MsgHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Retrieves messages about the process and gives them further to output /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -162,9 +162,7 @@ if (myLock != 0) { myLock->lock(); } - RetrieverVector::iterator i = - find(myRetrievers.begin(), myRetrievers.end(), retriever); - if (i == myRetrievers.end()) { + if (!isRetriever(retriever)) { myRetrievers.push_back(retriever); } if (myLock != 0) { @@ -189,6 +187,12 @@ } +bool +MsgHandler::isRetriever(OutputDevice* retriever) const { + return find(myRetrievers.begin(), myRetrievers.end(), retriever) != myRetrievers.end(); +} + + void MsgHandler::initOutputOptions() { // initialize console properly diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/MsgHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/MsgHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/MsgHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/MsgHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file MsgHandler.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Tue, 17 Jun 2003 -/// @version $Id: MsgHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MsgHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Retrieves messages about the process and gives them further to output /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -100,9 +101,12 @@ /// Adds a further retriever to the instance responsible for a certain msg type void addRetriever(OutputDevice* retriever); - /// Removes the retriever from the + /// Removes the retriever from the handler void removeRetriever(OutputDevice* retriever); + /// Returns whether the given output device retrieves messages from the handler + bool isRetriever(OutputDevice* retriever) const; + /// Returns the information whether any messages were added bool wasInformed() const; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/MsgRetrievingFunction.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/MsgRetrievingFunction.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/MsgRetrievingFunction.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/MsgRetrievingFunction.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 24 Oct 2003 -/// @version $Id: MsgRetrievingFunction.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MsgRetrievingFunction.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Encapsulates an object's method for using it as a message retriever /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/Named.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/Named.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/Named.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/Named.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: Named.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Named.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Base class for objects which have an id. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -77,6 +77,13 @@ } }; + /// @brief Function-object for stable sorting of objects acting like Named without being derived (SUMOVehicle) + template + struct NamedLikeComparatorIdLess { + bool operator()(const NamedLike* const a, const NamedLike* const b) const { + return a->getID() < b->getID(); + } + }; /** @class StoringVisitor diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/NamedObjectCont.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/NamedObjectCont.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/NamedObjectCont.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/NamedObjectCont.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file NamedObjectCont.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: NamedObjectCont.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NamedObjectCont.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A map of named object pointers /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/NamedRTree.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/NamedRTree.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/NamedRTree.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/NamedRTree.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,133 @@ +/****************************************************************************/ +/// @file NamedRTree.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date 27.10.2008 +/// @version $Id: NamedRTree.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A RT-tree for efficient storing of SUMO's Named objects +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef NamedRTree_h +#define NamedRTree_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include + + +// specialized implementation for speedup and avoiding warnings +#define NAMED_RTREE_QUAL RTree + +template<> +inline float NAMED_RTREE_QUAL::RectSphericalVolume(Rect* a_rect) { + ASSERT(a_rect); + const float extent0 = a_rect->m_max[0] - a_rect->m_min[0]; + const float extent1 = a_rect->m_max[1] - a_rect->m_min[1]; + return .78539816f * (extent0 * extent0 + extent1 * extent1); +} + +template<> +inline NAMED_RTREE_QUAL::Rect NAMED_RTREE_QUAL::CombineRect(Rect* a_rectA, Rect* a_rectB) { + ASSERT(a_rectA && a_rectB); + Rect newRect; + newRect.m_min[0] = rtree_min(a_rectA->m_min[0], a_rectB->m_min[0]); + newRect.m_max[0] = rtree_max(a_rectA->m_max[0], a_rectB->m_max[0]); + newRect.m_min[1] = rtree_min(a_rectA->m_min[1], a_rectB->m_min[1]); + newRect.m_max[1] = rtree_max(a_rectA->m_max[1], a_rectB->m_max[1]); + return newRect; +} + +// =========================================================================== +// class definitions +// =========================================================================== +/** @class NamedRTree + * @brief A RT-tree for efficient storing of SUMO's Named objects + * + * This class specialises the used RT-tree implementation from "rttree.h". + * It stores names of "Named"-objects. + * @see Named + */ +class NamedRTree : private NAMED_RTREE_QUAL { +public: + /// @brief Constructor + NamedRTree() : NAMED_RTREE_QUAL(&Named::addTo) { + } + + + /// @brief Destructor + ~NamedRTree() { + } + + + /** @brief Insert entry + * @param a_min Min of bounding rect + * @param a_max Max of bounding rect + * @param a_data The instance of a Named-object to add (the ID is added) + * @see RTree::Insert + */ + void Insert(const float a_min[2], const float a_max[2], Named* const& a_data) { + NAMED_RTREE_QUAL::Insert(a_min, a_max, a_data); + } + + + /** @brief Remove entry + * @param a_min Min of bounding rect + * @param a_max Max of bounding rect + * @param a_data The instance of a Named-object to remove + * @see RTree::Remove + */ + void Remove(const float a_min[2], const float a_max[2], Named* const& a_data) { + NAMED_RTREE_QUAL::Remove(a_min, a_max, a_data); + } + + + /** @brief Remove all enrties + * @see RTree::RemoveAll + */ + void RemoveAll() { + NAMED_RTREE_QUAL::RemoveAll(); + } + + + /** @brief Find all within search rectangle + * @param a_min Min of search bounding rect + * @param a_max Max of search bounding rect + * @param a_searchResult Search result array. Caller should set grow size. Function will reset, not append to array. + * @param a_resultCallback Callback function to return result. Callback should return 'true' to continue searching + * @param a_context User context to pass as parameter to a_resultCallback + * @return Returns the number of entries found + * @see RTree::Search + */ + int Search(const float a_min[2], const float a_max[2], const Named::StoringVisitor& c) const { + return NAMED_RTREE_QUAL::Search(a_min, a_max, c); + } + + +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/Parameterised.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/Parameterised.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/Parameterised.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/Parameterised.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file Parameterised.cpp /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: Parameterised.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Parameterised.cpp 18137 2015-03-24 15:12:38Z behrisch $ /// -// A RGB-color definition +// A super class for objects with additional parameters /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/Parameterised.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/Parameterised.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/Parameterised.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/Parameterised.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @author Michael Behrisch +/// @author Melanie Knocke /// @date Sept 2002 -/// @version $Id: Parameterised.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Parameterised.h 18137 2015-03-24 15:12:38Z behrisch $ /// -// An upper class for objects with additional parameters +// A super class for objects with additional parameters /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/RandHelper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/RandHelper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/RandHelper.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/RandHelper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Tue, 29.05.2005 -/// @version $Id: RandHelper.cpp 14489 2013-08-23 12:33:20Z behrisch $ +/// @version $Id: RandHelper.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/RandHelper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/RandHelper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/RandHelper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/RandHelper.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file RandHelper.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Fri, 29.04.2005 -/// @version $Id: RandHelper.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RandHelper.h 18096 2015-03-17 09:50:59Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -88,8 +89,18 @@ } /// @brief Access to a random number from a normal distribution - static inline SUMOReal randNorm(SUMOReal mean, SUMOReal variance, MTRand& rng = myRandomNumberGenerator) { - return (SUMOReal) rng.randNorm(mean, variance); + static inline SUMOReal randNorm(SUMOReal mean, SUMOReal variance, MTRand* rng = 0) { + if (rng == 0) { + rng = &myRandomNumberGenerator; + } + // Polar method to avoid cosine + double u, q; + do { + u = rng->randExc(2.0) - 1; + const double v = rng->randExc(2.0) - 1; + q = u * u + v * v; + } while (q == 0.0 || q >= 1.0); + return (SUMOReal)(mean + variance * u * sqrt(-2 * log(q) / q)); } /// @brief Returns a random element from the given vector diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/RandomDistributor.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/RandomDistributor.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/RandomDistributor.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/RandomDistributor.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file RandomDistributor.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date 2005-09-15 -/// @version $Id: RandomDistributor.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RandomDistributor.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Represents a generic random distribution /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -54,19 +55,12 @@ template class RandomDistributor { public: - typedef void(*Operation)(const T); - static void doNothing(const T) {} - /** @brief Constructor for an empty distribution * @param[in] maximumSize The maximum size to maintain * older entrys will be removed when adding more than the maximumSize */ - RandomDistributor(unsigned int maximumSize = std::numeric_limits::max(), - Operation operation = &doNothing) : - myProb(0), - myMaximumSize(maximumSize), - myInsertionIndex(0), - myOperation(operation) + RandomDistributor() : + myProb(0) {} /// @brief Destructor @@ -81,27 +75,22 @@ * * @param[in] prob The probability assigned to the value * @param[in] val The value to add to the distribution + * @return true if a new value was added, false if just the probability of an existing one was updated */ - void add(SUMOReal prob, T val, bool checkDuplicates = true) { + bool add(SUMOReal prob, T val, bool checkDuplicates = true) { assert(prob >= 0); myProb += prob; if (checkDuplicates) { for (size_t i = 0; i < myVals.size(); i++) { if (val == myVals[i]) { myProbs[i] += prob; - return; + return false; } } } - if (myVals.size() < myMaximumSize) { - myVals.push_back(val); - myProbs.push_back(prob); - } else { - myOperation(myVals[myInsertionIndex]); - myVals[myInsertionIndex] = val; - myProbs[myInsertionIndex] = prob; - myInsertionIndex = (myInsertionIndex + 1) % myMaximumSize; - } + myVals.push_back(val); + myProbs.push_back(prob); + return true; } /** @brief Draw a sample of the distribution. @@ -138,9 +127,6 @@ /// @brief Clears the distribution void clear() { myProb = 0; - for (size_t i = 0; i < myVals.size(); i++) { - myOperation(myVals[i]); - } myVals.clear(); myProbs.clear(); } @@ -170,12 +156,6 @@ private: /// @brief the total probability SUMOReal myProb; - /// @brief the maximumSize of the distribution that shall be maintained - unsigned int myMaximumSize; - /// @brief the index at which the next element shall be inserted if maximumSize is exceeded - unsigned int myInsertionIndex; - /// @brief the operation to perform with replaced elements - Operation myOperation; /// @brief the members (acts as a ring buffer if myMaximumSize is reached) std::vector myVals; /// @brief the corresponding probabilities (acts as a ring buffer if myMaximumSize is reached) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/RGBColor.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/RGBColor.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/RGBColor.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/RGBColor.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Sept 2002 -/// @version $Id: RGBColor.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RGBColor.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A RGB-color definition /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -32,6 +32,7 @@ #endif #include +#include #include #include #include @@ -55,6 +56,7 @@ const RGBColor RGBColor::YELLOW = RGBColor(255, 255, 0, 255); const RGBColor RGBColor::CYAN = RGBColor(0, 255, 255, 255); const RGBColor RGBColor::MAGENTA = RGBColor(255, 0, 255, 255); +const RGBColor RGBColor::ORANGE = RGBColor(255, 128, 0, 255); const RGBColor RGBColor::WHITE = RGBColor(255, 255, 255, 255); const RGBColor RGBColor::BLACK = RGBColor(0, 0, 0, 255); const RGBColor RGBColor::GREY = RGBColor(128, 128, 128, 255); @@ -110,6 +112,9 @@ if (col == RGBColor::MAGENTA) { return os << "magenta"; } + if (col == RGBColor::ORANGE) { + return os << "orange"; + } if (col == RGBColor::WHITE) { return os << "white"; } @@ -142,12 +147,25 @@ RGBColor -RGBColor::changedBrightness(const char change) { - const unsigned char red = static_cast(MIN2(MAX2(myRed + change, 0), 255)); - const unsigned char blue = static_cast(MIN2(MAX2(myBlue + change, 0), 255)); - const unsigned char green = static_cast(MIN2(MAX2(myGreen + change, 0), 255)); - return RGBColor(red, green, blue, myAlpha); - +RGBColor::changedBrightness(int change, int toChange) const { + const unsigned char red = (unsigned char)(MIN2(MAX2(myRed + change, 0), 255)); + const unsigned char blue = (unsigned char)(MIN2(MAX2(myBlue + change, 0), 255)); + const unsigned char green = (unsigned char)(MIN2(MAX2(myGreen + change, 0), 255)); + int changed = ((int)red - (int)myRed) + ((int)blue - (int)myBlue) + ((int)green - (int)myGreen); + const RGBColor result(red, green, blue, myAlpha); + if (changed == toChange * change) { + return result; + } else if (changed == 0) { + return result; + } else { + const int maxedColors = (red != myRed + change ? 1 : 0) + (blue != myBlue + change ? 1 : 0) + (green != myGreen + change ? 1 : 0); + if (maxedColors == 3) { + return result; + } else { + const int toChangeNext = 3 - maxedColors; + return result.changedBrightness((int)((toChange * change - changed) / toChangeNext), toChangeNext); + } + } } RGBColor @@ -171,6 +189,9 @@ if (coldef == "magenta") { return MAGENTA; } + if (coldef == "orange") { + return ORANGE; + } if (coldef == "white") { return WHITE; } @@ -261,10 +282,10 @@ if (weight > 1) { weight = 1; } - const unsigned char r = minColor.myRed + static_cast((maxColor.myRed - minColor.myRed) * weight); - const unsigned char g = minColor.myGreen + static_cast((maxColor.myGreen - minColor.myGreen) * weight); - const unsigned char b = minColor.myBlue + static_cast((maxColor.myBlue - minColor.myBlue) * weight); - const unsigned char a = minColor.myAlpha + static_cast((maxColor.myAlpha - minColor.myAlpha) * weight); + const unsigned char r = (unsigned char)((int)minColor.myRed + (((int)maxColor.myRed - (int)minColor.myRed) * weight)); + const unsigned char g = (unsigned char)((int)minColor.myGreen + (((int)maxColor.myGreen - (int)minColor.myGreen) * weight)); + const unsigned char b = (unsigned char)((int)minColor.myBlue + (((int)maxColor.myBlue - (int)minColor.myBlue) * weight)); + const unsigned char a = (unsigned char)((int)minColor.myAlpha + (((int)maxColor.myAlpha - (int)minColor.myAlpha) * weight)); return RGBColor(r, g, b, a); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/RGBColor.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/RGBColor.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/RGBColor.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/RGBColor.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: RGBColor.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: RGBColor.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A RGB-color definition /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -124,9 +124,10 @@ /** @brief Returns a new color with altered brightness * @param[in] change The absolute change applied to all channels (within bounds) + * @param[in] change The number of colors to change * @return The new color */ - RGBColor changedBrightness(const char change); + RGBColor changedBrightness(int change, int toChange = 3) const; /** @brief Parses a color information @@ -191,6 +192,7 @@ static const RGBColor YELLOW; static const RGBColor CYAN; static const RGBColor MAGENTA; + static const RGBColor ORANGE; static const RGBColor WHITE; static const RGBColor BLACK; static const RGBColor GREY; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StaticCommand.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StaticCommand.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StaticCommand.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StaticCommand.h 2015-04-17 00:20:29.000000000 +0000 @@ -7,8 +7,8 @@ /// // A wrapper for a Command function /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StdDefs.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StdDefs.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StdDefs.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StdDefs.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,103 @@ +/****************************************************************************/ +/// @file StdDefs.cpp +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @author Laura Bieker +/// @date 2014-01-07 +/// @version $Id: StdDefs.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2014-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#include "RGBColor.h" +#include "StdDefs.h" + + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + +/* ------------------------------------------------------------------------- + * color constants for link states + * ----------------------------------------------------------------------- */ +const RGBColor SUMO_color_TL_GREEN_MAJOR(0, 255, 0); +const RGBColor SUMO_color_TL_GREEN_MINOR(0, 179, 0); +const RGBColor SUMO_color_TL_RED(255, 0, 0); +const RGBColor SUMO_color_TL_REDYELLOW(255, 128, 0); +const RGBColor SUMO_color_TL_YELLOW_MAJOR(255, 255, 0); +const RGBColor SUMO_color_TL_YELLOW_MINOR(255, 255, 0); +const RGBColor SUMO_color_TL_OFF_BLINKING(128, 64, 0); +const RGBColor SUMO_color_TL_OFF_NOSIGNAL(0, 255, 255); +const RGBColor SUMO_color_MAJOR(255, 255, 255); +const RGBColor SUMO_color_MINOR(51, 51, 51); +const RGBColor SUMO_color_EQUAL(128, 128, 128); +const RGBColor SUMO_color_STOP(128, 0, 128); +const RGBColor SUMO_color_ALLWAY_STOP(0, 0, 192); +const RGBColor SUMO_color_DEADEND(0, 0, 0); + +const RGBColor& getLinkColor(const LinkState& ls) { + switch (ls) { + case LINKSTATE_TL_GREEN_MAJOR: + return SUMO_color_TL_GREEN_MAJOR; + case LINKSTATE_TL_GREEN_MINOR: + return SUMO_color_TL_GREEN_MINOR; + case LINKSTATE_TL_RED: + return SUMO_color_TL_RED; + case LINKSTATE_TL_REDYELLOW: + return SUMO_color_TL_REDYELLOW; + case LINKSTATE_TL_YELLOW_MAJOR: + return SUMO_color_TL_YELLOW_MAJOR; + case LINKSTATE_TL_YELLOW_MINOR: + return SUMO_color_TL_YELLOW_MINOR; + case LINKSTATE_TL_OFF_BLINKING: + return SUMO_color_TL_OFF_BLINKING; + case LINKSTATE_TL_OFF_NOSIGNAL: + return SUMO_color_TL_OFF_NOSIGNAL; + case LINKSTATE_MAJOR: + return SUMO_color_MAJOR; + case LINKSTATE_MINOR: + return SUMO_color_MINOR; + case LINKSTATE_EQUAL: + return SUMO_color_EQUAL; + case LINKSTATE_STOP: + return SUMO_color_STOP; + case LINKSTATE_ALLWAY_STOP: + return SUMO_color_ALLWAY_STOP; + case LINKSTATE_DEADEND: + return SUMO_color_DEADEND; + default: + throw ProcessError("No color defined for LinkState '" + std::string(ls, 1) + "'"); + } +} + + +const std::string getBuildName(const std::string& version) { + std::string result = version; +#ifdef HAVE_INTERNAL + result += "I"; +#endif +#ifdef _DEBUG + result += "D"; +#endif + return result; +} + +bool gDebugFlag1 = false; +bool gDebugFlag2 = false; + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StdDefs.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StdDefs.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StdDefs.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StdDefs.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Laura Bieker /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Fri, 29.04.2005 -/// @version $Id: StdDefs.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: StdDefs.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -32,9 +33,13 @@ #include #endif +#include + /* avoiding compiler warning unreferenced parameter */ #define UNUSED_PARAMETER(x) ((void)(x)) +class RGBColor; + /* ------------------------------------------------------------------------- * some constant defaults used by SUMO * ----------------------------------------------------------------------- */ @@ -48,6 +53,12 @@ /// @brief the speed threshold at which vehicles are considered as halting const SUMOReal SUMO_const_haltingSpeed = (SUMOReal) 0.1; +/* @brief map from LinkState to color constants (see above) + */ +const RGBColor& getLinkColor(const LinkState& ls); + +/// @brief attach some build flags to the version string +const std::string getBuildName(const std::string& version); /* ------------------------------------------------------------------------- * templates for mathematical functions missing in some c++-implementations @@ -100,6 +111,9 @@ return d != d; } +/// @brief global utility flags for debugging +extern bool gDebugFlag1; +extern bool gDebugFlag2; #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StringBijection.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StringBijection.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StringBijection.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StringBijection.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file StringBijection.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @author Jakob Erdmann /// @date Mar 2011 -/// @version $Id: StringBijection.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: StringBijection.h 18095 2015-03-17 09:39:00Z behrisch $ /// -// Bijective Container between string and something else +// Bidirectional map between string and something else /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -40,7 +42,10 @@ // class definitions // =========================================================================== /** - * Template container for maintaining a bijection between strings and something else + * Template container for maintaining a bidirectional map between strings and something else + * It is not always a bijection since it allows for duplicate entries on both sides if either + * checkDuplicates is set to false in the constructor or the insert function or if + * the addAlias function is used. */ template< class T > @@ -64,32 +69,52 @@ StringBijection() {} - StringBijection(Entry entries[], T terminatorKey) { + StringBijection(Entry entries[], T terminatorKey, bool checkDuplicates = true) { int i = 0; do { - insert(entries[i].str, entries[i].key); + insert(entries[i].str, entries[i].key, checkDuplicates); } while (entries[i++].key != terminatorKey); } - void insert(const std::string str, const T key) { + void insert(const std::string str, const T key, bool checkDuplicates = true) { + if (checkDuplicates) { + if (has(key)) { + // cannot use toString(key) because that might create an infinite loop + throw InvalidArgument("Duplicate key."); + } + if (hasString(str)) { + throw InvalidArgument("Duplicate string '" + str + "'."); + } + } myString2T[str] = key; myT2String[key] = str; } - T get(const std::string& str) { + void addAlias(const std::string str, const T key) { + myString2T[str] = key; + } + + + void remove(const std::string str, const T key) { + myString2T.erase(str); + myT2String.erase(key); + } + + + T get(const std::string& str) const { if (hasString(str)) { - return myString2T[str]; + return myString2T.find(str)->second; } else { throw InvalidArgument("String '" + str + "' not found."); } } - const std::string& getString(const T key) { + const std::string& getString(const T key) const { if (has(key)) { - return myT2String[key]; + return myT2String.find(key)->second; } else { // cannot use toString(key) because that might create an infinite loop throw InvalidArgument("Key not found."); @@ -97,12 +122,12 @@ } - bool hasString(const std::string& str) { + bool hasString(const std::string& str) const { return myString2T.count(str) != 0; } - bool has(const T key) { + bool has(const T key) const { return myT2String.count(key) != 0; } @@ -122,6 +147,14 @@ } + void addKeysInto(std::vector& list) const { + typename std::map::const_iterator it; // learn something new every day + for (it = myT2String.begin(); it != myT2String.end(); it++) { + list.push_back(it->first); + } + } + + private: std::map myString2T; std::map myT2String; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StringTokenizer.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StringTokenizer.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StringTokenizer.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StringTokenizer.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date ? -/// @version $Id: StringTokenizer.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: StringTokenizer.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A java-style StringTokenizer for c++ (stl) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StringTokenizer.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StringTokenizer.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StringTokenizer.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StringTokenizer.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date ? -/// @version $Id: StringTokenizer.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: StringTokenizer.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A java-style StringTokenizer for c++ (stl) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StringUtils.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StringUtils.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StringUtils.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StringUtils.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Laura Bieker /// @author Michael Behrisch /// @date unknown -/// @version $Id: StringUtils.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: StringUtils.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Some static methods for string processing /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -53,7 +53,7 @@ // method definitions // =========================================================================== std::string -StringUtils::prune(std::string str) { +StringUtils::prune(const std::string& str) { const size_t endpos = str.find_last_not_of(" \t\n\r"); if (std::string::npos != endpos) { const size_t startpos = str.find_first_not_of(" \t\n\r"); @@ -75,18 +75,35 @@ std::string +StringUtils::latin1_to_utf8(std::string str) { + // inspired by http://stackoverflow.com/questions/4059775/convert-iso-8859-1-strings-to-utf-8-in-c-c + std::string result; + for (size_t i = 0; i < str.length(); i++) { + const unsigned char c = str[i]; + if (c < 128) { + result += c; + } else { + result += (char)(0xc2 + (c > 0xbf)); + result += (char)((c & 0x3f) + 0x80); + } + } + return result; +} + + +std::string StringUtils::convertUmlaute(std::string str) { - str = replace(str, "ä", "ae"); - str = replace(str, "Ä", "Ae"); - str = replace(str, "ö", "oe"); - str = replace(str, "Ö", "Oe"); - str = replace(str, "ü", "ue"); - str = replace(str, "Ü", "Ue"); - str = replace(str, "ß", "ss"); - str = replace(str, "É", "E"); - str = replace(str, "é", "e"); - str = replace(str, "È", "E"); - str = replace(str, "è", "e"); + str = replace(str, "\xE4", "ae"); + str = replace(str, "\xC4", "Ae"); + str = replace(str, "\xF6", "oe"); + str = replace(str, "\xD6", "Oe"); + str = replace(str, "\xFC", "ue"); + str = replace(str, "\xDC", "Ue"); + str = replace(str, "\xDF", "ss"); + str = replace(str, "\xC9", "E"); + str = replace(str, "\xE9", "e"); + str = replace(str, "\xC8", "E"); + str = replace(str, "\xE8", "e"); return str; } @@ -130,6 +147,22 @@ } +bool +StringUtils::startsWith(const std::string& str, const std::string prefix) { + return str.compare(0, prefix.length(), prefix) == 0; +} + + +bool +StringUtils::endsWith(const std::string& str, const std::string suffix) { + if (str.length() >= suffix.length()) { + return str.compare(str.length() - suffix.length(), suffix.length(), suffix) == 0; + } else { + return false; + } +} + + std::string StringUtils::escapeXML(const std::string& orig) { std::string result = replace(orig, "&", "&"); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StringUtils.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StringUtils.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/StringUtils.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/StringUtils.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date unknown -/// @version $Id: StringUtils.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: StringUtils.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Some static methods for string processing /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,11 +45,14 @@ class StringUtils { public: /// Removes trailing and leading whitechars - static std::string prune(std::string str); + static std::string prune(const std::string& str); /// Transfers the content to lower case static std::string to_lower_case(std::string str); + /// Transfers from Latin 1 (ISO-8859-1) to UTF-8 + static std::string latin1_to_utf8(std::string str); + /// Converts german "Umlaute" to their latin-version static std::string convertUmlaute(std::string str); @@ -61,6 +64,12 @@ /// Builds a time string (hh:mm:ss) from the given seconds static std::string toTimeString(int time); + /// Checks whether a given string starts with the prefix + static bool startsWith(const std::string& str, const std::string prefix); + + /// Checks whether a given string ends with the suffix + static bool endsWith(const std::string& str, const std::string suffix); + /** * @brief Replaces the standard escapes by their XML entities. * diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOAbstractRouter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOAbstractRouter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOAbstractRouter.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOAbstractRouter.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,142 +0,0 @@ -/****************************************************************************/ -/// @file SUMOAbstractRouter.h -/// @author Daniel Krajzewicz -/// @author Michael Behrisch -/// @date 25.Jan 2006 -/// @version $Id: SUMOAbstractRouter.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// The dijkstra-router -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef SUMOAbstractRouter_h -#define SUMOAbstractRouter_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class SUMOAbstractRouter - * The interface for routing the vehicles over the network. - */ -template -class SUMOAbstractRouter { -public: - /// Constructor - SUMOAbstractRouter(const std::string& type): - myType(type), - myQueryVisits(0), - myNumQueries(0), - myQueryStartTime(0), - myQueryTimeSum(0) - { } - - /// Destructor - virtual ~SUMOAbstractRouter() { - if (myNumQueries > 0) { - WRITE_MESSAGE(myType + " answered " + toString(myNumQueries) + " queries and explored " + toString(double(myQueryVisits) / myNumQueries) + " edges on average."); - WRITE_MESSAGE(myType + " spent " + toString(myQueryTimeSum) + " ms answering queries (" + toString(double(myQueryTimeSum) / myNumQueries) + " ms on average)."); - } - } - - /** @brief Builds the route between the given edges using the minimum effort at the given time - The definition of the effort depends on the wished routing scheme */ - virtual void compute(const E* from, const E* to, const V* const vehicle, - SUMOTime msTime, std::vector& into) = 0; - - virtual SUMOReal recomputeCosts(const std::vector& edges, - const V* const v, SUMOTime msTime) const = 0; - - // interface extension for BulkStarRouter - virtual void prepare(const E*, const V*, bool) { - assert(false); - } - - inline void startQuery() { - myNumQueries++; - myQueryStartTime = SysUtils::getCurrentMillis(); - } - - inline void endQuery(int visits) { - myQueryVisits += visits; - myQueryTimeSum += (SysUtils::getCurrentMillis() - myQueryStartTime); - } - -private: - /// @brief the type of this router - const std::string myType; - /// @brief counters for performance logging - int myQueryVisits; - int myNumQueries; - /// @brief the time spent querying in milliseconds - long myQueryStartTime; - long myQueryTimeSum; -private: - /// @brief Invalidated assignment operator - SUMOAbstractRouter& operator=(const SUMOAbstractRouter& s); -}; - - -template -struct prohibited_withRestrictions { -public: - inline bool operator()(const E* edge, const V* vehicle) const { - if (std::find(myProhibited.begin(), myProhibited.end(), edge) != myProhibited.end()) { - return true; - } - return edge->prohibits(vehicle); - } - - void prohibit(const std::vector& toProhibit) { - myProhibited = toProhibit; - } - -protected: - std::vector myProhibited; - -}; - -template -struct prohibited_noRestrictions { -public: - inline bool operator()(const E*, const V*) const { - return false; - } -}; - - - - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOTime.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOTime.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOTime.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOTime.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Fri, 29.04.2005 -/// @version $Id: SUMOTime.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOTime.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Variables, methods, and tools for internal time representation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -49,8 +49,8 @@ double time; std::istringstream buf(r); buf >> time; - if (buf.fail()) { - throw ProcessError("Input string '" + r + "' cannot be parsed as a time"); + if (buf.fail() || time > STEPS2TIME(SUMOTime_MAX)) { + throw ProcessError("Input string '" + r + "' is not a valid number or exceeds the time value range."); } else { return TIME2STEPS(time); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOTime.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOTime.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOTime.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOTime.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Fri, 29.04.2005 -/// @version $Id: SUMOTime.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOTime.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Variables, methods, and tools for internal time representation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -65,6 +65,7 @@ #define STEPS2TIME(x) (static_cast(x)) #define TIME2STEPS(x) (static_cast(x)) #define STEPFLOOR(x) (x) +#define STEPS2MS(x) ((x)*1000) #else @@ -88,9 +89,11 @@ #define STEPS2TIME(x) (static_cast((x)/1000.)) #define TIME2STEPS(x) (static_cast((x)*1000)) #define STEPFLOOR(x) (int(x/DELTA_T)*DELTA_T) +#define STEPS2MS(x) (x) #endif +#define SIMTIME STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep()) // =========================================================================== // method declarations diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOVehicleClass.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOVehicleClass.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOVehicleClass.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOVehicleClass.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date 2006-01-24 -/// @version $Id: SUMOVehicleClass.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOVehicleClass.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Definitions of SUMO vehicle classes and helper functions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -49,38 +49,53 @@ // static members // =========================================================================== StringBijection::Entry sumoVehicleClassStringInitializer[] = { - {"unknown", SVC_UNKNOWN}, + {"ignoring", SVC_IGNORING}, {"private", SVC_PRIVATE}, - {"public_transport", SVC_PUBLIC_TRANSPORT}, - {"public_emergency", SVC_PUBLIC_EMERGENCY}, - {"public_authority", SVC_PUBLIC_AUTHORITY}, - {"public_army", SVC_PUBLIC_ARMY}, + {"public_emergency", SVC_EMERGENCY}, // !!! deprecated + {"emergency", SVC_EMERGENCY}, + {"public_authority", SVC_AUTHORITY}, // !!! deprecated + {"authority", SVC_AUTHORITY}, + {"public_army", SVC_ARMY}, // !!! deprecated + {"army", SVC_ARMY}, {"vip", SVC_VIP}, - {"ignoring", SVC_IGNORING}, {"passenger", SVC_PASSENGER}, {"hov", SVC_HOV}, {"taxi", SVC_TAXI}, + {"public_transport", SVC_BUS}, // !!! deprecated {"bus", SVC_BUS}, + {"coach", SVC_COACH}, {"delivery", SVC_DELIVERY}, - {"transport", SVC_TRANSPORT}, - {"lightrail", SVC_LIGHTRAIL}, - {"cityrail", SVC_CITYRAIL}, - {"rail_slow", SVC_RAIL_SLOW}, - {"rail_fast", SVC_RAIL_FAST}, + {"transport", SVC_TRUCK}, + {"truck", SVC_TRUCK}, + {"trailer", SVC_TRAILER}, + {"lightrail", SVC_TRAM}, // !!! deprecated + {"tram", SVC_TRAM}, + {"cityrail", SVC_RAIL_URBAN}, // !!! deprecated + {"rail_urban", SVC_RAIL_URBAN}, + {"rail_slow", SVC_RAIL}, // !!! deprecated + {"rail", SVC_RAIL}, + {"rail_fast", SVC_RAIL_ELECTRIC}, // !!! deprecated + {"rail_electric", SVC_RAIL_ELECTRIC}, {"motorcycle", SVC_MOTORCYCLE}, + {"moped", SVC_MOPED}, {"bicycle", SVC_BICYCLE}, {"pedestrian", SVC_PEDESTRIAN}, + {"evehicle", SVC_E_VEHICLE}, + {"ship", SVC_SHIP}, {"custom1", SVC_CUSTOM1}, {"custom2", SVC_CUSTOM2} }; StringBijection SumoVehicleClassStrings( - sumoVehicleClassStringInitializer, SVC_CUSTOM2); + sumoVehicleClassStringInitializer, SVC_CUSTOM2, false); + +std::set deprecatedVehicleClassesSeen; StringBijection::Entry sumoVehicleShapeStringInitializer[] = { {"pedestrian", SVS_PEDESTRIAN}, {"bicycle", SVS_BICYCLE}, + {"moped", SVS_MOPED}, {"motorcycle", SVS_MOTORCYCLE}, {"passenger", SVS_PASSENGER}, {"passenger/sedan", SVS_PASSENGER_SEDAN}, @@ -88,140 +103,44 @@ {"passenger/wagon", SVS_PASSENGER_WAGON}, {"passenger/van", SVS_PASSENGER_VAN}, {"delivery", SVS_DELIVERY}, - {"transport", SVS_TRANSPORT}, - {"transport/semitrailer", SVS_TRANSPORT_SEMITRAILER}, - {"transport/trailer", SVS_TRANSPORT_1TRAILER}, + {"transport", SVS_TRUCK}, // !!! deprecated + {"truck", SVS_TRUCK}, + {"transport/semitrailer", SVS_TRUCK_SEMITRAILER}, // !!! deprecated + {"truck/semitrailer", SVS_TRUCK_SEMITRAILER}, + {"transport/trailer", SVS_TRUCK_1TRAILER}, // !!! deprecated + {"truck/trailer", SVS_TRUCK_1TRAILER}, + {"bus/city", SVS_BUS}, // !!! deprecated {"bus", SVS_BUS}, - {"bus/city", SVS_BUS_CITY}, - {"bus/flexible", SVS_BUS_CITY_FLEXIBLE}, - {"bus/overland", SVS_BUS_OVERLAND}, + {"bus/overland", SVS_BUS_COACH}, // !!! deprecated + {"bus/coach", SVS_BUS_COACH}, + {"bus/flexible", SVS_BUS_FLEXIBLE}, {"bus/trolley", SVS_BUS_TROLLEY}, + {"rail/slow", SVS_RAIL}, // !!! deprecated + {"rail/fast", SVS_RAIL}, // !!! deprecated {"rail", SVS_RAIL}, - {"rail/light", SVS_RAIL_LIGHT}, - {"rail/city", SVS_RAIL_CITY}, - {"rail/slow", SVS_RAIL_SLOW}, - {"rail/fast", SVS_RAIL_FAST}, + {"rail/light", SVS_RAIL_CAR}, // !!! deprecated + {"rail/city", SVS_RAIL_CAR}, // !!! deprecated + {"rail/railcar", SVS_RAIL_CAR}, {"rail/cargo", SVS_RAIL_CARGO}, {"evehicle", SVS_E_VEHICLE}, {"ant", SVS_ANT}, + {"ship", SVS_SHIP}, {"", SVS_UNKNOWN} }; StringBijection SumoVehicleShapeStrings( - sumoVehicleShapeStringInitializer, SVS_UNKNOWN); - - -StringBijection::Entry SumoEmissionClassStringInitializer[] = { - {"unknown", SVE_UNKNOWN}, - // heavy duty vehicles; 3 clusters - {"HDV_3_1", SVE_HDV_3_1}, - {"HDV_3_2", SVE_HDV_3_2}, - {"HDV_3_3", SVE_HDV_3_3}, - // heavy duty vehicles; 6 clusters - {"HDV_6_1", SVE_HDV_6_1}, - {"HDV_6_2", SVE_HDV_6_2}, - {"HDV_6_3", SVE_HDV_6_3}, - {"HDV_6_4", SVE_HDV_6_4}, - {"HDV_6_5", SVE_HDV_6_5}, - {"HDV_6_6", SVE_HDV_6_6}, - // heavy duty vehicles; 12 clusters - {"HDV_12_1", SVE_HDV_12_1}, - {"HDV_12_2", SVE_HDV_12_2}, - {"HDV_12_3", SVE_HDV_12_3}, - {"HDV_12_4", SVE_HDV_12_4}, - {"HDV_12_5", SVE_HDV_12_5}, - {"HDV_12_6", SVE_HDV_12_6}, - {"HDV_12_7", SVE_HDV_12_7}, - {"HDV_12_8", SVE_HDV_12_8}, - {"HDV_12_9", SVE_HDV_12_9}, - {"HDV_12_10", SVE_HDV_12_10}, - {"HDV_12_11", SVE_HDV_12_11}, - {"HDV_12_12", SVE_HDV_12_12}, - // passenger & light duty vehicles; 7 clusters - {"P_7_1", SVE_P_LDV_7_1}, - {"P_7_2", SVE_P_LDV_7_2}, - {"P_7_3", SVE_P_LDV_7_3}, - {"P_7_4", SVE_P_LDV_7_4}, - {"P_7_5", SVE_P_LDV_7_5}, - {"P_7_6", SVE_P_LDV_7_6}, - {"P_7_7", SVE_P_LDV_7_7}, - // passenger & light duty vehicles; 14 clusters - {"P_14_1", SVE_P_LDV_14_1}, - {"P_14_2", SVE_P_LDV_14_2}, - {"P_14_3", SVE_P_LDV_14_3}, - {"P_14_4", SVE_P_LDV_14_4}, - {"P_14_5", SVE_P_LDV_14_5}, - {"P_14_6", SVE_P_LDV_14_6}, - {"P_14_7", SVE_P_LDV_14_7}, - {"P_14_8", SVE_P_LDV_14_8}, - {"P_14_9", SVE_P_LDV_14_9}, - {"P_14_10", SVE_P_LDV_14_10}, - {"P_14_11", SVE_P_LDV_14_11}, - {"P_14_12", SVE_P_LDV_14_12}, - {"P_14_13", SVE_P_LDV_14_13}, - {"P_14_14", SVE_P_LDV_14_14}, - // no emissions - {"zero", SVE_ZERO_EMISSIONS}, - // heavy duty vehicles, no accel; 3 clusters - {"HDV_A0_3_1", SVE_HDV_A0_3_1}, - {"HDV_A0_3_2", SVE_HDV_A0_3_2}, - {"HDV_A0_3_3", SVE_HDV_A0_3_3}, - // heavy duty vehicles, no accel; 6 clusters - {"HDV_A0_6_1", SVE_HDV_A0_6_1}, - {"HDV_A0_6_2", SVE_HDV_A0_6_2}, - {"HDV_A0_6_3", SVE_HDV_A0_6_3}, - {"HDV_A0_6_4", SVE_HDV_A0_6_4}, - {"HDV_A0_6_5", SVE_HDV_A0_6_5}, - {"HDV_A0_6_6", SVE_HDV_A0_6_6}, - // heavy duty vehicles, no accel; 12 clusters - {"HDV_A0_12_1", SVE_HDV_A0_12_1}, - {"HDV_A0_12_2", SVE_HDV_A0_12_2}, - {"HDV_A0_12_3", SVE_HDV_A0_12_3}, - {"HDV_A0_12_4", SVE_HDV_A0_12_4}, - {"HDV_A0_12_5", SVE_HDV_A0_12_5}, - {"HDV_A0_12_6", SVE_HDV_A0_12_6}, - {"HDV_A0_12_7", SVE_HDV_A0_12_7}, - {"HDV_A0_12_8", SVE_HDV_A0_12_8}, - {"HDV_A0_12_9", SVE_HDV_A0_12_9}, - {"HDV_A0_12_10", SVE_HDV_A0_12_10}, - {"HDV_A0_12_11", SVE_HDV_A0_12_11}, - {"HDV_A0_12_12", SVE_HDV_A0_12_12}, - // passenger & light duty vehicles, no accel; 7 clusters - {"P_A0_7_1", SVE_P_LDV_A0_7_1}, - {"P_A0_7_2", SVE_P_LDV_A0_7_2}, - {"P_A0_7_3", SVE_P_LDV_A0_7_3}, - {"P_A0_7_4", SVE_P_LDV_A0_7_4}, - {"P_A0_7_5", SVE_P_LDV_A0_7_5}, - {"P_A0_7_6", SVE_P_LDV_A0_7_6}, - {"P_A0_7_7", SVE_P_LDV_A0_7_7}, - // passenger & light duty vehicles, no accel; 14 clusters - {"P_A0_14_1", SVE_P_LDV_A0_14_1}, - {"P_A0_14_2", SVE_P_LDV_A0_14_2}, - {"P_A0_14_3", SVE_P_LDV_A0_14_3}, - {"P_A0_14_4", SVE_P_LDV_A0_14_4}, - {"P_A0_14_5", SVE_P_LDV_A0_14_5}, - {"P_A0_14_6", SVE_P_LDV_A0_14_6}, - {"P_A0_14_7", SVE_P_LDV_A0_14_7}, - {"P_A0_14_8", SVE_P_LDV_A0_14_8}, - {"P_A0_14_9", SVE_P_LDV_A0_14_9}, - {"P_A0_14_10", SVE_P_LDV_A0_14_10}, - {"P_A0_14_11", SVE_P_LDV_A0_14_11}, - {"P_A0_14_12", SVE_P_LDV_A0_14_12}, - {"P_A0_14_13", SVE_P_LDV_A0_14_13}, - {"P_A0_14_14", SVE_P_LDV_A0_14_14} -}; - -StringBijection SumoEmissionClassStrings( - SumoEmissionClassStringInitializer, SVE_P_LDV_A0_14_14); + sumoVehicleShapeStringInitializer, SVS_UNKNOWN, false); // =========================================================================== // additional constants // =========================================================================== -const int SUMOVehicleClass_MAX = SVC_PEDESTRIAN; -const SVCPermissions SVCFreeForAll = std::numeric_limits::max(); // all bits set to 1 +const int SUMOVehicleClass_MAX = SVC_CUSTOM2; +const SVCPermissions SVCAll = 2 * SUMOVehicleClass_MAX - 1; // all relevant bits set to 1 +const SVCPermissions SVC_UNSPECIFIED = -1; + // =========================================================================== // method definitions @@ -246,19 +165,22 @@ std::string -getAllowedVehicleClassNames(SVCPermissions permissions) { - return joinToString(getAllowedVehicleClassNamesList(permissions), ' '); +getVehicleClassNames(SVCPermissions permissions) { + if (permissions == SVCAll) { + return "all"; + } + return joinToString(getVehicleClassNamesList(permissions), ' '); } std::vector -getAllowedVehicleClassNamesList(SVCPermissions permissions) { +getVehicleClassNamesList(SVCPermissions permissions) { /// @todo cache values? const std::vector classNames = SumoVehicleClassStrings.getStrings(); std::vector result; for (std::vector::const_iterator it = classNames.begin(); it != classNames.end(); it++) { const int svc = (int)SumoVehicleClassStrings.get(*it); - if ((svc & permissions) == svc && svc != SVC_UNKNOWN) { + if ((svc & permissions) == svc && svc != SVC_IGNORING) { result.push_back(*it); } } @@ -266,40 +188,18 @@ } -std::pair -getPermissionEncoding(SVCPermissions permissions) { - // shortcut the common cases - if (permissions == SVCFreeForAll) { - return std::pair("", false); // nothing disallowed - } - // figure out whether its shorter to write allow or disallow - // @note: this code assumes that enum values are assigned contiguous powers of 2 from 1 to SUMOVehicleClass_MAX - size_t num_allowed = 0; - for (int mask = 1; mask <= SUMOVehicleClass_MAX; mask = mask << 1) { - if ((mask & permissions) == mask) { - ++num_allowed; - } - } - if (num_allowed <= (SumoVehicleClassStrings.size() - num_allowed) && num_allowed > 0) { - return std::pair(getAllowedVehicleClassNames(permissions), true); - } else { - return std::pair(getAllowedVehicleClassNames(~permissions), false); - } -} - - SUMOVehicleClass getVehicleClassID(const std::string& name) { if (SumoVehicleClassStrings.hasString(name)) { return SumoVehicleClassStrings.get(name); } - throw ProcessError("Unknown vehicle class '" + name + "'."); + throw InvalidArgument("Unknown vehicle class '" + name + "'."); } int getVehicleClassCompoundID(const std::string& name) { - int ret = SVC_UNKNOWN; + int ret = SVC_IGNORING; const std::vector names = SumoVehicleClassStrings.getStrings(); for (std::vector::const_iterator it = names.begin(); it != names.end(); it++) { if (name.find(*it) != std::string::npos) { @@ -312,10 +212,19 @@ SVCPermissions parseVehicleClasses(const std::string& allowedS) { + if (allowedS == "all") { + return SVCAll; + } SVCPermissions result = 0; StringTokenizer sta(allowedS, " "); while (sta.hasNext()) { - result |= getVehicleClassID(sta.next()); + const std::string s = sta.next(); + const SUMOVehicleClass vc = getVehicleClassID(s); + const std::string& realName = SumoVehicleClassStrings.getString(vc); + if (realName != s) { + deprecatedVehicleClassesSeen.insert(s); + } + result |= vc; } return result; } @@ -323,6 +232,9 @@ bool canParseVehicleClasses(const std::string& classes) { + if (classes == "all") { + return true; + } StringTokenizer sta(classes, " "); while (sta.hasNext()) { if (!SumoVehicleClassStrings.hasString(sta.next())) { @@ -335,14 +247,14 @@ extern SVCPermissions parseVehicleClasses(const std::string& allowedS, const std::string& disallowedS) { if (allowedS.size() == 0 && disallowedS.size() == 0) { - return SVCFreeForAll; + return SVCAll; } else if (allowedS.size() > 0 && disallowedS.size() > 0) { WRITE_WARNING("SVCPermissions must be specified either via 'allow' or 'disallow'. Ignoring 'disallow'"); return parseVehicleClasses(allowedS); } else if (allowedS.size() > 0) { return parseVehicleClasses(allowedS); } else { - return ~parseVehicleClasses(disallowedS); + return SVCAll & ~parseVehicleClasses(disallowedS); } } @@ -351,6 +263,11 @@ parseVehicleClasses(const std::vector& allowedS) { SVCPermissions result = 0; for (std::vector::const_iterator i = allowedS.begin(); i != allowedS.end(); ++i) { + const SUMOVehicleClass vc = getVehicleClassID(*i); + const std::string& realName = SumoVehicleClassStrings.getString(vc); + if (realName != *i) { + WRITE_WARNING("The vehicle class '" + (*i) + "' is deprecated, use '" + realName + "' instead."); + } result |= getVehicleClassID(*i); } return result; @@ -362,7 +279,7 @@ if (SumoVehicleShapeStrings.hasString(name)) { return SumoVehicleShapeStrings.get(name); } else { - throw ProcessError("Unknown vehicle shape '" + name + "'."); + throw InvalidArgument("Unknown vehicle shape '" + name + "'."); } } @@ -374,50 +291,28 @@ bool isRailway(SVCPermissions permissions) { - const int anyRail = SVC_RAIL_FAST + SVC_RAIL_SLOW + SVC_CITYRAIL + SVC_LIGHTRAIL; - return (permissions & anyRail) > 0 && (permissions & SVC_PASSENGER) == 0; + return (permissions & (SVC_RAIL_ELECTRIC | SVC_RAIL | SVC_RAIL_URBAN | SVC_TRAM)) > 0 && (permissions & SVC_PASSENGER) == 0; } -// ------------ Conversion of SUMOEmissionClass -SUMOEmissionClass -getVehicleEmissionTypeID(const std::string& name) { - if (SumoEmissionClassStrings.hasString(name)) { - return SumoEmissionClassStrings.get(name); - } else { - throw ProcessError("Unknown emission type '" + name + "'."); - } + +bool isWaterway(SVCPermissions permissions) { + return permissions == SVC_SHIP; } -std::string -getVehicleEmissionTypeName(SUMOEmissionClass id) { - return SumoEmissionClassStrings.getString(id); + +bool isForbidden(SVCPermissions permissions) { + return (permissions & SVCAll) == 0; } const std::string DEFAULT_VTYPE_ID("DEFAULT_VEHTYPE"); -const SUMOReal DEFAULT_VEH_MAXSPEED(70.0); -const SUMOReal DEFAULT_VEH_ACCEL(2.6); -const SUMOReal DEFAULT_VEH_DECEL(4.5); -const SUMOReal DEFAULT_VEH_SIGMA(0.5); -const SUMOReal DEFAULT_VEH_LENGTH(5.); -const SUMOReal DEFAULT_VEH_MINGAP(2.5); -const SUMOReal DEFAULT_VEH_TAU(1.); -const SUMOVehicleClass DEFAULT_VEH_CLASS(SVC_UNKNOWN); +const std::string DEFAULT_PEDTYPE_ID("DEFAULT_PEDTYPE"); + const SUMOReal DEFAULT_VEH_PROB(1.); -const SUMOReal DEFAULT_VEH_SPEEDFACTOR(1.); -const SUMOReal DEFAULT_VEH_SPEEDDEV(0.); -const SUMOReal DEFAULT_VEH_WIDTH(2.); -const SUMOReal DEFAULT_VEH_HEIGHT(1.5); -const SumoXMLTag DEFAULT_VEH_FOLLOW_MODEL(SUMO_TAG_CF_KRAUSS); -const std::string DEFAULT_VEH_LANE_CHANGE_MODEL("dkrajzew2008"); -const SUMOVehicleShape DEFAULT_VEH_SHAPE(SVS_UNKNOWN); -const SUMOReal DEFAULT_VEH_TMP1(1.); -const SUMOReal DEFAULT_VEH_TMP2(1.); -const SUMOReal DEFAULT_VEH_TMP3(1.); -const SUMOReal DEFAULT_VEH_TMP4(1.); -const SUMOReal DEFAULT_VEH_TMP5(1.); -const SUMOReal DEFAULT_PERSON_SPEED(5. / 3.6); +const SUMOReal DEFAULT_PEDESTRIAN_SPEED(5. / 3.6); + +const SUMOReal DEFAULT_CONTAINER_TRANSHIP_SPEED(5. / 3.6); /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOVehicleClass.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOVehicleClass.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOVehicleClass.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOVehicleClass.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date 2006-01-24 -/// @version $Id: SUMOVehicleClass.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: SUMOVehicleClass.h 18096 2015-03-17 09:50:59Z behrisch $ /// // Definitions of SUMO vehicle classes and helper functions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -54,6 +54,8 @@ SVS_PEDESTRIAN, /// @brief render as a bicycle SVS_BICYCLE, + /// @brief render as a moped + SVS_MOPED, /// @brief render as a motorcycle SVS_MOTORCYCLE, /// @brief render as a passenger vehicle @@ -69,37 +71,31 @@ /// @brief render as a delivery vehicle SVS_DELIVERY, /// @brief render as a transport vehicle - SVS_TRANSPORT, + SVS_TRUCK, /// @brief render as a semi-trailer transport vehicle ("Sattelschlepper") - SVS_TRANSPORT_SEMITRAILER, + SVS_TRUCK_SEMITRAILER, /// @brief render as a transport vehicle with one trailer - SVS_TRANSPORT_1TRAILER, + SVS_TRUCK_1TRAILER, /// @brief render as a bus SVS_BUS, - /// @brief render as a city bus - SVS_BUS_CITY, + /// @brief render as a coach + SVS_BUS_COACH, /// @brief render as a flexible city bus - SVS_BUS_CITY_FLEXIBLE, - /// @brief render as a overland bus - SVS_BUS_OVERLAND, + SVS_BUS_FLEXIBLE, /// @brief render as a trolley bus SVS_BUS_TROLLEY, /// @brief render as a rail SVS_RAIL, - /// @brief render as a light rail - SVS_RAIL_LIGHT, - /// @brief render as a city rail - SVS_RAIL_CITY, - /// @brief render as a slow (passenger) train - SVS_RAIL_SLOW, - /// @brief render as a fast (passenger) train - SVS_RAIL_FAST, + /// @brief render as a (city) rail without locomotive + SVS_RAIL_CAR, /// @brief render as a cargo train SVS_RAIL_CARGO, /// @brief render as a (futuristic) e-vehicle SVS_E_VEHICLE, /// @brief render as a giant ant - SVS_ANT + SVS_ANT, + /// @brief render as a arbitrary ship + SVS_SHIP }; @@ -125,25 +121,22 @@ * @arg [9] Pedestrian */ enum SUMOVehicleClass { - SVC_UNKNOWN = 0, + /// @brief vehicles ignoring classes + SVC_IGNORING = 0, /// @name vehicle ownership //@{ /// @brief private vehicles SVC_PRIVATE = 1, - /// @brief public transport vehicles - SVC_PUBLIC_TRANSPORT = 2, /// @brief public emergency vehicles - SVC_PUBLIC_EMERGENCY = 4, + SVC_EMERGENCY = 1 << 1, /// @brief authorities vehicles - SVC_PUBLIC_AUTHORITY = 8, + SVC_AUTHORITY = 1 << 2, /// @brief army vehicles - SVC_PUBLIC_ARMY = 16, + SVC_ARMY = 1 << 3, /// @brief vip vehicles - SVC_VIP = 32, - /// @brief vehicles ignoring classes - SVC_IGNORING = 64, + SVC_VIP = 1 << 4, //@} @@ -151,157 +144,67 @@ //@{ /// @brief vehicle is a passenger car (a "normal" car) - SVC_PASSENGER = 128, + SVC_PASSENGER = 1 << 5, /// @brief vehicle is a HOV - SVC_HOV = 256, + SVC_HOV = 1 << 6, /// @brief vehicle is a taxi - SVC_TAXI = 512, + SVC_TAXI = 1 << 7, /// @brief vehicle is a bus - SVC_BUS = 1024, + SVC_BUS = 1 << 8, + /// @brief vehicle is a coach + SVC_COACH = 1 << 9, /// @brief vehicle is a small delivery vehicle - SVC_DELIVERY = 2048, + SVC_DELIVERY = 1 << 10, /// @brief vehicle is a large transport vehicle - SVC_TRANSPORT = 4096, + SVC_TRUCK = 1 << 11, + /// @brief vehicle is a large transport vehicle + SVC_TRAILER = 1 << 12, /// @brief vehicle is a light rail - SVC_LIGHTRAIL = 8192, + SVC_TRAM = 1 << 13, /// @brief vehicle is a city rail - SVC_CITYRAIL = 16384, - /// @brief vehicle is a slow moving transport rail - SVC_RAIL_SLOW = 32768, - /// @brief vehicle is a fast moving rail - SVC_RAIL_FAST = 65536, + SVC_RAIL_URBAN = 1 << 14, + /// @brief vehicle is a not electrified rail + SVC_RAIL = 1 << 15, + /// @brief vehicle is a (possibly fast moving) electric rail + SVC_RAIL_ELECTRIC = 1 << 16, /// @brief vehicle is a motorcycle - SVC_MOTORCYCLE = 131072, + SVC_MOTORCYCLE = 1 << 17, + /// @brief vehicle is a moped + SVC_MOPED = 1 << 18, /// @brief vehicle is a bicycle - SVC_BICYCLE = 262144, + SVC_BICYCLE = 1 << 19, /// @brief is a pedestrian - SVC_PEDESTRIAN = 524288, + SVC_PEDESTRIAN = 1 << 20, + /// @brief is an electric vehicle + SVC_E_VEHICLE = 1 << 21, + /// @brief is an arbitrary ship + SVC_SHIP = 1 << 22, /// @brief is a user-defined type - SVC_CUSTOM1 = 1048576, + SVC_CUSTOM1 = 1 << 23, /// @brief is a user-defined type - SVC_CUSTOM2 = 2097152 + SVC_CUSTOM2 = 1 << 24 //@} }; extern const int SUMOVehicleClass_MAX; extern StringBijection SumoVehicleClassStrings; +extern std::set deprecatedVehicleClassesSeen; extern StringBijection SumoVehicleShapeStrings; /* @brief bitset where each bit declares whether a certain SVC may use this edge/lane */ typedef int SVCPermissions; -extern const SVCPermissions SVCFreeForAll; +extern const SVCPermissions SVCAll; // everything allowed +extern const SVCPermissions SVC_UNSPECIFIED; // permissions not specified /** * @enum SUMOEmissionClass * @brief Definition of vehicle emission classes - * - * The order is important - HBEFA computation helper use it. - * @see HelpersHBEFA + * @see PollutantsInterface */ -enum SUMOEmissionClass { - SVE_UNKNOWN = -1, - // heavy duty vehicles; 3 clusters - SVE_HDV_3_1 = 0, - SVE_HDV_3_2, - SVE_HDV_3_3, - // heavy duty vehicles; 6 clusters - SVE_HDV_6_1, - SVE_HDV_6_2, - SVE_HDV_6_3, - SVE_HDV_6_4, - SVE_HDV_6_5, - SVE_HDV_6_6, - // heavy duty vehicles; 12 clusters - SVE_HDV_12_1, - SVE_HDV_12_2, - SVE_HDV_12_3, - SVE_HDV_12_4, - SVE_HDV_12_5, - SVE_HDV_12_6, - SVE_HDV_12_7, - SVE_HDV_12_8, - SVE_HDV_12_9, - SVE_HDV_12_10, - SVE_HDV_12_11, - SVE_HDV_12_12, - // passenger & light duty vehicles; 7 clusters - SVE_P_LDV_7_1, - SVE_P_LDV_7_2, - SVE_P_LDV_7_3, - SVE_P_LDV_7_4, - SVE_P_LDV_7_5, - SVE_P_LDV_7_6, - SVE_P_LDV_7_7, - // passenger & light duty vehicles; 14 clusters - SVE_P_LDV_14_1, - SVE_P_LDV_14_2, - SVE_P_LDV_14_3, - SVE_P_LDV_14_4, - SVE_P_LDV_14_5, - SVE_P_LDV_14_6, - SVE_P_LDV_14_7, - SVE_P_LDV_14_8, - SVE_P_LDV_14_9, - SVE_P_LDV_14_10, - SVE_P_LDV_14_11, - SVE_P_LDV_14_12, - SVE_P_LDV_14_13, - SVE_P_LDV_14_14, - // no emissions - SVE_ZERO_EMISSIONS, - // heavy duty vehicles, no accel; 3 clusters - SVE_HDV_A0_3_1, - SVE_HDV_A0_3_2, - SVE_HDV_A0_3_3, - // heavy duty vehicles, no accel; 6 clusters - SVE_HDV_A0_6_1, - SVE_HDV_A0_6_2, - SVE_HDV_A0_6_3, - SVE_HDV_A0_6_4, - SVE_HDV_A0_6_5, - SVE_HDV_A0_6_6, - // heavy duty vehicles, no accel; 12 clusters - SVE_HDV_A0_12_1, - SVE_HDV_A0_12_2, - SVE_HDV_A0_12_3, - SVE_HDV_A0_12_4, - SVE_HDV_A0_12_5, - SVE_HDV_A0_12_6, - SVE_HDV_A0_12_7, - SVE_HDV_A0_12_8, - SVE_HDV_A0_12_9, - SVE_HDV_A0_12_10, - SVE_HDV_A0_12_11, - SVE_HDV_A0_12_12, - // passenger & light duty vehicles, no accel; 7 clusters - SVE_P_LDV_A0_7_1, - SVE_P_LDV_A0_7_2, - SVE_P_LDV_A0_7_3, - SVE_P_LDV_A0_7_4, - SVE_P_LDV_A0_7_5, - SVE_P_LDV_A0_7_6, - SVE_P_LDV_A0_7_7, - // passenger & light duty vehicles, no accel; 14 clusters - SVE_P_LDV_A0_14_1, - SVE_P_LDV_A0_14_2, - SVE_P_LDV_A0_14_3, - SVE_P_LDV_A0_14_4, - SVE_P_LDV_A0_14_5, - SVE_P_LDV_A0_14_6, - SVE_P_LDV_A0_14_7, - SVE_P_LDV_A0_14_8, - SVE_P_LDV_A0_14_9, - SVE_P_LDV_A0_14_10, - SVE_P_LDV_A0_14_11, - SVE_P_LDV_A0_14_12, - SVE_P_LDV_A0_14_13, - SVE_P_LDV_A0_14_14 -}; - -extern StringBijection SumoEmissionClassStrings; +typedef int SUMOEmissionClass; // =========================================================================== @@ -323,20 +226,14 @@ * @param[in] the permissions to encode * @return The string representation of these classes */ -extern std::string getAllowedVehicleClassNames(SVCPermissions permissions); +extern std::string getVehicleClassNames(SVCPermissions permissions); /** @brief Returns the ids of the given classes, divided using a ' ' * @param[in] the permissions to encode * @return The string representation of these classes as a vector */ -extern std::vector getAllowedVehicleClassNamesList(SVCPermissions permissions); - -/** @brief returns the shorter encoding of the given permissions - * (selects automatically wether to use allow or disallow attribute) - * @return the string and true for allow, false for disallow - */ -extern std::pair getPermissionEncoding(SVCPermissions permissions); +extern std::vector getVehicleClassNamesList(SVCPermissions permissions); /** @brief Returns the class id of the abstract class given by its name @@ -353,10 +250,11 @@ extern int getVehicleClassCompoundID(const std::string& name); /** @brief Parses the given definition of allowed vehicle classes into the given containers + * Deprecated classes go into a separate container. * * @param[in] classNames Space separated class names * @param[out] container The set of vehicle classes to fill - * throws ProcessErrorr if parsing fails + * throws ProcessError if parsing fails */ extern SVCPermissions parseVehicleClasses(const std::string& allowedS); @@ -365,12 +263,7 @@ */ extern bool canParseVehicleClasses(const std::string& classes); -/** @brief Parses the given definition of allowed/disallowed vehicle classes into the given containers - * - * @param[in] allowedS Definition which classes are allowed - * @param[in] disallowedS Definition which classes are not allowed - */ -/** @brief Encodes the given vector of allowed and disallowed classs into a bitset +/** @brief Encodes the given vector of allowed and disallowed classes into a bitset * @param[in] allowedS Definition which classes are allowed * @param[in] disallowedS Definition which classes are not allowed */ @@ -378,6 +271,7 @@ /** @brief Encodes the given vector of allowed classs into a bitset + * Unlike the methods which parse a string it gives immediately a warning output on deprecated vehicle classes. * @param[in] classesS The names vector to parse */ extern SVCPermissions parseVehicleClasses(const std::vector& allowedS); @@ -400,57 +294,35 @@ extern SUMOVehicleShape getVehicleShapeID(const std::string& name); -// --------------------------------------------------------------------------- -// emission class -// --------------------------------------------------------------------------- -/** @brief Returns the class name of the emission class given by its id - * @param[in] id The id of the emission class - * @return The string representation of this class - */ -extern std::string getVehicleEmissionTypeName(SUMOEmissionClass id); - - -/** @brief Returns the class id of the emission class given by its name - * @param[in] name The name of the emission class - * @return The internal representation of this class - */ -extern SUMOEmissionClass getVehicleEmissionTypeID(const std::string& name); - - /** @brief Returns whether an edge with the given permission is a railway edge * @param[in] permissions The permissions of the edge * @return Whether the edge is a railway edge */ extern bool isRailway(SVCPermissions permissions); +/** @brief Returns whether an edge with the given permission is a waterway edge + * @param[in] permissions The permissions of the edge + * @return Whether the edge is a waterway edge + */ +extern bool isWaterway(SVCPermissions permissions); + +/** @brief Returns whether an edge with the given permission is a forbidden edge + * @param[in] permissions The permissions of the edge + * @return Whether the edge is forbidden + */ +extern bool isForbidden(SVCPermissions permissions); // --------------------------------------------------------------------------- // default vehicle type parameter // --------------------------------------------------------------------------- extern const std::string DEFAULT_VTYPE_ID; -extern const SUMOReal DEFAULT_VEH_MAXSPEED; -extern const SUMOReal DEFAULT_VEH_ACCEL; -extern const SUMOReal DEFAULT_VEH_DECEL; -extern const SUMOReal DEFAULT_VEH_SIGMA; -extern const SUMOReal DEFAULT_VEH_LENGTH; -extern const SUMOReal DEFAULT_VEH_MINGAP; -extern const SUMOReal DEFAULT_VEH_TAU; -extern const SUMOVehicleClass DEFAULT_VEH_CLASS; -extern const SUMOReal DEFAULT_VEH_PROB; -extern const SUMOReal DEFAULT_VEH_SPEEDFACTOR; -extern const SUMOReal DEFAULT_VEH_SPEEDDEV; -extern const SUMOReal DEFAULT_VEH_WIDTH; -extern const SUMOReal DEFAULT_VEH_HEIGHT; -extern const SumoXMLTag DEFAULT_VEH_FOLLOW_MODEL; -extern const std::string DEFAULT_VEH_LANE_CHANGE_MODEL; -extern const SUMOVehicleShape DEFAULT_VEH_SHAPE; -extern const SUMOReal DEFAULT_VEH_TMP1; -extern const SUMOReal DEFAULT_VEH_TMP2; -extern const SUMOReal DEFAULT_VEH_TMP3; -extern const SUMOReal DEFAULT_VEH_TMP4; -extern const SUMOReal DEFAULT_VEH_TMP5; +extern const std::string DEFAULT_PEDTYPE_ID; + +extern const SUMOReal DEFAULT_VEH_PROB; // !!! does this belong here? + +extern const SUMOReal DEFAULT_PEDESTRIAN_SPEED; -extern const SUMOReal DEFAULT_PERSON_SPEED; +extern const SUMOReal DEFAULT_CONTAINER_TRANSHIP_SPEED; #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOVehicle.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOVehicle.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOVehicle.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOVehicle.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,224 +0,0 @@ -/****************************************************************************/ -/// @file SUMOVehicle.h -/// @author Michael Behrisch -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @date Tue, 17 Feb 2009 -/// @version $Id: SUMOVehicle.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Abstract base class for vehicle representations -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef SUMOVehicle_h -#define SUMOVehicle_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class MSVehicleType; -class MSRoute; -class MSEdge; -class MSLane; -class MSDevice; -class MSPerson; -class SUMOSAXAttributes; - -typedef std::vector MSEdgeVector; - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class SUMOVehicle - * @brief Representation of a vehicle - */ -class SUMOVehicle { -public: - /// @brief Destructor - virtual ~SUMOVehicle() {} - - /** @brief Get the vehicle's ID - * @return The the ID of the vehicle - */ - virtual const std::string& getID() const = 0; - - /** @brief Get the vehicle's position along the lane - * @return The position of the vehicle (in m from the lane's begin) - */ - virtual SUMOReal getPositionOnLane() const = 0; - - /** @brief Returns the vehicle's maximum speed - * @return The vehicle's maximum speed - */ - virtual SUMOReal getMaxSpeed() const = 0; - - /** @brief Returns the vehicle's current speed - * @return The vehicle's speed - */ - virtual SUMOReal getSpeed() const = 0; - - /** @brief Returns the vehicle's type - * @return The vehicle's type - */ - virtual const MSVehicleType& getVehicleType() const = 0; - - /// Returns the current route - virtual const MSRoute& getRoute() const = 0; - - /** @brief Returns the nSuccs'th successor of edge the vehicle is currently at - * - * If the rest of the route (counted from the current edge) than nSuccs, - * 0 is returned. - * @param[in] nSuccs The number of edge to look forward - * @return The nSuccs'th following edge in the vehicle's route - */ - virtual const MSEdge* succEdge(unsigned int nSuccs) const = 0; - - /// Replaces the current route by the given edges - virtual bool replaceRouteEdges(const MSEdgeVector& edges, bool onInit = false) = 0; - - /// Replaces the current route by the given one - virtual bool replaceRoute(const MSRoute* route, bool onInit = false) = 0; - - /** @brief Performs a rerouting using the given router - * - * Tries to find a new route between the current edge and the destination edge, first. - * Tries to replace the current route by the new one using replaceRoute. - * - * @param[in] t The time for which the route is computed - * @param[in] router The router to use - * @see replaceRoute - */ - virtual void reroute(SUMOTime t, SUMOAbstractRouter& router, bool withTaz = false) = 0; - - /** @brief Returns the vehicle's acceleration - * @return The acceleration - */ - virtual SUMOReal getAcceleration() const = 0; - - /** @brief Returns the edge the vehicle is currently at - * - * @return The current edge in the vehicle's route - */ - virtual const MSEdge* getEdge() const = 0; - - /** @brief Returns the vehicle's parameter (including departure definition) - * - * @return The vehicle's parameter - */ - virtual const SUMOVehicleParameter& getParameter() const = 0; - - /** @brief Called when the vehicle is inserted into the network - * - * Sets optional information about departure time, informs the vehicle - * control about a further running vehicle. - */ - virtual void onDepart() = 0; - - /** @brief Returns the information whether the vehicle is on a road (is simulated) - * @return Whether the vehicle is simulated - */ - virtual bool isOnRoad() const = 0; - - /** @brief Returns this vehicle's real departure time - * @return This vehicle's real departure time - */ - virtual SUMOTime getDeparture() const = 0; - - /** @brief Returns this vehicle's desired arrivalPos for its current route - * (may change on reroute) - * @return This vehicle's real arrivalPos - */ - virtual SUMOReal getArrivalPos() const = 0; - - /** @brief Returns whether this vehicle has departed - */ - virtual bool hasDeparted() const = 0; - - /** @brief Returns whether this vehicle has arrived - */ - virtual bool hasArrived() const = 0; - - /** @brief Returns the number of new routes this vehicle got - * @return the number of new routes this vehicle got - */ - virtual unsigned int getNumberReroutes() const = 0; - - /** @brief Returns this vehicle's devices - * @return This vehicle's devices - */ - virtual const std::vector& getDevices() const = 0; - - /** @brief Adds a person to this vehicle - * - * May do nothing since persons are not supported by default - * - * @param[in] person The person to add - */ - virtual void addPerson(MSPerson* person) = 0; - - /** @brief Adds a stop - * - * The stop is put into the sorted list. - * @param[in] stop The stop to add - * @return Whether the stop could be added - */ - virtual bool addStop(const SUMOVehicleParameter::Stop& stopPar, SUMOTime untilOffset = 0) = 0; - - /** @brief Returns whether the vehicle is at a stop - * @return Whether the has stopped - */ - virtual bool isStopped() const = 0; - - /// @brief Returns a device of the given type if it exists or 0 - virtual MSDevice* getDevice(const std::type_info& type) const = 0; - - - virtual SUMOReal getChosenSpeedFactor() const = 0; - - virtual SUMOTime getWaitingTime() const = 0; - - /// @name state io - //@{ - - /// Saves the states of a vehicle - virtual void saveState(OutputDevice& out) = 0; - - /** @brief Loads the state of this vehicle from the given description - */ - virtual void loadState(const SUMOSAXAttributes& attrs, const SUMOTime offset) = 0; - //@} -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOVehicleParameter.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOVehicleParameter.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOVehicleParameter.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOVehicleParameter.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,455 +0,0 @@ -/****************************************************************************/ -/// @file SUMOVehicleParameter.cpp -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date Tue, 31.03.2009 -/// @version $Id: SUMOVehicleParameter.cpp 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Structure representing possible vehicle parameter -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include "SUMOVehicleParameter.h" -#include -#include -#include -#include -#include - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// member method definitions -// =========================================================================== -SUMOVehicleParameter::SUMOVehicleParameter() - : vtypeid(DEFAULT_VTYPE_ID), color(RGBColor::DEFAULT_COLOR), - depart(-1), departProcedure(DEPART_GIVEN), - departLane(0), departLaneProcedure(DEPART_LANE_DEFAULT), - departPos(0), departPosProcedure(DEPART_POS_DEFAULT), - departSpeed(-1), departSpeedProcedure(DEPART_SPEED_DEFAULT), - arrivalLane(0), arrivalLaneProcedure(ARRIVAL_LANE_DEFAULT), - arrivalPos(0), arrivalPosProcedure(ARRIVAL_POS_DEFAULT), - arrivalSpeed(-1), arrivalSpeedProcedure(ARRIVAL_SPEED_DEFAULT), - repetitionNumber(-1), repetitionsDone(-1), repetitionOffset(-1), - line(), fromTaz(), toTaz(), personCapacity(0), personNumber(0), setParameter(0) { -} - - -bool -SUMOVehicleParameter::defaultOptionOverrides(const OptionsCont& oc, const std::string& optionName) const { - return oc.isSet(optionName) && oc.getBool("defaults-override"); -} - - -void -SUMOVehicleParameter::write(OutputDevice& dev, const OptionsCont& oc) const { - dev.openTag(SUMO_TAG_VEHICLE).writeAttr(SUMO_ATTR_ID, id); - if (wasSet(VEHPARS_VTYPE_SET)) { - dev.writeAttr(SUMO_ATTR_TYPE, vtypeid); - } - if (departProcedure == DEPART_TRIGGERED) { - dev.writeAttr(SUMO_ATTR_DEPART, "triggered"); - } else { - dev.writeAttr(SUMO_ATTR_DEPART, time2string(depart)); - } - - // optional parameter - // departlane - if (wasSet(VEHPARS_DEPARTLANE_SET) && !defaultOptionOverrides(oc, "departlane")) { - std::string val; - switch (departLaneProcedure) { - case DEPART_LANE_GIVEN: - val = toString(departLane); - break; - case DEPART_LANE_RANDOM: - val = "random"; - break; - case DEPART_LANE_FREE: - val = "free"; - break; - case DEPART_LANE_ALLOWED_FREE: - val = "allowed"; - break; - case DEPART_LANE_BEST_FREE: - val = "best"; - break; - case DEPART_LANE_DEFAULT: - default: - break; - } - dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTLANE, val); - } else if (oc.isSet("departlane")) { - dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTLANE, oc.getString("departlane")); - } - // departpos - if (wasSet(VEHPARS_DEPARTPOS_SET) && !defaultOptionOverrides(oc, "departpos")) { - std::string val; - switch (departPosProcedure) { - case DEPART_POS_GIVEN: - val = toString(departPos); - break; - case DEPART_POS_RANDOM: - val = "random"; - break; - case DEPART_POS_RANDOM_FREE: - val = "random_free"; - break; - case DEPART_POS_FREE: - val = "free"; - break; - case DEPART_POS_PWAG_SIMPLE: - val = "pwagSimple"; - break; - case DEPART_POS_PWAG_GENERIC: - val = "pwagGeneric"; - break; - case DEPART_POS_MAX_SPEED_GAP: - val = "maxSpeedGap"; - break; - case DEPART_POS_BASE: - val = "base"; - break; - case DEPART_POS_DEFAULT: - default: - break; - } - dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTPOS, val); - } else if (oc.isSet("departpos")) { - dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTPOS, oc.getString("departpos")); - } - // departspeed - if (wasSet(VEHPARS_DEPARTSPEED_SET) && !defaultOptionOverrides(oc, "departspeed")) { - std::string val; - switch (departSpeedProcedure) { - case DEPART_SPEED_GIVEN: - val = toString(departSpeed); - break; - case DEPART_SPEED_RANDOM: - val = "random"; - break; - case DEPART_SPEED_MAX: - val = "max"; - break; - case DEPART_SPEED_DEFAULT: - default: - break; - } - dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTSPEED, val); - } else if (oc.isSet("departspeed")) { - dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTSPEED, oc.getString("departspeed")); - } - - // arrivallane - if (wasSet(VEHPARS_ARRIVALLANE_SET) && !defaultOptionOverrides(oc, "arrivallane")) { - std::string val; - switch (arrivalLaneProcedure) { - case ARRIVAL_LANE_GIVEN: - val = toString(arrivalLane); - break; - case ARRIVAL_LANE_CURRENT: - val = "current"; - break; - case ARRIVAL_LANE_DEFAULT: - default: - break; - } - dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALLANE, val); - } else if (oc.isSet("arrivallane")) { - dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALLANE, oc.getString("arrivallane")); - } - // arrivalpos - if (wasSet(VEHPARS_ARRIVALPOS_SET) && !defaultOptionOverrides(oc, "arrivalpos")) { - std::string val; - switch (arrivalPosProcedure) { - case ARRIVAL_POS_GIVEN: - val = toString(arrivalPos); - break; - case ARRIVAL_POS_RANDOM: - val = "random"; - break; - case ARRIVAL_POS_MAX: - val = "max"; - break; - case ARRIVAL_POS_DEFAULT: - default: - break; - } - dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALPOS, val); - } else if (oc.isSet("arrivalpos")) { - dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALPOS, oc.getString("arrivalpos")); - } - // arrivalspeed - if (wasSet(VEHPARS_ARRIVALSPEED_SET) && !defaultOptionOverrides(oc, "arrivalspeed")) { - std::string val; - switch (arrivalSpeedProcedure) { - case ARRIVAL_SPEED_GIVEN: - val = toString(arrivalSpeed); - break; - case ARRIVAL_SPEED_CURRENT: - val = "current"; - break; - case ARRIVAL_SPEED_DEFAULT: - default: - break; - } - dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALSPEED, val); - } else if (oc.isSet("arrivalspeed")) { - dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALSPEED, oc.getString("arrivalspeed")); - } - - // color - if (wasSet(VEHPARS_COLOR_SET)) { - dev.writeAttr(SUMO_ATTR_COLOR, color); - } - if (wasSet(VEHPARS_LINE_SET)) { - dev.writeAttr(SUMO_ATTR_LINE, line); - } - if (wasSet(VEHPARS_TAZ_SET)) { - dev.writeAttr(SUMO_ATTR_FROM_TAZ, fromTaz).writeAttr(SUMO_ATTR_TO_TAZ, toTaz); - } - if (wasSet(VEHPARS_PERSON_CAPACITY_SET)) { - dev.writeAttr(SUMO_ATTR_PERSON_CAPACITY, personCapacity); - } - if (wasSet(VEHPARS_PERSON_NUMBER_SET)) { - dev.writeAttr(SUMO_ATTR_PERSON_NUMBER, personNumber); - } -} - - -void -SUMOVehicleParameter::writeStops(OutputDevice& dev) const { - for (std::vector::const_iterator stop = stops.begin(); stop != stops.end(); ++stop) { - dev.openTag(SUMO_TAG_STOP); - if (stop->busstop != "") { - dev.writeAttr(SUMO_ATTR_BUS_STOP, stop->busstop); - } else { - dev.writeAttr(SUMO_ATTR_LANE, stop->lane); - if ((stop->setParameter & STOP_START_SET) != 0) { - dev.writeAttr(SUMO_ATTR_STARTPOS, stop->startPos); - } - if ((stop->setParameter & STOP_END_SET) != 0) { - dev.writeAttr(SUMO_ATTR_ENDPOS, stop->endPos); - } - } - if (stop->duration >= 0) { - dev.writeAttr(SUMO_ATTR_DURATION, STEPS2TIME(stop->duration)); - } - if (stop->until >= 0) { - dev.writeAttr(SUMO_ATTR_UNTIL, STEPS2TIME(stop->until)); - } - if ((stop->setParameter & STOP_TRIGGER_SET) != 0) { - dev.writeAttr(SUMO_ATTR_TRIGGERED, stop->triggered); - } - if ((stop->setParameter & STOP_PARKING_SET) != 0) { - dev.writeAttr(SUMO_ATTR_PARKING, stop->parking); - } - // look, we are writing the set of expected persons in its current state... - // if this method is used somewhere in the simulation output, - // one should consider keeping the original values additionally, - // as the ones we write may hev changed. - if ((stop->setParameter & STOP_EXPECTED_SET) != 0) { - dev.writeAttr(SUMO_ATTR_EXPECTED, stop->awaitedPersons); - } - dev.closeTag(); - } -} - - -bool -SUMOVehicleParameter::parseDepartLane(const std::string& val, const std::string& element, const std::string& id, - int& lane, DepartLaneDefinition& dld, std::string& error) { - bool ok = true; - if (val == "random") { - dld = DEPART_LANE_RANDOM; - } else if (val == "free") { - dld = DEPART_LANE_FREE; - } else if (val == "allowed") { - dld = DEPART_LANE_ALLOWED_FREE; - } else if (val == "best") { - dld = DEPART_LANE_BEST_FREE; - } else { - try { - lane = TplConvert::_2int(val.c_str()); - dld = DEPART_LANE_GIVEN; - if (lane < 0) { - ok = false; - } - } catch (...) { - ok = false; - } - } - if (!ok) { - error = "Invalid departLane definition for " + element + " '" + id + "';\n must be one of (\"random\", \"free\", \"allowed\", \"best\", or an int>=0)"; - } - return ok; -} - - -bool -SUMOVehicleParameter::parseDepartPos(const std::string& val, const std::string& element, const std::string& id, - SUMOReal& pos, DepartPosDefinition& dpd, std::string& error) { - bool ok = true; - if (val == "random") { - dpd = DEPART_POS_RANDOM; - } else if (val == "random_free") { - dpd = DEPART_POS_RANDOM_FREE; - } else if (val == "free") { - dpd = DEPART_POS_FREE; - } else if (val == "base") { - dpd = DEPART_POS_BASE; - } else if (val == "pwagSimple") { - dpd = DEPART_POS_PWAG_SIMPLE; - } else if (val == "pwagGeneric") { - dpd = DEPART_POS_PWAG_GENERIC; - } else if (val == "maxSpeedGap") { - dpd = DEPART_POS_MAX_SPEED_GAP; - } else { - try { - pos = TplConvert::_2SUMOReal(val.c_str()); - dpd = DEPART_POS_GIVEN; - } catch (...) { - ok = false; - } - } - if (!ok) { - error = "Invalid departPos definition for " + element + " '" + id + "';\n must be one of (\"random\", \"random_free\", \"free\", \"base\", \"pwagSimple\", \"pwagGeneric\", \"maxSpeedGap\", or a float)"; - } - return ok; -} - - -bool -SUMOVehicleParameter::parseDepartSpeed(const std::string& val, const std::string& element, const std::string& id, - SUMOReal& speed, DepartSpeedDefinition& dsd, std::string& error) { - bool ok = true; - if (val == "random") { - dsd = DEPART_SPEED_RANDOM; - } else if (val == "max") { - dsd = DEPART_SPEED_MAX; - } else { - try { - speed = TplConvert::_2SUMOReal(val.c_str()); - dsd = DEPART_SPEED_GIVEN; - if (speed < 0) { - ok = false; - } - } catch (...) { - ok = false; - } - } - if (!ok) { - error = "Invalid departSpeed definition for " + element + " '" + id + "';\n must be one of (\"random\", \"max\", or a float>=0)"; - } - return ok; -} - - -bool -SUMOVehicleParameter::parseArrivalLane(const std::string& val, const std::string& element, const std::string& id, - int& lane, ArrivalLaneDefinition& ald, std::string& error) { - bool ok = true; - if (val == "current") { - ald = ARRIVAL_LANE_CURRENT; - } else { - try { - lane = TplConvert::_2int(val.c_str()); - ald = ARRIVAL_LANE_GIVEN; - if (lane < 0) { - ok = false; - } - } catch (...) { - ok = false; - } - } - if (!ok) { - error = "Invalid arrivalLane definition for " + element + " '" + id + "';\n must be one of (\"current\", or an int>=0)"; - } - return ok; -} - - -bool -SUMOVehicleParameter::parseArrivalPos(const std::string& val, const std::string& element, const std::string& id, - SUMOReal& pos, ArrivalPosDefinition& apd, std::string& error) { - bool ok = true; - if (val == "random") { - apd = ARRIVAL_POS_RANDOM; - } else if (val == "max") { - apd = ARRIVAL_POS_MAX; - } else { - try { - pos = TplConvert::_2SUMOReal(val.c_str()); - apd = ARRIVAL_POS_GIVEN; - } catch (...) { - ok = false; - } - } - if (!ok) { - error = "Invalid arrivalPos definition for " + element + " '" + id + "';\n must be one of (\"random\", \"max\", or a float)"; - } - return ok; -} - - -bool -SUMOVehicleParameter::parseArrivalSpeed(const std::string& val, const std::string& element, const std::string& id, - SUMOReal& speed, ArrivalSpeedDefinition& asd, std::string& error) { - bool ok = true; - if (val == "current") { - asd = ARRIVAL_SPEED_CURRENT; - } else { - try { - speed = TplConvert::_2SUMOReal(val.c_str()); - if (speed < 0) { - ok = false; - } - asd = ARRIVAL_SPEED_GIVEN; - } catch (...) { - ok = false; - } - } - if (!ok) { - error = "Invalid arrivalSpeed definition for " + element + " '" + id + "';\n must be one of (\"current\", or a float>=0)"; - } - return ok; -} - - -SUMOReal -SUMOVehicleParameter::interpretEdgePos(SUMOReal pos, SUMOReal maximumValue, SumoXMLAttr attr, const std::string& id) { - if (pos < 0) { - pos = maximumValue + pos; - } - if (pos > maximumValue) { - WRITE_WARNING("Invalid " + toString(attr) + " " + toString(pos) + " given for " + id + ". Inserting at edge end instead."); - pos = maximumValue; - } - return pos; -} - - -/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOVehicleParameter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOVehicleParameter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOVehicleParameter.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOVehicleParameter.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,487 +0,0 @@ -/****************************************************************************/ -/// @file SUMOVehicleParameter.h -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Axel Wegener -/// @author Michael Behrisch -/// @date 2006-01-24 -/// @version $Id: SUMOVehicleParameter.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Structure representing possible vehicle parameter -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef SUMOVehicleParameter_h -#define SUMOVehicleParameter_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include "SUMOVehicleClass.h" -#include "RGBColor.h" -#include "SUMOTime.h" -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class OutputDevice; -class OptionsCont; - - -// =========================================================================== -// value definitions -// =========================================================================== -const int VEHPARS_COLOR_SET = 1; -const int VEHPARS_VTYPE_SET = 2; -const int VEHPARS_DEPARTLANE_SET = 2 << 1; -const int VEHPARS_DEPARTPOS_SET = 2 << 2; -const int VEHPARS_DEPARTSPEED_SET = 2 << 3; -const int VEHPARS_PERIODNUM_SET = 2 << 4; -const int VEHPARS_PERIODFREQ_SET = 2 << 5; -const int VEHPARS_ROUTE_SET = 2 << 6; -const int VEHPARS_ARRIVALLANE_SET = 2 << 7; -const int VEHPARS_ARRIVALPOS_SET = 2 << 8; -const int VEHPARS_ARRIVALSPEED_SET = 2 << 9; -const int VEHPARS_LINE_SET = 2 << 10; -const int VEHPARS_TAZ_SET = 2 << 11; -const int VEHPARS_FORCE_REROUTE = 2 << 12; -const int VEHPARS_PERSON_CAPACITY_SET = 2 << 13; -const int VEHPARS_PERSON_NUMBER_SET = 2 << 14; - -const int STOP_INDEX_END = -1; -const int STOP_INDEX_FIT = -2; - -const int STOP_END_SET = 1; -const int STOP_START_SET = 2; -const int STOP_TRIGGER_SET = 2 << 1; -const int STOP_PARKING_SET = 2 << 2; -const int STOP_EXPECTED_SET = 2 << 3; - - -// =========================================================================== -// enum definitions -// =========================================================================== -/** - * @enum DepartDefinition - * @brief Possible ways to depart - */ -enum DepartDefinition { - /// @brief The time is given - DEPART_GIVEN, - /// @brief The departure is person triggered - DEPART_TRIGGERED, - /// @brief The vehicle is discarded if emission fails (not fully implemented yet) - DEPART_NOW, - /// @brief Tag for the last element in the enum for safe int casting - DEPART_DEF_MAX -}; - - -/** - * @enum DepartLaneDefinition - * @brief Possible ways to choose a lane on depart - */ -enum DepartLaneDefinition { - /// @brief No information given; use default - DEPART_LANE_DEFAULT, - /// @brief The lane is given - DEPART_LANE_GIVEN, - /// @brief The lane is chosen randomly - DEPART_LANE_RANDOM, - /// @brief The least occupied lane is used - DEPART_LANE_FREE, - /// @brief The least occupied lane from lanes which allow the continuation - DEPART_LANE_ALLOWED_FREE, - /// @brief The least occupied lane from best lanes - DEPART_LANE_BEST_FREE, - /// @brief Tag for the last element in the enum for safe int casting - DEPART_LANE_DEF_MAX -}; - - -/** - * @enum DepartPosDefinition - * @brief Possible ways to choose the departure position - */ -enum DepartPosDefinition { - /// @brief No information given; use default - DEPART_POS_DEFAULT, - /// @brief The position is given - DEPART_POS_GIVEN, - /// @brief The position is chosen randomly - DEPART_POS_RANDOM, - /// @brief A free position is chosen - DEPART_POS_FREE, - /// @brief Back-at-zero position - DEPART_POS_BASE, - /// @brief Simple max-flow insertion by P.Wagner - DEPART_POS_PWAG_SIMPLE, - /// @brief Generic max-flow insertion by P.Wagner - DEPART_POS_PWAG_GENERIC, - /// @brief A gap is chosen where the maximum speed may be achieved - DEPART_POS_MAX_SPEED_GAP, - /// @brief If a fixed number of random choices fails, a free position is chosen - DEPART_POS_RANDOM_FREE, - /// @brief Tag for the last element in the enum for safe int casting - DEPART_POS_DEF_MAX -}; - - -/** - * @enum DepartSpeedDefinition - * @brief Possible ways to choose the departure speed - */ -enum DepartSpeedDefinition { - /// @brief No information given; use default - DEPART_SPEED_DEFAULT, - /// @brief The speed is given - DEPART_SPEED_GIVEN, - /// @brief The speed is chosen randomly - DEPART_SPEED_RANDOM, - /// @brief The maximum speed is used - DEPART_SPEED_MAX, - /// @brief Tag for the last element in the enum for safe int casting - DEPART_SPEED_DEF_MAX -}; - - -/** - * @enum ArrivalLaneDefinition - * @brief Possible ways to choose the arrival lane - */ -enum ArrivalLaneDefinition { - /// @brief No information given; use default - ARRIVAL_LANE_DEFAULT, - /// @brief The arrival lane is given - ARRIVAL_LANE_GIVEN, - /// @brief The current lane shall be used - ARRIVAL_LANE_CURRENT, - /// @brief Tag for the last element in the enum for safe int casting - ARRIVAL_LANE_DEF_MAX -}; - - -/** - * @enum ArrivalPosDefinition - * @brief Possible ways to choose the arrival position - */ -enum ArrivalPosDefinition { - /// @brief No information given; use default - ARRIVAL_POS_DEFAULT, - /// @brief The arrival position is given - ARRIVAL_POS_GIVEN, - /// @brief The arrival position is chosen randomly - ARRIVAL_POS_RANDOM, - /// @brief The maximum arrival position is used - ARRIVAL_POS_MAX, - /// @brief Tag for the last element in the enum for safe int casting - ARRIVAL_POS_DEF_MAX -}; - - -/** - * @enum ArrivalSpeedDefinition - * @brief Possible ways to choose the arrival speed - */ -enum ArrivalSpeedDefinition { - /// @brief No information given; use default - ARRIVAL_SPEED_DEFAULT, - /// @brief The speed is given - ARRIVAL_SPEED_GIVEN, - /// @brief The current speed is used - ARRIVAL_SPEED_CURRENT, - /// @brief Tag for the last element in the enum for safe int casting - ARRIVAL_SPEED_DEF_MAX -}; - - -// =========================================================================== -// struct definitions -// =========================================================================== -/** - * @class SUMOVehicleParameter - * @brief Structure representing possible vehicle parameter - * - * The fields yielding with "Procedure" describe whether the according value - * shall be used or another procedure is used to choose the value. - * @see DepartLaneDefinition - * @see DepartPosDefinition - * @see DepartSpeedDefinition - */ -class SUMOVehicleParameter : public Parameterised { -public: - /** @brief Constructor - * - * Initialises the structure with default values - */ - SUMOVehicleParameter(); - - - /** @brief Returns whether the given parameter was set - * @param[in] what The parameter which one asks for - * @return Whether the given parameter was set - */ - bool wasSet(int what) const { - return (setParameter & what) != 0; - } - - - /** @brief Writes the parameters as a beginning element - * - * @param[in, out] dev The device to write into - * @param[in] oc The options to get defaults from - * @exception IOError not yet implemented - */ - void write(OutputDevice& dev, const OptionsCont& oc) const; - - - /** @brief Writes the enclosed stops - * - * @param[in, out] dev The device to write into - * @exception IOError not yet implemented - */ - void writeStops(OutputDevice& dev) const; - - - /** @brief Returns whether the defaults shall be used - * @param[in] oc The options to get the options from - * @param[in] optionName The name of the option to determine whether its value shall be used - * @return Whether the option is set and --defaults-override was set - */ - bool defaultOptionOverrides(const OptionsCont& oc, const std::string& optionName) const; - - - - /// @name Depart/arrival-attributes verification - /// @{ - - /** @brief Validates a given departLane value - * @param[in] val The departLane value to parse - * @param[in] element The name of the type of the parsed element, for building the error message - * @param[in] id The id of the parsed element, for building the error message - * @param[out] lane The parsed lane, if given - * @param[out] dld The parsed departLane definition - * @param[out] error Error message, if an error occures - * @return Whether the given value is a valid departLane definition - */ - static bool parseDepartLane(const std::string& val, const std::string& element, const std::string& id, - int& lane, DepartLaneDefinition& dld, std::string& error); - - - /** @brief Validates a given departPos value - * @param[in] val The departPos value to parse - * @param[in] element The name of the type of the parsed element, for building the error message - * @param[in] id The id of the parsed element, for building the error message - * @param[out] pos The parsed position, if given - * @param[out] dpd The parsed departPos definition - * @param[out] error Error message, if an error occures - * @return Whether the given value is a valid departPos definition - */ - static bool parseDepartPos(const std::string& val, const std::string& element, const std::string& id, - SUMOReal& pos, DepartPosDefinition& dpd, std::string& error); - - - /** @brief Validates a given departSpeed value - * @param[in] val The departSpeed value to parse - * @param[in] element The name of the type of the parsed element, for building the error message - * @param[in] id The id of the parsed element, for building the error message - * @param[out] speed The parsed speed, if given - * @param[out] dsd The parsed departSpeed definition - * @param[out] error Error message, if an error occures - * @return Whether the given value is a valid departSpeed definition - */ - static bool parseDepartSpeed(const std::string& val, const std::string& element, const std::string& id, - SUMOReal& speed, DepartSpeedDefinition& dsd, std::string& error); - - - /** @brief Validates a given arrivalLane value - * @param[in] val The arrivalLane value to parse - * @param[in] element The name of the type of the parsed element, for building the error message - * @param[in] id The id of the parsed element, for building the error message - * @param[out] lane The parsed lane, if given - * @param[out] ald The parsed arrivalLane definition - * @param[out] error Error message, if an error occures - * @return Whether the given value is a valid arrivalLane definition - */ - static bool parseArrivalLane(const std::string& val, const std::string& element, const std::string& id, - int& lane, ArrivalLaneDefinition& ald, std::string& error); - - - /** @brief Validates a given arrivalPos value - * @param[in] val The arrivalPos value to parse - * @param[in] element The name of the type of the parsed element, for building the error message - * @param[in] id The id of the parsed element, for building the error message - * @param[out] pos The parsed position, if given - * @param[out] apd The parsed arrivalPos definition - * @param[out] error Error message, if an error occures - * @return Whether the given value is a valid arrivalPos definition - */ - static bool parseArrivalPos(const std::string& val, const std::string& element, const std::string& id, - SUMOReal& pos, ArrivalPosDefinition& apd, std::string& error); - - - /** @brief Validates a given arrivalSpeed value - * @param[in] val The arrivalSpeed value to parse - * @param[in] element The name of the type of the parsed element, for building the error message - * @param[in] id The id of the parsed element, for building the error message - * @param[out] speed The parsed speed, if given - * @param[out] asd The parsed arrivalSpeed definition - * @param[out] error Error message, if an error occures - * @return Whether the given value is a valid arrivalSpeed definition - */ - static bool parseArrivalSpeed(const std::string& val, const std::string& element, const std::string& id, - SUMOReal& speed, ArrivalSpeedDefinition& asd, std::string& error); - /// @} - - - /** @brief Interprets negative edge positions and fits them onto a given edge - * @param[in] pos The position to be interpreted - * @param[in] maximumValue The maximum allowed value (edge length) - * @param[in] attr The attribute from which the value originated - * @param[in] id The id of the object to which this attribute belongs - * @return Whether the interpreted position - */ - static SUMOReal interpretEdgePos(SUMOReal pos, SUMOReal maximumValue, SumoXMLAttr attr, const std::string& id); - - /// @brief The vehicle's id - std::string id; - - /// @brief The vehicle's route id - std::string routeid; - /// @brief The vehicle's type id - std::string vtypeid; - /// @brief The vehicle's color - mutable RGBColor color; - - - /// @name Departure definition - /// @{ - - /// @brief The vehicle's departure time - SUMOTime depart; - /// @brief Information how the vehicle shall choose the depart time - DepartDefinition departProcedure; - /// @brief (optional) The lane the vehicle shall depart from (index in edge) - int departLane; - /// @brief Information how the vehicle shall choose the lane to depart from - DepartLaneDefinition departLaneProcedure; - /// @brief (optional) The position the vehicle shall depart from - SUMOReal departPos; - /// @brief Information how the vehicle shall choose the departure position - DepartPosDefinition departPosProcedure; - /// @brief (optional) The initial speed of the vehicle - SUMOReal departSpeed; - /// @brief Information how the vehicle's initial speed shall be chosen - DepartSpeedDefinition departSpeedProcedure; - /// @} - - - /// @name Arrival definition - /// @{ - - /// @brief (optional) The lane the vehicle shall arrive on (not used yet) - int arrivalLane; - /// @brief Information how the vehicle shall choose the lane to arrive on - ArrivalLaneDefinition arrivalLaneProcedure; - /// @brief (optional) The position the vehicle shall arrive on - SUMOReal arrivalPos; - /// @brief Information how the vehicle shall choose the arrival position - ArrivalPosDefinition arrivalPosProcedure; - /// @brief (optional) The final speed of the vehicle (not used yet) - SUMOReal arrivalSpeed; - /// @brief Information how the vehicle's end speed shall be chosen - ArrivalSpeedDefinition arrivalSpeedProcedure; - /// @} - - - /// @name Repetition definition - /// @{ - - /// @brief The number of times the vehicle shall be repeatedly inserted - int repetitionNumber; - /// @brief The number of times the vehicle was already inserted - int repetitionsDone; - /// @brief The time offset between vehicle reinsertions -#ifdef HAVE_SUBSECOND_TIMESTEPS - SUMOTime repetitionOffset; -#else - SUMOReal repetitionOffset; -#endif - /// @} - - - /// @brief The vehicle's line (mainly for public transport) - std::string line; - - /// @brief The vehicle's origin zone (district) - std::string fromTaz; - - /// @brief The vehicle's destination zone (district) - std::string toTaz; - - /** @struct Stop - * @brief Definition of vehicle stop (position and duration) - */ - struct Stop { - /// @brief The lane to stop at - std::string lane; - /// @brief (Optional) bus stop if one is assigned to the stop - std::string busstop; - /// @brief The stopping position start - SUMOReal startPos; - /// @brief The stopping position end - SUMOReal endPos; - /// @brief The stopping duration - SUMOTime duration; - /// @brief The time at which the vehicle may continue its journey - SUMOTime until; - /// @brief whether an arriving person lets the vehicle continue - bool triggered; - /// @brief whether the vehicle is removed from the net while stopping - bool parking; - /// @brief IDs of persons the vehicle has to wait for until departing - std::set awaitedPersons; - /// @brief at which position in the stops list - int index; - /// @brief Information for the output which parameter were set - int setParameter; - }; - - /// @brief List of the stops the vehicle will make - std::vector stops; - - /// @brief The vehicle's capacity (persons) - unsigned int personCapacity; - - /// @brief The number of persons in the vehicle - unsigned int personNumber; - - /// @brief Information for the router which parameter were set - mutable int setParameter; - - -}; - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOVTypeParameter.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOVTypeParameter.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOVTypeParameter.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOVTypeParameter.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,151 +0,0 @@ -/****************************************************************************/ -/// @file SUMOVTypeParameter.cpp -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date 10.09.2009 -/// @version $Id: SUMOVTypeParameter.cpp 14494 2013-08-24 21:47:48Z behrisch $ -/// -// Structure representing possible vehicle parameter -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef CHECK_MEMORY_LEAKS -#include -#endif // CHECK_MEMORY_LEAKS - - -// =========================================================================== -// member method definitions -// =========================================================================== -SUMOVTypeParameter::SUMOVTypeParameter() - : id(DEFAULT_VTYPE_ID), length(DEFAULT_VEH_LENGTH), - minGap(DEFAULT_VEH_MINGAP), maxSpeed(DEFAULT_VEH_MAXSPEED), - defaultProbability(DEFAULT_VEH_PROB), - speedFactor(DEFAULT_VEH_SPEEDFACTOR), speedDev(DEFAULT_VEH_SPEEDDEV), - emissionClass(SVE_UNKNOWN), color(RGBColor::DEFAULT_COLOR), - vehicleClass(SVC_UNKNOWN), - impatience(0), - width(DEFAULT_VEH_WIDTH), - height(DEFAULT_VEH_HEIGHT), shape(DEFAULT_VEH_SHAPE), - cfModel(DEFAULT_VEH_FOLLOW_MODEL), lcModel(DEFAULT_VEH_LANE_CHANGE_MODEL), - setParameter(0), saved(false), onlyReferenced(false) { -} - - -void -SUMOVTypeParameter::write(OutputDevice& dev) const { - if (onlyReferenced) { - return; - } - dev.openTag(SUMO_TAG_VTYPE); - dev.writeAttr(SUMO_ATTR_ID, id); - if (wasSet(VTYPEPARS_LENGTH_SET)) { - dev.writeAttr(SUMO_ATTR_LENGTH, length); - } - if (wasSet(VTYPEPARS_MINGAP_SET)) { - dev.writeAttr(SUMO_ATTR_MINGAP, minGap); - } - if (wasSet(VTYPEPARS_MAXSPEED_SET)) { - dev.writeAttr(SUMO_ATTR_MAXSPEED, maxSpeed); - } - if (wasSet(VTYPEPARS_PROBABILITY_SET)) { - dev.writeAttr(SUMO_ATTR_PROB, defaultProbability); - } - if (wasSet(VTYPEPARS_SPEEDFACTOR_SET)) { - dev.writeAttr(SUMO_ATTR_SPEEDFACTOR, speedFactor); - } - if (wasSet(VTYPEPARS_SPEEDDEVIATION_SET)) { - dev.writeAttr(SUMO_ATTR_SPEEDDEV, speedDev); - } - if (wasSet(VTYPEPARS_VEHICLECLASS_SET)) { - dev.writeAttr(SUMO_ATTR_VCLASS, toString(vehicleClass)); - } - if (wasSet(VTYPEPARS_EMISSIONCLASS_SET)) { - dev.writeAttr(SUMO_ATTR_EMISSIONCLASS, getVehicleEmissionTypeName(emissionClass)); - } - if (wasSet(VTYPEPARS_IMPATIENCE_SET)) { - if (impatience == -std::numeric_limits::max()) { - dev.writeAttr(SUMO_ATTR_IMPATIENCE, "off"); - } else { - dev.writeAttr(SUMO_ATTR_IMPATIENCE, impatience); - } - } - if (wasSet(VTYPEPARS_SHAPE_SET)) { - dev.writeAttr(SUMO_ATTR_GUISHAPE, getVehicleShapeName(shape)); - } - if (wasSet(VTYPEPARS_WIDTH_SET)) { - dev.writeAttr(SUMO_ATTR_WIDTH, width); - } - if (wasSet(VTYPEPARS_HEIGHT_SET)) { - dev.writeAttr(SUMO_ATTR_HEIGHT, height); - } - if (wasSet(VTYPEPARS_COLOR_SET)) { - dev.writeAttr(SUMO_ATTR_COLOR, color); - } - if (wasSet(VTYPEPARS_OSGFILE_SET)) { - dev.writeAttr(SUMO_ATTR_OSGFILE, osgFile); - } - if (wasSet(VTYPEPARS_IMGFILE_SET)) { - dev.writeAttr(SUMO_ATTR_IMGFILE, imgFile); - } - - if (cfParameter.size() != 0) { - dev.openTag(cfModel); - std::vector attrs; - for (CFParams::const_iterator i = cfParameter.begin(); i != cfParameter.end(); ++i) { - attrs.push_back(i->first); - } - std::sort(attrs.begin(), attrs.end()); - for (std::vector::const_iterator i = attrs.begin(); i != attrs.end(); ++i) { - dev.writeAttr(*i, cfParameter.find(*i)->second); - } - dev.closeTag(); - dev.closeTag(); - } else { - dev.closeTag(); - } -} - - -SUMOReal -SUMOVTypeParameter::get(const SumoXMLAttr attr, const SUMOReal defaultValue) const { - if (cfParameter.count(attr)) { - return cfParameter.find(attr)->second; - } else { - return defaultValue; - } -} - - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOVTypeParameter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOVTypeParameter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SUMOVTypeParameter.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SUMOVTypeParameter.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,185 +0,0 @@ -/****************************************************************************/ -/// @file SUMOVTypeParameter.h -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Michael Behrisch -/// @date 10.09.2009 -/// @version $Id: SUMOVTypeParameter.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// Structure representing possible vehicle parameter -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef SUMOVTypeParameter_h -#define SUMOVTypeParameter_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include "SUMOVehicleClass.h" -#include "RGBColor.h" -#include "SUMOTime.h" -#include - - -// =========================================================================== -// class declarations -// =========================================================================== -class OutputDevice; -class OptionsCont; - - -// =========================================================================== -// value definitions -// =========================================================================== -const int VTYPEPARS_LENGTH_SET = 1; -const int VTYPEPARS_MINGAP_SET = 2; -const int VTYPEPARS_MAXSPEED_SET = 2 << 2; -const int VTYPEPARS_PROBABILITY_SET = 2 << 3; -const int VTYPEPARS_SPEEDFACTOR_SET = 2 << 4; -const int VTYPEPARS_SPEEDDEVIATION_SET = 2 << 5; -const int VTYPEPARS_EMISSIONCLASS_SET = 2 << 6; -const int VTYPEPARS_COLOR_SET = 2 << 7; -const int VTYPEPARS_VEHICLECLASS_SET = 2 << 8; -const int VTYPEPARS_WIDTH_SET = 2 << 9; -const int VTYPEPARS_HEIGHT_SET = 2 << 10; -const int VTYPEPARS_SHAPE_SET = 2 << 11; -const int VTYPEPARS_OSGFILE_SET = 2 << 12; -const int VTYPEPARS_IMGFILE_SET = 2 << 13; -const int VTYPEPARS_IMPATIENCE_SET = 2 << 14; - - -// =========================================================================== -// struct definitions -// =========================================================================== -/** - * @class SUMOVTypeParameter - * @brief Structure representing possible vehicle parameter - */ -class SUMOVTypeParameter : public Parameterised { -public: - /** @brief Constructor - * - * Initialises the structure with default values - */ - SUMOVTypeParameter(); - - - /** @brief Returns whether the given parameter was set - * @param[in] what The parameter which one asks for - * @return Whether the given parameter was set - */ - bool wasSet(int what) const { - return (setParameter & what) != 0; - } - - - /** @brief Writes the vtype - * - * @param[in, out] dev The device to write into - * @exception IOError not yet implemented - */ - void write(OutputDevice& dev) const; - - /** @brief Validates stored car-following parameter - */ - void validateCFParameter() const; - - - /** @brief Returns the named value from the map, or the default if it is ot contained there - * @param[in] attr The corresponding xml attribute - * @param[in] defaultValue The value to return if the given map does not contain the named variable - * @return The named value from the map or the default if it does not exist there - */ - SUMOReal get(const SumoXMLAttr attr, const SUMOReal defaultValue) const; - - - /// @brief The vehicle type's id - std::string id; - - /// @brief The physical vehicle length - SUMOReal length; - /// @brief This class' free space in front of the vehicle itself - SUMOReal minGap; - /// @brief The vehicle type's maximum speed [m/s] - SUMOReal maxSpeed; - /// @brief The probability when being added to a distribution without an explicit probability - SUMOReal defaultProbability; - /// @brief The factor by which the maximum speed may deviate from the allowed max speed on the street - SUMOReal speedFactor; - /// @brief The standard deviation for speed variations - SUMOReal speedDev; - /// @brief The emission class of this vehicle - SUMOEmissionClass emissionClass; - /// @brief The color - RGBColor color; - /// @brief The vehicle's class - SUMOVehicleClass vehicleClass; - /// @brief The vehicle's impatience (willingness to obstruct others) - SUMOReal impatience; - - - /// @name Values for drawing this class' vehicles - /// @{ - - /// @brief This class' width - SUMOReal width; - - /// @brief This class' height - SUMOReal height; - - /// @brief This class' shape - SUMOVehicleShape shape; - - /// @brief 3D model file for this class - std::string osgFile; - - /// @brief Image file for this class - std::string imgFile; - /// @} - - - /// @brief The enum-representation of the car-following model to use - SumoXMLTag cfModel; - - /// @brief Car-following parameter - typedef std::map CFParams; - CFParams cfParameter; - - /// @brief The name of the lane-change model to use - std::string lcModel; - - /// @brief Information for the router which parameter were set - int setParameter; - - - /// @brief Information whether this type was already saved (needed by routers) - mutable bool saved; - - /// @brief Information whether this is a type-stub, being only referenced but not defined (needed by routers) - mutable bool onlyReferenced; - -}; - -#endif - -/****************************************************************************/ - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SystemFrame.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SystemFrame.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SystemFrame.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SystemFrame.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 23.06.2003 -/// @version $Id: SystemFrame.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SystemFrame.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A set of actions common to all applications /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -77,7 +77,7 @@ oc.doRegister("verbose", 'v', new Option_Bool(false)); oc.addDescription("verbose", "Report", "Switches to verbose output"); - oc.doRegister("print-options", 'p', new Option_Bool(false)); + oc.doRegister("print-options", new Option_Bool(false)); oc.addDescription("print-options", "Report", "Prints option values before processing"); oc.doRegister("help", '?', new Option_Bool(false)); @@ -86,8 +86,11 @@ oc.doRegister("version", 'V', new Option_Bool(false)); oc.addDescription("version", "Report", "Prints the current version"); - oc.doRegister("xml-validation", 'X', new Option_Bool(false)); - oc.addDescription("xml-validation", "Report", "Enable schema validation of XML inputs"); + oc.doRegister("xml-validation", 'X', new Option_String("auto")); + oc.addDescription("xml-validation", "Report", "Set schema validation scheme of XML inputs (\"never\", \"auto\" or \"always\")"); + + oc.doRegister("xml-validation.net", new Option_String("never")); + oc.addDescription("xml-validation.net", "Report", "Set schema validation scheme of SUMO network inputs (\"never\", \"auto\" or \"always\")"); oc.doRegister("no-warnings", 'W', new Option_Bool(false)); oc.addSynonyme("no-warnings", "suppress-warnings", true); @@ -102,6 +105,9 @@ oc.doRegister("error-log", new Option_FileName()); oc.addDescription("error-log", "Report", "Writes all warnings and errors to FILE"); + + oc.doRegister("output-prefix", new Option_FileName());//!!! check, describe + oc.addDescription("output-prefix", "Output", "Prefix which is applied to all output files. The special string 'TIME' is replaced by the current time."); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SystemFrame.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SystemFrame.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SystemFrame.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SystemFrame.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 23.06.2003 -/// @version $Id: SystemFrame.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SystemFrame.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A set of actions common to all applications /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SysUtils.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SysUtils.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SysUtils.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SysUtils.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file SysUtils.cpp /// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @date Tue, 29.05.2005 -/// @version $Id: SysUtils.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SysUtils.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A few system-specific functions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -26,6 +27,7 @@ #include #endif +#include #include "SysUtils.h" #ifndef WIN32 @@ -69,6 +71,44 @@ #endif +unsigned long +SysUtils::runHiddenCommand(const std::string& cmd) { +#ifndef WIN32 + return (unsigned long)system(cmd.c_str()); +#else + // code inspired by http://www.codeproject.com/Articles/2537/Running-console-applications-silently + STARTUPINFO StartupInfo; + PROCESS_INFORMATION ProcessInfo; + unsigned long rc; + + memset(&StartupInfo, 0, sizeof(StartupInfo)); + StartupInfo.cb = sizeof(STARTUPINFO); + StartupInfo.dwFlags = STARTF_USESHOWWINDOW; + StartupInfo.wShowWindow = SW_HIDE; + + // "/c" option - Do the command then terminate the command window + std::string winCmd = "CMD.exe /c " + cmd; + char* args = new char[winCmd.size()]; + args[0] = 0; + strcpy(args, winCmd.c_str()); + if (!CreateProcess(NULL, args, NULL, NULL, FALSE, + CREATE_NEW_CONSOLE, NULL, NULL, &StartupInfo, &ProcessInfo)) { + delete args; + return (unsigned long)GetLastError(); + } + + WaitForSingleObject(ProcessInfo.hProcess, INFINITE); + if (!GetExitCodeProcess(ProcessInfo.hProcess, &rc)) { + rc = 0; + } + + CloseHandle(ProcessInfo.hThread); + CloseHandle(ProcessInfo.hProcess); + + delete args; + return rc; +#endif +} /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SysUtils.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SysUtils.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/SysUtils.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/SysUtils.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file SysUtils.h /// @author Daniel Krajzewicz /// @date Fri, 29.04.2005 -/// @version $Id: SysUtils.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SysUtils.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A few system-specific functions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -30,6 +30,7 @@ #include #endif +#include // =========================================================================== // class definitions @@ -54,8 +55,10 @@ static long getWindowsTicks(); #endif -}; + /// @brief run a shell command without popping up any windows (particuarly on win32) + static unsigned long runHiddenCommand(const std::string& cmd); +}; #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/ToString.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/ToString.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/ToString.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/ToString.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Christian Roessel /// @author Daniel Krajzewicz /// @author Jakob Erdmann +/// @author Michael Behrisch /// @date Wed, 23 Sep 2002 -/// @version $Id: ToString.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ToString.h 18095 2015-03-17 09:39:00Z behrisch $ /// // ------------------- /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,6 +36,7 @@ #include #include #include +#include #include #include #include "StdDefs.h" @@ -57,6 +59,15 @@ } +template +inline std::string toHex(const T i, std::streamsize numDigits = 0) { + // taken from http://stackoverflow.com/questions/5100718/int-to-hex-string-in-c + std::stringstream stream; + stream << "0x" << std::setfill('0') << std::setw(numDigits == 0 ? sizeof(T) * 2 : numDigits) << std::hex << i; + return stream.str(); +} + + template <> inline std::string toString(const SumoXMLTag& tag, std::streamsize accuracy) { UNUSED_PARAMETER(accuracy); @@ -117,13 +128,25 @@ return SUMOXMLDefinitions::TrafficLightTypes.getString(type); } +template <> +inline std::string toString(const LaneChangeModel& model, std::streamsize accuracy) { + UNUSED_PARAMETER(accuracy); + return SUMOXMLDefinitions::LaneChangeModels.getString(model); +} + template inline std::string toString(const std::vector& v, std::streamsize accuracy = OUTPUT_ACCURACY) { + return toString(v.begin(), v.end(), accuracy); +} + + +template +inline std::string toString(const typename std::vector::const_iterator& b, const typename std::vector::const_iterator& e, std::streamsize accuracy = OUTPUT_ACCURACY) { UNUSED_PARAMETER(accuracy); std::ostringstream oss; - for (typename std::vector::const_iterator it = v.begin(); it != v.end(); ++it) { - if (it != v.begin()) { + for (typename std::vector::const_iterator it = b; it != e; ++it) { + if (it != b) { oss << " "; } oss << (*it)->getID(); @@ -148,6 +171,25 @@ } +template +inline std::string joinToStringSorting(const std::vector& v, const T_BETWEEN& between, std::streamsize accuracy = OUTPUT_ACCURACY) { + std::vector sorted(v); + std::sort(sorted.begin(), sorted.end()); + return joinToString(sorted, between, accuracy); +} + + +template +inline std::string toString(const std::set& v, std::streamsize accuracy = OUTPUT_ACCURACY) { + UNUSED_PARAMETER(accuracy); + std::vector ids; + for (typename std::set::const_iterator it = v.begin(); it != v.end(); ++it) { + ids.push_back((*it)->getID()); + } + return joinToStringSorting(ids, " "); +} + + template <> inline std::string toString(const std::vector& v, std::streamsize accuracy) { return joinToString(v, " ", accuracy); @@ -176,8 +218,28 @@ } template <> -inline std::string toString(const std::set& v, std::streamsize accuracy) { - return joinToString(v, " ", accuracy); +inline std::string toString(const std::set& v, std::streamsize) { + return joinToString(v, " "); +} + +template +inline std::string joinToString(const std::map& s, const T_BETWEEN& between, const T_BETWEEN_KEYVAL& between_keyval, std::streamsize accuracy = OUTPUT_ACCURACY) { + std::ostringstream oss; + bool connect = false; + for (typename std::map::const_iterator it = s.begin(); it != s.end(); ++it) { + if (connect) { + oss << toString(between, accuracy); + } else { + connect = true; + } + oss << toString(it->first, accuracy) << between_keyval << toString(it->second, accuracy); + } + return oss.str(); +} + +template <> +inline std::string toString(const std::map& v, std::streamsize) { + return joinToString(v, ", ", ":"); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/TplConvert.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/TplConvert.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/TplConvert.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/TplConvert.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sun, 09 Jun 2002 -/// @version $Id: TplConvert.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TplConvert.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Some conversion methods (from strings to other) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -224,7 +224,7 @@ if (data == 0 || data[0] == 0) { throw EmptyData(); } - unsigned i = 0; + int i = 0; SUMOReal sgn = 1; if (data[0] == '+') { i++; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/UtilExceptions.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/UtilExceptions.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/UtilExceptions.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/UtilExceptions.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Felix Brack /// @date Mon, 17 Dec 2001 -/// @version $Id: UtilExceptions.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: UtilExceptions.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Exceptions for used by some utility classes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -41,20 +41,6 @@ // class definitions // =========================================================================== /** - * InvalidArgument - * Thrown when an argument was not proper in the current context - * A message will be supplied - */ -class InvalidArgument : public std::runtime_error { -public: - /** constructor */ - InvalidArgument(const std::string& message) - : std::runtime_error(message) {} - -}; - - -/** * ProcessError * A general exception type that may be thrown when the process is no * longer able to proceed due to any reason. The reason itself is mostly @@ -72,6 +58,20 @@ }; + +/** + * InvalidArgument + * Thrown when an argument was not proper in the current context + * A message will be supplied + */ +class InvalidArgument : public ProcessError { +public: + /** constructor */ + InvalidArgument(const std::string& message) + : ProcessError(message) {} + +}; + /** * EmptyData diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/ValueRetriever.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/ValueRetriever.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/ValueRetriever.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/ValueRetriever.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file ValueRetriever.h /// @author Daniel Krajzewicz /// @date Fri, 29.04.2005 -/// @version $Id: ValueRetriever.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ValueRetriever.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/ValueSource.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/ValueSource.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/ValueSource.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/ValueSource.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file ValueSource.h /// @author Daniel Krajzewicz /// @date Fri, 29.04.2005 -/// @version $Id: ValueSource.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ValueSource.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/ValueTimeLine.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/ValueTimeLine.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/ValueTimeLine.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/ValueTimeLine.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: ValueTimeLine.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ValueTimeLine.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A list of time ranges with assigned values /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/VectorHelper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/VectorHelper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/VectorHelper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/VectorHelper.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: VectorHelper.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: VectorHelper.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A simple vector of SUMOReals /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,6 +33,7 @@ #endif #include +#include #include #include @@ -55,7 +56,7 @@ } static void normaliseSum(std::vector& v, T msum = 1.0) { - if (msum == 0) { + if (msum == 0 || v.size() == 0) { // is an error; do nothing return; } @@ -95,8 +96,8 @@ } static T maxValue(const std::vector& v) { - SUMOReal m = *(v.begin()); - for (typename std::vector::const_iterator j = v.begin() + 1; j != v.end(); j++) { + T m = -std::numeric_limits::max(); + for (typename std::vector::const_iterator j = v.begin() ; j != v.end(); j++) { if ((*j) > m) { m = *j; } @@ -105,8 +106,8 @@ } static T minValue(const std::vector& v) { - SUMOReal m = *(v.begin()); - for (typename std::vector::const_iterator j = v.begin() + 1; j != v.end(); j++) { + T m = std::numeric_limits::max(); + for (typename std::vector::const_iterator j = v.begin(); j != v.end(); j++) { if ((*j) < m) { m = *j; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/WrappingCommand.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/WrappingCommand.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/common/WrappingCommand.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/common/WrappingCommand.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Christian Roessel /// @author Daniel Krajzewicz /// @date Thu, 20 Dec 2001 -/// @version $Id: WrappingCommand.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: WrappingCommand.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A wrapper for a Command function /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/DistributionCont.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/DistributionCont.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/DistributionCont.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/DistributionCont.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file DistributionCont.cpp /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: DistributionCont.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: DistributionCont.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A container for distributions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/DistributionCont.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/DistributionCont.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/DistributionCont.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/DistributionCont.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file DistributionCont.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: DistributionCont.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: DistributionCont.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A container for distributions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/Distribution.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/Distribution.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/Distribution.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/Distribution.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file Distribution.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: Distribution.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Distribution.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The base class for distribution descriptions. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/Distribution_MeanDev.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/Distribution_MeanDev.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/Distribution_MeanDev.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/Distribution_MeanDev.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file Distribution_MeanDev.cpp /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: Distribution_MeanDev.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Distribution_MeanDev.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A distribution described by the mean value and std-dev amount /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/Distribution_MeanDev.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/Distribution_MeanDev.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/Distribution_MeanDev.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/Distribution_MeanDev.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file Distribution_MeanDev.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: Distribution_MeanDev.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Distribution_MeanDev.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A distribution described by the mean value and std-dev amount /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/Distribution_Points.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/Distribution_Points.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/Distribution_Points.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/Distribution_Points.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: Distribution_Points.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Distribution_Points.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The description of a distribution by a curve /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/Distribution_Points.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/Distribution_Points.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/Distribution_Points.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/Distribution_Points.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: Distribution_Points.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Distribution_Points.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The description of a distribution by a curve /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -1,7 +1,5 @@ noinst_LIBRARIES = libdistribution.a -EXTRA_DIST = Distribution.h - libdistribution_a_SOURCES = DistributionCont.cpp \ Distribution_MeanDev.cpp \ Distribution_Points.cpp \ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/distribution/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/distribution/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/distribution -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,35 +92,95 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libdistribution_a_AR = $(AR) $(ARFLAGS) libdistribution_a_LIBADD = am_libdistribution_a_OBJECTS = DistributionCont.$(OBJEXT) \ Distribution_MeanDev.$(OBJEXT) Distribution_Points.$(OBJEXT) libdistribution_a_OBJECTS = $(am_libdistribution_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libdistribution_a_SOURCES) DIST_SOURCES = $(libdistribution_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -84,6 +189,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -110,9 +216,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -123,10 +233,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -221,7 +327,6 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libdistribution.a -EXTRA_DIST = Distribution.h libdistribution_a_SOURCES = DistributionCont.cpp \ Distribution_MeanDev.cpp \ Distribution_Points.cpp \ @@ -267,10 +372,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libdistribution.a: $(libdistribution_a_OBJECTS) $(libdistribution_a_DEPENDENCIES) - -rm -f libdistribution.a - $(libdistribution_a_AR) libdistribution.a $(libdistribution_a_OBJECTS) $(libdistribution_a_LIBADD) - $(RANLIB) libdistribution.a + +libdistribution.a: $(libdistribution_a_OBJECTS) $(libdistribution_a_DEPENDENCIES) $(EXTRA_libdistribution_a_DEPENDENCIES) + $(AM_V_at)-rm -f libdistribution.a + $(AM_V_AR)$(libdistribution_a_AR) libdistribution.a $(libdistribution_a_OBJECTS) $(libdistribution_a_LIBADD) + $(AM_V_at)$(RANLIB) libdistribution.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -283,25 +389,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Distribution_Points.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -309,26 +415,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -340,15 +435,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -357,6 +448,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -405,10 +511,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -493,18 +604,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersHarmonoise.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersHarmonoise.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersHarmonoise.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersHarmonoise.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,153 @@ +/****************************************************************************/ +/// @file HelpersHarmonoise.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date Mon, 10.05.2004 +/// @version $Id: HelpersHarmonoise.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Noise data collector for edges/lanes +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include "PollutantsInterface.h" +#include "HelpersHarmonoise.h" +#include +#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// static definitions +// =========================================================================== +// --------------------------------------------------------------------------- +// vehicle class noise emission coefficients +// --------------------------------------------------------------------------- +// rolling component, light vehicles, alpha +double +HelpersHarmonoise::myR_A_C1_Parameter[27] = { 69.9, 69.9, 69.9, 74.9, 74.9, 74.9, 77.3, 77.5, 78.1, 78.3, 78.9, 77.8, 78.5, 81.9, 84.1, 86.5, 88.6, 88.2, 87.6, 85.8, 82.8, 80.2, 77.6, 75.0, 72.8, 70.4, 67.9 }; + +// rolling component, light vehicles, beta +double +HelpersHarmonoise::myR_B_C1_Parameter[27] = { 33.0, 33.0, 33.0, 15.2, 15.2, 15.2, 41.0, 41.2, 42.3, 41.8, 38.6, 35.5, 31.7, 21.5, 21.2, 23.5, 29.1, 33.5, 34.1, 35.1, 36.4, 37.4, 38.9, 39.7, 39.7, 39.7, 39.7 }; + + +// rolling component, heavy vehicles, alpha +double +HelpersHarmonoise::myR_A_C3_Parameter[27] = { 80.5, 80.5, 80.5, 82.5, 83.5, 83.5, 86.5, 88.3, 88.7, 88.3, 91.4, 92.2, 96.0, 98.1, 97.8, 98.4, 97.2, 94.6, 95.9, 90.5, 87.1, 85.1, 83.2, 81.3, 81.3, 81.3, 81.3 }; + +// rolling component, heavy vehicles, beta +double +HelpersHarmonoise::myR_B_C3_Parameter[27] = { 33.0, 33.0, 33.0, 30.0, 30.0, 30.0, 41.0, 41.2, 42.3, 41.8, 38.6, 35.5, 31.7, 21.5, 21.2, 23.5, 29.1, 33.5, 34.1, 35.1, 36.4, 37.4, 38.9, 39.7, 39.7, 39.7, 39.7 }; + + + +// traction component, light vehicles, alpha +double +HelpersHarmonoise::myT_A_C1_Parameter[27] = { 90.0, 92.0, 89.0, 91.0, 92.4, 94.8, 90.8, 86.8, 86.2, 84.5, 84.5, 84.8, 83.5, 81.8, 81.4, 79.0, 79.2, 81.4, 85.5, 85.8, 85.2, 82.9, 81.0, 78.2, 77.2, 75.2, 74.2 }; + +// traction component, light vehicles, beta +double +HelpersHarmonoise::myT_B_C1_Parameter[27] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4, 9.4 }; + + +// traction component, heavy vehicles, alpha +double +HelpersHarmonoise::myT_A_C3_Parameter[27] = { 97.7, 97.3, 98.2, 103.3, 109.5, 104.3, 99.8, 100.2, 98.9, 99.5, 100.7, 101.2, 100.6, 100.2, 97.4, 97.1, 97.8, 97.3, 95.8, 94.9, 92.7, 90.6, 89.9, 87.9, 85.9, 83.8, 82.2 }; + +// traction component, heavy vehicles, beta +double +HelpersHarmonoise::myT_B_C3_Parameter[27] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7, 11.7 }; + + +// --------------------------------------------------------------------------- +// A-weighted correction for octave bands +// --------------------------------------------------------------------------- +double +HelpersHarmonoise::myAOctaveBandCorrection[27] = { -44.7, -39.4, -34.6, -30.2, -26.2, -22.5, -19.1, -16.1, -13.4, + -10.9, -8.6, -6.6, -4.8, -3.2, -1.9, -0.8, 0.0, +0.6, + +1.0, +1.2, +1.3, +1.2, +1.0, +0.5, -0.1, -1.1, -2.5 + }; + + + +double +mySurfaceCorrection[27] = { 0.7, 0.2, 3.6, -1.0, -1.8, -0.1, -0.9, -0.7, -1.1, -0.5, -1.5, + -2.4, -3.0, -4.6, -5.8, -6.5, -7.9, -7.8, -7.2, -6.3, -5.6, + -5.5, -4.8, -4.3 + }; + + +// =========================================================================== +// method definitions +// =========================================================================== +SUMOReal +HelpersHarmonoise::computeNoise(SUMOEmissionClass c, double v, double a) { + double* alphaT, *betaT, *alphaR, *betaR; + double ac = 0; + if (PollutantsInterface::isHeavy(c)) { + alphaT = myT_A_C3_Parameter; + betaT = myT_B_C3_Parameter; + alphaR = myR_A_C3_Parameter; + betaR = myR_B_C3_Parameter; + ac = 5.6; + } else if (!PollutantsInterface::isSilent(c)) { + alphaT = myT_A_C1_Parameter; + betaT = myT_B_C1_Parameter; + alphaR = myR_A_C1_Parameter; + betaR = myR_B_C1_Parameter; + ac = 4.4; + } else { + return 0; + } + // + double L_low = 0; + double L_high = 0; + v = v * 3.6; + double s = -30.;// + for (unsigned int i = 0; i < 27; ++i) { + double crc_low = alphaR[i] + betaR[i] * log10(v / 70.) + 10.*log10(.8); // + mySurfaceCorrection[i]; + double ctc_low = alphaT[i] + betaT[i] * ((v - 70.) / 70.) + a * ac + 10.*log10(.2); + double Li_low = 10. * log10(pow(10., (crc_low / 10.)) + pow(10., (ctc_low / 10.))); + Li_low += s; + double crc_high = alphaR[i] + betaR[i] * log10(v / 70.) + 10.*log10(.2); // + mySurfaceCorrection[i]; + double ctc_high = alphaT[i] + betaT[i] * ((v - 70.) / 70.) + a * ac + 10.*log10(.8); + double Li_high = 10. * log10(pow(10., (crc_high / 10.)) + pow(10., (ctc_high / 10.))); + Li_high += s; + L_low += pow(10., (Li_low + myAOctaveBandCorrection[i]) / 10.); + L_high += pow(10., (Li_high + myAOctaveBandCorrection[i]) / 10.); + } + L_low = (10. * log10(L_low)); + L_high = (10. * log10(L_high)); + SUMOReal v1 = (SUMOReal)(10. * log10(pow(10., L_low / 10.) + pow(10., L_high / 10.))); + return v1; +} + + + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersHarmonoise.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersHarmonoise.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersHarmonoise.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersHarmonoise.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,113 @@ +/****************************************************************************/ +/// @file HelpersHarmonoise.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Mon, 10.05.2004 +/// @version $Id: HelpersHarmonoise.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Helper methods for Harmonoise-based noise emission computation +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef HelpersHarmonoise_h +#define HelpersHarmonoise_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class HelpersHarmonoise + * @brief Helper methods for Harmonoise-based noise emission computation + * + * The stored values compute the recepted noise of either passenger or heavy + * duty vehicles for a distance of 10m from the noise source. + */ +class HelpersHarmonoise { +public: + /** @brief Returns the noise produced by the a vehicle of the given type at the given speed + * + * @param[in] c The vehicle emission class + * @param[in] v The vehicle's current velocity + * @param[in] a The vehicle's current acceleration + * @return The noise produced by the vehicle of the given class running with v and a + */ + static SUMOReal computeNoise(SUMOEmissionClass c, double v, double a); + + + /** @brief Computes the resulting noise + * + * @param[in] val The sum of converted vehicle noises ( pow(10., (/10.)) ) + * @return The resulting sum + */ + inline static SUMOReal sum(SUMOReal val) { + return SUMOReal(10. * log10(val)); + } + + +private: + /// @name vehicle class noise emission coefficients + /// @{ + + /// @brief rolling component, light vehicles, alpha + static double myR_A_C1_Parameter[27]; + + /// @brief rolling component, light vehicles, beta + static double myR_B_C1_Parameter[27]; + + /// @brief rolling component, heavy vehicles, alpha + static double myR_A_C3_Parameter[27]; + + /// @brief rolling component, heavy vehicles, beta + static double myR_B_C3_Parameter[27]; + + /// @brief traction component, light vehicles, alpha + static double myT_A_C1_Parameter[27]; + + /// @brief traction component, light vehicles, beta + static double myT_B_C1_Parameter[27]; + + /// @brief traction component, heavy vehicles, alpha + static double myT_A_C3_Parameter[27]; + + /// @brief traction component, heavy vehicles, beta + static double myT_B_C3_Parameter[27]; + /// @} + + + /// @brief A-weighted correction for octave bands + static double myAOctaveBandCorrection[27]; + + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA3.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA3.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA3.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA3.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,575 @@ +/****************************************************************************/ +/// @file HelpersHBEFA3.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date Mon, 10.05.2004 +/// @version $Id: HelpersHBEFA3.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Helper methods for HBEFA3-based emission computation +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include "HelpersHBEFA3.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// static definitions +// =========================================================================== +double +HelpersHBEFA3::myFunctionParameter[45][6][6] = { + { + // LDV + { 7192, 1022, 0.0, -161, 23.33, 0.0 }, // CO2(total) + { 961.4, 69.4, 0.0, -114.3, 3.851, 0.0 }, // CO + { 59.65, 1.963, 0.0, -5.305, 0.159, 0.0 }, // HC + { 2294, 323.8, 0.0, -52.78, 7.43, 0.0 }, // mKr + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // NOx + { 5.695, 0.2347, 0.0, -0.8032, 0.05115, -0.0007435 }, // PM + }, + { + // LDV_G_EU0 + { 1.045e+04, 1105, 0.0, -430.5, 29.24, 0.0 }, // CO2(total) + { 956.6, 219.3, 0.0, -41.98, 0.0, 0.13 }, // CO + { 80.96, 4.731, 0.0, -4.85, 0.1828, 0.0 }, // HC + { 3332, 352.5, 0.0, -137.3, 9.328, 0.0 }, // mKr + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // NOx + { 1.243, 0.2422, 0.0, -0.1785, 0.008536, 0.0 }, // PM + }, + { + // LDV_G_EU1 + { 4906, 1144, 0.0, 295.4, 0.0, 0.3967 }, // CO2(total) + { 2176, 243.2, 0.0, -303.2, 11.33, 0.0 }, // CO + { 26.97, 3.78, 0.0, -3.277, 0.1403, 0.0 }, // HC + { 1565, 365, 0.0, 94.21, 0.0, 0.1266 }, // mKr + { 19.35, 3.279, 0.0, 0.8384, 0.0, 0.001006 }, // NOx + { 0.915, 0.18, 0.2317, -0.1635, 0.006222, 0.0 }, // PM + }, + { + // LDV_G_EU2 + { 5122, 1131, 0.0, 277.6, 0.0, 0.391 }, // CO2(total) + { 1296, 123.5, 0.0, -174.8, 6.212, 0.0 }, // CO + { 10.94, 1.322, 0.0, -1.316, 0.05277, 0.0 }, // HC + { 1634, 360.9, 0.0, 88.54, 0.0, 0.1247 }, // mKr + { 6.574, 1.161, 0.0, 0.3115, 0.0, 0.0003318 }, // NOx + { 1.988, 0.3357, 0.0, -0.2804, 0.01234, 0.0 }, // PM + }, + { + // LDV_G_EU3 + { 5363, 1115, 0.0, 264, 0.0, 0.394 }, // CO2(total) + { 809.6, 64.08, 0.0, -108, 3.632, 0.0 }, // CO + { 3.502, 0.3612, 0.0, -0.4307, 0.01612, 0.0 }, // HC + { 1710, 355.8, 0.0, 84.18, 0.0, 0.1257 }, // mKr + { 0.5866, 0.2926, 0.0, 0.1955, 0.0, 0.0 }, // NOx + { 0.7376, 0.09247, 0.0, -0.0981, 0.004036, 0.0 }, // PM + }, + { + // LDV_G_EU4 + { 5056, 1015, 0.0, 286.5, 0.0, 0.3172 }, // CO2(total) + { 567.4, 43.43, 0.0, -76.69, 2.618, 0.0 }, // CO + { 2.052, 0.1911, 0.0, -0.2652, 0.009888, 0.0 }, // HC + { 1613, 323.8, 0.0, 91.39, 0.0, 0.1012 }, // mKr + { 1.1, 0.1892, 0.0, 0.08809, 0.0, 0.0 }, // NOx + { 0.5892, 0.06059, 0.0, -0.07563, 0.002986, 0.0 }, // PM + }, + { + // LDV_G_EU5 + { 4635, 985.8, 0.0, 296.2, 0.0, 0.3007 }, // CO2(total) + { 639.8, 43.92, 0.0, -85.21, 2.829, 0.0 }, // CO + { 2.248, 0.1968, 0.0, -0.2896, 0.01057, 0.0 }, // HC + { 1479, 314.4, 0.0, 94.47, 0.0, 0.0959 }, // mKr + { 1.101, 0.1824, 0.0, 0.08517, 0.0, 0.0 }, // NOx + { 0.6097, 0.06993, 0.0, -0.08108, 0.003213, 0.0 }, // PM + }, + { + // LDV_G_EU6 + { 4423, 927.9, 0.0, 279, 0.0, 0.2844 }, // CO2(total) + { 645.1, 41.88, 0.0, -85.32, 2.798, 0.0 }, // CO + { 2.311, 0.1872, 0.0, -0.2952, 0.01056, 0.0 }, // HC + { 1411, 296, 0.0, 88.98, 0.0, 0.09072 }, // mKr + { 1.109, 0.1806, 0.0, 0.08319, 0.0, 0.0 }, // NOx + { 0.6029, 0.06641, 0.0, -0.08017, 0.003149, 0.0 }, // PM + }, + { + // LDV_G_East + { 8365, 832.4, 0.0, -368.6, 22.94, 0.0 }, // CO2(total) + { 2266, 172.8, 0.0, -235.2, 8.393, 0.0 }, // CO + { 2226, 46.86, 0.0, -212.9, 5.895, 0.0 }, // HC + { 2668, 265.5, 0.0, -117.6, 7.317, 0.0 }, // mKr + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // NOx + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // PM + }, + { + // LDV_D_EU0 + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // CO2(total) + { 7.189, 2.276, 0.0, 2.542, 0.0, 0.0 }, // CO + { 4.995, 0.2038, 0.0, 0.4551, 0.0, 0.0 }, // HC + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // mKr + { 53.84, 11.77, 0.0, -3.702, 0.3365, 0.0 }, // NOx + { 17.82, 0.9409, 0.0, -1.8, 0.1364, -0.001849 }, // PM + }, + { + // LDV_D_EU1 + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // CO2(total) + { 4.958, 1.428, 0.0, 1.624, 0.0, 0.0 }, // CO + { 2.849, 0.1092, 0.0, 0.2372, 0.0, 0.0 }, // HC + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // mKr + { 45.13, 10.42, 0.0, -2.941, 0.2852, 0.0 }, // NOx + { 15.3, 0.6367, 0.0, -2.007, 0.1254, -0.001671 }, // PM + }, + { + // LDV_D_EU2 + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // CO2(total) + { 1.437, 0.4449, 0.0, 0.4966, 0.0, 0.0 }, // CO + { 1.262, 0.04612, 0.0, 0.1011, 0.0, 0.0 }, // HC + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // mKr + { 42.83, 9.371, 0.0, -2.973, 0.2623, 0.0 }, // NOx + { 6.58, 0.2888, 0.0, -0.7254, 0.04933, -0.0006649 }, // PM + }, + { + // LDV_D_EU3 + { 3779, 902, 0.0, 288.6, 0.0, 0.3084 }, // CO2(total) + { 1.94, 0.02085, 0.0, -0.03984, 0.0, 0.0 }, // CO + { 0.4687, 0.02017, 0.0, -0.02515, 0.00116, 0.0 }, // HC + { 1189, 283.7, 0.0, 90.77, 0.0, 0.09701 }, // mKr + { 33.02, 6.747, 1.706, -1.94, 0.1688, 0.0 }, // NOx + { 1.553, 0.2034, 0.0, -0.09003, 0.006345, 0.0 }, // PM + }, + { + // LDV_D_EU4 + { 3682, 915.4, 0.0, 331, 0.0, 0.306 }, // CO2(total) + { 1.724, 0.03099, 0.0, -0.02995, 0.0, 0.0 }, // CO + { 0.03577, 0.01844, 0.0, 0.02506, 0.0, 0.0 }, // HC + { 1158, 288, 0.0, 104.1, 0.0, 0.09624 }, // mKr + { 40.68, 6.272, 0.0, -3.613, 0.2148, 0.0 }, // NOx + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // PM + }, + { + // LDV_D_EU5 + { 3505, 918.8, 0.0, 319.7, 0.0, 0.2978 }, // CO2(total) + { 1.135, 0.01769, 0.0, -0.01882, 0.0, 0.0 }, // CO + { 0.01997, 0.01916, 0.0, 0.02654, 0.0, 0.0 }, // HC + { 1102, 289, 0.0, 100.6, 0.0, 0.09367 }, // mKr + { 38.6, 6.079, 0.0, -3.414, 0.2026, 0.0 }, // NOx + { 0.1111, 0.007346, 0.005486, -0.009925, 0.0004092, 0.0 }, // PM + }, + { + // LDV_D_EU6 + { 3374, 880.2, 0.0, 308.9, 0.0, 0.2798 }, // CO2(total) + { 1.651, 0.03157, 0.0, -0.02797, 0.0, 0.0 }, // CO + { 0.03311, 0.01971, 0.0, 0.02401, 0.0, 0.0 }, // HC + { 1061, 276.9, 0.0, 97.17, 0.0, 0.088 }, // mKr + { 13.57, 2.119, 0.0, -1.211, 0.07068, 0.0 }, // NOx + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // PM + }, + { + // PC + { 9034, 925.8, 0.0, -394.3, 25.71, 0.0 }, // CO2(total) + { 428.7, 37.11, 0.0, -40.02, 1.494, 0.0 }, // CO + { 48.97, 1.325, 0.0, -3.261, 0.1002, 0.0 }, // HC + { 2937, 301, 0.0, -128.6, 8.373, 0.0 }, // mKr + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // NOx + { 1.021, 0.1731, 0.0, -0.03389, 0.0, 0.0001301 }, // PM + }, + { + // PC_Alternative + { 7932, 785, 0.0, -393, 23.68, 0.0 }, // CO2(total) + { 505.6, 20.69, 0.0, -62.72, 1.831, 0.0 }, // CO + { 3.917, 0.2646, 0.0, -0.4245, 0.01417, 0.0 }, // HC + { 3040, 300.9, 0.0, -150.6, 9.077, 0.0 }, // mKr + { 7.5, 0.563, 0.0, -0.6094, 0.02294, 0.0 }, // NOx + { 0.6383, 0.05188, 0.0, -0.08341, 0.002963, 0.0 }, // PM + }, + { + // PC_G_EU0 + { 1.172e+04, 1160, 0.0, -580.5, 34.98, 0.0 }, // CO2(total) + { 738.6, 83.85, 0.0, -52.74, 2.41, 0.0 }, // CO + { 26.96, 2.829, 0.0, 2.118, 0.0, 0.0 }, // HC + { 3737, 369.9, 0.0, -185.2, 11.16, 0.0 }, // mKr + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // NOx + { 2.159, 0.1897, 0.0, -0.2832, 0.00997, 0.0 }, // PM + }, + { + // PC_G_EU1 + { 1.093e+04, 1081, 0.0, -541.4, 32.63, 0.0 }, // CO2(total) + { 291.2, 24.14, 0.0, -32.65, 1.125, 0.0 }, // CO + { 14.58, 1.01, 0.0, -1.172, 0.03809, 0.0 }, // HC + { 3486, 345, 0.0, -172.7, 10.41, 0.0 }, // mKr + { 30.63, 2.031, 0.0, -3.595, 0.2137, -0.002299 }, // NOx + { 1.371, 0.09943, 0.0, -0.1742, 0.005969, 0.0 }, // PM + }, + { + // PC_G_EU2 + { 1.039e+04, 1028, 0.0, -514.9, 31.03, 0.0 }, // CO2(total) + { 620.1, 35.08, 0.0, -78.49, 2.429, 0.0 }, // CO + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // HC + { 3315, 328, 0.0, -164.2, 9.897, 0.0 }, // mKr + { 23.05, 1.089, 0.0, -2.081, 0.06925, 0.0 }, // NOx + { 2.371, 0.18, 0.0, -0.3078, 0.01044, 0.0 }, // PM + }, + { + // PC_G_EU3 + { 9858, 975.6, 0.0, -488.4, 29.43, 0.0 }, // CO2(total) + { 597.5, 32.52, 0.0, -75.27, 2.305, 0.0 }, // CO + { 2.303, 0.25, 0.0, -0.2555, 0.00992, 0.0 }, // HC + { 3144, 311.2, 0.0, -155.8, 9.388, 0.0 }, // mKr + { 7.204, 0.3327, 0.0, -0.6641, 0.0215, 0.0 }, // NOx + { 0.714, 0.05158, 0.0, -0.08903, 0.00308, 0.0 }, // PM + }, + { + // PC_G_EU4 + { 9449, 938.4, 0.0, -467.1, 28.26, 0.0 }, // CO2(total) + { 593.2, 19.32, 0.0, -73.25, 2.086, 0.0 }, // CO + { 2.923, 0.1113, 0.0, -0.3476, 0.01032, 0.0 }, // HC + { 3014, 299.3, 0.0, -149, 9.014, 0.0 }, // mKr + { 4.336, 0.4428, 0.0, -0.3204, 0.01371, 0.0 }, // NOx + { 0.2375, 0.0245, 0.0, -0.03251, 0.001325, 0.0 }, // PM + }, + { + // PC_G_EU5 + { 8823, 886, 0.0, -432.9, 26.53, 0.0 }, // CO2(total) + { 499.5, 16.93, 0.0, -61.37, 1.737, 0.0 }, // CO + { 2.554, 0.1011, 0.0, -0.3009, 0.008911, 0.0 }, // HC + { 2814, 282.6, 0.0, -138.1, 8.462, 0.0 }, // mKr + { 4.02, 0.4289, 0.0, -0.286, 0.01257, 0.0 }, // NOx + { 0.2786, 0.0241, 0.0, -0.03718, 0.001396, 0.0 }, // PM + }, + { + // PC_G_EU6 + { 8273, 845.1, 0.0, -401.1, 25.08, 0.0 }, // CO2(total) + { 405.3, 13.7, 0.0, -49.38, 1.389, 0.0 }, // CO + { 2.016, 0.08505, 0.0, -0.2338, 0.006998, 0.0 }, // HC + { 2639, 269.6, 0.0, -127.9, 8.001, 0.0 }, // mKr + { 3.444, 0.4035, 0.0, -0.2313, 0.01086, 0.0 }, // NOx + { 0.3107, 0.02274, 0.0, -0.04042, 0.001421, 0.0 }, // PM + }, + { + // PC_G_East + { 9396, 929.9, 0.0, -465.5, 28.05, 0.0 }, // CO2(total) + { 3034, 176.7, 0.0, -332.4, 10.88, 0.0 }, // CO + { 1363, 16.62, 0.0, -133.4, 3.537, 0.0 }, // HC + { 2997, 296.6, 0.0, -148.5, 8.948, 0.0 }, // mKr + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // NOx + { 2.394, 0.2126, 0.0, -0.3147, 0.01108, 0.0 }, // PM + }, + { + // PC_D_EU0 + { 8212, 888.8, 0.0, -237.3, 19.77, 0.0 }, // CO2(total) + { 84.56, 3.162, 0.0, -6.251, 0.1955, 0.0 }, // CO + { 6.153, 0.1644, 0.0, 0.1236, 0.0, 0.0 }, // HC + { 2583, 279.6, 0.0, -74.65, 6.22, 0.0 }, // mKr + { 28.84, 5.756, 0.0, -1.228, 0.1234, 0.0 }, // NOx + { 18.43, 0.7548, 0.0, -1.834, 0.06254, 0.0 }, // PM + }, + { + // PC_D_EU1 + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // CO2(total) + { 2.811, 1.004, 0.0, 0.9606, 0.0, 0.0 }, // CO + { 1.989, 0.06299, 0.0, 0.05963, 0.0, 0.0 }, // HC + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // mKr + { 43.38, 5.386, 0.0, -3.436, 0.1704, 0.0 }, // NOx + { 2.569, 0.4934, 0.0, 0.1002, 0.0, 0.0003083 }, // PM + }, + { + // PC_D_EU2 + { 4485, 760.9, 0.0, 160, 0.0, 0.2488 }, // CO2(total) + { 6.66, 0.08232, 0.0, 0.01522, 0.0, 0.0 }, // CO + { 1.145, 0.01858, 0.0, 0.04206, -0.0009262, 0.0 }, // HC + { 1411, 239.3, 0.0, 50.32, 0.0, 0.07827 }, // mKr + { 58.93, 5.709, 0.0, -5.174, 0.2186, 0.0 }, // NOx + { 1.496, 0.2026, 0.0, 0.0777, 0.0, 0.0001067 }, // PM + }, + { + // PC_D_EU3 + { 4234, 691.1, 0.0, 149.4, 0.0, 0.2161 }, // CO2(total) + { 4.436, 0.04963, 0.0, -0.1117, 0.0, 0.0 }, // CO + { 0.3601, 0.04356, 0.0, 0.02848, 0.0, 0.0 }, // HC + { 1332, 217.4, 0.0, 47, 0.0, 0.06797 }, // mKr + { 65.19, 7.25, 0.0, -6.12, 0.2648, 0.0 }, // NOx + { 1.773, 0.175, 0.0, -0.1295, 0.006047, 0.0 }, // PM + }, + { + // PC_D_EU4 + { 6824, 742.3, 0.0, -195.3, 16.46, 0.0 }, // CO2(total) + { 2.105, 0.02898, 0.0, -0.03593, 0.0, 0.0 }, // CO + { 0.1208, 0.01649, 0.0, 0.02261, 0.0, 0.0 }, // HC + { 2147, 233.5, 0.0, -61.45, 5.178, 0.0 }, // mKr + { 47.45, 4.011, 0.0, -4.061, 0.1619, 0.0 }, // NOx + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // PM + }, + { + // PC_D_EU5 + { 4125, 686.1, 0.0, 153.1, 0.0, 0.2125 }, // CO2(total) + { 1.319, 0.02428, 0.0, -0.01683, 0.0, 0.0 }, // CO + { 0.1285, 0.0168, 0.0, 0.02269, 0.0, 0.0 }, // HC + { 1298, 215.8, 0.0, 48.15, 0.0, 0.06684 }, // mKr + { 46.01, 4.064, 0.0, -3.872, 0.1567, 0.0 }, // NOx + { 0.6729, 0.02248, 0.0, -0.0764, 0.002153, 0.0 }, // PM + }, + { + // PC_D_EU6 + { 3946, 661.8, 0.0, 149.8, 0.0, 0.2041 }, // CO2(total) + { 2.096, 0.02906, 0.0, -0.03578, 0.0, 0.0 }, // CO + { 0.1368, 0.01692, 0.0, 0.02037, 0.0, 0.0 }, // HC + { 1241, 208.2, 0.0, 47.1, 0.0, 0.06419 }, // mKr + { 16.31, 1.39, 0.0, -1.391, 0.05512, 0.0 }, // NOx + { 0.553, 0.01902, 0.0, -0.06184, 0.001758, 0.0 }, // PM + }, + { + // Bus + { 1.903e+04, 6475, 0.0, 2073, 0.0, 0.0 }, // CO2(total) + { 72.61, 7.482, 0.0, 0.6348, 0.0, 0.0 }, // CO + { 17.46, 0.8473, 0.0, 0.254, 0.0, 0.0 }, // HC + { 6016, 2049, 0.0, 656.6, 0.0, 0.0 }, // mKr + { 218.7, 46.17, 0.0, 11.27, 0.0, 0.0 }, // NOx + { 7.222, 0.8024, 0.0, 0.1201, 0.0, 0.0 }, // PM + }, + { + // Coach + { 1.667e+04, 7763, 0.0, 2610, 0.0, 0.0 }, // CO2(total) + { 70.85, 7.73, 0.0, 1.306, 0.0, 0.0 }, // CO + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // HC + { 5244, 2442, 0.0, 820.9, 0.0, 0.0 }, // mKr + { 226.7, 60.86, 0.0, 16.97, 0.0, 0.0 }, // NOx + { 8.297, 0.8085, 0.0, 0.1417, 0.0, 0.0 }, // PM + }, + { + // HDV + { 2.657e+04, 7076, 0.0, 1753, 0.0, 0.0 }, // CO2(total) + { 54.72, 7.864, 0.0, 1.669, 0.0, 0.0 }, // CO + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // HC + { 8358, 2226, 0.0, 551.4, 0.0, 0.0 }, // mKr + { 305.6, 55.28, 0.0, 9.505, 0.0, 0.0 }, // NOx + { 7.952, 0.854, 0.0, 0.1195, 0.0, 0.0 }, // PM + }, + { + // HDV_G + { 7628, 3462, 0.0, 1058, 0.0, 0.9676 }, // CO2(total) + { 464, 22.34, 0.0, -81.01, 5.955, -0.1182 }, // CO + { 220.4, 3.65, 0.0, -13.27, 0.4346, 0.0 }, // HC + { 2434, 1104, 0.0, 337.4, 0.0, 0.3087 }, // mKr + { 53.53, 33.43, 0.0, 11.47, 0.0, 0.007806 }, // NOx + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, // PM + }, + { + // HDV_D_EU0 + { 3.251e+04, 7256, 0.0, 1631, 0.0, 0.0 }, // CO2(total) + { 52.89, 12.75, 0.0, 4.547, 0.0, 0.0 }, // CO + { 27.82, 1.453, 0.0, 0.2468, 0.0, 0.0 }, // HC + { 1.023e+04, 2283, 0.0, 513.1, 0.0, 0.0 }, // mKr + { 428.6, 104.2, 0.0, 24.18, 0.0, 0.0 }, // NOx + { 14.15, 2.335, 0.0, 0.6566, 0.0, 0.0 }, // PM + }, + { + // HDV_D_EU1 + { 2.749e+04, 6533, 0.0, 1538, 0.0, 0.0 }, // CO2(total) + { 58.3, 8.423, 0.0, 1.86, 0.0, 0.0 }, // CO + { 19.78, 1.929, 0.0, 0.2819, 0.0, 0.0 }, // HC + { 8647, 2055, 0.0, 483.7, 0.0, 0.0 }, // mKr + { 299.3, 67.56, 0.0, 14.89, 0.0, 0.0 }, // NOx + { 11.9, 1.744, 0.0, 0.3954, 0.0, 0.0 }, // PM + }, + { + // HDV_D_EU2 + { 2.537e+04, 6723, 0.0, 1689, 0.0, 0.0 }, // CO2(total) + { 41.4, 5.325, 0.0, 1.366, 0.0, 0.0 }, // CO + { 13.69, 1.19, 0.0, 0.1655, 0.0, 0.0 }, // HC + { 7980, 2115, 0.0, 531.2, 0.0, 0.0 }, // mKr + { 298.4, 67.21, 0.0, 15.36, 0.0, 0.0 }, // NOx + { 4.584, 0.789, 0.0, 0.2434, 0.0, 0.0 }, // PM + }, + { + // HDV_D_EU3 + { 2.598e+04, 6712, 0.0, 1728, 0.0, 0.0 }, // CO2(total) + { 51.47, 4.238, 0.0, 1.078, 0.0, 0.0 }, // CO + { 12.25, 0.9033, 0.0, 0.1305, 0.0, 0.0 }, // HC + { 8174, 2111, 0.0, 543.5, 0.0, 0.0 }, // mKr + { 241.1, 51.57, 0.0, 11.42, 0.0, 0.0 }, // NOx + { 5.436, 0.5336, 0.0, 0.1604, 0.0, 0.0 }, // PM + }, + { + // HDV_D_EU4 + { 2.429e+04, 7180, 0.0, 1835, 0.0, 0.0 }, // CO2(total) + { 50.68, 6.655, 0.0, 0.8349, 0.0, 0.0 }, // CO + { 1.119, 0.1747, 0.0, 0.03217, 0.0, 0.0 }, // HC + { 7639, 2259, 0.0, 577.1, 0.0, 0.0 }, // mKr + { 202.2, 42.34, 0.0, 8.858, 0.0, 0.0 }, // NOx + { 1.267, 0.131, 0.0, -0.006405, 0.0, 0.0 }, // PM + }, + { + // HDV_D_EU5 + { 2.396e+04, 7231, 0.0, 1868, 0.0, 0.0 }, // CO2(total) + { 51.51, 6.785, 0.0, 0.8496, 0.0, 0.0 }, // CO + { 1.124, 0.175, 0.0, 0.03241, 0.0, 0.0 }, // HC + { 7536, 2274, 0.0, 587.6, 0.0, 0.0 }, // mKr + { 164.8, 33.84, 0.0, 7.036, 0.0, 0.0 }, // NOx + { 1.305, 0.1324, 0.0, -0.007715, 0.0, 0.0 }, // PM + }, + { + // HDV_D_EU6 + { 2.353e+04, 7227, 0.0, 1889, 0.0, 0.0 }, // CO2(total) + { 30.78, 4.512, 0.0, 0.6383, 0.0, 0.0 }, // CO + { 0.7469, 0.136, 0.0, 0.03002, 0.0, 0.0 }, // HC + { 7400, 2273, 0.0, 594.2, 0.0, 0.0 }, // mKr + { 47.47, 11.68, 0.0, 2.737, 0.0, 0.0 }, // NOx + { 0.1279, 0.01668, 0.0, 0.00329, 0.0, 0.0 }, // PM + }, + { + // HDV_D_East + { 2.017e+04, 6019, 0.0, 1723, 0.0, 0.0 }, // CO2(total) + { 51.97, 16.95, 0.0, 6.523, 0.0, 0.0 }, // CO + { 78.82, 2.36, 0.0, -4.421, 0.1487, 0.0 }, // HC + { 6344, 1893, 0.0, 541.9, 0.0, 0.0 }, // mKr + { 299.7, 91.14, 0.0, 25.15, 0.0, 0.0 }, // NOx + { 13.59, 3.709, 0.0, 1.39, 0.0, 0.0 }, // PM + }, +}; + + +// =========================================================================== +// method definitions +// =========================================================================== +HelpersHBEFA3::HelpersHBEFA3() : PollutantsInterface::Helper("HBEFA3") { + int index = HBEFA3_BASE; + myEmissionClassStrings.insert("zero", index++); + std::string light[] = { "LDV", "LDV_G_EU0", "LDV_G_EU1", "LDV_G_EU2", "LDV_G_EU3", "LDV_G_EU4", "LDV_G_EU5", "LDV_G_EU6", "LDV_G_East", + "LDV_D_EU0", "LDV_D_EU1", "LDV_D_EU2", "LDV_D_EU3", "LDV_D_EU4", "LDV_D_EU5", "LDV_D_EU6", + "PC", "PC_Alternative", "PC_G_EU0", "PC_G_EU1", "PC_G_EU2", "PC_G_EU3", "PC_G_EU4", "PC_G_EU5", "PC_G_EU6", "PC_G_East", + "PC_D_EU0", "PC_D_EU1", "PC_D_EU2", "PC_D_EU3", "PC_D_EU4", "PC_D_EU5", "PC_D_EU6" + }; + std::string heavy[] = { "Bus", "Coach", "HDV", "HDV_G", "HDV_D_EU0", "HDV_D_EU1", "HDV_D_EU2", "HDV_D_EU3", "HDV_D_EU4", "HDV_D_EU5", "HDV_D_EU6", "HDV_D_East"}; + for (int i = 0; i < 33; i++) { + myEmissionClassStrings.insert(light[i], index); + std::transform(light[i].begin(), light[i].end(), light[i].begin(), tolower); + myEmissionClassStrings.addAlias(light[i], index); + index++; + } + for (int i = 0; i < 12; i++) { + myEmissionClassStrings.insert(heavy[i], index | PollutantsInterface::HEAVY_BIT); + std::transform(heavy[i].begin(), heavy[i].end(), heavy[i].begin(), tolower); + myEmissionClassStrings.addAlias(heavy[i], index); + index++; + } + myEmissionClassStrings.addAlias("unknown", myEmissionClassStrings.get("PC_G_EU4")); +} + + +SUMOEmissionClass +HelpersHBEFA3::getClass(const SUMOEmissionClass base, const std::string& vClass, const std::string& fuel, const std::string& eClass, const double /* weight */) const { + std::string eClassOffset = "0"; + if (eClass.length() == 5 && eClass.substr(0, 4) == "Euro") { + if (eClass[4] >= '0' && eClass[4] <= '6') { + eClassOffset = eClass.substr(4, 1); + } + } + std::string desc; + if (vClass == "Passenger") { + desc = "PC_"; + if (fuel == "Gasoline") { + desc += "G_"; + } else if (fuel == "Diesel") { + desc += "D_"; + } + desc += "EU" + eClassOffset; + } else if (vClass == "Delivery") { + desc = "LDV_"; + if (fuel == "Gasoline") { + desc += "G_"; + } else if (fuel == "Diesel") { + desc += "D_"; + } + desc += "EU" + eClassOffset; + } else if (vClass == "UrbanBus") { + desc = "Bus"; + } else if (vClass == "Coach") { + desc = "Coach"; + } else if (vClass == "Truck" || vClass == "Trailer") { + if (fuel == "Gasoline") { + desc = "HDV_G"; + } else if (fuel == "Diesel") { + desc = "HDV_D_EU" + eClassOffset; + } + } + if (myEmissionClassStrings.hasString(desc)) { + return myEmissionClassStrings.get(desc); + } + return base; +} + + +std::string +HelpersHBEFA3::getAmitranVehicleClass(const SUMOEmissionClass c) const { + const std::string name = myEmissionClassStrings.getString(c); + if (name.find("Coach") != std::string::npos) { + return "Coach"; + } else if (name.find("Bus") != std::string::npos) { + return "UrbanBus"; + } else if (name.find("LDV") != std::string::npos) { + return "Delivery"; + } else if (name.find("HDV") != std::string::npos) { + return "Truck"; + } + return "Passenger"; +} + + +std::string +HelpersHBEFA3::getFuel(const SUMOEmissionClass c) const { + const std::string name = myEmissionClassStrings.getString(c); + std::string fuel = "Gasoline"; + if (name.find("_D_") != std::string::npos) { + fuel = "Diesel"; + } + return fuel; +} + + +int +HelpersHBEFA3::getEuroClass(const SUMOEmissionClass c) const { + const std::string name = myEmissionClassStrings.getString(c); + if (name.find("_EU1") != std::string::npos) { + return 1; + } else if (name.find("_EU2") != std::string::npos) { + return 2; + } else if (name.find("_EU3") != std::string::npos) { + return 3; + } else if (name.find("_EU4") != std::string::npos) { + return 4; + } else if (name.find("_EU5") != std::string::npos) { + return 5; + } else if (name.find("_EU6") != std::string::npos) { + return 6; + } + return 0; +} + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA3.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA3.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA3.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA3.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,137 @@ +/****************************************************************************/ +/// @file HelpersHBEFA3.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Mon, 10.05.2004 +/// @version $Id: HelpersHBEFA3.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Helper methods for HBEFA3-based emission computation +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef HelpersHBEFA3_h +#define HelpersHBEFA3_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include "PollutantsInterface.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class HelpersHBEFA3 + * @brief Helper methods for HBEFA3-based emission computation + * + * The parameter are stored per vehicle class; 6*6 parameter are used, sorted by + * the pollutant (CO2, CO, HC, fuel, NOx, PMx), and the function part + * (c0, cav1, cav2, c1, c2, c3). + */ +class HelpersHBEFA3 : public PollutantsInterface::Helper { +public: + + + static const int HBEFA3_BASE = 1 << 16; + + + /** @brief Constructor (initializes myEmissionClassStrings) + */ + HelpersHBEFA3(); + + + /** @brief Returns the emission class described by the given parameters. + * @param[in] base the base class giving the default + * @param[in] vClass the vehicle class as described in the Amitran interface (Passenger, ...) + * @param[in] fuel the fuel type as described in the Amitran interface (Gasoline, Diesel, ...) + * @param[in] eClass the emission class as described in the Amitran interface (Euro0, ...) + * @param[in] weight the vehicle weight in kg as described in the Amitran interface + * @return the class described by the parameters + */ + SUMOEmissionClass getClass(const SUMOEmissionClass base, const std::string& vClass, const std::string& fuel, const std::string& eClass, const double weight) const; + + /** @brief Returns the vehicle class described by this emission class as described in the Amitran interface (Passenger, ...) + * @param[in] c the emission class + * @return the name of the vehicle class + */ + std::string getAmitranVehicleClass(const SUMOEmissionClass c) const; + + /** @brief Returns the fuel type described by this emission class as described in the Amitran interface (Gasoline, Diesel, ...) + * @param[in] c the emission class + * @return the fuel type + */ + std::string getFuel(const SUMOEmissionClass c) const; + + /** @brief Returns the Euro emission class described by this emission class as described in the Amitran interface (0, ..., 6) + * @param[in] c the emission class + * @return the Euro class + */ + int getEuroClass(const SUMOEmissionClass c) const; + + + /** @brief Computes the emitted pollutant amount using the given speed and acceleration + * + * As the functions are defining emissions in g/hour, the function's result is normed + * by 3.6 (seconds in an hour/1000) yielding mg/s. For fuel ml/s is returned. + * Negative acceleration results directly in zero emission. + * + * @param[in] c emission class for the function parameters to use + * @param[in] e the type of emission (CO, CO2, ...) + * @param[in] v The vehicle's current velocity + * @param[in] a The vehicle's current acceleration + * @param[in] slope The road's slope at vehicle's position [°] + * @return The amount emitted by the given emission class when moving with the given velocity and acceleration [mg/s or ml/s] + */ + inline SUMOReal compute(const SUMOEmissionClass c, const PollutantsInterface::EmissionType e, const double v, const double a, const double slope) const { + UNUSED_PARAMETER(slope); + if (c == HBEFA3_BASE || a < 0.) { + return 0.; + } + const int index = (c & ~PollutantsInterface::HEAVY_BIT) - HBEFA3_BASE - 1; + SUMOReal scale = 3.6; + if (e == PollutantsInterface::FUEL) { + if (getFuel(c) == "Diesel") { + scale *= 836.; + } else { + scale *= 742.; + } + } + const double* f = myFunctionParameter[index][e]; + return (SUMOReal) MAX2((f[0] + f[1] * a * v + f[2] * a * a * v + f[3] * v + f[4] * v * v + f[5] * v * v * v) / scale, 0.); + } + + +private: + /// @brief The function parameter + static double myFunctionParameter[45][6][6]; + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,184 @@ +/****************************************************************************/ +/// @file HelpersHBEFA.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date Mon, 10.05.2004 +/// @version $Id: HelpersHBEFA.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Helper methods for HBEFA-based emission computation +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include "HelpersHBEFA.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// static definitions +// =========================================================================== +double +HelpersHBEFA::myFunctionParameter[42][36] = { + // HDV; 3 clusters + // vehicle class#1/3 + { 4245.223, 154.6451, 1.927562, 541.2383, -4.550742, 0.04188938, 28.93721, 0.2037537, -0.003240476, 0.4930771, 0.008678762, -0.000121619, 13.32557, 0.01322119, 0.000700762, 0.095335, 0.001058381, -1.49E-05, 1337.078, 48.70711, 0.6071061, 170.4687, -1.433304, 0.01319348, 57.36627, 1.608585, -0.01356748, 5.374104, -0.04497662, 0.000340619, 4.261253, 0.02554976, 0.000149429, 0.03476595, 0.000966905, -8.29E-06 }, + // vehicle class#2/3 + { 7532.393, 296.2907, 4.776591, 894.9408, -4.454462, 0.01506321, 64.0142, 0.4218208, -0.003186929, 0.7000011, 0.01569257, -0.000193357, 30.24542, 0.0187745, 0.002567214, -0.08659921, 0.008306071, -7.94E-05, 2372.407, 93.3199, 1.504438, 281.8711, -1.40298, 0.004744429, 61.59909, 4.076068, 0.02217579, 12.79584, -0.09531593, 0.0005145, 11.43318, 0.08889879, 0.001239571, 0.09093043, 0.003454929, -3.71E-05 }, + // vehicle class#3/3 + { 4379.343, 326.7668, 5.13858, 1169.737, -10.36215, 0.05391863, 29.17327, 0.4384759, -0.02571725, 2.691101, -0.04257238, 0.000198563, 16.04012, 0.03122069, 0.00159475, 0.05119362, 0.003245125, -3.17E-05, 1262.193, 104.5547, 1.425356, 377.4979, -3.555124, 0.01910588, 89.55158, 3.046639, -0.01640881, 10.66656, -0.1096889, 0.00056675, 3.948798, 0.04236512, -0.000316063, 0.1628317, -0.001558937, 5.44E-06 }, + + // HDV; 6 clusters + // vehicle class#1/6 + { 3829.748, 147.9749, 1.777084, 529.3666, -4.567272, 0.04292206, 24.49617, 0.2063578, -0.004779611, 0.6274923, 0.0059385, -0.000108111, 11.84365, 0.01288211, 0.000403278, 0.1121517, 0.0004725, -1.07E-05, 1206.22, 46.60628, 0.5597114, 166.7297, -1.438511, 0.01351872, 56.05184, 1.508194, -0.01516956, 5.135625, -0.04351839, 0.000334778, 3.190084, 0.02395894, -0.000195444, 0.05076006, 0.000514056, -5.33E-06 }, + // vehicle class#2/6 + { 3727.514, 345.2813, 4.893428, 1096.787, -7.416957, 0.0280765, 23.77369, 0.4555801, -0.034993, 2.557392, -0.03645875, 0.000147667, 14.29555, 0.03184967, 0.00198025, 0.031253, 0.004242667, -4.20E-05, 1174.02, 108.75, 1.541237, 345.4448, -2.33605, 0.008842917, 77.83577, 3.005416, -0.030789, 10.1406, -0.09853533, 0.000451083, 2.518828, 0.03534608, -0.000696833, 0.1587361, -0.00135225, 2.25E-06 }, + // vehicle class#3/6 + { 5537.632, 269.8361, 5.648917, 1380.937, -19.34676, 0.1321773, 43.83397, 0.3016793, 0.005988, 1.782886, -0.02033733, 6.80E-05, 15.04026, 0.044756, -0.000785667, 0.2291307, -0.001645333, 1.20E-05, 1318.267, 91.26118, 1.02786, 467.6024, -7.150377, 0.04931933, 138.8276, 2.776265, 0.01352733, 8.819582, -0.07310133, 0.000410333, 5.781037, 0.04107233, 0.000997667, 0.1459517, -0.000726, 3.67E-06 }, + // vehicle class#4/6 + { 8985.25, 326.1776, 5.51268, 936.401, -3.526856, 0.004997833, 57.74254, 0.4314542, -0.01708467, 1.511672, -0.004765667, -7.15E-05, 26.43911, 0.006439667, 0.0025045, -0.1147438, 0.007911667, -7.13E-05, 2830, 102.7331, 1.736277, 294.9295, -1.110821, 0.001574167, 67.78939, 4.951368, 0.04244583, 14.74165, -0.09469333, 0.000439667, 10.07179, 0.1157227, -0.001297, 0.268713, -2.00E-04, -1.17E-05 }, + // vehicle class#5/6 + { 8726.428, 275.3837, 6.54939, 1411.54, -18.75068, 0.129248, 49.98624, 0.643615, -0.009524, 7.020251, -0.182641, 0.001201, 39.97457, -0.016933, 0.00411, -0.24333, 0.005946, -3.90E-05, 2152.048, 94.09162, 1.227265, 491.8213, -7.398254, 0.051621, 82.31324, 4.352434, 0.066345, 22.51904, -0.353294, 0.002424, 15.61173, 0.130472, 0.000312, 0.262619, -0.006538, 4.90E-05 }, + // vehicle class#6/6 + { 6523.294, 252.2728, 3.844317, 795.2882, -4.959638, 0.02617982, 65.1358, 0.3528321, 0.006897636, -0.01911436, 0.02942282, -0.000262364, 30.13205, 0.02454291, 0.002579182, -0.04914736, 0.007503273, -7.30E-05, 2054.581, 79.45602, 1.210808, 250.4845, -1.56209, 0.008245727, 59.21904, 3.089958, 0.003992818, 10.10062, -0.08431282, 0.000517455, 11.9726, 0.05959373, 0.002890182, -0.04753164, 0.005511, -4.79E-05 }, + + // HDV; 12 clusters + // vehicle class#1/12 + { 3777.914, 169.7948, 3.01701, 543.2617, -3.400868, 0.0276416, 19.79026, 0.2745816, -0.0136666, 1.042812, -0.0014014, -9.20E-05, 9.638248, 0.0117292, 0.001148, 0.0133902, 0.0024412, -2.24E-05, 1189.894, 53.47867, 0.9502392, 171.106, -1.071139, 0.008706, 58.3618, 1.905507, -0.0215914, 6.81565, -0.0627068, 0.0003704, 2.117546, 0.025472, -0.0003838, 0.0913152, -0.0002838, -1.80E-06 }, + // vehicle class#2/12 + { 1178.094, 98.07191, 0.6434853, 426.1617, -4.274885, 0.044156, 15.48074, 0.09682383, 0.000677833, 0.3069623, 0.0079665, -1.00E-04, 5.973097, 0.010058, 6.57E-05, 0.1382332, -0.001090833, 2.33E-06, 371.0531, 30.88879, 0.2026728, 134.2242, -1.346421, 0.01390733, 31.4823, 0.9752208, -0.001955667, 3.105738, -0.0124115, 0.0001845, 2.479061, 0.01418067, 7.65E-05, 0.03521683, 0.000487, -4.00E-06 }, + // vehicle class#3/12 + { 6037.502, 199.516, 2.957913, 629.6518, -4.367862, 0.0330238, 52.84091, 0.207839, 0.0033912, -0.2037164, 0.023461, -0.0001992, 21.73357, 0.0174904, 0.0026086, -0.0220608, 0.0052594, -4.76E-05, 1901.576, 62.83969, 0.9316262, 198.3155, -1.375705, 0.0104012, 56.82231, 2.241451, -0.0022442, 7.06951, -0.0568268, 0.0003946, 10.51586, 0.0366152, 0.0022762, -0.064026, 0.00404, -3.06E-05 }, + // vehicle class#4/12 + { 8346.313, 348.7957, 5.807692, 1002.669, -3.506569, -0.0024172, 57.5509, 0.4551868, -0.0191538, 1.673864, -0.0076502, -5.58E-05, 26.84843, 0.0092324, 0.002566, -0.1306032, 0.008825, -8.14E-05, 2628.76, 109.8569, 1.829195, 315.8013, -1.104431, -0.0007612, 57.11903, 5.282892, 0.0435782, 15.82654, -0.1004152, 0.000397, 9.997718, 0.1217238, -0.0013438, 0.2949876, -0.000472, -1.12E-05 }, + // vehicle class#5/12 + { 3945.002, 329.6897, 4.977738, 1029.128, -6.415743, 0.0229038, 26.09977, 0.460142, -0.0298806, 2.09053, -0.0254042, 7.76E-05, 13.81196, 0.0336372, 0.0022038, 0.0607028, 0.0034944, -3.80E-05, 1242.52, 103.8393, 1.567791, 324.1347, -2.020706, 0.0072138, 77.98345, 3.659314, -0.0167726, 13.28484, -0.141909, 0.0008374, 2.076544, 0.0586858, -0.0011186, 0.1913528, -0.0018984, 7.80E-06 }, + // vehicle class#6/12 + { 5146.604, 349.9846, 4.580544, 1128.035, -7.741384, 0.0275195, 58.78087, 0.4532422, -0.00607075, 0.731588, 0.00848925, -0.0001165, 27.23363, 0.046362, 0.0041685, -0.05372075, 0.00929775, -9.15E-05, 1620.978, 110.2314, 1.44269, 355.2865, -2.43823, 0.00866775, 49.73242, 3.702976, 0.010858, 12.32118, -0.1082213, 0.000542, 12.76151, 0.0733965, 0.003513, -0.006429, 0.00553575, -5.53E-05 }, + // vehicle class#7/12 + { 2468.366, 107.175, -0.454992, 531.0585, -6.0537, 0.0568685, 43.43802, 0.304624, 0.0032445, 0.290372, 0.0214735, -0.000149, 27.72425, 0.0096335, -0.00146, 0.5241775, -0.005529, 4.00E-06, 777.4382, 33.75592, -0.1433045, 167.2625, -1.906677, 0.017911, 19.87989, 1.605028, -0.0052925, 6.956905, -0.070429, 0.000715, 7.821013, 0.05183, -0.0001675, -0.0195895, 0.003644, -2.20E-05 }, + // vehicle class#8/12 + { 8158.499, 174.8699, 3.850001, 524.2941, -1.627882, 0.01411133, 84.22954, 0.4076163, 0.02642967, -0.7384697, 0.06290667, -0.000519667, 43.00436, 0.002628, 0.000444, -0.09107867, 0.0082, -8.30E-05, 2569.606, 55.07713, 1.212599, 165.132, -0.5127187, 0.004444667, 66.97121, 3.209013, 0.002880333, 10.74906, -0.08791767, 0.000667, 11.84367, 0.06905167, 0.002679333, -0.07983067, 0.007327667, -6.03E-05 }, + // vehicle class#9/12 + { 8726.428, 275.3837, 6.54939, 1411.54, -18.75068, 0.129248, 49.98624, 0.643615, -0.009524, 7.020251, -0.182641, 0.001201, 39.97457, -0.016933, 0.00411, -0.24333, 0.005946, -3.90E-05, 2152.048, 94.09162, 1.227265, 491.8213, -7.398254, 0.051621, 82.31324, 4.352434, 0.066345, 22.51904, -0.353294, 0.002424, 15.61173, 0.130472, 0.000312, 0.262619, -0.006538, 4.90E-05 }, + // vehicle class#10/12 + { 3572.165, 356.4182, 4.833206, 1145.116, -8.13211, 0.03177129, 22.1122, 0.4523216, -0.03864471, 2.890864, -0.04435486, 0.000197714, 14.64097, 0.03057286, 0.001820571, 0.01021743, 0.004777143, -4.49E-05, 1125.091, 112.2577, 1.522269, 360.6663, -2.561295, 0.01000657, 77.73029, 2.538346, -0.04080071, 7.894712, -0.06755414, 0.000175143, 2.834744, 0.01867486, -0.000395571, 0.1354384, -0.000962143, -1.71E-06 }, + // vehicle class#11/12 + { 5537.632, 269.8361, 5.648917, 1380.937, -19.34676, 0.1321773, 43.83397, 0.3016793, 0.005988, 1.782886, -0.02033733, 6.80E-05, 15.04026, 0.044756, -0.000785667, 0.2291307, -0.001645333, 1.20E-05, 1318.267, 91.26118, 1.02786, 467.6024, -7.150377, 0.04931933, 138.8276, 2.776265, 0.01352733, 8.819582, -0.07310133, 0.000410333, 5.781037, 0.04107233, 0.000997667, 0.1459517, -0.000726, 3.67E-06 }, + // vehicle class#12/12 + { 9345.47, 215.5508, 3.122979, 662.6306, -5.589131, 0.0536472, 37.07944, 0.2540546, -0.0062166, 0.8912752, 0.003296, -0.0001206, 16.58738, 0.0150562, 0.0007128, 0.019276, 0.002339, -1.48E-05, 2943.455, 67.89001, 0.983615, 208.7025, -1.760356, 0.0168968, 115.4133, 2.039132, -0.0205846, 5.871867, -0.0534446, 0.000368, 3.860352, 0.0345176, -0.000893, 0.0969626, -0.0004166, -1.00E-06 }, + + + // passenger & light delivery; 7 clusters + // vehicle class#1/7 + { 996.9682, 20.5008, 2.105255, 402.9621, -6.851369, 0.058854, 103.3263, 6.420582, -0.069665, 26.63126, -1.679889, 0.020307, 28.34217, 0.11478, 0.003321, 2.221844, -0.035114, 0.000203, 314.0057, 6.456945, 0.663072, 126.9172, -2.157912, 0.018537, -17.87872, 0.225347, 0.032447, 2.951223, -0.008134, 0.000136, 0, 0, 0, 0, 0, 0 }, + // vehicle class#2/7 + { 568.4164, 28.98654, 2.392379, 444.6236, -7.96483, 0.0713965, -30.73332, 2.72593, 0.1847705, 13.13587, -0.8342, 0.010139, 0.260599, 0.047499, 0.003201, 0.5008775, -0.017732, 0.000178, 179.0288, 9.12962, 0.753505, 140.0389, -2.508608, 0.0224875, -9.310931, 0.1564435, 0.025312, 1.814603, -0.039666, 0.0004675, 0, 0, 0, 0, 0, 0 }, + // vehicle class#3/7 + { 1555.28, 18.8412, 1.537082, 283.4023, -3.814485, 0.02828925, 92.07023, 1.368063, 0.047582, 1.272534, -0.1242364, 0.0018055, 12.88685, 0.02722013, 0.00503425, -0.09635513, 0.004566, -1.45E-05, 487.6871, 5.943571, 0.4862617, 89.2316, -1.20423, 0.008945125, -3.764286, 0.06886613, 0.01050787, 0.951383, -0.01077775, 0.00013075, 0, 0, 0, 0, 0, 0 }, + // vehicle class#4/7 + { 1638.562, 18.58688, 1.864623, 336.5175, -4.873515, 0.0352435, 200.8571, 2.721256, 0.0261325, -3.045024, 0.0110325, 0.0016485, 23.9455, 0.118374, 0.0010025, 1.515319, -0.01325, 5.10E-05, 516.0826, 5.854136, 0.587283, 105.9898, -1.534965, 0.0111, -18.26806, 0.194389, 0.027705, 3.746524, -0.0380975, 0.000291, 0, 0, 0, 0, 0, 0 }, + // vehicle class#5/7 + { -1003.894, 28.99975, 1.52799, 415.6817, -6.270028, 0.0435848, 2.427614, 0.0026388, 0.004946, 0.7214286, -0.0114684, 5.56E-05, 0.0985086, 0.006085, 5.60E-06, 0.1458242, -0.0024438, 1.10E-05, -316.1871, 9.133779, 0.4812568, 130.9234, -1.974812, 0.0137276, -2.200042, 0.0711052, 0.0060012, 1.097767, -0.0172668, 0.0001186, 0.3387628, 0.0045714, 0.0018894, 0.053204, -0.00066, 9.40E-06 }, + // vehicle class#6/7 + { -1460.657, 38.54555, 2.587558, 550.0553, -9.270113, 0.073572, 2.30828, 0.00579875, 0.00612125, 1.01166, -0.02122225, 0.000138, -0.3680555, 0.00952975, 0.0002195, 0.3670983, -0.0078245, 4.23E-05, -460.0494, 12.14033, 0.814979, 173.2458, -2.919721, 0.023172, -5.03414, 0.114594, 0.01239625, 2.15876, -0.045757, 0.00037375, -0.5019018, 0.00714925, 0.00287175, 0.1692208, -0.003773, 3.75E-05 }, + // vehicle class#7/7 + { 2166.094, 19.70297, 1.127945, 124.9567, -0.9551173, 0.013322, 22.93762, 0.3453138, 0.0340968, -1.141499, -0.0123665, 0.00048415, 1.257912, 0.0073757, 0.000494, -0.0051317, -0.00024665, 6.55E-06, 682.2344, 6.205661, 0.3552582, 39.35645, -0.3008244, 0.00419595, 3.022236, 0.0405486, 0.0033863, 0.2024628, -0.00173205, 3.28E-05, 0.07654135, 0.00089725, 0.00037255, 0.0085828, -7.94E-05, 1.50E-06 }, + + + // passenger & light delivery; 14 clusters + // vehicle class#1/14 + { 895.048, 28.01939, 2.268731, 353.5948, -6.013789, 0.060184, -78.42317, 2.252056, 0.204949, 11.88813, -0.729578, 0.00895, -0.198061, 0.029691, 0.001663, 0.228178, -0.009928, 0.00011, 281.9048, 8.825005, 0.714561, 111.3684, -1.894107, 0.018956, -0.840184, 0.128177, 0.022964, 0.090339, 0.006234, 0.00013, 0, 0, 0, 0, 0, 0 }, + // vehicle class#2/14 + { 996.9682, 20.5008, 2.105255, 402.9621, -6.851369, 0.058854, 103.3263, 6.420582, -0.069665, 26.63126, -1.679889, 0.020307, 28.34217, 0.11478, 0.003321, 2.221844, -0.035114, 0.000203, 314.0057, 6.456945, 0.663072, 126.9172, -2.157912, 0.018537, -17.87872, 0.225347, 0.032447, 2.951223, -0.008134, 0.000136, 0, 0, 0, 0, 0, 0 }, + // vehicle class#3/14 + { 241.7848, 29.95369, 2.516027, 535.6524, -9.915872, 0.082609, 16.95654, 3.199804, 0.164592, 14.38362, -0.938822, 0.011328, 0.719259, 0.065307, 0.004739, 0.773577, -0.025536, 0.000246, 76.1527, 9.434234, 0.792449, 168.7094, -3.123109, 0.026019, -17.78168, 0.18471, 0.02766, 3.538866, -0.085566, 0.000805, 0, 0, 0, 0, 0, 0 }, + // vehicle class#4/14 + { 1766.366, 28.86222, 1.009348, 179.9436, -1.995637, 0.021407, 9.519505, -0.0001735, 0.004417, 0.2940755, -0.003349, 7.50E-06, 2.614778, 0.008488, -4.90E-05, 0.0952845, -0.0017875, 7.50E-06, 556.3357, 9.090463, 0.3179045, 56.67517, -0.628547, 0.0067425, 11.64171, 0.092567, 0.004931, 0.1218405, 0.0027595, 1.85E-05, 0.477455, 0.002826, 0.001173, 0.01824, -0.000236, 5.00E-06 }, + // vehicle class#5/14 + { -1460.657, 38.54555, 2.587558, 550.0553, -9.270113, 0.073572, 0.851137, 0.002138, 0.002257, 0.3730315, -0.0078255, 5.10E-05, -0.191191, 0.00495, 0.000114, 0.1906935, -0.0040645, 2.20E-05, -460.0494, 12.14033, 0.814979, 173.2458, -2.919721, 0.023172, -2.918474, 0.066434, 0.0071865, 1.251511, -0.026527, 0.0002165, -0.1795185, 0.002557, 0.001027, 0.0605265, -0.0013495, 1.35E-05 }, + // vehicle class#6/14 + { -1460.657, 38.54555, 2.587558, 550.0553, -9.270113, 0.073572, 2.772362, 0.006964667, 0.007352, 1.215055, -0.025489, 0.000165667, -0.421911, 0.01092433, 0.000251667, 0.4208137, -0.008969333, 4.83E-05, -460.0494, 12.14033, 0.814979, 173.2458, -2.919721, 0.023172, -5.467097, 0.1244497, 0.01346233, 2.344422, -0.04969233, 0.000406, -0.5896773, 0.008399667, 0.003374, 0.198815, -0.004433, 4.40E-05 }, + // vehicle class#7/14 + { 1524.712, 19.83281, 1.526236, 246.8718, -2.755203, 0.02236, 125.3404, 0.8948317, 0.082081, -4.478419, 0.01717675, 0.00072175, 15.07328, 0.028836, 0.00394, -0.469072, 0.00669525, -1.45E-05, 480.2241, 6.246555, 0.480704, 77.75491, -0.8677803, 0.0070425, -2.985925, 0.0615315, 0.0086275, 0.6688392, -0.01133175, 0.000145, 0, 0, 0, 0, 0, 0 }, + // vehicle class#8/14 + { 1315.659, 19.85449, 0.8501516, 125.5445, -1.234241, 0.01365757, 6.445969, -0.001671, 0.001951714, -0.021213, 0.001361143, -1.47E-05, 0.9530063, 0.003198571, -8.14E-06, 0.037985, -0.000763286, 3.57E-06, 414.3807, 6.253384, 0.2677641, 39.54159, -0.3887376, 0.004301714, 6.52896, 0.06100229, 0.003692571, 0.1800367, -0.000521571, 3.26E-05, 0.08227386, 0.001756143, 0.000729286, 0.01931086, -0.000159286, 2.86E-06 }, + // vehicle class#9/14 + { 2389.721, 16.02631, 1.210326, 114.4709, -0.6800661, 0.01103857, 26.19008, 0.6217411, 0.05579343, -3.591721, 0.029783, 0.000538857, 1.040033, 0.010627, 0.000763571, -0.07915957, 0.001320571, 2.00E-06, 752.668, 5.047656, 0.3812051, 36.05382, -0.214194, 0.003476857, -0.4058774, 0.01190943, 0.002148571, 0.1531723, -0.002129143, 2.30E-05, 0, 0, 0, 0, 0, 0 }, + // vehicle class#10/14 + { -889.7033, 26.6133, 1.263098, 382.0882, -5.520007, 0.036088, 2.837958, 0.00280475, 0.00566125, 0.8156385, -0.01252825, 5.78E-05, 0.167109, 0.00646775, -1.93E-05, 0.1384215, -0.00212, 8.75E-06, -280.2215, 8.382141, 0.3978262, 120.3428, -1.738585, 0.0113665, -2.224633, 0.07692125, 0.00620775, 1.146896, -0.01680775, 0.00010925, 0.453569, 0.00528525, 0.0021895, 0.05635125, -0.0005985, 9.50E-06 }, + // vehicle class#11/14 + { 1160.041, 15.96945, 1.472322, 264.6607, -3.900594, 0.0307155, 99.29707, 3.146305, -0.0568605, 8.132381, -0.382831, 0.004678, 19.00645, 0.037976, 0.0099855, 0.4603955, 0.0078325, -5.60E-05, 356.7081, 5.067087, 0.4722905, 83.24187, -1.239802, 0.0098145, -6.34454, 0.1020615, 0.0158925, 1.428825, -0.0007645, 6.80E-05, 0, 0, 0, 0, 0, 0 }, + // vehicle class#12/14 + { 1638.562, 18.58688, 1.864623, 336.5175, -4.873515, 0.0352435, 200.8571, 2.721256, 0.0261325, -3.045024, 0.0110325, 0.0016485, 23.9455, 0.118374, 0.0010025, 1.515319, -0.01325, 5.10E-05, 516.0826, 5.854136, 0.587283, 105.9898, -1.534965, 0.0111, -18.26806, 0.194389, 0.027705, 3.746524, -0.0380975, 0.000291, 0, 0, 0, 0, 0, 0 }, + // vehicle class#13/14 + { 4090.07, 23.34377, 1.661025, 94.17165, 0.1407857, 0.010964, 74.75966, 0.458661, 0.06031533, -2.345069, -0.02632067, 0.000755, 1.535461, 0.003798333, 0.000544, -0.06322367, 0.000545667, 2.67E-06, 1288.211, 7.352367, 0.5231577, 29.66036, 0.044342, 0.003453, -1.500043, 0.014919, 0.002562, 0.2383583, -0.002585, 2.33E-05, 0, 0, 0, 0, 0, 0 }, + // vehicle class#14/14 + { 1868.198, 18.1992, 1.460284, 309.0113, -4.609052, 0.03110133, 7.862757, 0.7542397, 0.08466433, 6.912267, -0.2255383, 0.001978333, 2.053268, 0.01627633, 0.002533667, 0.1231153, -0.004271333, 4.10E-05, 588.409, 5.73203, 0.4599317, 97.32639, -1.45167, 0.009795667, -2.227221, 0.05712633, 0.009019333, 0.9453647, -0.01773867, 0.000163, 0, 0, 0, 0, 0, 0 } +}; + + +// =========================================================================== +// method definitions +// =========================================================================== +HelpersHBEFA::HelpersHBEFA() : PollutantsInterface::Helper("HBEFA2") { + myEmissionClassStrings.insert("zero", PollutantsInterface::ZERO_EMISSIONS); + int clusterSizesH[] = {3, 6, 12}; + int clusterSizesP[] = {7, 14}; + int index = 1; + for (int i = 0; i < 3; i++) { + for (int j = 0; j < clusterSizesH[i]; j++) { + myEmissionClassStrings.insert("HDV_" + toString(clusterSizesH[i]) + "_" + toString(j + 1), index | PollutantsInterface::HEAVY_BIT); + myEmissionClassStrings.addAlias("hdv_" + toString(clusterSizesH[i]) + "_" + toString(j + 1), index); + index++; + } + } + for (int i = 0; i < 2; i++) { + for (int j = 0; j < clusterSizesP[i]; j++) { + myEmissionClassStrings.insert("P_" + toString(clusterSizesP[i]) + "_" + toString(j + 1), index); + myEmissionClassStrings.addAlias("p_" + toString(clusterSizesP[i]) + "_" + toString(j + 1), index); + index++; + } + } + for (int i = 0; i < 3; i++) { + for (int j = 0; j < clusterSizesH[i]; j++) { + myEmissionClassStrings.insert("HDV_A0_" + toString(clusterSizesH[i]) + "_" + toString(j + 1), index | PollutantsInterface::HEAVY_BIT); + myEmissionClassStrings.addAlias("hdv_a0_" + toString(clusterSizesH[i]) + "_" + toString(j + 1), index); + index++; + } + } + for (int i = 0; i < 2; i++) { + for (int j = 0; j < clusterSizesP[i]; j++) { + myEmissionClassStrings.insert("P_A0_" + toString(clusterSizesP[i]) + "_" + toString(j + 1), index); + myEmissionClassStrings.addAlias("p_a0_" + toString(clusterSizesP[i]) + "_" + toString(j + 1), index); + index++; + } + } + myEmissionClassStrings.addAlias("unknown", myEmissionClassStrings.get("P_7_7")); +} + + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersHBEFA.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,105 @@ +/****************************************************************************/ +/// @file HelpersHBEFA.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Mon, 10.05.2004 +/// @version $Id: HelpersHBEFA.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Helper methods for HBEFA-based emission computation +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef HelpersHBEFA_h +#define HelpersHBEFA_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include "PollutantsInterface.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class HelpersHBEFA + * @brief Helper methods for HBEFA-based emission computation + * + * The parameter are stored per vehicle class; 6*6 parameter are used, sorted by + * the pollutant (CO2, CO, HC, fuel, NOx, PMx), and the function part + * (c0, cav1, cav2, c1, c2, c3). + */ +class HelpersHBEFA : public PollutantsInterface::Helper { +public: + /** @brief Constructor (initializes myEmissionClassStrings) + */ + HelpersHBEFA(); + + + /** @brief Computes the emitted pollutant amount using the given speed and acceleration + * + * As the functions are defining emissions in g/hour, the function's result is normed + * by 3.6 (seconds in an hour/1000) yielding mg/s. For fuel ml/s is returned. + * Negative acceleration results directly in zero emission. + * + * @param[in] c emission class for the function parameters to use + * @param[in] e the type of emission (CO, CO2, ...) + * @param[in] v The vehicle's current velocity + * @param[in] a The vehicle's current acceleration + * @param[in] slope The road's slope at vehicle's position [°] + * @return The amount emitted by the given emission class when moving with the given velocity and acceleration [mg/s or ml/s] + */ + inline SUMOReal compute(const SUMOEmissionClass c, const PollutantsInterface::EmissionType e, const double v, const double a, const double slope) const { + UNUSED_PARAMETER(slope); + if (c == PollutantsInterface::ZERO_EMISSIONS) { + return 0.; + } + const int index = (c & ~PollutantsInterface::HEAVY_BIT) - 1; + const SUMOReal kmh = v * 3.6; + const SUMOReal scale = (e == PollutantsInterface::FUEL) ? 3.6 * 790. : 3.6; + if (index >= 42) { + const double* f = myFunctionParameter[index - 42] + 6 * e; + return (SUMOReal) MAX2((f[0] + f[3] * kmh + f[4] * kmh * kmh + f[5] * kmh * kmh * kmh) / scale, 0.); + } + if (a < 0.) { + return 0.; + } + const double* f = myFunctionParameter[index] + 6 * e; + const double alpha = asin(a / 9.81) * 180. / M_PI; + return (SUMOReal) MAX2((f[0] + f[1] * alpha * kmh + f[2] * alpha * alpha * kmh + f[3] * kmh + f[4] * kmh * kmh + f[5] * kmh * kmh * kmh) / scale, 0.); + } + + +private: + /// @brief The function parameter + static double myFunctionParameter[42][36]; + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersPHEMlight.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersPHEMlight.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersPHEMlight.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersPHEMlight.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,273 @@ +/****************************************************************************/ +/// @file HelpersPHEMlight.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Nikolaus Furian +/// @date Sat, 20.04.2013 +/// @version $Id: HelpersPHEMlight.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// Helper methods for PHEMlight-based emission computation +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include "HelpersPHEMlight.h" +#include "PHEMCEPHandler.h" +#include "PHEMConstants.h" +#include +#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +HelpersPHEMlight::HelpersPHEMlight() : PollutantsInterface::Helper("PHEMlight"), myIndex(PHEMLIGHT_BASE) { + myEmissionClassStrings.insert("zero", myIndex++); +} + + +SUMOEmissionClass +HelpersPHEMlight::getClassByName(const std::string& eClass, const SUMOVehicleClass vc) { + if (eClass == "unknown" && !myEmissionClassStrings.hasString("unknown")) { + myEmissionClassStrings.addAlias("unknown", getClassByName("PKW_G_EU4", vc)); + } + if (myEmissionClassStrings.hasString(eClass)) { + return myEmissionClassStrings.get(eClass); + } + if (eClass.size() < 8 || (eClass.find("_D_EU") == std::string::npos && eClass.find("_G_EU") == std::string::npos)) { + return false; + } + int index = myIndex++; + const std::string type = eClass.substr(0, 3); + if (type == "LB_" || type == "RB_" || type == "LSZ" || eClass.find("LKW") != std::string::npos) { + index |= PollutantsInterface::HEAVY_BIT; + } + myEmissionClassStrings.insert(eClass, index); + if (!PHEMCEPHandler::getHandlerInstance().Load(index, eClass)) { + myEmissionClassStrings.remove(eClass, index); + myIndex--; + throw InvalidArgument("File for PHEM emission class " + eClass + " not found."); + } + std::string eclower = eClass; + std::transform(eclower.begin(), eclower.end(), eclower.begin(), tolower); + myEmissionClassStrings.addAlias(eclower, index); + return index; +} + + +SUMOReal +HelpersPHEMlight::getMaxAccel(SUMOEmissionClass c, double v, double a, double slope) const { + PHEMCEP* currCep = PHEMCEPHandler::getHandlerInstance().GetCep(c); + if (currCep == 0) { + return -1.; + } + return currCep->GetMaxAccel(v, a, slope); +} + + +SUMOEmissionClass +HelpersPHEMlight::getClass(const SUMOEmissionClass base, const std::string& vClass, const std::string& fuel, const std::string& eClass, const double weight) const { + std::string eClassOffset = "0"; + if (eClass.length() == 5 && eClass.substr(0, 4) == "Euro") { + if (eClass[4] >= '0' && eClass[4] <= '6') { + eClassOffset = eClass.substr(4, 1); + } + } + std::string desc; + if (vClass == "Passenger") { + desc = "PKW_"; + if (fuel == "Gasoline") { + desc += "G_"; + } else if (fuel == "Diesel") { + desc += "D_"; + } else if (fuel == "HybridGasoline") { + desc = "H_" + desc + "G_"; + } else if (fuel == "HybridDiesel") { + desc = "H_" + desc + "G_"; + } + desc += "EU" + eClassOffset; + } else if (vClass == "Moped") { + desc = "KKR_G_EU" + eClassOffset; + } else if (vClass == "Motorcycle") { + desc = "MR_G_EU" + eClassOffset; + if (fuel == "Gasoline2S") { + desc += "_2T"; + } else { + desc += "_4T"; + } + } else if (vClass == "Delivery") { + desc = "LNF_"; + if (fuel == "Gasoline") { + desc += "G_"; + } else if (fuel == "Diesel") { + desc += "D_"; + } + desc += "EU" + eClassOffset + "_I"; + if (weight > 1305.) { + desc += "I"; + if (weight > 1760.) { + desc += "I"; + } + } + } else if (vClass == "UrbanBus") { + desc = "LB_D_EU" + eClassOffset; + } else if (vClass == "Coach") { + desc = "RB_D_EU" + eClassOffset; + } else if (vClass == "Truck") { + desc = "Solo_LKW_D_EU" + eClassOffset + "_I"; + if (weight > 1305.) { + desc += "I"; + } + } else if (vClass == "Trailer") { + desc = "LSZ_D_EU" + eClassOffset; + } + if (myEmissionClassStrings.hasString(desc)) { + return myEmissionClassStrings.get(desc); + } + return base; +} + + +std::string +HelpersPHEMlight::getAmitranVehicleClass(const SUMOEmissionClass c) const { + const std::string name = myEmissionClassStrings.getString(c); + if (name.find("KKR_") != std::string::npos) { + return "Moped"; + } else if (name.find("RB_") != std::string::npos) { + return "Coach"; + } else if (name.find("LB_") != std::string::npos) { + return "UrbanBus"; + } else if (name.find("LNF_") != std::string::npos) { + return "Delivery"; + } else if (name.find("LSZ_") != std::string::npos) { + return "Trailer"; + } else if (name.find("MR_") != std::string::npos) { + return "Motorcycle"; + } else if (name.find("LKW_") != std::string::npos) { + return "Truck"; + } + return "Passenger"; +} + + +std::string +HelpersPHEMlight::getFuel(const SUMOEmissionClass c) const { + const std::string name = myEmissionClassStrings.getString(c); + std::string fuel = "Gasoline"; + if (name.find("_D_") != std::string::npos) { + fuel = "Diesel"; + } + if (name.find("H_") != std::string::npos) { + fuel = "Hybrid" + fuel; + } + return fuel; +} + + +int +HelpersPHEMlight::getEuroClass(const SUMOEmissionClass c) const { + const std::string name = myEmissionClassStrings.getString(c); + if (name.find("_EU1") != std::string::npos) { + return 1; + } else if (name.find("_EU2") != std::string::npos) { + return 2; + } else if (name.find("_EU3") != std::string::npos) { + return 3; + } else if (name.find("_EU4") != std::string::npos) { + return 4; + } else if (name.find("_EU5") != std::string::npos) { + return 5; + } else if (name.find("_EU6") != std::string::npos) { + return 6; + } + return 0; +} + + +SUMOReal +HelpersPHEMlight::getWeight(const SUMOEmissionClass c) const { + const std::string name = myEmissionClassStrings.getString(c); + if (name.find("LNF_") != std::string::npos) { + if (name.find("_III") != std::string::npos) { + return 2630.; + } else if (name.find("_II") != std::string::npos) { + return 1532.; + } else if (name.find("_I") != std::string::npos) { + return 652.; + } + } + if (name.find("Solo_LKW_") != std::string::npos) { + if (name.find("_II") != std::string::npos) { + return 8398.; + } else if (name.find("_I") != std::string::npos) { + return 18702.; + } + } + return -1.; +} + + +SUMOReal +HelpersPHEMlight::compute(const SUMOEmissionClass c, const PollutantsInterface::EmissionType e, const double v, const double a, const double slope) const { + if (c == PHEMLIGHT_BASE) { // zero emission class + return 0.; + } + const PHEMCEP* const currCep = PHEMCEPHandler::getHandlerInstance().GetCep(c); + const double corrSpeed = MAX2((double) 0.0, v); + const double decelCoast = currCep->GetDecelCoast(corrSpeed, a, slope, 0); + if (a < decelCoast) { + return 0; + } + double power = currCep->CalcPower(corrSpeed, a, slope); + switch (e) { + case PollutantsInterface::CO: + return currCep->GetEmission("CO", power, corrSpeed) / SECONDS_PER_HOUR * 1000.; + case PollutantsInterface::CO2: + return currCep->GetEmission("FC", power, corrSpeed) * 3.15 / SECONDS_PER_HOUR * 1000.; + case PollutantsInterface::HC: + return currCep->GetEmission("HC", power, corrSpeed) / SECONDS_PER_HOUR * 1000.; + case PollutantsInterface::NO_X: + return currCep->GetEmission("NOx", power, corrSpeed) / SECONDS_PER_HOUR * 1000.; + case PollutantsInterface::PM_X: + return currCep->GetEmission("PM", power, corrSpeed) / SECONDS_PER_HOUR * 1000.; + case PollutantsInterface::FUEL: { + std::string fuelType = currCep->GetVehicleFuelType(); + if (fuelType == "D") { // divide by average diesel density of 836 g/l + return currCep->GetEmission("FC", power, corrSpeed) / 836. / SECONDS_PER_HOUR * 1000.; + } else if (fuelType == "G") { // divide by average gasoline density of 742 g/l + return currCep->GetEmission("FC", power, corrSpeed) / 742. / SECONDS_PER_HOUR * 1000.; + } else { + return currCep->GetEmission("FC", power, corrSpeed) / SECONDS_PER_HOUR * 1000.; // surely false, but at least not additionally modified + } + } + } + // should never get here + return 0.; +} + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersPHEMlight.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersPHEMlight.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/HelpersPHEMlight.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/HelpersPHEMlight.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,129 @@ +/****************************************************************************/ +/// @file HelpersPHEMlight.h +/// @author Daniel Krajzewicz +/// @author Nikolaus Furian +/// @date Sat, 20.04.2013 +/// @version $Id: HelpersPHEMlight.h 17682 2015-01-23 07:27:34Z behrisch $ +/// +// Helper methods for PHEMlight-based emission computation +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2012 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef HelpersPHEMlight_h +#define HelpersPHEMlight_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include "PollutantsInterface.h" +#include "PHEMCEPHandler.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class HelpersPHEMlight + * @brief Helper methods for PHEMlight-based emission computation + */ +class HelpersPHEMlight : public PollutantsInterface::Helper { +public: + static const int PHEMLIGHT_BASE = 2 << 16; + + + /** @brief Constructor + */ + HelpersPHEMlight(); + + + /** @brief Checks whether the string describes a known vehicle class + * @param[in] eClass The string describing the vehicle emission class + * @return whether it describes a valid emission class + */ + SUMOEmissionClass getClassByName(const std::string& eClass, const SUMOVehicleClass vc); + + + /** @brief Returns the emission class described by the given parameters. + * @param[in] base the base class giving the default + * @param[in] vClass the vehicle class as described in the Amitran interface (Passenger, ...) + * @param[in] fuel the fuel type as described in the Amitran interface (Gasoline, Diesel, ...) + * @param[in] eClass the emission class as described in the Amitran interface (Euro0, ...) + * @param[in] weight the vehicle weight in kg as described in the Amitran interface + * @return the class described by the parameters + */ + SUMOEmissionClass getClass(const SUMOEmissionClass base, const std::string& vClass, const std::string& fuel, const std::string& eClass, const double weight) const; + + /** @brief Returns the vehicle class described by this emission class as described in the Amitran interface (Passenger, ...) + * @param[in] c the emission class + * @return the name of the vehicle class + */ + std::string getAmitranVehicleClass(const SUMOEmissionClass c) const; + + /** @brief Returns the fuel type described by this emission class as described in the Amitran interface (Gasoline, Diesel, ...) + * @param[in] c the emission class + * @return the fuel type + */ + std::string getFuel(const SUMOEmissionClass c) const; + + /** @brief Returns the Euro emission class described by this emission class as described in the Amitran interface (0, ..., 6) + * @param[in] c the emission class + * @return the Euro class + */ + int getEuroClass(const SUMOEmissionClass c) const; + + /** @brief Returns a reference weight in kg described by this emission class as described in the Amitran interface + * This implementation returns only meaningful values for Solo_LKW (truck without trailer) and LNF (light duty vehicles). + * @param[in] c the emission class + * @return a reference weight + */ + SUMOReal getWeight(const SUMOEmissionClass c) const; + + /** @brief Returns the maximum possible acceleration + * @param[in] c The vehicle emission class + * @param[in] v The vehicle's current velocity + * @param[in] a The vehicle's current acceleration + * @param[in] slope The road's slope at vehicle's position [°] + * @return The maximum possible acceleration + */ + SUMOReal getMaxAccel(SUMOEmissionClass c, double v, double a, double slope) const; + + + /** @brief Returns the amount of emitted pollutant given the vehicle type and state (in mg/s or in ml/s for fuel) + * @param[in] c The vehicle emission class + * @param[in] v The vehicle's current velocity + * @param[in] a The vehicle's current acceleration + * @param[in] slope The road's slope at vehicle's position [°] + * @return The amount of the pollutant emitted by the given emission class when moving with the given velocity and acceleration [mg/s or ml/s] + */ + SUMOReal compute(const SUMOEmissionClass c, const PollutantsInterface::EmissionType e, const double v, const double a, const double slope) const; + +private: + /// @brief the index of the next class + int myIndex; +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,8 @@ +noinst_LIBRARIES = libemissions.a + +libemissions_a_SOURCES = HelpersHarmonoise.cpp HelpersHarmonoise.h \ +HelpersHBEFA.cpp HelpersHBEFA.h \ +HelpersHBEFA3.cpp HelpersHBEFA3.h \ +HelpersPHEMlight.cpp HelpersPHEMlight.h \ +PHEMCEP.h PHEMCEP.cpp PHEMCEPHandler.h PHEMCEPHandler.cpp PHEMConstants.h \ +PollutantsInterface.h PollutantsInterface.cpp diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,629 @@ +# Makefile.in generated by automake 1.13.4 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/utils/emissions +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libemissions_a_AR = $(AR) $(ARFLAGS) +libemissions_a_LIBADD = +am_libemissions_a_OBJECTS = HelpersHarmonoise.$(OBJEXT) \ + HelpersHBEFA.$(OBJEXT) HelpersHBEFA3.$(OBJEXT) \ + HelpersPHEMlight.$(OBJEXT) PHEMCEP.$(OBJEXT) \ + PHEMCEPHandler.$(OBJEXT) PollutantsInterface.$(OBJEXT) +libemissions_a_OBJECTS = $(am_libemissions_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libemissions_a_SOURCES) +DIST_SOURCES = $(libemissions_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_CPPFLAGS = @AM_CPPFLAGS@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ +FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ +GDAL_LDFLAGS = @GDAL_LDFLAGS@ +GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_XERCES = @LIB_XERCES@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OSG_LIBS = @OSG_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJ_LDFLAGS = @PROJ_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XERCES_CFLAGS = @XERCES_CFLAGS@ +XERCES_LDFLAGS = @XERCES_LDFLAGS@ +XERCES_LIBS = @XERCES_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LIBRARIES = libemissions.a +libemissions_a_SOURCES = HelpersHarmonoise.cpp HelpersHarmonoise.h \ +HelpersHBEFA.cpp HelpersHBEFA.h \ +HelpersHBEFA3.cpp HelpersHBEFA3.h \ +HelpersPHEMlight.cpp HelpersPHEMlight.h \ +PHEMCEP.h PHEMCEP.cpp PHEMCEPHandler.h PHEMCEPHandler.cpp PHEMConstants.h \ +PollutantsInterface.h PollutantsInterface.cpp + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/utils/emissions/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/utils/emissions/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +libemissions.a: $(libemissions_a_OBJECTS) $(libemissions_a_DEPENDENCIES) $(EXTRA_libemissions_a_DEPENDENCIES) + $(AM_V_at)-rm -f libemissions.a + $(AM_V_AR)$(libemissions_a_AR) libemissions.a $(libemissions_a_OBJECTS) $(libemissions_a_LIBADD) + $(AM_V_at)$(RANLIB) libemissions.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HelpersHBEFA.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HelpersHBEFA3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HelpersHarmonoise.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HelpersPHEMlight.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PHEMCEP.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PHEMCEPHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PollutantsInterface.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/PHEMCEP.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/PHEMCEP.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/PHEMCEP.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/PHEMCEP.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,442 @@ +/****************************************************************************/ +/// @file PHEMCEP.cpp +/// @author Nikolaus Furian +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @author Marek Heinrich +/// @date Thu, 13.06.2013 +/// @version $Id: PHEMCEP.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// Helper class for PHEM Light, holds a specific CEP for a PHEM emission class +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include "PHEMCEP.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +PHEMCEP::PHEMCEP(bool heavyVehicle, SUMOEmissionClass emissionClass, const std::string& emissionClassIdentifier, + double vehicleMass, double vehicleLoading, double vehicleMassRot, + double crossArea, double cdValue, + double f0, double f1, double f2, double f3, double f4, + double ratedPower, double pNormV0, double pNormP0, double pNormV1, double pNormP1, + double axleRatio, double engineIdlingSpeed, double engineRatedSpeed, double effectiveWheelDiameter, + double idlingFC, + const std::string& vehicleFuelType, + const std::vector< std::vector >& matrixFC, + const std::vector& headerLinePollutants, + const std::vector< std::vector >& matrixPollutants, + const std::vector< std::vector >& matrixSpeedRotational, + const std::vector< std::vector >& normedDragTable, + const std::vector& idlingValuesPollutants) { + _emissionClass = emissionClass; + _resistanceF0 = f0; + _resistanceF1 = f1; + _resistanceF2 = f2; + _resistanceF3 = f3; + _resistanceF4 = f4; + _cdValue = cdValue; + _crossSectionalArea = crossArea; + _massVehicle = vehicleMass; + _vehicleLoading = vehicleLoading; + _massRot = vehicleMassRot; + _ratedPower = ratedPower; + _vehicleFuelType = vehicleFuelType; + + _pNormV0 = pNormV0 / 3.6; + _pNormP0 = pNormP0; + _pNormV1 = pNormV1 / 3.6; + _pNormP1 = pNormP1; + + _axleRatio = axleRatio; + _engineIdlingSpeed = engineIdlingSpeed; + _engineRatedSpeed = engineRatedSpeed; + _effictiveWheelDiameter = effectiveWheelDiameter; + + _heavyVehicle = heavyVehicle; + _idlingFC = idlingFC; + + std::vector pollutantIdentifier; + std::vector< std::vector > pollutantMeasures; + std::vector > normalizedPollutantMeasures; + + // init pollutant identifiers + for (int i = 0; i < (int)headerLinePollutants.size(); i++) { + pollutantIdentifier.push_back(headerLinePollutants[i]); + } // end for + + // get size of powerPatterns + _sizeOfPatternFC = (int)matrixFC.size(); + _sizeOfPatternPollutants = (int)matrixPollutants.size(); + + // initialize measures + for (int i = 0; i < (int)headerLinePollutants.size(); i++) { + pollutantMeasures.push_back(std::vector()); + normalizedPollutantMeasures.push_back(std::vector()); + } // end for + + // looping through matrix and assigning values for speed rotational table + _speedCurveRotational.clear(); + _speedPatternRotational.clear(); + _gearTransmissionCurve.clear(); + for (int i = 0; i < (int)matrixSpeedRotational.size(); i++) { + if (matrixSpeedRotational[i].size() != 3) { + throw InvalidArgument("Error loading vehicle file for: " + emissionClassIdentifier); + } + + _speedPatternRotational.push_back(matrixSpeedRotational[i][0] / 3.6); + _speedCurveRotational.push_back(matrixSpeedRotational[i][1]); + _gearTransmissionCurve.push_back(matrixSpeedRotational[i][2]); + } // end for + + // looping through matrix and assigning values for drag table + _nNormTable.clear(); + _dragNormTable.clear(); + for (int i = 0; i < (int) normedDragTable.size(); i++) { + if (normedDragTable[i].size() != 2) { + return; + } + + _nNormTable.push_back(normedDragTable[i][0]); + _dragNormTable.push_back(normedDragTable[i][1]); + + } // end for + + // looping through matrix and assigning values for Fuel consumption + _cepCurveFC.clear(); + _powerPatternFC.clear(); + _normalizedPowerPatternFC.clear(); + _normedCepCurveFC.clear(); + for (int i = 0; i < (int)matrixFC.size(); i++) { + if (matrixFC[i].size() != 2) { + throw InvalidArgument("Error loading vehicle file for: " + emissionClassIdentifier); + } + + _powerPatternFC.push_back(matrixFC[i][0] * _ratedPower); + _normalizedPowerPatternFC.push_back(matrixFC[i][0]); + _cepCurveFC.push_back(matrixFC[i][1] * _ratedPower); + _normedCepCurveFC.push_back(matrixFC[i][1]); + + } // end for + + _powerPatternPollutants.clear(); + double pollutantMultiplyer = 1; + + _drivingPower = _normalizingPower = CalcPower(NORMALIZING_SPEED, NORMALIZING_ACCELARATION, 0, vehicleLoading); + + // looping through matrix and assigning values for pollutants + + if (heavyVehicle) { + _normalizingPower = _ratedPower; + pollutantMultiplyer = _ratedPower; + _normalizingType = RatedPower; + } else { + _normalizingPower = _drivingPower; + _normalizingType = DrivingPower; + } // end if + + const int headerCount = (int)headerLinePollutants.size(); + for (int i = 0; i < (int)matrixPollutants.size(); i++) { + for (int j = 0; j < (int)matrixPollutants[i].size(); j++) { + if ((int)matrixPollutants[i].size() != headerCount + 1) { + return; + } + + if (j == 0) { + _normailzedPowerPatternPollutants.push_back(matrixPollutants[i][j]); + _powerPatternPollutants.push_back(matrixPollutants[i][j] * _normalizingPower); + } else { + pollutantMeasures[j - 1].push_back(matrixPollutants[i][j] * pollutantMultiplyer); + normalizedPollutantMeasures[j - 1].push_back(matrixPollutants[i][j]); + } // end if + } // end for + } // end for + + for (int i = 0; i < (int) headerLinePollutants.size(); i++) { + _cepCurvePollutants.insert(pollutantIdentifier[i], pollutantMeasures[i]); + _normalizedCepCurvePollutants.insert(pollutantIdentifier[i], normalizedPollutantMeasures[i]); + _idlingValuesPollutants.insert(pollutantIdentifier[i], idlingValuesPollutants[i] * pollutantMultiplyer); + } // end for + + _idlingFC = idlingFC * _ratedPower; + +} // end of Cep + + +PHEMCEP::~PHEMCEP() { + // free power pattern + _powerPatternFC.clear(); + _powerPatternPollutants.clear(); + _cepCurveFC.clear(); + _speedCurveRotational.clear(); + _speedPatternRotational.clear(); +} // end of ~Cep + + +double +PHEMCEP::GetEmission(const std::string& pollutant, double power, double speed, bool normalized) const { + std::vector emissionCurve; + std::vector powerPattern; + + if (!normalized && fabs(speed) <= ZERO_SPEED_ACCURACY) { + if (pollutant == "FC") { + return _idlingFC; + } else { + return _idlingValuesPollutants.get(pollutant); + } + } // end if + + if (pollutant == "FC") { + if (normalized) { + emissionCurve = _normedCepCurveFC; + powerPattern = _normalizedPowerPatternFC; + } else { + emissionCurve = _cepCurveFC; + powerPattern = _powerPatternFC; + } + } else { + if (!_cepCurvePollutants.hasString(pollutant)) { + throw InvalidArgument("Emission pollutant " + pollutant + " not found!"); + } + + if (normalized) { + emissionCurve = _normalizedCepCurvePollutants.get(pollutant); + powerPattern = _normailzedPowerPatternPollutants; + } else { + emissionCurve = _cepCurvePollutants.get(pollutant); + powerPattern = _powerPatternPollutants; + } + + } // end if + + + + if (emissionCurve.size() == 0) { + throw InvalidArgument("Empty emission curve for " + pollutant + " found!"); + } + + if (emissionCurve.size() == 1) { + return emissionCurve[0]; + } + + // in case that the demanded power is smaller than the first entry (smallest) in the power pattern the first two entries are extrapolated + if (power <= powerPattern.front()) { + double calcEmission = PHEMCEP::Interpolate(power, powerPattern[0], powerPattern[1], emissionCurve[0], emissionCurve[1]); + + if (calcEmission < 0) { + return 0; + } else { + return calcEmission; + } + + } // end if + + // if power bigger than all entries in power pattern the last two values are linearly extrapolated + if (power >= powerPattern.back()) { + return PHEMCEP::Interpolate(power, powerPattern[powerPattern.size() - 2], powerPattern.back(), emissionCurve[emissionCurve.size() - 2], emissionCurve.back()); + } // end if + + // bisection search to find correct position in power pattern + int upperIndex; + int lowerIndex; + + PHEMCEP::FindLowerUpperInPattern(lowerIndex, upperIndex, powerPattern, power); + + return PHEMCEP::Interpolate(power, powerPattern[lowerIndex], powerPattern[upperIndex], emissionCurve[lowerIndex], emissionCurve[upperIndex]); + +} // end of GetEmission + + +double +PHEMCEP::Interpolate(double px, double p1, double p2, double e1, double e2) const { + if (p2 == p1) { + return e1; + } + return e1 + (px - p1) / (p2 - p1) * (e2 - e1); +} // end of Interpolate + + +double PHEMCEP::GetDecelCoast(double speed, double acc, double gradient, double /* vehicleLoading */) const { + if (speed < SPEED_DCEL_MIN) { + return speed / SPEED_DCEL_MIN * GetDecelCoast(SPEED_DCEL_MIN, acc, gradient, _vehicleLoading); // !!!vehicleLoading + } // end if + + double rotCoeff = GetRotationalCoeffecient(speed); + + int upperIndex; + int lowerIndex; + + double iGear = GetGearCoeffecient(speed); + + double iTot = iGear * _axleRatio; + + double n = (30 * speed * iTot) / ((_effictiveWheelDiameter / 2) * M_PI2); + double nNorm = (n - _engineIdlingSpeed) / (_engineRatedSpeed - _engineIdlingSpeed); + + FindLowerUpperInPattern(lowerIndex, upperIndex, _nNormTable, nNorm); + + double fMot = 0; + + if (speed >= 10e-2) { + fMot = (-GetDragCoeffecient(nNorm) * _ratedPower * 1000 / speed) / 0.9; + } // end if + + double fRoll = (_resistanceF0 + + _resistanceF1 * speed + + pow(_resistanceF2 * speed, 2) + + pow(_resistanceF3 * speed, 3) + + pow(_resistanceF4 * speed, 4)) * (_massVehicle + _vehicleLoading) * GRAVITY_CONST; // !!!vehicleLoading + + double fAir = _cdValue * _crossSectionalArea * 1.2 * 0.5 * pow(speed, 2); + + double fGrad = (_massVehicle + _vehicleLoading) * GRAVITY_CONST * gradient / 100; // !!!vehicleLoading + + return -(fMot + fRoll + fAir + fGrad) / ((_massVehicle + _vehicleLoading) * rotCoeff); // !!!vehicleLoading +} // end of GetDecelCoast + + +double +PHEMCEP::GetRotationalCoeffecient(double speed) const { + int upperIndex; + int lowerIndex; + + PHEMCEP::FindLowerUpperInPattern(lowerIndex, upperIndex, _speedPatternRotational, speed); + + return PHEMCEP::Interpolate(speed, + _speedPatternRotational[lowerIndex], + _speedPatternRotational[upperIndex], + _speedCurveRotational[lowerIndex], + _speedCurveRotational[upperIndex]); +} // end of GetRotationalCoeffecient + +double PHEMCEP::GetGearCoeffecient(double speed) const { + int upperIndex; + int lowerIndex; + + FindLowerUpperInPattern(lowerIndex, upperIndex, _gearTransmissionCurve, speed); + + return Interpolate(speed, + _speedPatternRotational[lowerIndex], + _speedPatternRotational[upperIndex], + _gearTransmissionCurve[lowerIndex], + _gearTransmissionCurve[upperIndex]); +} // end of GetGearCoefficient + +double PHEMCEP::GetDragCoeffecient(double nNorm) const { + int upperIndex; + int lowerIndex; + + FindLowerUpperInPattern(lowerIndex, upperIndex, _dragNormTable, nNorm); + + return Interpolate(nNorm, + _nNormTable[lowerIndex], + _nNormTable[upperIndex], + _dragNormTable[lowerIndex], + _dragNormTable[upperIndex]); +} // end of GetGearCoefficient + +void PHEMCEP::FindLowerUpperInPattern(int& lowerIndex, int& upperIndex, const std::vector& pattern, double value) const { + if (value <= pattern.front()) { + lowerIndex = 0; + upperIndex = 0; + return; + + } // end if + + if (value >= pattern.back()) { + lowerIndex = (int)pattern.size() - 1; + upperIndex = (int)pattern.size() - 1; + return; + } // end if + + // bisection search to find correct position in power pattern + int middleIndex = ((int)pattern.size() - 1) / 2; + upperIndex = (int)pattern.size() - 1; + lowerIndex = 0; + + while (upperIndex - lowerIndex > 1) { + if (pattern[middleIndex] == value) { + lowerIndex = middleIndex; + upperIndex = middleIndex; + return; + } else if (pattern[middleIndex] < value) { + lowerIndex = middleIndex; + middleIndex = (upperIndex - lowerIndex) / 2 + lowerIndex; + } else { + upperIndex = middleIndex; + middleIndex = (upperIndex - lowerIndex) / 2 + lowerIndex; + } // end if + } // end while + + if (pattern[lowerIndex] <= value && value < pattern[upperIndex]) { + return; + } else { + throw ProcessError("Error during calculation of position in pattern!"); + } +} // end of FindLowerUpperInPattern + + +double +PHEMCEP::CalcPower(double v, double a, double slope, double /* vehicleLoading */) const { + const double rotFactor = GetRotationalCoeffecient(v); + double power = (_massVehicle + _vehicleLoading) * GRAVITY_CONST * (_resistanceF0 + _resistanceF1 * v + _resistanceF4 * pow(v, 4)) * v; + power += (_crossSectionalArea * _cdValue * AIR_DENSITY_CONST / 2) * pow(v, 3); + power += (_massVehicle * rotFactor + _massRot + _vehicleLoading) * a * v; + power += (_massVehicle + _vehicleLoading) * slope * 0.01 * v; + return power / 950.; +} + + +double +PHEMCEP::GetMaxAccel(double v, double a, double gradient, double /* vehicleLoading */) const { + UNUSED_PARAMETER(a); + double rotFactor = GetRotationalCoeffecient(v); + const double pMaxForAcc = GetPMaxNorm(v) * _ratedPower - PHEMCEP::CalcPower(v, 0, gradient, _vehicleLoading); // !!!vehicleLoading + return (pMaxForAcc * 1000) / ((_massVehicle * rotFactor + _massRot + _vehicleLoading) * v); // !!!vehicleLoading +} + + + +double PHEMCEP::GetPMaxNorm(double speed) const { + // Linear function between v0 and v1, constant elsewhere + if (speed <= _pNormV0) { + return _pNormP0; + } else if (speed >= _pNormV1) { + return _pNormP1; + } else { + return PHEMCEP::Interpolate(speed, _pNormV0, _pNormV1, _pNormP0, _pNormP1); + } +} // end of GetPMaxNorm + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/PHEMCEP.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/PHEMCEP.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/PHEMCEP.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/PHEMCEP.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,334 @@ +/****************************************************************************/ +/// @file PHEMCEP.h +/// @author Nikolaus Furian +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Marek Heinrich +/// @date Thu, 13.06.2013 +/// @version $$ +/// +// Helper class for PHEM Light, holds a specific CEP for a PHEM emission class +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef PHEMCEP_h +#define PHEMCEP_h + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include "PHEMCEP.h" +#include "PHEMConstants.h" + + + +// =========================================================================== +// enumerations +// =========================================================================== +enum NormalizingType { + RatedPower, + DrivingPower +}; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class PHEMCEP + * @brief Data Handler for a single CEP emission data set + */ +class PHEMCEP { +public: + /*** @brief Constructor + * @param[in] emissionClass PHEM emission class of vehicle + * @param[in] vehicleMass vehicle mass + * @param[in] vehicleLoading vehicle loading + * @param[in] vehicleMassRot rotational mass of vehicle + * @param[in] crossArea crosssectional area of vehicle + * @param[in] cWValue cw-value + * @param[in] f0 Rolling resistance f0 + * @param[in] f1 Rolling resistance f1 + * @param[in] f2 Rolling resistance f2 + * @param[in] f3 Rolling resistance f3 + * @param[in] f4 Rolling resistance f4 + * @param[in] ratedPower rated power of vehicle + * @param[in] pNormV0 out variable for step function to get maximum normalized rated power over speed + * @param[in] pNormP0 out variable for step function to get maximum normalized rated power over speed + * @param[in] pNormV1 out variable for step function to get maximum normalized rated power over speed + * @param[in] pNormP1 out variable for step function to get maximum normalized rated power over speed + * @param[in] vehicleFuelType out variable for fuel type (D, G) of vehicle, needed for density of fuel + * @param[in] matrixFC Coefficients of the fuel consumption + * @param[in] headerLine Definition of covered pollutants + * @param[in] headerLinePollutants Coefficients of the pollutants + * @param[in] matrixPollutants Coefficients of the pollutants + * @param[in] matrixSpeedRotational Table for rotational coefficients over speed + */ + PHEMCEP(bool heavyVehicel, SUMOEmissionClass emissionClass, const std::string& emissionClassIdentifier, + double vehicleMass, double vehicleLoading, double vehicleMassRot, + double crossArea, double cdValue, + double f0, double f1, double f2, double f3, double f4, + double ratedPower, double pNormV0, double pNormP0, double pNormV1, double pNormP1, + double axleRatio, double engineIdlingSpeed, double engineRatedSpeed, double effectiveWheelDiameter, + double idlingFC, + const std::string& vehicleFuelType, + const std::vector< std::vector >& matrixFC, + const std::vector& headerLinePollutants, + const std::vector< std::vector >& matrixPollutants, + const std::vector< std::vector >& matrixSpeedRotational, + const std::vector< std::vector >& normedDragTable, + const std::vector& idlingValuesPollutants); + + /// @brief Destructor + ~PHEMCEP(); + + /** @brief Returns the power of used for a vehicle at state v,a, slope and loading + * @param[in] v The vehicle's average velocity + * @param[in] a The vehicle's average acceleration + * @param[in] slope The road's slope at vehicle's position [°] + * @param{in] vehicleCep vehicles CEP data + * @param{in] loading vehicle loading [kg] + * @return The power demand for desired state [kW] + */ + double CalcPower(double v, double a, double slope, double vehicleLoading = 0) const; + + + /** @brief Returns the maximum accelaration for a vehicle at state v,a, slope and loading + * @param[in] v The vehicle's average velocity + * @param[in] a The vehicle's average acceleration + * @param[in] slope The road's slope at vehicle's position [°] + * @param{in] vehicleCep vehicles CEP data + * @param{in] loading vehicle loading [kg] + * @return The maximum accelaration for desired state [kW] + */ + double GetMaxAccel(double v, double a, double gradient, double vehicleLoading = 0) const; + + /** @brief Returns a emission measure for power[kW] level + * @param[in] pollutantIdentifier Desired pollutant, e.g. NOx + * @param[in] power in [kW] + * @return emission in [g/h] + */ + double GetEmission(const std::string& pollutantIdentifier, double power, double speed, bool normalized = false) const; + double GetDecelCoast(double speed, double acc, double gradient, double vehicleLoading) const; + + + /** @brief Getter function to recieve vehicle data from CEP + * @return PHEM emission class of vehicle + */ + SUMOEmissionClass GetEmissionClass() const { + return _emissionClass; + } + + + /** @brief Getter function to recieve vehicle data from CEP + * @return Rolling resistance f0 + */ + double GetResistanceF0() const { + return _resistanceF0; + } + + + /** @brief Getter function to recieve vehicle data from CEP + * @return Rolling resistance f1 + */ + double GetResistanceF1() const { + return _resistanceF1; + } + + + /** @brief Getter function to recieve vehicle data from CEP + * @return Rolling resistance f2 + */ + double GetResistanceF2() const { + return _resistanceF2; + } + + + /** @brief Getter function to recieve vehicle data from CEP + * @return Rolling resistance f3 + */ + double GetResistanceF3() const { + return _resistanceF3; + } + + + /** @brief Getter function to recieve vehicle data from CEP + * @return Rolling resistance f4 + */ + double GetResistanceF4() const { + return _resistanceF4; + } + + + /** @brief Getter function to recieve vehicle data from CEP + * @return Cw value + * @todo: Why is it named "cdValue", here? + */ + double GetCdValue() const { + return _cdValue; + } + + /** @brief Getter function to recieve vehicle data from CEP + * @return crosssectional area of vehicle + */ + double GetCrossSectionalArea() const { + return _crossSectionalArea; + } + + + /** @brief Getter function to recieve vehicle data from CEP + * @return vehicle mass + */ + double GetMassVehicle() const { + return _massVehicle; + } + + /** @brief Getter function to recieve vehicle data from CEP + * @return vehicle loading + */ + double GetVehicleLoading() const { + return _vehicleLoading; + } + + + /** @brief Getter function to recieve vehicle data from CEP + * @return rotational mass of vehicle + */ + double GetMassRot() const { + return _massRot; + } + + + /** @brief Getter function to recieve vehicle data from CEP + * @return rated power of vehicle + */ + double GetRatedPower() const { + return _ratedPower; + } + + /** @brief Getter function to recieve vehicle data from CEP + * @return fuel type of vehicle + */ + std::string GetVehicleFuelType() const { + return _vehicleFuelType; + } + +private: + /** @brief Interpolates emission linearly between two known power-emission pairs + * @param[in] px power-value to interpolate + * @param[in] p1 first known power value + * @param[in] p2 second known power value + * @param[in] e1 emission value for p1 + * @param[in] e2 emission value for p2 + * @return emission value for px + */ + double Interpolate(double px, double p1, double p2, double e1, double e2) const; + + /** @brief Finds bounding upper and lower index in pattern for value + * @param[out] lowerIndex out variable for lower index + * @param[out] upperIndex out variable for lower index + * @param[in] pattern to search + * @param[in] value to search + */ + void FindLowerUpperInPattern(int& lowerIndex, int& upperIndex, const std::vector& pattern, double value) const; + + /** @brief Calculates rotational index for speed + * @param[in] speed desired speed + */ + double GetRotationalCoeffecient(double speed) const; + double GetGearCoeffecient(double speed) const; + double GetDragCoeffecient(double nNorm) const; + + /** @brief Calculates maximum available rated power for speed + * @param[in] speed desired speed + */ + double GetPMaxNorm(double speed) const; + +private: + /// @brief PHEM emission class of vehicle + SUMOEmissionClass _emissionClass; + NormalizingType _normalizingType; + /// @brief Rolling resistance f0 + double _resistanceF0; + /// @brief Rolling resistance f1 + double _resistanceF1; + /// @brief Rolling resistance f2 + double _resistanceF2; + /// @brief Rolling resistance f3 + double _resistanceF3; + /// @brief Rolling resistance f4 + double _resistanceF4; + /// @brief Cw value + double _cdValue; + /// @brief crosssectional area of vehicle + double _crossSectionalArea; + /// @brief vehicle mass + double _massVehicle; + /// @brief vehicle loading + double _vehicleLoading; + /// @brief rotational mass of vehicle + double _massRot; + /// @brief rated power of vehicle + double _ratedPower; + /// @brief Step functions parameter for maximum rated power + double _pNormV0; + /// @brief Step functions parameter for maximum rated power + double _pNormP0; + /// @brief Step functions parameter for maximum rated power + double _pNormV1; + /// @brief Step functions parameter for maximum rated power + double _pNormP1; + double _axleRatio; + double _engineIdlingSpeed; + double _engineRatedSpeed; + double _effictiveWheelDiameter; + double _idlingFC; + std::string _vehicleFuelType; + int _sizeOfPatternFC; + /// @todo describe + int _sizeOfPatternPollutants; + double _normalizingPower; + double _drivingPower; + bool _heavyVehicle; + std::vector _speedPatternRotational; + /// @todo describe + std::vector _powerPatternFC; + /// @todo describe + std::vector _powerPatternPollutants; + std::vector _normalizedPowerPatternFC; + std::vector _normailzedPowerPatternPollutants; + /// @todo describe + std::vector _cepCurveFC; + /// @todo describe + std::vector _normedCepCurveFC; + std::vector _speedCurveRotational; + std::vector _gearTransmissionCurve; + std::vector _nNormTable; + std::vector _dragNormTable; + StringBijection< std::vector > _cepCurvePollutants; + StringBijection > _normalizedCepCurvePollutants; + StringBijection _idlingValuesPollutants; + +}; + +#endif + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/PHEMCEPHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/PHEMCEPHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/PHEMCEPHandler.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/PHEMCEPHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,469 @@ +/****************************************************************************/ +/// @file PHEMCEPHandler.cpp +/// @author Nikolaus Furian +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Marek Heinrich +/// @date Thu, 13.06.2013 +/// @version $$ +/// +// Helper class for PHEM Light, holds CEP data for emission computation +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include "PHEMCEPHandler.h" +#include "PHEMConstants.h" +#include +#include + +// =========================================================================== +// method definitions +// =========================================================================== +PHEMCEPHandler::PHEMCEPHandler() { +} + + +PHEMCEPHandler::~PHEMCEPHandler() { + std::map::iterator iter = _ceps.begin(); + while (iter != _ceps.end()) { + delete(iter->second); + iter++; + } // end while + _ceps.clear(); +} + + +PHEMCEPHandler& +PHEMCEPHandler::getHandlerInstance() { + static PHEMCEPHandler instance; + return instance; +} + + +bool +PHEMCEPHandler::Load(SUMOEmissionClass emissionClass, const std::string& emissionClassIdentifier) { + // to hold everything. + std::vector< std::vector > matrixSpeedInertiaTable; + std::vector< std::vector > normedDragTable; + std::vector< std::vector > matrixFC; + std::vector< std::vector > matrixPollutants; + std::vector headerFC; + std::vector headerPollutants; + std::vector idlingValues; + std::vector idlingValuesFC; + + double vehicleMass; + double vehicleLoading; + double vehicleMassRot; + double crosssectionalArea; + double cwValue; + double f0; + double f1; + double f2; + double f3; + double f4; + double axleRatio; + double ratedPower; + double engineIdlingSpeed; + double engineRatedSpeed; + double effectiveWheelDiameter; + std::string vehicleMassType; + std::string vehicleFuelType; + double pNormV0; + double pNormP0; + double pNormV1; + double pNormP1; + + OptionsCont& oc = OptionsCont::getOptions(); + //std::string phemPath = oc.getString("phemlight-path") + "/"; + std::vector phemPath; + phemPath.push_back(oc.getString("phemlight-path") + "/"); + if (getenv("PHEMLIGHT_PATH") != 0) { + phemPath.push_back(std::string(getenv("PHEMLIGHT_PATH")) + "/"); + } + if (getenv("SUMO_HOME") != 0) { + phemPath.push_back(std::string(getenv("SUMO_HOME")) + "/data/emissions/PHEMlight/"); + } + if (!ReadVehicleFile(phemPath, emissionClassIdentifier, + vehicleMass, + vehicleLoading, + vehicleMassRot, + crosssectionalArea, + cwValue, + f0, + f1, + f2, + f3, + f4, + axleRatio, + ratedPower, + engineIdlingSpeed, + engineRatedSpeed, + effectiveWheelDiameter, + vehicleMassType, + vehicleFuelType, + pNormV0, + pNormP0, + pNormV1, + pNormP1, + matrixSpeedInertiaTable, + normedDragTable)) { + return false; + } + + if (!ReadEmissionData(true, phemPath, emissionClassIdentifier, headerFC, matrixFC, idlingValuesFC)) { + return false; + } + + if (!ReadEmissionData(false, phemPath, emissionClassIdentifier, headerPollutants, matrixPollutants, idlingValues)) { + return false; + } + + _ceps[emissionClass] = new PHEMCEP(vehicleMassType == "HV", + emissionClass, emissionClassIdentifier, + vehicleMass, + vehicleLoading, + vehicleMassRot, + crosssectionalArea, + cwValue, + f0, + f1, + f2, + f3, + f4, + ratedPower, + pNormV0, + pNormP0, + pNormV1, + pNormP1, + axleRatio, + engineIdlingSpeed, + engineRatedSpeed, + effectiveWheelDiameter, + idlingValuesFC.front(), + vehicleFuelType, + matrixFC, + headerPollutants, + matrixPollutants, + matrixSpeedInertiaTable, + normedDragTable, + idlingValues); + + return true; +} // end of Load() + + +PHEMCEP* +PHEMCEPHandler::GetCep(SUMOEmissionClass emissionClass) { + // check if Cep has been loaded + if (_ceps.find(emissionClass) == _ceps.end()) { + return 0; + } // end if + + return _ceps[emissionClass]; +} // end of GetCep + + +bool +PHEMCEPHandler::ReadVehicleFile(const std::vector& path, const std::string& emissionClass, + double& vehicleMass, + double& vehicleLoading, + double& vehicleMassRot, + double& crossArea, + double& cWValue, + double& f0, + double& f1, + double& f2, + double& f3, + double& f4, + double& axleRatio, + double& ratedPower, + double& engineIdlingSpeed, + double& engineRatedSpeed, + double& effectiveWheelDiameter, + std::string& vehicleMassType, + std::string& vehicleFuelType, + double& pNormV0, + double& pNormP0, + double& pNormV1, + double& pNormP1, + std::vector< std::vector >& matrixSpeedInertiaTable, + std::vector< std::vector >& normedDragTable) + +{ + std::ifstream fileVehicle; + for (std::vector::const_iterator i = path.begin(); i != path.end(); i++) { + fileVehicle.open(((*i) + emissionClass + ".PHEMLight.veh").c_str()); + if (fileVehicle.good()) { + break; + } + } + if (!fileVehicle.good()) { + return false; + } + + std::string line; + std::string cell; + std::string commentPrefix = "c"; + int dataCount = 0; + + // skip header + std::getline(fileVehicle, line); + + while (std::getline(fileVehicle, line) && dataCount <= 49) { + // EOL handling for Linux + if (line.size() > 0 && line.substr(line.size() - 1) == "\r") { + line = line.substr(0, line.size() - 1); + } + + std::stringstream lineStream(line); + + if (line.substr(0, 1) == commentPrefix) { + continue; + } else { + dataCount++; + } + + std::getline(lineStream, cell, ','); + + // reading Mass + if (dataCount == 1) { + std::istringstream(cell) >> vehicleMass; + } + + // reading vehicle loading + if (dataCount == 2) { + std::istringstream(cell) >> vehicleLoading; + } + + // reading cWValue + if (dataCount == 3) { + std::istringstream(cell) >> cWValue; + } + + // reading crossectional area + if (dataCount == 4) { + std::istringstream(cell) >> crossArea; + } + + // reading vehicle mass rotational + if (dataCount == 7) { + std::istringstream(cell) >> vehicleMassRot; + } + + // reading rated power + if (dataCount == 10) { + std::istringstream(cell) >> ratedPower; + } + + // reading engine rated speed + if (dataCount == 11) { + std::istringstream(cell) >> engineRatedSpeed; + } + + // reading engine idling speed + if (dataCount == 12) { + std::istringstream(cell) >> engineIdlingSpeed; + } + + // reading f0 + if (dataCount == 14) { + std::istringstream(cell) >> f0; + } + + // reading f1 + if (dataCount == 15) { + std::istringstream(cell) >> f1; + } + + // reading f2 + if (dataCount == 16) { + std::istringstream(cell) >> f2; + } + + // reading f3 + if (dataCount == 17) { + std::istringstream(cell) >> f3; + } + + // reading f4 + if (dataCount == 18) { + std::istringstream(cell) >> f4; + } + // reading axleRatio + if (dataCount == 21) { + std::istringstream(cell) >> axleRatio; + } + + // reading effective wheel diameter + if (dataCount == 22) { + std::istringstream(cell) >> effectiveWheelDiameter; + } + + // reading vehicleMassType + if (dataCount == 45) { + vehicleMassType = cell; + } + + // reading vehicleFuelType + if (dataCount == 46) { + vehicleFuelType = cell; + } + + // reading pNormV0 + if (dataCount == 47) { + std::istringstream(cell) >> pNormV0; + } + + // reading pNormP0 + if (dataCount == 48) { + std::istringstream(cell) >> pNormP0; + } + + // reading pNormV1 + if (dataCount == 49) { + std::istringstream(cell) >> pNormV1; + } + + // reading pNormP1 + if (dataCount == 50) { + std::istringstream(cell) >> pNormP1; + } + } // end while + + while (std::getline(fileVehicle, line) && line.substr(0, 1) != commentPrefix) { + std::stringstream lineStream(line); + std::string cell; + std::vector vi; + while (std::getline(lineStream, cell, ',')) { + double entry; + std::istringstream(cell) >> entry; + vi.push_back(entry); + + } // end while + matrixSpeedInertiaTable.push_back(vi); + } // end while + + while (std::getline(fileVehicle, line)) { + if (line.substr(0, 1) == commentPrefix) { + continue; + } + + std::stringstream lineStream(line); + std::string cell; + std::vector vi; + while (std::getline(lineStream, cell, ',')) { + double entry; + std::istringstream(cell) >> entry; + vi.push_back(entry); + + } // end while + normedDragTable.push_back(vi); + } // end while + + + fileVehicle.close(); + return true; +} // end of ReadVehicleFile + + +bool PHEMCEPHandler::ReadEmissionData(bool readFC, const std::vector& path, const std::string& emissionClass, + std::vector& header, std::vector >& matrix, std::vector& idlingValues) { + + std::string pollutantExtension = ""; + if (readFC) { + pollutantExtension += "_FC"; + } + // declare file stream + std::ifstream fileEmission; + for (std::vector::const_iterator i = path.begin(); i != path.end(); i++) { + fileEmission.open(((*i) + emissionClass + pollutantExtension + ".csv").c_str()); + if (fileEmission.good()) { + break; + } + } + + if (!fileEmission.good()) { + return false; + } + + std::string line; + std::string cell; + // read header line for pollutant identifiers + if (std::getline(fileEmission, line)) { + std::stringstream lineStream(line); + + // skip first entry "Pe" + std::getline(lineStream, cell, ','); + + while (std::getline(lineStream, cell, ',')) { + header.push_back(cell); + } // end while + + } // end if + + // skip units + std::getline(fileEmission, line); + + // skip comments + std::getline(fileEmission, line); + + // reading idlingValues + std::getline(fileEmission, line); + + std::stringstream idlingStream(line); + std::string idlingCell; + + //skipping idle comment + std::getline(idlingStream, idlingCell, ','); + + while (std::getline(idlingStream, idlingCell, ',')) { + double entry; + std::istringstream(idlingCell) >> entry; + idlingValues.push_back(entry); + } // end while + + while (std::getline(fileEmission, line)) { + std::stringstream lineStream(line); + std::string cell; + std::vector vi; + while (std::getline(lineStream, cell, ',')) { + double entry; + std::istringstream(cell) >> entry; + vi.push_back(entry); + + } // end while + matrix.push_back(vi); + } // end while + + fileEmission.close(); + + return true; +} // end of ReadEmissionData + + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/PHEMCEPHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/PHEMCEPHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/PHEMCEPHandler.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/PHEMCEPHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,150 @@ +/****************************************************************************/ +/// @file PHEMCEPHandler.h +/// @author Nikolaus Furian +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Marek Heinrich +/// @date Thu, 13.06.2013 +/// @version $$ +/// +// Helper singleton class for PHEM Light, holds CEP data for emission computation +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef PHEMCEPHandler_h +#define PHEMCEPHandler_h + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include "PHEMCEP.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class PHEMCEPHandler + * @brief Data Handler for all CEP emission and vehicle Data + */ +class PHEMCEPHandler { +public: + /// @brief Destructor + ~PHEMCEPHandler(); + + + /** @brief Implementatio of Singelton pattern + * @return reference on the actual instance + */ + static PHEMCEPHandler& getHandlerInstance(); + + + /** @brief Returns the CEP data for a PHEM emission class + * @param[in] emissionClass desired PHEM emission class + * @return CEP Data + */ + PHEMCEP* GetCep(SUMOEmissionClass emissionClass); + + + /** @brief Helper method to load CEP and vehicle files from file system + * @param[in] emissionClass desired PHEM emission class + * @return Indicator if loading was successul + */ + bool Load(SUMOEmissionClass emissionClass, const std::string& emissionClassIdentifier); + + +private: + /** @brief Helper method to read a vehicle file from file system + * @param[in] path The possible paths to PHEMlight data files + * @param[in] emissionClass desired PHEM emission class + * @param[in] vehicleMass out variable for vehicle mass + * @param[in] vehivleLoading out variable for vehicle loading + * @param[in] crossArea out variable for crosssectional area of vehicle + * @param[in] cwValue dout variable for cd value of vehivle + * @param[in] f0 out variable for rolling resistance coefficient f0 + * @param[in] f1 out variable for rolling resistance coefficient f1 + * @param[in] f2 out variable for rolling resistance coefficient f2 + * @param[in] f3 out variable for rolling resistance coefficient f3 + * @param[in] f4 out variable for rolling resistance coefficient f4 + * @param[in] ratedPower out variable for rated power of vehicle + * @param[in] vehicleMassType out variable for mass tyepe of vehicle, light (LV) or heavy (HV) + * @param[in] vehicleFuelType out variable for fuel type (D, G) of vehicle, needed for density of fuel + * @param[in] pNormV0 out variable for step function to get maximum normalized rated power over speed + * @param[in] pNormP0 out variable for step function to get maximum normalized rated power over speed + * @param[in] pNormV1 out variable for step function to get maximum normalized rated power over speed + * @param[in] pNormP1 out variable for step function to get maximum normalized rated power over speed + * @param[in] matrixRotFactor out variable for rotational factors over speed for more accurate power calculation + * @return Indicator if reading was successul + */ + bool ReadVehicleFile(const std::vector& path, const std::string& emissionClass, + double& vehicleMass, + double& vehicleLoading, + double& vehicleMassRot, + double& crossArea, + double& cWValue, + double& f0, + double& f1, + double& f2, + double& f3, + double& f4, + double& axleRatio, + double& ratedPower, + double& engineIdlingSpeed, + double& engineRatedSpeed, + double& effectiveWheelDiameter, + std::string& vehicleMassType, + std::string& vehicleFuelType, + double& pNormV0, + double& pNormP0, + double& pNormV1, + double& pNormP1, + std::vector< std::vector >& matrixSpeedInertiaTable, + std::vector< std::vector >& normedDragTable); + + + + /** @brief Helper method to read a CEP file from file system + * @param[in] path The possible paths to PHEMlight data files + * @param[in] emissionClass desired PHEM emission class + * @param[in] header vector of pollutant identifiers + * @param[in] matrix matrix holding power pattern and CEP curves + * @return Indicator if reading was successul + */ + bool ReadEmissionData(bool readFC, const std::vector& path, const std::string& emissionClass, + std::vector& header, std::vector >& matrix, std::vector& idlingValues); + + +private: + /// @brief bijection between PHEMEmissionClass and CEPs + std::map _ceps; +// StringBijection _stringRepsPhemEmissionClass; + + +private: + /** @brief Implementation of Singelton pattern + * private (copy) constructor and =operator to avoid more than one instances + */ + PHEMCEPHandler(); + PHEMCEPHandler(PHEMCEPHandler const&); + void operator=(PHEMCEPHandler const&); + +}; + +#endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/PHEMConstants.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/PHEMConstants.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/PHEMConstants.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/PHEMConstants.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,42 @@ +/****************************************************************************/ +/// @file PHEMConstants.cpp +/// @author Nikolaus Furian +/// @author Daniel Krajzewicz +/// @date Thu, 13.06.2013 +/// @version $$ +/// +// Holds constants and data version info for PHEM Light +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + +#ifndef PHEMConstants_h +#define PHEMConstants_h + +const double GRAVITY_CONST = 9.81; +const double AIR_DENSITY_CONST = 1.182; +const double SECONDS_PER_HOUR = 3600; +const double NORMALIZING_SPEED = 19.444; +const double NORMALIZING_ACCELARATION = 0.45; +const double DENSITY_DIESEL = 1; +const double DENSITY_GASOLINE = 1; +const double SPEED_DCEL_MIN = 10 / 3.6; +const double M_PI2 = 3.14159265358979323846; +const double ZERO_SPEED_ACCURACY = 0.1; +const double SPEED_ROTATIONAL_INCREMENT = 10 / 3.6; +const double POWER_FC_INCREMENT = 0.1; +const double POWER_POLLUTANT_INCREMENT = 0.3; +const double NNORM_INCREMENT = 0.05; + +const std::string PHEM_DATA_VERSION = "V5"; + +#endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/PollutantsInterface.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/PollutantsInterface.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/PollutantsInterface.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/PollutantsInterface.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,163 @@ +/****************************************************************************/ +/// @file PollutantsInterface.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Mon, 19.08.2013 +/// @version $Id: PollutantsInterface.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Interface to capsulate different emission models +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include "PollutantsInterface.h" +#include "HelpersHBEFA.h" +#include "HelpersHBEFA3.h" +#include "HelpersPHEMlight.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// static definitions +// =========================================================================== +HelpersHBEFA PollutantsInterface::myHBEFA2Helper; +HelpersHBEFA3 PollutantsInterface::myHBEFA3Helper; +HelpersPHEMlight PollutantsInterface::myPHEMlightHelper; +PollutantsInterface::Helper* PollutantsInterface::myHelpers[] = {&PollutantsInterface::myHBEFA2Helper, &PollutantsInterface::myHBEFA3Helper, &PollutantsInterface::myPHEMlightHelper}; + + +// =========================================================================== +// method definitions +// =========================================================================== +SUMOEmissionClass +PollutantsInterface::getClassByName(const std::string& eClass, const SUMOVehicleClass vc) { + size_t sep = eClass.find("/"); + if (sep != std::string::npos) { + const std::string model = eClass.substr(0, sep); + const std::string subClass = eClass.substr(sep + 1); + for (int i = 0; i < 3; i++) { + if (myHelpers[i]->getName() == model) { + return myHelpers[i]->getClassByName(subClass, vc); + } + } + } else { + // default HBEFA2 + return myHelpers[0]->getClassByName(eClass, vc); + } + throw InvalidArgument("Unknown emission class '" + eClass + "'."); +} + + +const std::vector +PollutantsInterface::getAllClasses() { + std::vector result; + for (int i = 0; i < 3; i++) { + myHelpers[i]->addAllClassesInto(result); + } + return result; +} + + +std::string +PollutantsInterface::getName(const SUMOEmissionClass c) { + return myHelpers[c >> 16]->getClassName(c); +} + + +bool +PollutantsInterface::isHeavy(const SUMOEmissionClass c) { + return (c & HEAVY_BIT) != 0; +} + + +bool +PollutantsInterface::isSilent(const SUMOEmissionClass c) { + return myHelpers[c >> 16]->isSilent(c); +} + + +SUMOReal +PollutantsInterface::getMaxAccel(SUMOEmissionClass c, double v, double a, double slope) { + return myHelpers[c >> 16]->getMaxAccel(c, v, a, slope); +} + + +SUMOEmissionClass +PollutantsInterface::getClass(const SUMOEmissionClass base, const std::string& vClass, + const std::string& fuel, const std::string& eClass, const double weight) { + return myHelpers[base >> 16]->getClass(base, vClass, fuel, eClass, weight); +} + + +std::string +PollutantsInterface::getAmitranVehicleClass(const SUMOEmissionClass c) { + return myHelpers[c >> 16]->getAmitranVehicleClass(c); +} + + +std::string +PollutantsInterface::getFuel(const SUMOEmissionClass c) { + return myHelpers[c >> 16]->getFuel(c); +} + + +int +PollutantsInterface::getEuroClass(const SUMOEmissionClass c) { + return myHelpers[c >> 16]->getEuroClass(c); +} + + +SUMOReal +PollutantsInterface::getWeight(const SUMOEmissionClass c) { + return myHelpers[c >> 16]->getWeight(c); +} + + +SUMOReal +PollutantsInterface::compute(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope) { + return myHelpers[c >> 16]->compute(c, e, v, a, slope); +} + + +PollutantsInterface::Emissions +PollutantsInterface::computeAll(const SUMOEmissionClass c, const double v, const double a, const double slope) { + const Helper* const h = myHelpers[c >> 16]; + return Emissions(h->compute(c, CO2, v, a, slope), h->compute(c, CO, v, a, slope), h->compute(c, HC, v, a, slope), + h->compute(c, FUEL, v, a, slope), h->compute(c, NO_X, v, a, slope), h->compute(c, PM_X, v, a, slope)); +} + + +SUMOReal +PollutantsInterface::computeDefault(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const SUMOReal tt) { + const Helper* const h = myHelpers[c >> 16]; + return (h->compute(c, e, v, 0, slope) + h->compute(c, e, v - a, a, slope)) * tt / 2.; +} + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/PollutantsInterface.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/PollutantsInterface.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/emissions/PollutantsInterface.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/emissions/PollutantsInterface.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,410 @@ +/****************************************************************************/ +/// @file PollutantsInterface.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date Mon, 19.08.2013 +/// @version $Id: PollutantsInterface.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Interface to capsulate different emission models +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2013-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef PollutantsInterface_h +#define PollutantsInterface_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include "PHEMCEP.h" + + +// =========================================================================== +// class declarations +// =========================================================================== +class HelpersHBEFA; +class HelpersHBEFA3; +class HelpersPHEMlight; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class PollutantsInterface + * @brief Helper methods for PHEMlight-based emission computation + */ +class PollutantsInterface { +public: + + /// @brief Enumerating all emission types, including fuel + enum EmissionType { CO2, CO, HC, FUEL, NO_X, PM_X }; + + + /** + * @struct Emissions + * @brief Storage for collected values of all emission types + */ + struct Emissions { + SUMOReal CO2; + SUMOReal CO; + SUMOReal HC; + SUMOReal fuel; + SUMOReal NOx; + SUMOReal PMx; + + /** @brief Constructor, intializes all members + * @param[in] co2 initial value for CO2, defaults to 0 + * @param[in] co initial value for CO, defaults to 0 + * @param[in] hc initial value for HC, defaults to 0 + * @param[in] f initial value for fuel, defaults to 0 + * @param[in] nox initial value for NOx, defaults to 0 + * @param[in] pmx initial value for PMx, defaults to 0 + */ + Emissions(SUMOReal co2 = 0, SUMOReal co = 0, SUMOReal hc = 0, SUMOReal f = 0, SUMOReal nox = 0, SUMOReal pmx = 0) + : CO2(co2), CO(co), HC(hc), fuel(f), NOx(nox), PMx(pmx) { + } + + /** @brief Add the values of the other struct to this one, scaling the values if needed + * @param[in] a the other emission valuess + * @param[in] scale scaling factor, defaulting to 1 (no scaling) + */ + void addScaled(const Emissions& a, const SUMOReal scale = 1.) { + CO2 += scale * a.CO2; + CO += scale * a.CO; + HC += scale * a.HC; + fuel += scale * a.fuel; + NOx += scale * a.NOx; + PMx += scale * a.PMx; + } + }; + + + /** + * @class Helper + * @brief abstract superclass for the model helpers + */ + class Helper { + public: + /** @brief Constructor, intializes the name + * @param[in] name the name of the model (string before the '/' in the emission class attribute) + */ + Helper(std::string name) : myName(name) {} + + /** @brief Returns the name of the model + * @return the name of the model (string before the '/' in the emission class attribute) + */ + const std::string& getName() const { + return myName; + } + + /** @brief Returns the emission class associated with the given name, aliases are possible + * If this method is asked for the "unknown" class it should return the default + * (possibly depending on the given vehicle class). + * The class name is case insensitive. + * + * @param[in] eClass the name of the emission class (string after the '/' in the emission class attribute) + * @param[in] vc the vehicle class to use when determining default class + * @return the name of the model (string before the '/' in the emission class) + */ + virtual SUMOEmissionClass getClassByName(const std::string& eClass, const SUMOVehicleClass vc) { + UNUSED_PARAMETER(vc); + if (myEmissionClassStrings.hasString(eClass)) { + return myEmissionClassStrings.get(eClass); + } + std::string eclower = eClass; + std::transform(eclower.begin(), eclower.end(), eclower.begin(), tolower); + return myEmissionClassStrings.get(eclower); + } + + /** @brief Returns the complete name of the emission class including the model + * @param[in] c the emission class + * @return the name of the class (the complete emission class attribute) + */ + const std::string getClassName(const SUMOEmissionClass c) const { + return myName + "/" + myEmissionClassStrings.getString(c); + } + + /** @brief Returns whether the class denotes a silent vehicle for interfacing with the noise model. + * By default the first class in each model is the silent class. + * @param[in] c the emission class + * @return whether the class denotes a silent vehicle + */ + virtual bool isSilent(const SUMOEmissionClass c) { + return (c & 0xffffffff & ~HEAVY_BIT) == 0; + } + + /// @name Methods for Amitran interfaces + /// @{ + + /** @brief Returns the emission class described by the given parameters. + * The base is used to determine the model to use and as default return values. + * Default implementation returns always base. + * @param[in] base the base class giving the model and the default + * @param[in] vClass the vehicle class as described in the Amitran interface (Passenger, ...) + * @param[in] fuel the fuel type as described in the Amitran interface (Gasoline, Diesel, ...) + * @param[in] eClass the emission class as described in the Amitran interface (Euro0, ...) + * @param[in] weight the vehicle weight in kg as described in the Amitran interface + * @return the class described by the parameters + */ + virtual SUMOEmissionClass getClass(const SUMOEmissionClass base, const std::string& vClass, + const std::string& fuel, const std::string& eClass, const double weight) const { + UNUSED_PARAMETER(vClass); + UNUSED_PARAMETER(fuel); + UNUSED_PARAMETER(eClass); + UNUSED_PARAMETER(weight); + return base; + } + + /** @brief Returns the vehicle class described by this emission class as described in the Amitran interface (Passenger, ...) + * Default implementation returns always "Passenger". + * @param[in] c the emission class + * @return the name of the vehicle class + */ + virtual std::string getAmitranVehicleClass(const SUMOEmissionClass c) const { + UNUSED_PARAMETER(c); + return "Passenger"; + } + + /** @brief Returns the fuel type described by this emission class as described in the Amitran interface (Gasoline, Diesel, ...) + * Default implementation returns always "Gasoline". + * @param[in] c the emission class + * @return the fuel type + */ + virtual std::string getFuel(const SUMOEmissionClass c) const { + UNUSED_PARAMETER(c); + return "Gasoline"; + } + + /** @brief Returns the Euro emission class described by this emission class as described in the Amitran interface (0, ..., 6) + * Default implementation returns always 0. + * @param[in] c the emission class + * @return the Euro class + */ + virtual int getEuroClass(const SUMOEmissionClass c) const { + UNUSED_PARAMETER(c); + return 0; + } + + /** @brief Returns a reference weight in kg described by this emission class as described in the Amitran interface + * It might return -1, if the weight is not important to distinguish different emission classes. + * Default implementation returns always -1. + * @param[in] c the emission class + * @return a reference weight + */ + virtual SUMOReal getWeight(const SUMOEmissionClass c) const { + UNUSED_PARAMETER(c); + return -1.; + } + /// @} + + /** @brief Returns the amount of the emitted pollutant given the vehicle type and state (in mg/s or ml/s for fuel) + * @param[in] c The vehicle emission class + * @param[in] e the type of emission (CO, CO2, ...) + * @param[in] v The vehicle's current velocity + * @param[in] a The vehicle's current acceleration + * @param[in] slope The road's slope at vehicle's position [°] + * @return The amount emitted by the given emission class when moving with the given velocity and acceleration [mg/s or ml/s] + */ + virtual SUMOReal compute(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope) const = 0; + + /** @brief Returns the maximum possible acceleration or -1. if the model cannot determine the maximum acceleration. + * Default implementation returns always -1. + * @param[in] c The vehicle emission class + * @param[in] v The vehicle's current velocity + * @param[in] a The vehicle's current acceleration + * @param[in] slope The road's slope at vehicle's position [°] + * @return The maximum possible acceleration + */ + virtual SUMOReal getMaxAccel(SUMOEmissionClass c, double v, double a, double slope) const { + UNUSED_PARAMETER(c); + UNUSED_PARAMETER(v); + UNUSED_PARAMETER(a); + UNUSED_PARAMETER(slope); + return -1.; + } + + /** @brief Add all known emission classes of this model to the given container + * @param[in] list the vector to add to + */ + void addAllClassesInto(std::vector& list) const { + myEmissionClassStrings.addKeysInto(list); + } + + + protected: + /// @brief the name of the model + const std::string myName; + + /// @brief Mapping between emission class names and integer representations + StringBijection myEmissionClassStrings; + + private: + Helper& operator=(const Helper&); // just to avoid a compiler warning + + + }; + + + /// @brief the known model helpers + static Helper* myHelpers[]; + + /// @brief the first class in each model representing a zero emission vehicle + static const int ZERO_EMISSIONS = 0; + + /// @brief the bit to set for denoting heavy vehicles + static const int HEAVY_BIT = 1 << 15; + + /** @brief Checks whether the string describes a known vehicle class + * @param[in] eClass The string describing the vehicle emission class + * @return whether it describes a valid emission class + */ + static SUMOEmissionClass getClassByName(const std::string& eClass, const SUMOVehicleClass vc = SVC_IGNORING); + + + /** @brief Checks whether the string describes a known vehicle class + * @param[in] eClass The string describing the vehicle emission class + * @return whether it describes a valid emission class + */ + static const std::vector getAllClasses(); + + + /** @brief Checks whether the string describes a known vehicle class + * @param[in] eClass The string describing the vehicle emission class + * @return whether it describes a valid emission class + */ + static std::string getName(const SUMOEmissionClass c); + + + /** @brief Checks whether the emission class describes a bus, truck or similar vehicle + * @param[in] c The vehicle emission class + * @return whether it describes a heavy vehicle + */ + static bool isHeavy(const SUMOEmissionClass c); + + + /** @brief Checks whether the emission class describes an electric or similar silent vehicle + * @param[in] c The vehicle emission class + * @return whether it describes a silent vehicle + */ + static bool isSilent(const SUMOEmissionClass c); + + + /** @brief Returns the maximum possible acceleration + * @param[in] c The vehicle emission class + * @param[in] v The vehicle's current velocity + * @param[in] a The vehicle's current acceleration + * @param[in] slope The road's slope at vehicle's position [°] + * @return The maximum possible acceleration + */ + static SUMOReal getMaxAccel(SUMOEmissionClass c, double v, double a, double slope); + + + /** @brief Returns the emission class fittig the given parameters + * @param[in] base The base emission class to derive from + * @param[in] vClass The vehicle class description (like "truck") + * @param[in] eClass The emission class description (like "Euro5") + * @param[in] fuel The fuel type (like "Diesel") + * @param[in] weight The weight in kg + * @return The best fitting emission class related to the base + */ + static SUMOEmissionClass getClass(const SUMOEmissionClass base, const std::string& vClass, const std::string& fuel, const std::string& eClass, const double weight); + + + /** @brief Returns the vehicle class described by the given emission class + * @param[in] c The vehicle emission class + * @return The Amitran string describing the vehicle class + */ + static std::string getAmitranVehicleClass(const SUMOEmissionClass c); + + + /** @brief Returns the fuel type of the given emission class + * @param[in] c The vehicle emission class + * @return "Diesel", "Gasoline", "HybridDiesel", or "HybridGasoline" + */ + static std::string getFuel(const SUMOEmissionClass c); + + + /** @brief Returns the Euro norm described by the given emission class + * @param[in] c The vehicle emission class + * @return A value between 0 and 6 (inclusive) + */ + static int getEuroClass(const SUMOEmissionClass c); + + + /** @brief Returns a representative weight for the given emission class + * see http://colombo-fp7.eu/deliverables/COLOMBO_D4.2_ExtendedPHEMSUMO_v1.7.pdf + * @param[in] c The vehicle emission class + * @return the weight in kg if it matters, 0 otherwise + */ + static SUMOReal getWeight(const SUMOEmissionClass c); + + + /** @brief Returns the amount of the emitted pollutant given the vehicle type and state (in mg/s or ml/s for fuel) + * @param[in] c The vehicle emission class + * @param[in] e the type of emission (CO, CO2, ...) + * @param[in] v The vehicle's current velocity + * @param[in] a The vehicle's current acceleration + * @param[in] slope The road's slope at vehicle's position [°] + * @return The amount emitted by the given vehicle class when moving with the given velocity and acceleration [mg/s] + */ + static SUMOReal compute(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope); + + + /** @brief Returns the amount of all emitted pollutants given the vehicle type and state (in mg/s or ml/s for fuel) + * @param[in] c The vehicle emission class + * @param[in] v The vehicle's current velocity + * @param[in] a The vehicle's current acceleration + * @param[in] slope The road's slope at vehicle's position [°] + * @return The amount emitted by the given vehicle class when moving with the given velocity and acceleration [mg/s] + */ + static Emissions computeAll(const SUMOEmissionClass c, const double v, const double a, const double slope); + + + /** @brief Returns the amount of emitted pollutant given the vehicle type and default values for the state (in mg) + * @param[in] c The vehicle emission class + * @param[in] e the type of emission (CO, CO2, ...) + * @param[in] v The vehicle's average velocity + * @param[in] a The vehicle's average acceleration + * @param[in] slope The road's slope at vehicle's position [°] + * @param{in] tt the time the vehicle travels + * @return The amount emitted by the given vehicle class [mg] + */ + static SUMOReal computeDefault(const SUMOEmissionClass c, const EmissionType e, const double v, const double a, const double slope, const SUMOReal tt); + +private: + /// @brief Instance of HBEFA2Helper which gets cleaned up automatically + static HelpersHBEFA myHBEFA2Helper; + /// @brief Instance of HBEFA3Helper which gets cleaned up automatically + static HelpersHBEFA3 myHBEFA3Helper; + /// @brief Instance of PHEMlightHelper which gets cleaned up automatically + static HelpersPHEMlight myPHEMlightHelper; + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXBaseObject.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXBaseObject.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXBaseObject.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXBaseObject.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,24 +1,26 @@ -/******************************************************************************** -* * -* Base of lots of non-widgets * -* * -********************************************************************************* -* Copyright (C) 2003 by Mathew Robertson. All Rights Reserved. * -********************************************************************************* -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Lesser General Public * -* License as published by the Free Software Foundation; either * -* version 2.1 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * -* Lesser General Public License for more details. * -* * -* You should have received a copy of the GNU Lesser General Public * -* License along with this library; if not, write to the Free Software * -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * -*********************************************************************************/ +/****************************************************************************/ +/// @file FXBaseObject.cpp +/// @author Mathew Robertson +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2004-03-19 +/// @version $Id: FXBaseObject.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + /* ========================================================================= * included modules * ======================================================================= */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXBaseObject.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXBaseObject.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXBaseObject.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXBaseObject.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,24 +1,25 @@ -/******************************************************************************** -* * -* Base of lots of non-widgets * -* * -********************************************************************************* -* Copyright (C) 2003 by Mathew Robertson. All Rights Reserved. * -********************************************************************************* -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Lesser General Public * -* License as published by the Free Software Foundation; either * -* version 2.1 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * -* Lesser General Public License for more details. * -* * -* You should have received a copy of the GNU Lesser General Public * -* License along with this library; if not, write to the Free Software * -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * -*********************************************************************************/ +/****************************************************************************/ +/// @file FXBaseObject.h +/// @author Mathew Robertson +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2004-03-19 +/// @version $Id: FXBaseObject.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + #ifndef FXBASEOBJECT_H #define FXBASEOBJECT_H diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/fxexdefs.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/fxexdefs.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/fxexdefs.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/fxexdefs.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,24 +1,25 @@ -/******************************************************************************** -* * -* FOX extension library: Definitions, Types, and Macros * -* * -********************************************************************************* -* Copyright (C) 2003 by Mathew Robertson. All Rights Reserved. * -********************************************************************************* -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Lesser General Public * -* License as published by the Free Software Foundation; either * -* version 2.1 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * -* Lesser General Public License for more details. * -* * -* You should have received a copy of the GNU Lesser General Public * -* License along with this library; if not, write to the Free Software * -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * -********************************************************************************/ +/****************************************************************************/ +/// @file fxexdefs.h +/// @author Mathew Robertson +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2004-03-19 +/// @version $Id: fxexdefs.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + #ifndef FXEXDEFS_H #define FXEXDEFS_H @@ -299,25 +300,25 @@ // thread stuff #ifndef WIN32 -typedef void* FXThreadHandle; // handle to a thread -typedef void* FXThreadMutex; // handle to a mutex -typedef void* FXThreadCondition; // handle to a condition variable -typedef void* FXThreadSemaphore; // handle to a semaphore -typedef FXInputHandle* FXThreadEventHandle; // handle to a thread event object +typedef void* FXThreadHandle; // handle to a thread +typedef void* FXThreadMutex; // handle to a mutex +typedef void* FXThreadCondition; // handle to a condition variable +typedef void* FXThreadSemaphore; // handle to a semaphore +typedef FXInputHandle* FXThreadEventHandle; // handle to a thread event object #else -typedef HANDLE FXThreadHandle; // handle to a thread -typedef HANDLE FXThreadMutex; // handle to a mutex -typedef HANDLE FXThreadCondition; // handle to a condition variable -typedef HANDLE FXThreadSemaphore; // handle to a semaphore -typedef FXInputHandle FXThreadEventHandle; // handle to a thread event object +typedef HANDLE FXThreadHandle; // handle to a thread +typedef HANDLE FXThreadMutex; // handle to a mutex +typedef HANDLE FXThreadCondition; // handle to a condition variable +typedef HANDLE FXThreadSemaphore; // handle to a semaphore +typedef FXInputHandle FXThreadEventHandle; // handle to a thread event object #endif // dynamic library loading #ifndef WIN32 -typedef void* FXDLLHandle; // handle to a dynamically loaded file +typedef void* FXDLLHandle; // handle to a dynamically loaded file #else -typedef HMODULE FXDLLHandle; // handle to a dynamically loaded file +typedef HMODULE FXDLLHandle; // handle to a dynamically loaded file #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXLCDLabel.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXLCDLabel.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXLCDLabel.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXLCDLabel.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,24 +1,26 @@ -/******************************************************************************** -* * -* LCD text label widget * -* * -********************************************************************************* -* Copyright (C) 2003 by Mathew Robertson. All Rights Reserved. * -********************************************************************************* -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Lesser General Public * -* License as published by the Free Software Foundation; either * -* version 2.1 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * -* Lesser General Public License for more details. * -* * -* You should have received a copy of the GNU Lesser General Public * -* License along with this library; if not, write to the Free Software * -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * -*********************************************************************************/ +/****************************************************************************/ +/// @file FXLCDLabel.cpp +/// @author Mathew Robertson +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2004-03-19 +/// @version $Id: FXLCDLabel.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + /* ========================================================================= * included modules * ======================================================================= */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXLCDLabel.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXLCDLabel.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXLCDLabel.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXLCDLabel.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,24 +1,26 @@ -/******************************************************************************** -* * -* LCD text label widget * -* * -********************************************************************************* -* Copyright (C) 2003 by Mathew Robertson. All Rights Reserved. * -********************************************************************************* -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Lesser General Public * -* License as published by the Free Software Foundation; either * -* version 2.1 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * -* Lesser General Public License for more details. * -* * -* You should have received a copy of the GNU Lesser General Public * -* License along with this library; if not, write to the Free Software * -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * -*********************************************************************************/ +/****************************************************************************/ +/// @file FXLCDLabel.h +/// @author Mathew Robertson +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2004-03-19 +/// @version $Id: FXLCDLabel.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + #ifndef FXLCDLABEL_H #define FXLCDLABEL_H diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXLinkLabel.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXLinkLabel.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXLinkLabel.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXLinkLabel.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,3 +1,25 @@ +/****************************************************************************/ +/// @file FXLinkLabel.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date 2006-03-08 +/// @version $Id: FXLinkLabel.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + /* ========================================================================= * included modules * ======================================================================= */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXLinkLabel.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXLinkLabel.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXLinkLabel.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXLinkLabel.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,3 +1,24 @@ +/****************************************************************************/ +/// @file FXLinkLabel.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2006-03-08 +/// @version $Id: FXLinkLabel.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + #ifndef FXLinkLabel_h #define FXLinkLabel_h diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXRealSpinDial.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXRealSpinDial.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXRealSpinDial.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXRealSpinDial.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,3 +1,26 @@ +/****************************************************************************/ +/// @file FXRealSpinDial.cpp +/// @author Bill Baxter +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Laura Bieker +/// @date 2004-03-19 +/// @version $Id: FXRealSpinDial.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + /******************************************************************************** * * * R e a l - V a l u e d S p i n n e r / D i a l W i d g e t * @@ -19,8 +42,9 @@ * License along with this library; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * ********************************************************************************* -* $Id: FXRealSpinDial.cpp 12641 2012-08-31 20:26:04Z behrisch $ * +* $Id: FXRealSpinDial.cpp 18095 2015-03-17 09:39:00Z behrisch $ * ********************************************************************************/ + /* ========================================================================= * included modules * ======================================================================= */ @@ -407,7 +431,7 @@ FXMAPFUNC(SEL_CHANGED, FXRealSpinDial::ID_ENTRY, FXRealSpinDial::onChgEntry), FXMAPFUNC(SEL_UPDATE, FXRealSpinDial::ID_DIAL, FXRealSpinDial::onUpdDial), FXMAPFUNC(SEL_CHANGED, FXRealSpinDial::ID_DIAL, FXRealSpinDial::onChgDial), - FXMAPFUNC(SEL_COMMAND, FXRealSpinDial::ID_DIAL, FXRealSpinDial::onCmdDial), + FXMAPFUNC(SEL_COMMAND, FXRealSpinDial::ID_DIAL, FXRealSpinDial::onChgDial), FXMAPFUNC(SEL_MOUSEWHEEL, FXRealSpinDial::ID_ENTRY, FXRealSpinDial::onMouseWheel), FXMAPFUNC(SEL_MOUSEWHEEL, FXRealSpinDial::ID_DIAL, FXRealSpinDial::onMouseWheel), FXMAPFUNC(SEL_MOUSEWHEEL, FXRealSpinDial::ID_INCREMENT, FXRealSpinDial::onMouseWheel), @@ -460,7 +484,9 @@ dial->setRevolutionIncrement(DIALINCR); upButton = new FXRealSpinDialBtn(this, this, ID_INCREMENT, FRAME_RAISED | FRAME_THICK | ARROW_UP | ARROW_REPEAT, 0, 0, 0, 0, 0, 0, 0, 0); downButton = new FXRealSpinDialBtn(this, this, ID_DECREMENT, FRAME_RAISED | FRAME_THICK | ARROW_DOWN | ARROW_REPEAT, 0, 0, 0, 0, 0, 0, 0, 0); - textField = new FXRealSpinDialText(this, cols, this, ID_ENTRY, (opts & FRAME_RIDGE) | TEXTFIELD_REAL | JUSTIFY_RIGHT, 0, 0, 0, 0, pl, pr, pt, pb); + // flag SPINDIAL_NOMAX collides with flag TEXTFIELD_PASSWORD + // flag SPINDIAL_NOMIN collides with flag TEXTFIELD_INTEGER + textField = new FXRealSpinDialText(this, cols, this, ID_ENTRY, (opts & ~(SPINDIAL_NOMAX | SPINDIAL_NOMIN)) | TEXTFIELD_REAL | JUSTIFY_RIGHT, 0, 0, 0, 0, pl, pr, pt, pb); textField->setText("0"); range[0] = (options & SPINDIAL_NOMIN) ? -DBL_MAX : 0; range[1] = (options & SPINDIAL_NOMAX) ? DBL_MAX : 100; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXRealSpinDial.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXRealSpinDial.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXRealSpinDial.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXRealSpinDial.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,29 +1,27 @@ -/******************************************************************************** -* * -* R e a l - V a l u e d S p i n n e r W i d g e t * -* * -********************************************************************************* -* Copyright (C) 2003 by Bill Baxter. All Rights Reserved. * -********************************************************************************* -* Based on FXSpinner.cpp * -* Copyright (C) 1998,2003 by Lyle Johnson. All Rights Reserved. * -********************************************************************************* -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Lesser General Public * -* License as published by the Free Software Foundation; either * -* version 2.1 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * -* Lesser General Public License for more details. * -* * -* You should have received a copy of the GNU Lesser General Public * -* License along with this library; if not, write to the Free Software * -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * -********************************************************************************* -* $Id: FXRealSpinDial.h 11451 2011-11-02 09:07:49Z behrisch $ * -********************************************************************************/ +/****************************************************************************/ +/// @file FXRealSpinDial.h +/// @author Lyle Johnson +/// @author Bill Baxter +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2004-03-19 +/// @version $Id: FXRealSpinDial.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + #ifndef FXREALSPINDIAL_H #define FXREALSPINDIAL_H @@ -204,7 +202,7 @@ } /// Return spinner increment FXdouble getCoarseIncrement() const { - return incr[-1]; + return incr[2]; } /// Set the text font diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXSevenSegment.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXSevenSegment.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXSevenSegment.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXSevenSegment.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,24 +1,26 @@ -/******************************************************************************** -* * -* Seven segment display widget * -* * -********************************************************************************* -* Copyright (C) 2003 by Mathew Robertson. All Rights Reserved. * -********************************************************************************* -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Lesser General Public * -* License as published by the Free Software Foundation; either * -* version 2.1 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * -* Lesser General Public License for more details. * -* * -* You should have received a copy of the GNU Lesser General Public * -* License along with this library; if not, write to the Free Software * -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * -*********************************************************************************/ +/****************************************************************************/ +/// @file FXSevenSegment.cpp +/// @author Mathew Robertson +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2004-03-19 +/// @version $Id: FXSevenSegment.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + /* ========================================================================= * included modules * ======================================================================= */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXSevenSegment.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXSevenSegment.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXSevenSegment.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXSevenSegment.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,24 +1,26 @@ -/******************************************************************************** -* * -* Seven segment display widget * -* * -********************************************************************************* -* Copyright (C) 2003 by Mathew Robertson. All Rights Reserved. * -********************************************************************************* -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Lesser General Public * -* License as published by the Free Software Foundation; either * -* version 2.1 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * -* Lesser General Public License for more details. * -* * -* You should have received a copy of the GNU Lesser General Public * -* License along with this library; if not, write to the Free Software * -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * -*********************************************************************************/ +/****************************************************************************/ +/// @file FXSevenSegment.h +/// @author Mathew Robertson +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2004-03-19 +/// @version $Id: FXSevenSegment.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + #ifndef FXSEVENSEGMENT_H #define FXSEVENSEGMENT_H diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXSingleEventThread.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXSingleEventThread.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXSingleEventThread.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXSingleEventThread.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,3 +1,27 @@ +/****************************************************************************/ +/// @file FXSingleEventThread.cpp +/// @author unknown_author +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Laura Bieker +/// @author Jakob Erdmann +/// @date 2004-03-19 +/// @version $Id: FXSingleEventThread.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + /* ========================================================================= * included modules * ======================================================================= */ @@ -46,6 +70,7 @@ FXMALLOC(&event, FXThreadEventHandle, 2); FXint res = pipe(event); FXASSERT(res == 0); + UNUSED_PARAMETER(res); // only used for assertion myApp->addInput(event[PIPE_READ], INPUT_READ, this, ID_THREAD_EVENT); #else event = CreateEvent(NULL, FALSE, FALSE, NULL); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXSingleEventThread.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXSingleEventThread.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXSingleEventThread.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXSingleEventThread.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,3 +1,25 @@ +/****************************************************************************/ +/// @file FXSingleEventThread.h +/// @author unknown_author +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2004-03-19 +/// @version $Id: FXSingleEventThread.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + #ifndef FXSingleEventThread_h #define FXSingleEventThread_h diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXThreadEvent.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXThreadEvent.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXThreadEvent.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXThreadEvent.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file FXThreadEvent.cpp -/// @author unknown_author +/// @author Mathew Robertson +/// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date 2004-03-19 -/// @version $Id: FXThreadEvent.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: FXThreadEvent.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -79,6 +81,7 @@ FXMALLOC(&event, FXThreadEventHandle, 2); FXint res = pipe(event); FXASSERT(res == 0); + UNUSED_PARAMETER(res); // only used for assertion getApp()->addInput(event[PIPE_READ], INPUT_READ, this, ID_THREAD_EVENT); #else event = CreateEvent(NULL, FALSE, FALSE, NULL); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXThreadEvent.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXThreadEvent.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXThreadEvent.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXThreadEvent.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file FXThreadEvent.h -/// @author unknown_author +/// @author Mathew Robertson +/// @author Daniel Krajzewicz +/// @author Michael Behrisch /// @date 2004-03-19 -/// @version $Id: FXThreadEvent.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: FXThreadEvent.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -56,8 +58,8 @@ * * // message IDs * enum { - * ID_THREAD_EVENT = FXWhatEver::ID_LAST, - * ID_LAST }; + * ID_THREAD_EVENT = FXWhatEver::ID_LAST, + * ID_LAST }; * * // message handler * long onThreadEvent(FXObject*, FXSelector, void*); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXThreadMessageRetriever.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXThreadMessageRetriever.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXThreadMessageRetriever.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXThreadMessageRetriever.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file FXThreadMessageRetriever.h /// @author Daniel Krajzewicz /// @date 2004-03-19 -/// @version $Id: FXThreadMessageRetriever.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: FXThreadMessageRetriever.h 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXWorkerThread.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXWorkerThread.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/FXWorkerThread.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/FXWorkerThread.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,300 @@ +/****************************************************************************/ +/// @file FXWorkerThread.h +/// @author Michael Behrisch +/// @date 2014-07-13 +/// @version $Id: FXWorkerThread.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A thread class together with a pool and a task for parallelized computation +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + +#ifndef FXWorkerThread_h +#define FXWorkerThread_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class FXWorkerThread + * @brief A thread repeatingly calculating incoming tasks + */ +class FXWorkerThread : public FXThread { + +public: + /** + * @class FXWorkerThread::Task + * @brief Abstract superclass of a task to be run with an index to keep track of pending tasks + */ + class Task { + public: + /// @brief Desctructor + virtual ~Task() {}; + + /** @brief Abstract method which in subclasses should contain the computations to be performed. + * + * If there is data to be shared among several tasks (but not among several threads) it can be put in the + * a thread class subclassing the FXWorkerThread. the instance of the thread is then made available + * via the context parameter. + * + * @param[in] context The thread which runs the task + */ + virtual void run(FXWorkerThread* context) = 0; + + /** @brief Sets the running index of this task. + * + * Every task receive an index which is unique among all pending tasks of the same thread pool. + * + * @param[in] newIndex the index to assign + */ + void setIndex(const int newIndex) { + myIndex = newIndex; + } + private: + /// @brief the index of the task, valid only after the task has been added to the pool + int myIndex; + }; + + /** + * @class FXWorkerThread::Pool + * @brief A pool of worker threads which distributes the tasks and collects the results + */ + class Pool { + public: + /** @brief Constructor + * + * May initialize the pool with a given number of workers. + * + * @param[in] numThreads the number of threads to create + */ + Pool(int numThreads = 0) : myRunningIndex(0), myNumFinished(0) { + while (numThreads > 0) { + new FXWorkerThread(*this); + numThreads--; + } + } + + /** @brief Destructor + * + * Stopping and deleting all workers by calling clear. + */ + virtual ~Pool() { + clear(); + } + + /** @brief Stops and deletes all worker threads. + */ + void clear() { + for (std::vector::iterator it = myWorkers.begin(); it != myWorkers.end(); ++it) { + delete *it; + } + myWorkers.clear(); + } + + /** @brief Adds the given thread to the pool. + * + * @param[in] w the thread to add + */ + void addWorker(FXWorkerThread* const w) { +// if (myWorkers.empty()) std::cout << "created pool at " << SysUtils::getCurrentMillis() << std::endl; + myWorkers.push_back(w); + } + + /** @brief Gives a number to the given task and assigns it to a randomly chosen worker. + * + * @param[in] t the task to add + */ + void add(Task* const t) { + t->setIndex(myRunningIndex++); + myWorkers[myRunningIndex % myWorkers.size()]->add(t); + } + + /** @brief Adds the given task to the list of finished tasks and assigns it to a randomly chosen worker. + * + * Locks the internal mutex and counts the finished tasks. This is to be called by the worker thread only. + * + * @param[in] t the task to add + */ + void addFinished(Task* const t) { + myMutex.lock(); + myNumFinished++; + myFinishedTasks.push_back(t); + myCondition.signal(); + myMutex.unlock(); + } + + /// @brief waits for all tasks to be finished + void waitAll() { + myMutex.lock(); + while (myNumFinished < myRunningIndex) { + myCondition.wait(myMutex); + } +// if (myRunningIndex > 0) std::cout << "finished waiting for " << myRunningIndex << " tasks at " << SysUtils::getCurrentMillis() << std::endl; + for (std::list::iterator it = myFinishedTasks.begin(); it != myFinishedTasks.end(); ++it) { + delete *it; + } + myFinishedTasks.clear(); + myRunningIndex = 0; + myNumFinished = 0; + myMutex.unlock(); + } + + /** @brief Checks whether there are currently more pending tasks than threads. + * + * This is only a rough estimate because the tasks are already assigned and there could be an idle thread even though the + * number of tasks is large. + * + * @return whether there are enough tasks to let all threads work + */ + bool isFull() const { + return myRunningIndex - myNumFinished >= size(); + } + + /** @brief Returns the number of threads in the pool. + * + * @return the number of threads + */ + int size() const { + return (int)myWorkers.size(); + } + + /// @brief locks the pool mutex + void lock() { + myPoolMutex.lock(); + } + + /// @brief unlocks the pool mutex + void unlock() { + myPoolMutex.unlock(); + } + + private: + /// @brief the current worker threads + std::vector myWorkers; + /// @brief the internal mutex for the task list + FXMutex myMutex; + /// @brief the pool mutex for external sync + FXMutex myPoolMutex; + /// @brief the semaphore to wait on for finishing all tasks + FXCondition myCondition; + /// @brief list of finished tasks + std::list myFinishedTasks; + /// @brief the running index for the next task + int myRunningIndex; + /// @brief the number of finished tasks (is reset when the pool runs empty) + int myNumFinished; + }; + +public: + /** @brief Constructor + * + * Adds the thread to the given pool and starts it. + * + * @param[in] pool the pool for this thread + */ + FXWorkerThread(Pool& pool): FXThread(), myPool(pool), myStopped(false), myCounter(0) { + pool.addWorker(this); + start(); + } + + /** @brief Destructor + * + * Stops the thread by calling stop. + */ + virtual ~FXWorkerThread() { + stop(); + } + + /** @brief Adds the given task to this thread to be calculated + * + * @param[in] t the task to add + */ + void add(Task* t) { + myMutex.lock(); + myTasks.push_back(t); + myCondition.signal(); + myMutex.unlock(); + } + + /** @brief Main execution method of this thread. + * + * Checks for new tasks, calculates them and puts them in the finished list of the pool until being stopped. + * + * @return always 0 + */ + FXint run() { + while (!myStopped) { + myMutex.lock(); + while (!myStopped && myTasks.empty()) { + myCondition.wait(myMutex); + } + if (myStopped) { + myMutex.unlock(); + break; + } + Task* t = myTasks.front(); + myTasks.pop_front(); + myMutex.unlock(); + t->run(this); + myCounter++; +// if (myCounter % 1000 == 0) std::cout << (size_t)this << " ran " << myCounter << " tasks " << std::endl; + myPool.addFinished(t); + } +// std::cout << "ran " << myCounter << " tasks " << std::endl; + return 0; + } + + /** @brief Stops the thread + * + * The currently running task will be finished but all further tasks are discarded. + */ + void stop() { + myMutex.lock(); + myStopped = true; + myCondition.signal(); + myMutex.unlock(); + join(); + } + +private: + /// @brief the pool for this thread + Pool& myPool; + /// @brief the mutex for the task list + FXMutex myMutex; + /// @brief the semaphore when waiting for new tasks + FXCondition myCondition; + /// @brief the list of pending tasks + std::list myTasks; + /// @brief whether we are still running + bool myStopped; + /// @brief counting completed tasks for debugging / profiling + int myCounter; +}; + + +#endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -12,6 +12,7 @@ FXSevenSegment.cpp FXSevenSegment.h \ FXSingleEventThread.cpp FXSingleEventThread.h \ FXThreadEvent.cpp FXThreadEvent.h \ +FXWorkerThread.h \ MFXCheckableButton.cpp MFXCheckableButton.h \ MFXEventQue.cpp MFXEventQue.h \ MFXInterThreadEventClient.h \ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/foxtools -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,6 +92,10 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libfoxtools_a_AR = $(AR) $(ARFLAGS) libfoxtools_a_LIBADD = am_libfoxtools_a_OBJECTS = FXBaseObject.$(OBJEXT) \ @@ -58,30 +107,86 @@ MFXEditableTable.$(OBJEXT) MFXMenuHeader.$(OBJEXT) \ MFXMutex.$(OBJEXT) MFXUtils.$(OBJEXT) libfoxtools_a_OBJECTS = $(am_libfoxtools_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libfoxtools_a_SOURCES) DIST_SOURCES = $(libfoxtools_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -90,6 +195,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -116,9 +222,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -129,10 +239,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -238,6 +344,7 @@ FXSevenSegment.cpp FXSevenSegment.h \ FXSingleEventThread.cpp FXSingleEventThread.h \ FXThreadEvent.cpp FXThreadEvent.h \ +FXWorkerThread.h \ MFXCheckableButton.cpp MFXCheckableButton.h \ MFXEventQue.cpp MFXEventQue.h \ MFXInterThreadEventClient.h \ @@ -284,10 +391,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libfoxtools.a: $(libfoxtools_a_OBJECTS) $(libfoxtools_a_DEPENDENCIES) - -rm -f libfoxtools.a - $(libfoxtools_a_AR) libfoxtools.a $(libfoxtools_a_OBJECTS) $(libfoxtools_a_LIBADD) - $(RANLIB) libfoxtools.a + +libfoxtools.a: $(libfoxtools_a_OBJECTS) $(libfoxtools_a_DEPENDENCIES) $(EXTRA_libfoxtools_a_DEPENDENCIES) + $(AM_V_at)-rm -f libfoxtools.a + $(AM_V_AR)$(libfoxtools_a_AR) libfoxtools.a $(libfoxtools_a_OBJECTS) $(libfoxtools_a_LIBADD) + $(AM_V_at)$(RANLIB) libfoxtools.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -312,25 +420,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MFXUtils.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -338,26 +446,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -369,15 +466,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -386,6 +479,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -434,10 +542,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -522,18 +635,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXAddEditTypedTable.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXAddEditTypedTable.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXAddEditTypedTable.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXAddEditTypedTable.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXAddEditTypedTable.cpp /// @author Daniel Krajzewicz /// @date 2004-07-02 -/// @version $Id: MFXAddEditTypedTable.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MFXAddEditTypedTable.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXAddEditTypedTable.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXAddEditTypedTable.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXAddEditTypedTable.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXAddEditTypedTable.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXAddEditTypedTable.h /// @author Daniel Krajzewicz /// @date 2004-07-02 -/// @version $Id: MFXAddEditTypedTable.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MFXAddEditTypedTable.h 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXCheckableButton.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXCheckableButton.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXCheckableButton.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXCheckableButton.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXCheckableButton.cpp /// @author Daniel Krajzewicz /// @date 2004-03-19 -/// @version $Id: MFXCheckableButton.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MFXCheckableButton.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXCheckableButton.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXCheckableButton.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXCheckableButton.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXCheckableButton.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXCheckableButton.h /// @author Daniel Krajzewicz /// @date 2004-03-19 -/// @version $Id: MFXCheckableButton.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MFXCheckableButton.h 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXEditableTable.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXEditableTable.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXEditableTable.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXEditableTable.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXEditableTable.cpp /// @author Daniel Krajzewicz /// @date 2004-07-02 -/// @version $Id: MFXEditableTable.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MFXEditableTable.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXEditableTable.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXEditableTable.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXEditableTable.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXEditableTable.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXEditableTable.h /// @author Daniel Krajzewicz /// @date 2004-07-02 -/// @version $Id: MFXEditableTable.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MFXEditableTable.h 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXEventQue.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXEventQue.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXEventQue.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXEventQue.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXEventQue.cpp /// @author Daniel Krajzewicz /// @date void *ret = *(myEvents.begin()); -/// @version $Id: MFXEventQue.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MFXEventQue.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -28,57 +28,10 @@ #include #endif -#include "MFXEventQue.h" -#include - #ifdef CHECK_MEMORY_LEAKS #include #endif // CHECK_MEMORY_LEAKS -void* -MFXEventQue::top() { - assert(size() != 0); - myMutex.lock(); - void* ret = *(myEvents.begin()); - myMutex.unlock(); - return ret; -} - - -void -MFXEventQue::pop() { - myMutex.lock(); - myEvents.erase(myEvents.begin()); - myMutex.unlock(); -} - - -void -MFXEventQue::add(void* what) { - myMutex.lock(); - myEvents.push_back(what); - myMutex.unlock(); -} - - -size_t -MFXEventQue::size() { - myMutex.lock(); - size_t msize = myEvents.size(); - myMutex.unlock(); - return msize; -} - - -bool -MFXEventQue::empty() { - myMutex.lock(); - bool ret = size() == 0; - myMutex.unlock(); - return ret; -} - - /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXEventQue.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXEventQue.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXEventQue.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXEventQue.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXEventQue.h /// @author Daniel Krajzewicz /// @date 2004-03-19 -/// @version $Id: MFXEventQue.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MFXEventQue.h 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -32,21 +32,53 @@ #include #include +#include #include +template class MFXEventQue { public: MFXEventQue() { } ~MFXEventQue() { } - void* top(); - void pop(); - void add(void* what); - size_t size(); - bool empty(); + T top() { + assert(size() != 0); + myMutex.lock(); + T ret = myItems.front(); + myMutex.unlock(); + return ret; + } + + + void pop() { + myMutex.lock(); + myItems.erase(myItems.begin()); + myMutex.unlock(); + } + + void add(T what) { + myMutex.lock(); + myItems.push_back(what); + myMutex.unlock(); + } + + size_t size() { + myMutex.lock(); + const size_t ret = myItems.size(); + myMutex.unlock(); + return ret; + } + + bool empty() { + myMutex.lock(); + const bool ret = myItems.size() == 0; + myMutex.unlock(); + return ret; + } + private: MFXMutex myMutex; - std::list myEvents; + std::list myItems; }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXImageHelper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXImageHelper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXImageHelper.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXImageHelper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXImageHelper.cpp /// @author Daniel Krajzewicz /// @date 2005-05-04 -/// @version $Id: MFXImageHelper.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MFXImageHelper.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXImageHelper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXImageHelper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXImageHelper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXImageHelper.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXImageHelper.h /// @author Daniel Krajzewicz /// @date 2005-05-04 -/// @version $Id: MFXImageHelper.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: MFXImageHelper.h 18095 2015-03-17 09:39:00Z behrisch $ /// // static helpers for loading and saving images in various formats /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXInterThreadEventClient.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXInterThreadEventClient.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXInterThreadEventClient.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXInterThreadEventClient.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXInterThreadEventClient.h /// @author Daniel Krajzewicz /// @date 2004-03-19 -/// @version $Id: MFXInterThreadEventClient.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MFXInterThreadEventClient.h 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXMenuHeader.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXMenuHeader.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXMenuHeader.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXMenuHeader.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXMenuHeader.cpp /// @author Daniel Krajzewicz /// @date 2004-07-02 -/// @version $Id: MFXMenuHeader.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MFXMenuHeader.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXMenuHeader.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXMenuHeader.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXMenuHeader.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXMenuHeader.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXMenuHeader.h /// @author Daniel Krajzewicz /// @date 2004-07-02 -/// @version $Id: MFXMenuHeader.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MFXMenuHeader.h 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXMutex.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXMutex.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXMutex.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXMutex.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,24 +1,26 @@ -/******************************************************************************** -* * -* Mutal exclusion object (required for threads) * -* * -********************************************************************************* -* Copyright (C) 2003 by Mathew Robertson. All Rights Reserved. * -********************************************************************************* -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Lesser General Public * -* License as published by the Free Software Foundation; either * -* version 2.1 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * -* Lesser General Public License for more details. * -* * -* You should have received a copy of the GNU Lesser General Public * -* License along with this library; if not, write to the Free Software * -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * -********************************************************************************/ +/****************************************************************************/ +/// @file MFXMutex.cpp +/// @author Mathew Robertson +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date 2007-02-19 +/// @version $Id: MFXMutex.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + /* ========================================================================= * included modules * ======================================================================= */ @@ -55,6 +57,7 @@ FXMALLOC(&mutexHandle, pthread_mutex_t, 1); status = pthread_mutex_init((pthread_mutex_t*)mutexHandle, &attr); FXASSERT(status == 0); + (void)status; // only used for assertion pthread_mutexattr_destroy(&attr); #else mutexHandle = CreateMutex(NULL, FALSE, NULL); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXMutex.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXMutex.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXMutex.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXMutex.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,24 +1,26 @@ -/******************************************************************************** -* * -* Mutal exclusion object (required for threads) * -* * -********************************************************************************* -* Copyright (C) 2003 by Mathew Robertson. All Rights Reserved. * -********************************************************************************* -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Lesser General Public * -* License as published by the Free Software Foundation; either * -* version 2.1 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * -* Lesser General Public License for more details. * -* * -* You should have received a copy of the GNU Lesser General Public * -* License along with this library; if not, write to the Free Software * -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * -********************************************************************************/ +/****************************************************************************/ +/// @file MFXMutex.h +/// @author Mathew Robertson +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2007-02-19 +/// @version $Id: MFXMutex.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + #ifndef MFXMUTEX_H #define MFXMUTEX_H @@ -36,12 +38,12 @@ #include #ifndef WIN32 -typedef void* FXThreadMutex; // handle to a mutex +typedef void* FXThreadMutex; // handle to a mutex #else #define NOMINMAX #include #undef NOMINMAX -typedef HANDLE FXThreadMutex; // handle to a mutex +typedef HANDLE FXThreadMutex; // handle to a mutex #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXUtils.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXUtils.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXUtils.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXUtils.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXUtils.cpp /// @author Daniel Krajzewicz /// @date 2006-01-09 -/// @version $Id: MFXUtils.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MFXUtils.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Some helper functions for FOX /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXUtils.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXUtils.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/foxtools/MFXUtils.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/foxtools/MFXUtils.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file MFXUtils.h /// @author Daniel Krajzewicz /// @date 2006-01-09 -/// @version $Id: MFXUtils.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: MFXUtils.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Some helper functions for FOX /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/AbstractPoly.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/AbstractPoly.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/AbstractPoly.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/AbstractPoly.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: AbstractPoly.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: AbstractPoly.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The base class for polygons /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/bezier.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/bezier.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/bezier.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/bezier.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,15 +1,14 @@ /****************************************************************************/ /// @file bezier.cpp -/// @author unknown_author /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2003-11-19 -/// @version $Id: bezier.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: bezier.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/bezier.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/bezier.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/bezier.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/bezier.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,15 +1,14 @@ /****************************************************************************/ /// @file bezier.h -/// @author unknown_author /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2003-11-19 -/// @version $Id: bezier.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: bezier.h 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Boundary.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Boundary.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Boundary.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Boundary.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: Boundary.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Boundary.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A class that stores the 2D geometrical boundary /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Boundary.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Boundary.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Boundary.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Boundary.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: Boundary.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Boundary.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A class that stores a 2D geometrical boundary /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Bresenham.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Bresenham.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Bresenham.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Bresenham.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Fri, 07 Jun 2002 -/// @version $Id: Bresenham.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Bresenham.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A class to realise a uniform n:m - relationship using the /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Bresenham.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Bresenham.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Bresenham.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Bresenham.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 17 Dec 2001 -/// @version $Id: Bresenham.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Bresenham.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A class to realise a uniform n:m - relationship using the /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/GeoConvHelper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/GeoConvHelper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/GeoConvHelper.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/GeoConvHelper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date 2006-08-01 -/// @version $Id: GeoConvHelper.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GeoConvHelper.cpp 18171 2015-03-27 14:50:44Z behrisch $ /// // static methods for processing the coordinates conversion for the current net /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -38,6 +38,7 @@ #include #include #include +#include #include "GeoConvHelper.h" #ifdef CHECK_MEMORY_LEAKS @@ -61,6 +62,8 @@ myProjString(proj), #ifdef HAVE_PROJ myProjection(0), + myInverseProjection(0), + myGeoProjection(0), #endif myOffset(offset), myGeoScale(pow(10, (double) - shift)), @@ -76,6 +79,8 @@ myProjectionMethod = UTM; } else if (proj == "DHDN") { myProjectionMethod = DHDN; + } else if (proj == "DHDN_UTM") { + myProjectionMethod = DHDN_UTM; #ifdef HAVE_PROJ } else { myProjectionMethod = PROJ; @@ -94,6 +99,12 @@ if (myProjection != 0) { pj_free(myProjection); } + if (myInverseProjection != 0) { + pj_free(myInverseProjection); + } + if (myGeoProjection != 0) { + pj_free(myInverseProjection); + } #endif } @@ -112,9 +123,23 @@ pj_free(myProjection); myProjection = 0; } + if (myInverseProjection != 0) { + pj_free(myInverseProjection); + myInverseProjection = 0; + } + if (myGeoProjection != 0) { + pj_free(myGeoProjection); + myGeoProjection = 0; + } if (orig.myProjection != 0) { myProjection = pj_init_plus(orig.myProjString.c_str()); } + if (orig.myInverseProjection != 0) { + myInverseProjection = pj_init_plus(pj_get_def(orig.myInverseProjection, 0)); + } + if (orig.myGeoProjection != 0) { + myGeoProjection = pj_init_plus(pj_get_def(orig.myGeoProjection, 0)); + } #endif return *this; } @@ -136,7 +161,7 @@ WRITE_ERROR("Inverse projection works only with explicit proj parameters."); return false; } - unsigned numProjections = oc.getBool("simple-projection") + oc.getBool("proj.utm") + oc.getBool("proj.dhdn") + (oc.getString("proj").length() > 1); + unsigned numProjections = oc.getBool("simple-projection") + oc.getBool("proj.utm") + oc.getBool("proj.dhdn") + oc.getBool("proj.dhdnutm") + (oc.getString("proj").length() > 1); if (numProjections > 1) { WRITE_ERROR("The projection method needs to be uniquely defined."); return false; @@ -146,7 +171,9 @@ proj = "UTM"; } else if (oc.getBool("proj.dhdn")) { proj = "DHDN"; - } else { + } else if (oc.getBool("proj.dhdnutm")) { + proj = "DHDN_UTM"; + } else if (!oc.isDefault("proj")) { proj = oc.getString("proj"); } #endif @@ -184,13 +211,16 @@ oc.addDescription("proj.utm", "Projection", "Determine the UTM zone (for a universal transversal mercator projection based on the WGS84 ellipsoid)"); oc.doRegister("proj.dhdn", new Option_Bool(false)); - oc.addDescription("proj.dhdn", "Projection", "Determine the DHDN zone (for a transversal mercator projection based on the bessel ellipsoid)"); + oc.addDescription("proj.dhdn", "Projection", "Determine the DHDN zone (for a transversal mercator projection based on the bessel ellipsoid, \"Gauss-Krueger\")"); oc.doRegister("proj", new Option_String("!")); oc.addDescription("proj", "Projection", "Uses STR as proj.4 definition for projection"); oc.doRegister("proj.inverse", new Option_Bool(false)); oc.addDescription("proj.inverse", "Projection", "Inverses projection"); + + oc.doRegister("proj.dhdnutm", new Option_Bool(false)); + oc.addDescription("proj.dhdnutm", "Projection", "Convert from Gauss-Krueger to UTM"); #endif // HAVE_PROJ } @@ -234,8 +264,22 @@ // init projection parameter on first use #ifdef HAVE_PROJ if (myProjection == 0) { - const double x = from.x() * myGeoScale; + double x = from.x() * myGeoScale; switch (myProjectionMethod) { + case DHDN_UTM: { + int zone = (int)((x - 500000.) / 1000000.); + if (zone < 1 || zone > 5) { + WRITE_WARNING("Attempt to initialize DHDN_UTM-projection on invalid longitude " + toString(x)); + return false; + } + myProjString = "+proj=tmerc +lat_0=0 +lon_0=" + toString(3 * zone) + + " +k=1 +x_0=" + toString(zone * 1000000 + 500000) + + " +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"; + myInverseProjection = pj_init_plus(myProjString.c_str()); + myGeoProjection = pj_init_plus("+proj=latlong +datum=WGS84"); + //!!! check pj_errno + x = ((x - 500000.) / 1000000.) * 3; // continues with UTM + } case UTM: { int zone = (int)(x + 180) / 6 + 1; myProjString = "+proj=utm +zone=" + toString(zone) + @@ -261,6 +305,14 @@ break; } } + if (myInverseProjection != 0) { + double x = from.x(); + double y = from.y(); + if (pj_transform(myInverseProjection, myGeoProjection, 1, 1, &x, &y, NULL)) { + WRITE_WARNING("Could not transform (" + toString(x) + "," + toString(y) + ")"); + } + from.set(SUMOReal(x * RAD_TO_DEG), SUMOReal(y * RAD_TO_DEG)); + } #endif // perform conversion bool ok = x2cartesian_const(from); @@ -282,7 +334,12 @@ } else if (myUseInverseProjection) { cartesian2geo(from); } else { - if (x > 180.1 || x < -180.1 || y > 90.1 || y < -90.1) { + if (x > 180.1 || x < -180.1) { + WRITE_WARNING("Invalid longitude " + toString(x)); + return false; + } + if (y > 90.1 || y < -90.1) { + WRITE_WARNING("Invalid latitude " + toString(y)); return false; } #ifdef HAVE_PROJ @@ -388,5 +445,24 @@ } +void +GeoConvHelper::writeLocation(OutputDevice& into) { + into.openTag(SUMO_TAG_LOCATION); + into.writeAttr(SUMO_ATTR_NET_OFFSET, myFinal.getOffsetBase()); + into.writeAttr(SUMO_ATTR_CONV_BOUNDARY, myFinal.getConvBoundary()); + if (myFinal.usingGeoProjection()) { + into.setPrecision(GEO_OUTPUT_ACCURACY); + } + into.writeAttr(SUMO_ATTR_ORIG_BOUNDARY, myFinal.getOrigBoundary()); + if (myFinal.usingGeoProjection()) { + into.setPrecision(); + } + into.writeAttr(SUMO_ATTR_ORIG_PROJ, myFinal.getProjString()); + into.closeTag(); + into.lf(); +} + + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/GeoConvHelper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/GeoConvHelper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/GeoConvHelper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/GeoConvHelper.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date 2006-08-01 -/// @version $Id: GeoConvHelper.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GeoConvHelper.h 18095 2015-03-17 09:39:00Z behrisch $ /// // static methods for processing the coordinates conversion for the current net /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -47,6 +47,7 @@ // =========================================================================== class OptionsCont; class PositionVector; +class OutputDevice; // =========================================================================== @@ -98,6 +99,11 @@ return myProcessing; } + /** @brief the coordinate transformation that was loaded fron an input file + */ + static GeoConvHelper& getLoaded() { + return myLoaded; + } /** @brief compute the location attributes which will be used for output * based on the loaded location data, the given options and the transformations applied during processing @@ -163,12 +169,16 @@ /// Returns the network offset const std::string& getProjString() const; + /// @brief writes the location element + static void writeLocation(OutputDevice& into); + private: enum ProjectionMethod { NONE, SIMPLE, UTM, DHDN, + DHDN_UTM, PROJ }; @@ -178,6 +188,12 @@ #ifdef HAVE_PROJ /// The proj.4-projection to use projPJ myProjection; + + /// The inverse proj.4-projection to use first + projPJ myInverseProjection; + + /// The geo proj.4-projection which is the target of the inverse projection + projPJ myGeoProjection; #endif /// The offset to apply diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/GeomConvHelper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/GeomConvHelper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/GeomConvHelper.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/GeomConvHelper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2003 -/// @version $Id: GeomConvHelper.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GeomConvHelper.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Some helping functions for geometry parsing /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/GeomConvHelper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/GeomConvHelper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/GeomConvHelper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/GeomConvHelper.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2003 -/// @version $Id: GeomConvHelper.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GeomConvHelper.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Some helping functions for geometry parsing /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/GeomHelper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/GeomHelper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/GeomHelper.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/GeomHelper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GeomHelper.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GeomHelper.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// -// Some geometrical helpers +// Some static methods performing geometrical operations /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,6 +45,11 @@ #include #endif // CHECK_MEMORY_LEAKS +// =========================================================================== +// static members +// =========================================================================== +const SUMOReal GeomHelper::INVALID_OFFSET = -1; + // =========================================================================== // method definitions @@ -100,7 +105,11 @@ } else { *x = x1; *y = a; - *mu = (a - y1) / (y2 - y1); + if (y2 == y1) { + *mu = 0; + } else { + *mu = (a - y1) / (y2 - y1); + } } } return true; @@ -112,10 +121,15 @@ return false; } /* Is the intersection along the segments */ - const double mua = numera / denominator; - const double mub = numerb / denominator; - if (mua < 0 || mua > 1 || mub < 0 || mub > 1) { - return false; + double mua = numera / denominator; + /* reduce rounding errors for lines ending in the same point */ + if (fabs(x2 - x4) < eps && fabs(y2 - y4) < eps) { + mua = 1.; + } else { + const double mub = numerb / denominator; + if (mua < 0 || mua > 1 || mub < 0 || mub > 1) { + return false; + } } if (x != 0) { *x = x1 + mua * (x2 - x1); @@ -127,7 +141,6 @@ - bool GeomHelper::intersects(const Position& p11, const Position& p12, const Position& p21, const Position& p22) { @@ -136,6 +149,56 @@ } +bool +GeomHelper::pointOnLine(const Position& p, const Position& from, const Position& to) { + if (p.x() >= MIN2(from.x(), to.x()) && p.x() <= MAX2(from.x(), to.x()) && + p.y() >= MIN2(from.y(), to.y()) && p.y() <= MAX2(from.y(), to.y())) { + return true; + } + return false; +} + + +void +GeomHelper::FindLineCircleIntersections(const Position& c, SUMOReal radius, const Position& p1, const Position& p2, + std::vector& into) { + SUMOReal dx = p2.x() - p1.x(); + SUMOReal dy = p2.y() - p1.y(); + + SUMOReal A = dx * dx + dy * dy; + SUMOReal B = 2 * (dx * (p1.x() - c.x()) + dy * (p1.y() - c.y())); + SUMOReal C = (p1.x() - c.x()) * (p1.x() - c.x()) + (p1.y() - c.y()) * (p1.y() - c.y()) - radius * radius; + + SUMOReal det = B * B - 4 * A * C; + if ((A <= 0.0000001) || (det < 0)) { + // No real solutions. + return; + } else if (det == 0) { + // One solution. + SUMOReal t = -B / (2 * A); + Position intersection(p1.x() + t * dx, p1.y() + t * dy); + if (GeomHelper::pointOnLine(intersection, p1, p2)) { + into.push_back(t); + } + return; + } else { + // Two solutions. + SUMOReal t = (float)((-B + sqrt(det)) / (2 * A)); + Position intersection(p1.x() + t * dx, p1.y() + t * dy); + if (GeomHelper::pointOnLine(intersection, p1, p2)) { + into.push_back(t); + } + t = (float)((-B - sqrt(det)) / (2 * A)); + intersection.set(p1.x() + t * dx, p1.y() + t * dy); + if (GeomHelper::pointOnLine(intersection, p1, p2)) { + into.push_back(t); + } + return; + } +} + + + Position GeomHelper::intersection_position2D(const Position& p11, const Position& p12, @@ -147,7 +210,7 @@ // @todo calculate better "average" z value return Position(x, y, p11.z() + m * (p12.z() - p11.z())); } - return Position(-1, -1); + return Position::INVALID; } @@ -246,12 +309,12 @@ SUMOReal -GeomHelper::closestDistancePointLine(const Position& point, - const Position& lineStart, - const Position& lineEnd, - Position& outIntersection) { +GeomHelper::closestDistancePointLine2D(const Position& point, + const Position& lineStart, + const Position& lineEnd, + Position& outIntersection) { const SUMOReal length = nearest_offset_on_line_to_point2D(lineStart, lineEnd, point, false); - outIntersection.set(Line(lineStart, lineEnd).getPositionAtDistance(length)); + outIntersection.set(Line(lineStart, lineEnd).getPositionAtDistance2D(length)); return point.distanceTo2D(outIntersection); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/GeomHelper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/GeomHelper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/GeomHelper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/GeomHelper.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GeomHelper.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GeomHelper.h 18095 2015-03-17 09:39:00Z behrisch $ /// -// Some geometrical helpers +// Some static methods performing geometrical operations /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,20 +45,52 @@ #define DEG2RAD(x) static_cast((x) * M_PI / 180.) #define RAD2DEG(x) static_cast((x) * 180. / M_PI) + // =========================================================================== // class definitions // =========================================================================== -/** - * +/** @class GeomHelper + * @brief Some static methods performing geometrical operations */ class GeomHelper { + public: - /** @brief return whether the line segments defined by - * Line p11,p12 and Line p21,p22 intersect + /// @brief a value to signify offsets outside the range of [0, Line.length()] + static const SUMOReal INVALID_OFFSET; + + /** @brief return whether given lines intersect + * @param[in] p11 The begin position of the first line + * @param[in] p12 The end position of the first line + * @param[in] p21 The begin position of the second line + * @param[in] p22 The end position of the second line + * @return Whether both lines intersect */ static bool intersects(const Position& p11, const Position& p12, const Position& p21, const Position& p22); + + /** @brief Returns whether the given point lies on the given line + * @param[in] p The position + * @param[in] from The begin position of the line + * @param[in] to The end position of the line + * @return Whether the point lies on the line + */ + static bool pointOnLine(const Position& p, const Position& from, const Position& to); + + + /** @brief Returns the positions the given circle is crossed by the given line + * @param[in] c The center position of the circle + * @param[in] radius The radius of the circle + * @param[in] p1 The begin of the line + * @param[in] p2 The end of the line + * @param[filled] into The list of crossing positions (0-1 along the line's length) + * @see http://blog.csharphelper.com/2010/03/28/determine-where-a-line-intersects-a-circle-in-c.aspx + * @see http://gamedev.stackexchange.com/questions/18333/circle-line-collision-detection-problem (jazzdawg) + */ + static void FindLineCircleIntersections(const Position& c, SUMOReal radius, const Position& p1, const Position& p2, + std::vector& into); + + /** @brief returns the intersection point * of the (infinite) lines p11,p12 and p21,p22. * If the given lines are parallel the result will contain NAN-values @@ -90,7 +122,7 @@ * Return the distance from point to line as well as the intersection point. * If intersection does not lie within the line segment, the start or end point of the segment is returned */ - static SUMOReal closestDistancePointLine(const Position& point, + static SUMOReal closestDistancePointLine2D(const Position& point, const Position& lineStart, const Position& lineEnd, Position& outIntersection); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Helper_ConvexHull.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Helper_ConvexHull.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Helper_ConvexHull.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Helper_ConvexHull.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,10 +1,9 @@ /****************************************************************************/ /// @file Helper_ConvexHull.cpp -/// @author unknown_author /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2004-11-23 -/// @version $Id: Helper_ConvexHull.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Helper_ConvexHull.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Copyright 2002, softSurfer (www.softsurfer.com) // This code may be freely used and modified for any purpose @@ -13,8 +12,8 @@ // liable for any real or imagined damage resulting from its use. // Users of this code must verify correctness for their application. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Helper_ConvexHull.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Helper_ConvexHull.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Helper_ConvexHull.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Helper_ConvexHull.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Fri, 29.04.2005 -/// @version $Id: Helper_ConvexHull.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Helper_ConvexHull.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Line.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Line.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Line.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Line.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date 2003-08-14 -/// @version $Id: Line.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Line.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // } /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -66,6 +66,15 @@ void +Line::extrapolateBy2D(SUMOReal length) { + SUMOReal factor = length / myP1.distanceTo2D(myP2); + Position offset = (myP2 - myP1) * factor; + myP1.sub(offset); + myP2.add(offset); +} + + +void Line::extrapolateFirstBy(SUMOReal length) { myP1 = GeomHelper::extrapolate_first(myP1, myP2, length); } @@ -234,4 +243,12 @@ } +std::ostream& +operator<<(std::ostream& os, const Line& line) { + os << line.myP1 << " " << line.myP2; + return os; +} + + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Line.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Line.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Line.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Line.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Fri, 29.04.2005 -/// @version $Id: Line.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Line.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -54,6 +54,7 @@ Line(const Position& p1, const Position& p2); ~Line(); void extrapolateBy(SUMOReal length); + void extrapolateBy2D(SUMOReal length); void extrapolateFirstBy(SUMOReal length); void extrapolateSecondBy(SUMOReal length); const Position& p1() const; @@ -80,6 +81,9 @@ Line& reverse(); void rotateAtP1(SUMOReal rot); + /// @brief Output operator + friend std::ostream& operator<<(std::ostream& os, const Line& geom); + private: Position myP1, myP2; }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/geom -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,6 +92,10 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libgeom_a_AR = $(AR) $(ARFLAGS) libgeom_a_LIBADD = am_libgeom_a_OBJECTS = Boundary.$(OBJEXT) Bresenham.$(OBJEXT) \ @@ -55,30 +104,86 @@ Line.$(OBJEXT) Position.$(OBJEXT) PositionVector.$(OBJEXT) \ bezier.$(OBJEXT) libgeom_a_OBJECTS = $(am_libgeom_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libgeom_a_SOURCES) DIST_SOURCES = $(libgeom_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -87,6 +192,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -113,9 +219,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -126,10 +236,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -269,10 +375,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libgeom.a: $(libgeom_a_OBJECTS) $(libgeom_a_DEPENDENCIES) - -rm -f libgeom.a - $(libgeom_a_AR) libgeom.a $(libgeom_a_OBJECTS) $(libgeom_a_LIBADD) - $(RANLIB) libgeom.a + +libgeom.a: $(libgeom_a_OBJECTS) $(libgeom_a_DEPENDENCIES) $(EXTRA_libgeom_a_DEPENDENCIES) + $(AM_V_at)-rm -f libgeom.a + $(AM_V_AR)$(libgeom_a_AR) libgeom.a $(libgeom_a_OBJECTS) $(libgeom_a_LIBADD) + $(AM_V_at)$(RANLIB) libgeom.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -292,25 +399,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bezier.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -318,26 +425,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -349,15 +445,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -366,6 +458,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -414,10 +521,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -502,18 +614,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Position.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Position.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Position.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Position.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Axel Wegener /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: Position.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: Position.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A position in the 2D- or 3D-world /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Position.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Position.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/Position.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/Position.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Axel Wegener /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: Position.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Position.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A position in the 2D- or 3D-world /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -186,10 +186,21 @@ return Position(myX - p2.myX, myY - p2.myY, myZ - p2.myZ); } + /// @brief keep the direction but modify the length of the (location) vector to length * scalar Position operator*(SUMOReal scalar) const { return Position(myX * scalar, myY * scalar, myZ * scalar); } + /// @brief keep the direction but modify the length of the (location) vector to length + scalar + Position operator+(SUMOReal offset) const { + const SUMOReal length = distanceTo(Position(0, 0, 0)); + if (length == 0) { + return *this; + } + const SUMOReal scalar = (length + offset) / length; + return Position(myX * scalar, myY * scalar, myZ * scalar); + } + bool operator==(const Position& p2) const { return myX == p2.myX && myY == p2.myY && myZ == p2.myZ; } @@ -198,6 +209,16 @@ return myX != p2.myX || myY != p2.myY || myZ != p2.myZ; } + /// @brief lexicographical sorting for use in maps and sets + bool operator<(const Position& p2) const { + if (myX < p2.myX) { + return true; + } else if (myY < p2.myY) { + return true; + } else { + return myZ < p2.myZ; + } + } bool almostSame(const Position& p2, SUMOReal maxDiv = POSITION_EPS) const { return fabs(myX - p2.myX) < maxDiv && fabs(myY - p2.myY) < maxDiv && fabs(myZ - p2.myZ) < maxDiv; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/PositionVector.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/PositionVector.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/PositionVector.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/PositionVector.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date Sept 2002 -/// @version $Id: PositionVector.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PositionVector.cpp 18142 2015-03-25 08:32:29Z namdre $ /// // A list of positions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -53,7 +53,6 @@ #include #endif // CHECK_MEMORY_LEAKS - // =========================================================================== // method definitions // =========================================================================== @@ -92,7 +91,9 @@ bool PositionVector::around(const Position& p, SUMOReal offset) const { if (offset != 0) { - //throw 1; // !!! not yet implemented + PositionVector tmp(*this); + tmp.scaleAbsolute(offset); + return tmp.around(p); } SUMOReal angle = 0; for (const_iterator i = begin(); i != end() - 1; i++) { @@ -164,7 +165,7 @@ return GeomHelper::intersection_position2D(*i, *(i + 1), p1, p2); } } - return Position(-1, -1); + return Position::INVALID; } @@ -180,7 +181,7 @@ return v1.intersectsAtPoint(*(end()-1), *(begin())); } */ - return Position(-1, -1); + return Position::INVALID; } @@ -189,7 +190,7 @@ if (index >= 0) { return at(index); } else { - return at(size() + index); + return at((int)size() + index); } } @@ -199,19 +200,19 @@ if (index >= 0) { return at(index); } else { - return at(size() + index); + return at((int)size() + index); } } Position -PositionVector::positionAtOffset(SUMOReal pos) const { +PositionVector::positionAtOffset(SUMOReal pos, SUMOReal lateralOffset) const { const_iterator i = begin(); SUMOReal seenLength = 0; do { const SUMOReal nextLength = (*i).distanceTo(*(i + 1)); if (seenLength + nextLength > pos) { - return positionAtOffset(*i, *(i + 1), pos - seenLength); + return positionAtOffset(*i, *(i + 1), pos - seenLength, lateralOffset); } seenLength += nextLength; } while (++i != end() - 1); @@ -220,13 +221,13 @@ Position -PositionVector::positionAtOffset2D(SUMOReal pos) const { +PositionVector::positionAtOffset2D(SUMOReal pos, SUMOReal lateralOffset) const { const_iterator i = begin(); SUMOReal seenLength = 0; do { const SUMOReal nextLength = (*i).distanceTo2D(*(i + 1)); if (seenLength + nextLength > pos) { - return positionAtOffset2D(*i, *(i + 1), pos - seenLength); + return positionAtOffset2D(*i, *(i + 1), pos - seenLength, lateralOffset); } seenLength += nextLength; } while (++i != end() - 1); @@ -236,6 +237,9 @@ SUMOReal PositionVector::rotationDegreeAtOffset(SUMOReal pos) const { + if (pos < 0) { + pos += length(); + } const_iterator i = begin(); SUMOReal seenLength = 0; do { @@ -269,10 +273,15 @@ Position PositionVector::positionAtOffset(const Position& p1, const Position& p2, - SUMOReal pos) { + SUMOReal pos, SUMOReal lateralOffset) { const SUMOReal dist = p1.distanceTo(p2); if (dist < pos) { - return Position(-1, -1); + return Position::INVALID; + } + if (lateralOffset != 0) { + Line l(p1, p2); + l.move2side(-lateralOffset); // move in the same direction as Position::move2side + return l.getPositionAtDistance(pos); } return p1 + (p2 - p1) * (pos / dist); } @@ -281,10 +290,15 @@ Position PositionVector::positionAtOffset2D(const Position& p1, const Position& p2, - SUMOReal pos) { + SUMOReal pos, SUMOReal lateralOffset) { const SUMOReal dist = p1.distanceTo2D(p2); if (dist < pos) { - return Position(-1, -1); + return Position::INVALID; + } + if (lateralOffset != 0) { + Line l(p1, p2); + l.move2side(-lateralOffset); // move in the same direction as Position::move2side + return l.getPositionAtDistance2D(pos); } return p1 + (p2 - p1) * (pos / dist); } @@ -342,13 +356,17 @@ y += (tmp[i].y() + tmp[i + 1].y()) * length / 2; lengthSum += length; } + if (lengthSum == 0) { + // it is probably only one point + return tmp[0]; + } return Position(x / lengthSum, y / lengthSum); } } void -PositionVector::scaleSize(SUMOReal factor) { +PositionVector::scaleRelative(SUMOReal factor) { Position centroid = getCentroid(); for (int i = 0; i < static_cast(size()); i++) { (*this)[i] = centroid + (((*this)[i] - centroid) * factor); @@ -356,6 +374,15 @@ } +void +PositionVector::scaleAbsolute(SUMOReal offset) { + Position centroid = getCentroid(); + for (int i = 0; i < static_cast(size()); i++) { + (*this)[i] = centroid + (((*this)[i] - centroid) + offset); + } +} + + Position PositionVector::getLineCenter() const { if (size() == 1) { @@ -374,9 +401,21 @@ return len; } +SUMOReal +PositionVector::length2D() const { + SUMOReal len = 0; + for (const_iterator i = begin(); i != end() - 1; i++) { + len += (*i).distanceTo2D(*(i + 1)); + } + return len; +} + SUMOReal PositionVector::area() const { + if (size() < 3) { + return 0; + } SUMOReal area = 0; PositionVector tmp = *this; if (!isClosed()) { // make sure its closed @@ -569,8 +608,8 @@ void -PositionVector::append(const PositionVector& v) { - if (back().distanceTo(v[0]) < 2) { +PositionVector::append(const PositionVector& v, SUMOReal sameThreshold) { + if (size() > 0 && v.size() > 0 && back().distanceTo(v[0]) < sameThreshold) { copy(v.begin() + 1, v.end(), back_inserter(*this)); } else { copy(v.begin(), v.end(), back_inserter(*this)); @@ -691,7 +730,7 @@ // replace first item by the new position SUMOReal lpos = GeomHelper::nearest_offset_on_line_to_point2D( (*this)[0], (*this)[1], p); - if (lpos == -1) { + if (lpos == GeomHelper::INVALID_OFFSET) { return; } Position np = positionAtOffset(lpos); @@ -706,6 +745,22 @@ } +PositionVector +PositionVector::getSubpartByIndex(int beginIndex, int count) const { + if (beginIndex < 0) { + beginIndex += (int)size(); + } + assert(count > 0); + assert(beginIndex < (int)size()); + assert(beginIndex + count <= (int)size()); + PositionVector result; + for (int i = beginIndex; i < beginIndex + count; ++i) { + result.push_back((*this)[i]); + } + return result; +} + + void PositionVector::pruneFromEndAt(const Position& p) { // find minimum distance (from the end) @@ -736,7 +791,7 @@ SUMOReal lpos = GeomHelper::nearest_offset_on_line_to_point2D( (*this)[static_cast(size()) - 1], (*this)[static_cast(size()) - 2], p); - if (lpos == -1) { + if (lpos == GeomHelper::INVALID_OFFSET) { return; } Position np = positionAtOffset( @@ -777,17 +832,23 @@ for (const_iterator i = begin(); i != end() - 1; i++) { const SUMOReal pos = GeomHelper::nearest_offset_on_line_to_point2D(*i, *(i + 1), p, perpendicular); - const SUMOReal dist = pos < 0 ? minDist : p.distanceTo2D(Line(*i, *(i + 1)).getPositionAtDistance(pos)); + const SUMOReal dist = pos == GeomHelper::INVALID_OFFSET ? minDist : p.distanceTo2D(Line(*i, *(i + 1)).getPositionAtDistance2D(pos)); if (dist < minDist) { nearestPos = pos + seen; minDist = dist; } - if (perpendicular && i != begin()) { + if (perpendicular && i != begin() && pos == GeomHelper::INVALID_OFFSET) { // even if perpendicular is set we still need to check the distance to the inner points const SUMOReal cornerDist = p.distanceTo2D(*i); if (cornerDist < minDist) { - nearestPos = seen; - minDist = cornerDist; + const SUMOReal pos1 = + GeomHelper::nearest_offset_on_line_to_point2D(*(i - 1), *i, p, false); + const SUMOReal pos2 = + GeomHelper::nearest_offset_on_line_to_point2D(*i, *(i + 1), p, false); + if (pos1 == (*(i - 1)).distanceTo2D(*i) && pos2 == 0.) { + nearestPos = seen; + minDist = cornerDist; + } } } seen += (*i).distanceTo2D(*(i + 1)); @@ -796,6 +857,53 @@ } +Position +PositionVector::transformToVectorCoordinates(const Position& p, bool extend) const { + // XXX this duplicates most of the code in nearest_offset_to_point2D. It should be refactored + if (extend) { + PositionVector extended = *this; + const SUMOReal dist = 2 * distance(p); + extended.extrapolate(dist); + return extended.transformToVectorCoordinates(p) - Position(dist, 0); + } + SUMOReal minDist = std::numeric_limits::max(); + SUMOReal nearestPos = -1; + SUMOReal seen = 0; + int sign = 1; + for (const_iterator i = begin(); i != end() - 1; i++) { + const SUMOReal pos = + GeomHelper::nearest_offset_on_line_to_point2D(*i, *(i + 1), p, true); + const SUMOReal dist = pos < 0 ? minDist : p.distanceTo2D(Line(*i, *(i + 1)).getPositionAtDistance(pos)); + if (dist < minDist) { + nearestPos = pos + seen; + minDist = dist; + sign = isLeft(*i, *(i + 1), p) >= 0 ? -1 : 1; + } + if (i != begin() && pos == GeomHelper::INVALID_OFFSET) { + // even if perpendicular is set we still need to check the distance to the inner points + const SUMOReal cornerDist = p.distanceTo2D(*i); + if (cornerDist < minDist) { + const SUMOReal pos1 = + GeomHelper::nearest_offset_on_line_to_point2D(*(i - 1), *i, p, false); + const SUMOReal pos2 = + GeomHelper::nearest_offset_on_line_to_point2D(*i, *(i + 1), p, false); + if (pos1 == (*(i - 1)).distanceTo2D(*i) && pos2 == 0.) { + nearestPos = seen; + minDist = cornerDist; + sign = isLeft(*(i - 1), *i, p) >= 0 ? -1 : 1; + } + } + } + seen += (*i).distanceTo2D(*(i + 1)); + } + if (nearestPos != -1) { + return Position(nearestPos, sign * minDist); + } else { + return Position::INVALID; + } +} + + int PositionVector::indexOfClosest(const Position& p) const { assert(size() > 0); @@ -820,7 +928,7 @@ SUMOReal dist; int insertionIndex = 1; for (int i = 0; i < (int)size() - 1; i++) { - dist = GeomHelper::closestDistancePointLine(p, (*this)[i], (*this)[i + 1], outIntersection); + dist = GeomHelper::closestDistancePointLine2D(p, (*this)[i], (*this)[i + 1], outIntersection); if (dist < minDist) { insertionIndex = i + 1; minDist = dist; @@ -831,21 +939,6 @@ } -SUMOReal -PositionVector::distance(const Position& p) const { - if (size() == 1) { - return front().distanceTo(p); - } - Position outIntersection; - SUMOReal minDist = std::numeric_limits::max(); - for (const_iterator i = begin(); i != end() - 1; i++) { - minDist = MIN2(minDist, GeomHelper::closestDistancePointLine( - p, *i, *(i + 1), outIntersection)); - } - return minDist; -} - - std::vector PositionVector::intersectsAtLengths2D(const PositionVector& other) const { std::vector ret; @@ -925,16 +1018,23 @@ Position from = (*this)[i - 1]; Position me = (*this)[i]; Position to = (*this)[i + 1]; - const double sinAngle = sin(GeomHelper::Angle2D(from.x() - me.x(), from.y() - me.y(), - me.x() - to.x(), me.y() - to.y()) / 2); - const double maxDev = 2 * (from.distanceTo2D(me) + me.distanceTo2D(to)) * sinAngle; - if (fabs(maxDev) < POSITION_EPS) { + Line fromMe(from, me); + fromMe.extrapolateBy2D(me.distanceTo2D(to)); + const double extrapolateDev = fromMe.p2().distanceTo2D(to); + if (fabs(extrapolateDev) < POSITION_EPS) { // parallel case, just shift the middle point std::pair off = GeomHelper::getNormal90D_CW(from, to, amount); shape.push_back(Position(me.x() - off.first, me.y() - off.second, me.z())); continue; } + if (fabs(extrapolateDev - 2 * me.distanceTo2D(to)) < POSITION_EPS) { + // counterparallel case, just shift the middle point + Line fromMe(from, me); + fromMe.extrapolateBy2D(amount); + shape.push_back(fromMe.p2()); + continue; + } std::pair offsets = GeomHelper::getNormal90D_CW(from, me, amount); std::pair offsets2 = @@ -942,11 +1042,11 @@ Line l1( Position(from.x() - offsets.first, from.y() - offsets.second), Position(me.x() - offsets.first, me.y() - offsets.second)); - l1.extrapolateBy(100); + l1.extrapolateBy2D(100); Line l2( Position(me.x() - offsets2.first, me.y() - offsets2.second), Position(to.x() - offsets2.first, to.y() - offsets2.second)); - l2.extrapolateBy(100); + l2.extrapolateBy2D(100); if (l1.intersects(l2)) { shape.push_back(l1.intersectsAt(l2)); } else { @@ -1014,19 +1114,41 @@ std::vector -PositionVector::distances(const PositionVector& s) const { +PositionVector::distances(const PositionVector& s, bool perpendicular) const { std::vector ret; const_iterator i; for (i = begin(); i != end(); i++) { - ret.push_back(s.distance(*i)); + const SUMOReal dist = s.distance(*i, perpendicular); + if (dist != GeomHelper::INVALID_OFFSET) { + ret.push_back(dist); + } } for (i = s.begin(); i != s.end(); i++) { - ret.push_back(distance(*i)); + const SUMOReal dist = distance(*i, perpendicular); + if (dist != GeomHelper::INVALID_OFFSET) { + ret.push_back(dist); + } } return ret; } +SUMOReal +PositionVector::distance(const Position& p, bool perpendicular) const { + if (size() == 0) { + return std::numeric_limits::max(); + } else if (size() == 1) { + return front().distanceTo(p); + } + const SUMOReal nearestOffset = nearest_offset_to_point2D(p, perpendicular); + if (nearestOffset == GeomHelper::INVALID_OFFSET) { + return GeomHelper::INVALID_OFFSET; + } else { + return p.distanceTo2D(positionAtOffset2D(nearestOffset)); + } +} + + void PositionVector::insertAt(int index, const Position& p) { if (index >= 0) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/PositionVector.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/PositionVector.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/geom/PositionVector.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/geom/PositionVector.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: PositionVector.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PositionVector.h 18096 2015-03-17 09:50:59Z behrisch $ /// // A list of positions /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -151,10 +151,10 @@ Position& operator[](int index); /// Returns the position at the given length - Position positionAtOffset(SUMOReal pos) const; + Position positionAtOffset(SUMOReal pos, SUMOReal lateralOffset = 0) const; /// Returns the position at the given length - Position positionAtOffset2D(SUMOReal pos) const; + Position positionAtOffset2D(SUMOReal pos, SUMOReal lateralOffset = 0) const; /// Returns the rotation at the given length SUMOReal rotationDegreeAtOffset(SUMOReal pos) const; @@ -164,11 +164,11 @@ /// Returns the position between the two given point at the specified position */ static Position positionAtOffset(const Position& p1, - const Position& p2, SUMOReal pos); + const Position& p2, SUMOReal pos, SUMOReal lateralOffset); /// Returns the position between the two given point at the specified position */ static Position positionAtOffset2D(const Position& p1, - const Position& p2, SUMOReal pos); + const Position& p2, SUMOReal pos, SUMOReal lateralOffset); /// Returns a boundary enclosing this list of lines Boundary getBoxBoundary() const; @@ -180,13 +180,18 @@ /** @brief Returns the centroid (closes the polygon if unclosed) */ Position getCentroid() const; - /** @brief enlarges/shrinks the polygon based at the centroid */ - void scaleSize(SUMOReal factor); + /** @brief enlarges/shrinks the polygon by a factor based at the centroid */ + void scaleRelative(SUMOReal factor); + + /** @brief enlarges/shrinks the polygon by an absolute offset based at the centroid */ + void scaleAbsolute(SUMOReal offset); Position getLineCenter() const; /// Returns the length SUMOReal length() const; + /// Returns the length + SUMOReal length2D() const; /// Returns the area (0 for non-closed) @@ -212,12 +217,14 @@ int appendWithCrossingPoint(const PositionVector& v); // @brief append the given vector to this one - void append(const PositionVector& v); + void append(const PositionVector& v, SUMOReal sameThreshold = 2.0); PositionVector getSubpart(SUMOReal beginOffset, SUMOReal endOffset) const; PositionVector getSubpart2D(SUMOReal beginOffset, SUMOReal endOffset) const; + PositionVector getSubpartByIndex(int beginIndex, int count) const; + void sortAsPolyCWByAngle(); void sortByIncreasingXY(); @@ -273,14 +280,29 @@ SUMOReal nearest_offset_to_point2D(const Position& p, bool perpendicular = true) const; + /** @brief return position p within the length-wise coordinate system + * defined by this position vector. The x value is the same as that returned + * by nearest_offset_to_point2D(p) and the y value is the perpendicular distance to this + * vector with the sign indicating the side (right is postive). + * if extend is true, the vector is extended on both sides and the + * x-coordinate of the result may be below 0 or above the length of the original vector + */ + Position transformToVectorCoordinates(const Position& p, bool extend = false) const; + /* @brief index of the closest position to p * @note: may only be called for a non-empty vector */ int indexOfClosest(const Position& p) const; - // distances of all my points to s and all of s points to myself - std::vector distances(const PositionVector& s) const; + /* @brief distances of all my points to s and all of s points to myself + * if perpenciualr is set to true, only the perpendicular distances are + * returned + */ + std::vector distances(const PositionVector& s, bool perpendicular = false) const; - SUMOReal distance(const Position& p) const; + /* @brief closest distance to point p + * (or -1 if perpendicular is true and the point is beyond this vector) + */ + SUMOReal distance(const Position& p, bool perpendicular = false) const; void push_back_noDoublePos(const Position& p); void push_front_noDoublePos(const Position& p); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GLHelper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GLHelper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GLHelper.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GLHelper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GLHelper.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GLHelper.cpp 18119 2015-03-20 10:14:31Z behrisch $ /// // Some methods which help to draw certain geometrical objects in openGL /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -30,26 +30,48 @@ #include #endif -#include "GLHelper.h" +#include #include #include +#include +#include #include #include +#include "GLHelper.h" #ifdef CHECK_MEMORY_LEAKS #include #endif // CHECK_MEMORY_LEAKS +#define CIRCLE_RESOLUTION (SUMOReal)10 // inverse in degrees + // =========================================================================== // static member definitions // =========================================================================== std::vector > GLHelper::myCircleCoords; +void APIENTRY combCallback(GLdouble coords[3], + GLdouble* vertex_data[4], + GLfloat weight[4], GLdouble** dataOut) { + UNUSED_PARAMETER(weight); + UNUSED_PARAMETER(*vertex_data); + GLdouble* vertex; + + vertex = (GLdouble*)malloc(7 * sizeof(GLdouble)); + + vertex[0] = coords[0]; + vertex[1] = coords[1]; + vertex[2] = coords[2]; + *dataOut = vertex; +} + // =========================================================================== // method definitions // =========================================================================== + + void GLHelper::drawFilledPoly(const PositionVector& v, bool close) { if (v.size() == 0) { @@ -70,16 +92,51 @@ void +GLHelper::drawFilledPolyTesselated(const PositionVector& v, bool close) { + if (v.size() == 0) { + return; + } + GLUtesselator* tobj = gluNewTess(); + gluTessCallback(tobj, GLU_TESS_VERTEX, (GLvoid(APIENTRY*)()) &glVertex3dv); + gluTessCallback(tobj, GLU_TESS_BEGIN, (GLvoid(APIENTRY*)()) &glBegin); + gluTessCallback(tobj, GLU_TESS_END, (GLvoid(APIENTRY*)()) &glEnd); + gluTessCallback(tobj, GLU_TESS_COMBINE, (GLvoid(APIENTRY*)()) &combCallback); + gluTessProperty(tobj, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_ODD); + gluTessBeginPolygon(tobj, NULL); + gluTessBeginContour(tobj); + double* points = new double[(v.size() + int(close)) * 3]; + + for (size_t i = 0; i != v.size(); ++i) { + points[3 * i] = v[(int)i].x(); + points[3 * i + 1] = v[(int)i].y(); + points[3 * i + 2] = 0; + gluTessVertex(tobj, points + 3 * i, points + 3 * i); + } + if (close) { + const size_t i = v.size(); + points[3 * i] = v[0].x(); + points[3 * i + 1] = v[0].y(); + points[3 * i + 2] = 0; + gluTessVertex(tobj, points + 3 * i, points + 3 * i); + } + gluTessEndContour(tobj); + gluTessEndPolygon(tobj); + gluDeleteTess(tobj); + delete[] points; +} + + +void GLHelper::drawBoxLine(const Position& beg, SUMOReal rot, SUMOReal visLength, - SUMOReal width) { + SUMOReal width, SUMOReal offset) { glPushMatrix(); glTranslated(beg.x(), beg.y(), 0); glRotated(rot, 0, 0, 1); glBegin(GL_QUADS); - glVertex2d(-width, 0); - glVertex2d(-width, -visLength); - glVertex2d(width, -visLength); - glVertex2d(width, 0); + glVertex2d(-width - offset, 0); + glVertex2d(-width - offset, -visLength); + glVertex2d(width - offset, -visLength); + glVertex2d(width - offset, 0); glEnd(); glPopMatrix(); } @@ -102,14 +159,81 @@ } +bool +GLHelper::rightTurn(SUMOReal angle1, SUMOReal angle2) { + SUMOReal delta = angle2 - angle1; + while (delta > 180) { + delta -= 360; + } + while (delta < -180) { + delta += 360; + } + return delta <= 0; +} + + void GLHelper::drawBoxLines(const PositionVector& geom, const std::vector& rots, const std::vector& lengths, - SUMOReal width) { + SUMOReal width, int cornerDetail, SUMOReal offset) { + // draw the lane int e = (int) geom.size() - 1; for (int i = 0; i < e; i++) { - drawBoxLine(geom[i], rots[i], lengths[i], width); + drawBoxLine(geom[i], rots[i], lengths[i], width, offset); + } + // draw the corner details + if (cornerDetail > 0) { + for (int i = 1; i < e; i++) { + glPushMatrix(); + glTranslated(geom[i].x(), geom[i].y(), 0.1); + if (rightTurn(rots[i - 1], rots[i])) { + // inside corner + drawFilledCircle(width - offset, cornerDetail); + } else { + // outside corner, make sure to only draw a segment of the circle + SUMOReal angleBeg = -rots[i - 1]; + SUMOReal angleEnd = 180 - rots[i]; + // avoid drawing more than 360 degrees + if (angleEnd - angleBeg > 360) { + angleBeg += 360; + } + if (angleEnd - angleBeg < -360) { + angleEnd += 360; + } + // for a left tur, draw the right way around + if (angleEnd > angleBeg) { + angleEnd -= 360; + } + drawFilledCircle(width + offset, cornerDetail, angleBeg, angleEnd); + } + glEnd(); + glPopMatrix(); + } + } +} + + +void +GLHelper::drawBoxLines(const PositionVector& geom, + const std::vector& rots, + const std::vector& lengths, + const std::vector& cols, + SUMOReal width, int cornerDetail, SUMOReal offset) { + int e = (int) geom.size() - 1; + for (int i = 0; i < e; i++) { + setColor(cols[i]); + drawBoxLine(geom[i], rots[i], lengths[i], width, offset); + } + if (cornerDetail > 0) { + for (int i = 1; i < e; i++) { + glPushMatrix(); + setColor(cols[i]); + glTranslated(geom[i].x(), geom[i].y(), 0); + drawFilledCircle(width, cornerDetail); + glEnd(); + glPopMatrix(); + } } } @@ -181,6 +305,19 @@ } +void +GLHelper::drawLine(const PositionVector& v, const std::vector& cols) { + glBegin(GL_LINES); + int e = (int) v.size() - 1; + for (int i = 0; i < e; ++i) { + setColor(cols[i]); + glVertex2d(v[i].x(), v[i].y()); + glVertex2d(v[i + 1].x(), v[i + 1].y()); + } + glEnd(); +} + + void GLHelper::drawLine(const Position& beg, const Position& end) { @@ -191,6 +328,17 @@ } +size_t +GLHelper::angleLookup(SUMOReal angleDeg) { + const int numCoords = (int)myCircleCoords.size() - 1; + int index = ((int)(floor(angleDeg * CIRCLE_RESOLUTION + 0.5))) % numCoords; + if (index < 0) { + index += numCoords; + } + assert(index >= 0); + return (size_t)index; +} + void GLHelper::drawFilledCircle(SUMOReal width, int steps) { @@ -201,18 +349,18 @@ void GLHelper::drawFilledCircle(SUMOReal width, int steps, SUMOReal beg, SUMOReal end) { if (myCircleCoords.size() == 0) { - for (int i = 0; i < 360; i += 10) { - const SUMOReal x = (SUMOReal) sin(DEG2RAD(i)); - const SUMOReal y = (SUMOReal) cos(DEG2RAD(i)); + for (int i = 0; i <= (int)(360 * CIRCLE_RESOLUTION); ++i) { + const SUMOReal x = (SUMOReal) sin(DEG2RAD(i / CIRCLE_RESOLUTION)); + const SUMOReal y = (SUMOReal) cos(DEG2RAD(i / CIRCLE_RESOLUTION)); myCircleCoords.push_back(std::pair(x, y)); } } + const SUMOReal inc = (end - beg) / (SUMOReal)steps; glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - std::pair p1 = - beg == 0 ? myCircleCoords[0] : myCircleCoords[((int) beg / 10) % 36]; - for (int i = (int)(beg / 10); i < steps && (36.0 / (SUMOReal) steps * (SUMOReal) i) * 10 < end; i++) { - const std::pair& p2 = - myCircleCoords[(size_t)(36.0 / (SUMOReal) steps * (SUMOReal) i)]; + std::pair p1 = myCircleCoords[angleLookup(beg)]; + + for (int i = 0; i <= steps; ++i) { + const std::pair& p2 = myCircleCoords[angleLookup(beg + i * inc)]; glBegin(GL_TRIANGLES); glVertex2d(p1.first * width, p1.second * width); glVertex2d(p2.first * width, p2.second * width); @@ -220,13 +368,6 @@ glEnd(); p1 = p2; } - const std::pair& p2 = - end == 360 ? myCircleCoords[0] : myCircleCoords[((int) end / 10) % 36]; - glBegin(GL_TRIANGLES); - glVertex2d(p1.first * width, p1.second * width); - glVertex2d(p2.first * width, p2.second * width); - glVertex2d(0, 0); - glEnd(); } @@ -371,5 +512,13 @@ glPopMatrix(); } + +void +GLHelper::debugVertices(const PositionVector& shape, SUMOReal size, SUMOReal layer) { + RGBColor color = RGBColor::fromHSV(RandHelper::rand(360), 1, 1); + for (int i = 0; i < (int)shape.size(); ++i) { + GLHelper::drawText(toString(i), shape[i], layer, size, color, 0); + } +} /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GLHelper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GLHelper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GLHelper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GLHelper.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GLHelper.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GLHelper.h 18096 2015-03-17 09:50:59Z behrisch $ /// // Some methods which help to draw certain geometrical objects in openGL /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -51,6 +51,7 @@ class GLHelper { public: /** @brief Draws a filled polygon described by the list of points + * @note this only works well for convex polygons * * @param[in] v The polygon to draw * @param[in] close Whether the first point shall be appended @@ -58,6 +59,16 @@ static void drawFilledPoly(const PositionVector& v, bool close); + /** @brief Draws a filled polygon described by the list of points + * @note this works for convex and concave polygons but is slower than + * drawFilledPoly + * + * @param[in] v The polygon to draw + * @param[in] close Whether the first point shall be appended + */ + static void drawFilledPolyTesselated(const PositionVector& v, bool close); + + /** @brief Draws a thick line * * The line is drawn as a GL_QUADS. @@ -66,9 +77,10 @@ * @param[in] rot The direction the line shall be drawn to (in radiants) * @param[in] visLength The length of the line * @param[in] width The width of the line + * @param[in] offset The orthogonal offset */ static void drawBoxLine(const Position& beg, SUMOReal rot, - SUMOReal visLength, SUMOReal width); + SUMOReal visLength, SUMOReal width, SUMOReal offset = 0); /** @brief Draws a thick line using the mean of both given points as begin position @@ -93,11 +105,31 @@ * @param[in] rots The directions the lines shall be drawn to (in radiants) * @param[in] lengths The lengths of the lines * @param[in] width The width of the lines + * @param[in] cornerDetail Detail level for filling the corners between angled segments + * @param[in] the orthogonal offset * @see drawBoxLine */ static void drawBoxLines(const PositionVector& geom, const std::vector& rots, const std::vector& lengths, - SUMOReal width); + SUMOReal width, int cornerDetail = 0, SUMOReal offset = 0); + + /** @brief Draws thick lines with varying color + * + * Each line is drawn using drawBoxLine. + * + * @param[in] geom The list of begin positions of the lines + * @param[in] rots The directions the lines shall be drawn to (in radiants) + * @param[in] lengths The lengths of the lines + * @param[in] cols The colors of the lines + * @param[in] width The width of the lines + * @param[in] cornerDetail Detail level for filling the corners between angled segments + * @param[in] the orthogonal offset + * @see drawBoxLine + */ + static void drawBoxLines(const PositionVector& geom, + const std::vector& rots, const std::vector& lengths, + const std::vector& cols, + SUMOReal width, int cornerDetail = 0, SUMOReal offset = 0); /** @brief Draws thick lines using the mean of the points given in the point lists as begin positions @@ -163,6 +195,15 @@ static void drawLine(const PositionVector& v); + /** @brief Draws a thin line along the given position vector with variable color + * + * The line is drawn as a GL_LINES. + * + * @param[in] v The positions vector to use + */ + static void drawLine(const PositionVector& v, const std::vector& cols); + + /** @brief Draws a thin line between the two points * * The line is drawn as a GL_LINES. @@ -250,6 +291,16 @@ const RGBColor& borderColor = RGBColor::BLACK, const SUMOReal angle = 0); + /// @brief draw vertex numbers for the given shape (in a random color) + static void debugVertices(const PositionVector& shape, SUMOReal size, SUMOReal layer = 256); + +private: + /// @brief normalize angle for lookup in myCircleCoords + static size_t angleLookup(SUMOReal angleDeg); + + /// @brief whether the road makes a right turn (or goes straight) + static bool rightTurn(SUMOReal angle1, SUMOReal angle2); + private: /// @brief Storage for precomputed sin/cos-values describing a circle static std::vector > myCircleCoords; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GLObjectValuePassConnector.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GLObjectValuePassConnector.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GLObjectValuePassConnector.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GLObjectValuePassConnector.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Fri, 29.04.2005 -/// @version $Id: GLObjectValuePassConnector.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GLObjectValuePassConnector.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Class passing values from a GUIGlObject to another object /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIDialog_GLChosenEditor.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIDialog_GLChosenEditor.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIDialog_GLChosenEditor.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIDialog_GLChosenEditor.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Thu, 11.03.2004 -/// @version $Id: GUIDialog_GLChosenEditor.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDialog_GLChosenEditor.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Editor for the list of chosen objects /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIDialog_GLChosenEditor.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIDialog_GLChosenEditor.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIDialog_GLChosenEditor.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIDialog_GLChosenEditor.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @date Thu, 11.03.2004 -/// @version $Id: GUIDialog_GLChosenEditor.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDialog_GLChosenEditor.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Editor for the list of chosen objects /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIGlobalSelection.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIGlobalSelection.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIGlobalSelection.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIGlobalSelection.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file GUIGlobalSelection.cpp /// @author Daniel Krajzewicz /// @date 2004 -/// @version $Id: GUIGlobalSelection.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGlobalSelection.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A global holder of selected objects /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIGlobalSelection.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIGlobalSelection.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIGlobalSelection.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIGlobalSelection.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file GUIGlobalSelection.h /// @author Daniel Krajzewicz /// @date Jun 2004 -/// @version $Id: GUIGlobalSelection.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGlobalSelection.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A global holder of selected objects /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIIOGlobals.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIIOGlobals.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIIOGlobals.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIIOGlobals.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2004-11-23 -/// @version $Id: GUIIOGlobals.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIIOGlobals.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The folder used as last /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIIOGlobals.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIIOGlobals.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIIOGlobals.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIIOGlobals.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2004-11-23 -/// @version $Id: GUIIOGlobals.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIIOGlobals.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The folder used as last /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIMessageWindow.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIMessageWindow.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIMessageWindow.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIMessageWindow.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file GUIMessageWindow.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Tue, 25 Nov 2003 -/// @version $Id: GUIMessageWindow.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIMessageWindow.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A logging window for the gui /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -100,7 +101,7 @@ void -GUIMessageWindow::appendText(GUIEventType eType, const std::string& msg) { +GUIMessageWindow::appendMsg(GUIEventType eType, const std::string& msg) { if (!isEnabled()) { show(); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIMessageWindow.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIMessageWindow.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIMessageWindow.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIMessageWindow.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file GUIMessageWindow.h /// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @date Tue, 25 Nov 2003 -/// @version $Id: GUIMessageWindow.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIMessageWindow.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A logging window for the gui /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2003-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -76,7 +77,7 @@ * @param[in] msg The message * @see GUIEventType */ - void appendText(GUIEventType eType, const std::string& msg); + void appendMsg(GUIEventType eType, const std::string& msg); /// @brief Clears the window @@ -101,7 +102,7 @@ return myStream; } void postWriteHook() { - myMsgWindow->appendText(myType, myStream.str()); + myMsgWindow->appendMsg(myType, myStream.str()); myStream.str(""); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIParameterTableItem.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIParameterTableItem.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIParameterTableItem.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIParameterTableItem.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date -/// @version $Id: GUIParameterTableItem.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIParameterTableItem.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A single line in a parameter window /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIParameterTableWindow.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIParameterTableWindow.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIParameterTableWindow.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIParameterTableWindow.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Laura Bieker /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: GUIParameterTableWindow.cpp 14477 2013-08-23 06:59:42Z namdre $ +/// @version $Id: GUIParameterTableWindow.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The window that holds the table of an object's parameter /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -60,12 +61,18 @@ // =========================================================================== +// static value definitions +// =========================================================================== +MFXMutex GUIParameterTableWindow::myGlobalContainerLock; +std::vector GUIParameterTableWindow::myContainer; + +// =========================================================================== // method definitions // =========================================================================== GUIParameterTableWindow::GUIParameterTableWindow(GUIMainWindow& app, GUIGlObject& o, size_t noRows) : FXMainWindow(app.getApp(), (o.getFullName() + " Parameter").c_str(), - NULL, NULL, DECOR_ALL, 20, 20, 400, (FXint)(noRows * 20 + 60)), + NULL, NULL, DECOR_ALL, 20, 20, 500, (FXint)(noRows * 20 + 60)), myObject(&o), myApplication(&app), myCurrentPos(0) { myTable = new FXTable(this, this, MID_TABLE, TABLE_COL_SIZABLE | TABLE_ROW_SIZABLE | LAYOUT_FILL_X | LAYOUT_FILL_Y); @@ -79,15 +86,17 @@ myTable->getRowHeader()->setWidth(0); FXHeader* header = myTable->getColumnHeader(); header->setItemJustify(0, JUSTIFY_CENTER_X); - header->setItemSize(0, 250); + header->setItemSize(0, 240); header->setItemJustify(1, JUSTIFY_CENTER_X); - header->setItemSize(1, 80); + header->setItemSize(1, 120); header->setItemJustify(2, JUSTIFY_CENTER_X); header->setItemSize(2, 60); setIcon(GUIIconSubSys::getIcon(ICON_APP_TABLE)); myLock.lock(); myObject->addParameterTable(this); myLock.unlock(); + AbstractMutex::ScopedLocker locker(myGlobalContainerLock); + myContainer.push_back(this); } @@ -101,6 +110,11 @@ myObject->removeParameterTable(this); } myLock.unlock(); + AbstractMutex::ScopedLocker locker(myGlobalContainerLock); + std::vector::iterator i = std::find(myContainer.begin(), myContainer.end(), this); + if (i != myContainer.end()) { + myContainer.erase(i); + } } @@ -113,6 +127,7 @@ long GUIParameterTableWindow::onSimStep(FXObject*, FXSelector, void*) { + // table values are updated in GUINet::guiSimulationStep() updateTable(); update(); return 1; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIParameterTableWindow.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIParameterTableWindow.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIParameterTableWindow.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIParameterTableWindow.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file GUIParameterTableWindow.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: GUIParameterTableWindow.h 14477 2013-08-23 06:59:42Z namdre $ +/// @version $Id: GUIParameterTableWindow.h 18096 2015-03-17 09:50:59Z behrisch $ /// // The window that holds the table of an object's parameter /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,6 +34,8 @@ #include #include +#include +#include #include #include #include @@ -200,6 +203,12 @@ long onRightButtonPress(FXObject*, FXSelector, void*); /// @} + /** @brief Updates all instances + */ + static void updateAll() { + AbstractMutex::ScopedLocker locker(myGlobalContainerLock); + std::for_each(myContainer.begin(), myContainer.end(), std::mem_fun(&GUIParameterTableWindow::updateTable)); + } protected: /** @brief Updates the table @@ -210,6 +219,11 @@ */ void updateTable(); + /// @brief The mutex used to avoid concurrent updates of the instance container + static MFXMutex myGlobalContainerLock; + + /// @brief The container of items that shall be updated + static std::vector myContainer; private: /// @brief The object to get the information from @@ -227,7 +241,7 @@ /// @brief The index of the next row to add - used while building unsigned myCurrentPos; - /// @brief A lock assuring save updates in cse of object deletion + /// @brief A lock assuring save updates in case of object deletion mutable MFXMutex myLock; protected: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIParam_PopupMenu.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIParam_PopupMenu.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIParam_PopupMenu.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIParam_PopupMenu.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mai 2003 -/// @version $Id: GUIParam_PopupMenu.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIParam_PopupMenu.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A popup-menu for dynamic patameter table entries /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIParam_PopupMenu.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIParam_PopupMenu.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIParam_PopupMenu.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIParam_PopupMenu.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file GUIParam_PopupMenu.h /// @author Daniel Krajzewicz /// @date Mai 2003 -/// @version $Id: GUIParam_PopupMenu.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIParam_PopupMenu.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A popup-menu for dynamic patameter table entries /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUISelectedStorage.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUISelectedStorage.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUISelectedStorage.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUISelectedStorage.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Jun 2004 -/// @version $Id: GUISelectedStorage.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUISelectedStorage.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Storage for "selected" objects /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUISelectedStorage.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUISelectedStorage.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUISelectedStorage.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUISelectedStorage.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Jun 2004 -/// @version $Id: GUISelectedStorage.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUISelectedStorage.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Storage for "selected" objects /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIUserIO.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIUserIO.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIUserIO.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIUserIO.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2006-10-12 -/// @version $Id: GUIUserIO.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIUserIO.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Some OS-dependant functions to ease cliboard manipulation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIUserIO.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIUserIO.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/GUIUserIO.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/GUIUserIO.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2006 -/// @version $Id: GUIUserIO.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIUserIO.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Some OS-dependant functions to ease cliboard manipulation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/div/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/div/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/gui/div -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,6 +92,10 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libguiutilsdiv_a_AR = $(AR) $(ARFLAGS) libguiutilsdiv_a_LIBADD = am_libguiutilsdiv_a_OBJECTS = GUIDialog_GLChosenEditor.$(OBJEXT) \ @@ -55,30 +104,86 @@ GUIParameterTableWindow.$(OBJEXT) GUISelectedStorage.$(OBJEXT) \ GUIUserIO.$(OBJEXT) GLHelper.$(OBJEXT) libguiutilsdiv_a_OBJECTS = $(am_libguiutilsdiv_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libguiutilsdiv_a_SOURCES) DIST_SOURCES = $(libguiutilsdiv_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -87,6 +192,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -113,9 +219,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -126,10 +236,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -273,10 +379,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libguiutilsdiv.a: $(libguiutilsdiv_a_OBJECTS) $(libguiutilsdiv_a_DEPENDENCIES) - -rm -f libguiutilsdiv.a - $(libguiutilsdiv_a_AR) libguiutilsdiv.a $(libguiutilsdiv_a_OBJECTS) $(libguiutilsdiv_a_LIBADD) - $(RANLIB) libguiutilsdiv.a + +libguiutilsdiv.a: $(libguiutilsdiv_a_OBJECTS) $(libguiutilsdiv_a_DEPENDENCIES) $(EXTRA_libguiutilsdiv_a_DEPENDENCIES) + $(AM_V_at)-rm -f libguiutilsdiv.a + $(AM_V_AR)$(libguiutilsdiv_a_AR) libguiutilsdiv.a $(libguiutilsdiv_a_OBJECTS) $(libguiutilsdiv_a_LIBADD) + $(AM_V_at)$(RANLIB) libguiutilsdiv.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -295,25 +402,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIUserIO.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -321,26 +428,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -352,15 +448,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -369,6 +461,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -417,10 +524,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -505,18 +617,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/events/GUIEvent.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/events/GUIEvent.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/events/GUIEvent.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/events/GUIEvent.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file GUIEvent.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: GUIEvent.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIEvent.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Definition of an own event class /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/events/GUIEvent_Message.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/events/GUIEvent_Message.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/events/GUIEvent_Message.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/events/GUIEvent_Message.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file GUIEvent_Message.h /// @author Daniel Krajzewicz /// @date Wed 18 Jun 2003 -/// @version $Id: GUIEvent_Message.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIEvent_Message.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Event send when a message (message, warning, error) has to besubmitted /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/events/GUIEvent_SimulationStep.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/events/GUIEvent_SimulationStep.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/events/GUIEvent_SimulationStep.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/events/GUIEvent_SimulationStep.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file GUIEvent_SimulationStep.h /// @author Daniel Krajzewicz /// @date Sept 2002 -/// @version $Id: GUIEvent_SimulationStep.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIEvent_SimulationStep.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Event send when the a simulation step has been performed by GUIRunThread /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/events/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/events/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/events/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/events/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,7 +79,7 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/gui/events -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -44,14 +88,33 @@ CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -78,9 +141,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -91,10 +158,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -230,11 +293,11 @@ clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: + +ctags CTAGS: -ctags: CTAGS -CTAGS: +cscope cscopelist: distdir: $(DISTFILES) @@ -281,10 +344,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -365,15 +433,16 @@ .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GLIncludes.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GLIncludes.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GLIncludes.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GLIncludes.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file GLIncludes.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @author Michael Behrisch /// @date 2012 -/// @version $Id: GLIncludes.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GLIncludes.h 18095 2015-03-17 09:39:00Z behrisch $ /// // collection of includes for GL usage /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date 2004 -/// @version $Id: GUIGlObject_AbstractAdd.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGlObject_AbstractAdd.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Base class for additional objects (detectors etc.) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject_AbstractAdd.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date 2004 -/// @version $Id: GUIGlObject_AbstractAdd.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGlObject_AbstractAdd.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Base class for additional objects (detectors etc.) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Sept 2002 -/// @version $Id: GUIGlObject.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGlObject.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Base class for all objects that may be displayed within the openGL-gui /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -67,6 +67,7 @@ {"poi", GLO_POI}, {"vehicle", GLO_VEHICLE}, {"person", GLO_PERSON}, + {"container", GLO_CONTAINER}, {"undefined", GLO_MAX} }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObject.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Oct 2002 -/// @version $Id: GUIGlObject.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGlObject.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Base class for all objects that may be displayed within the openGL-gui /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGLObjectPopupMenu.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGLObjectPopupMenu.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGLObjectPopupMenu.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGLObjectPopupMenu.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIGLObjectPopupMenu.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGLObjectPopupMenu.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The popup menu of a globject /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGLObjectPopupMenu.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGLObjectPopupMenu.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGLObjectPopupMenu.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGLObjectPopupMenu.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIGLObjectPopupMenu.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGLObjectPopupMenu.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The popup menu of a globject /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObjectStorage.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObjectStorage.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObjectStorage.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObjectStorage.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIGlObjectStorage.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGlObjectStorage.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A storage for displayed objects via their numerical id /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObjectStorage.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObjectStorage.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObjectStorage.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObjectStorage.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Oct 2002 -/// @version $Id: GUIGlObjectStorage.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGlObjectStorage.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A storage for displayed objects via their numerical id /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObjectTypes.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObjectTypes.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObjectTypes.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIGlObjectTypes.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,14 +4,14 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIGlObjectTypes.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGlObjectTypes.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A list of object types which may be displayed within the gui // each type has an associated string which will be prefefixed to an object id // when constructing the full name /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -69,8 +69,10 @@ GLO_VEHICLE = 512, /// @brief a person GLO_PERSON = 1024, + /// @brief a container + GLO_CONTAINER = 2048, /// @brief empty max - GLO_MAX = 2048 + GLO_MAX = 4096 }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIPointOfInterest.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIPointOfInterest.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIPointOfInterest.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIPointOfInterest.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date June 2006 -/// @version $Id: GUIPointOfInterest.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIPointOfInterest.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The GUI-version of a point of interest /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -99,7 +99,8 @@ void GUIPointOfInterest::drawGL(const GUIVisualizationSettings& s) const { - if (s.scale * (1.3 / 3.0) < s.minPOISize) { + const SUMOReal exaggeration = s.poiSize.getExaggeration(s); + if (s.scale * (1.3 / 3.0) *exaggeration < s.poiSize.minSize) { return; } glPushName(getGlID()); @@ -112,15 +113,15 @@ int textureID = GUITexturesHelper::getTextureID(myImgFile); if (textureID > 0) { GUITexturesHelper::drawTexturedBox(textureID, - -myHalfImgWidth * s.poiExaggeration, -myHalfImgHeight * s.poiExaggeration, - myHalfImgWidth * s.poiExaggeration, myHalfImgHeight * s.poiExaggeration); + -myHalfImgWidth * exaggeration, -myHalfImgHeight * exaggeration, + myHalfImgWidth * exaggeration, myHalfImgHeight * exaggeration); } } else { // fallback if no image is defined - GLHelper::drawFilledCircle((SUMOReal) 1.3 * s.poiExaggeration, 16); + GLHelper::drawFilledCircle((SUMOReal) 1.3 * exaggeration, 16); } glPopMatrix(); - drawName(Position(x() + 1.32 * s.poiExaggeration, y() + 1.32 * s.poiExaggeration), + drawName(Position(x() + 1.32 * exaggeration, y() + 1.32 * exaggeration), s.scale, s.poiName); glPopName(); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIPointOfInterest.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIPointOfInterest.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIPointOfInterest.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIPointOfInterest.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date June 2006 -/// @version $Id: GUIPointOfInterest.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIPointOfInterest.h 18095 2015-03-17 09:39:00Z behrisch $ /// // missing_desc /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,6 +35,7 @@ #include #include #include +#include // =========================================================================== diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIPolygon.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIPolygon.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIPolygon.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIPolygon.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date June 2006 -/// @version $Id: GUIPolygon.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIPolygon.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The GUI-version of a polygon /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -44,6 +44,7 @@ #include #endif // CHECK_MEMORY_LEAKS +//#define GUIPolygon_DEBUG_DRAW_VERTICES // =========================================================================== // method definitions @@ -138,7 +139,7 @@ void GUIPolygon::drawGL(const GUIVisualizationSettings& s) const { Boundary boundary = myShape.getBoxBoundary(); - if (s.scale * MAX2(boundary.getWidth(), boundary.getHeight()) < s.minPolySize) { + if (s.scale * MAX2(boundary.getWidth(), boundary.getHeight()) < s.polySize.minSize) { return; } if (getFill()) { @@ -151,8 +152,8 @@ } } AbstractMutex::ScopedLocker locker(myLock); - //if (myDisplayList == 0 || (!getFill() && myLineWidth != s.polyExaggeration)) { - // storeTesselation(s.polyExaggeration); + //if (myDisplayList == 0 || (!getFill() && myLineWidth != s.polySize.getExaggeration(s))) { + // storeTesselation(s.polySize.getExaggeration(s)); //} glPushName(getGlID()); glPushMatrix(); @@ -193,7 +194,7 @@ } // recall tesselation //glCallList(myDisplayList); - performTesselation(s.polyExaggeration); + performTesselation(s.polySize.getExaggeration(s)); // de-init generation of texture coordinates if (textureID >= 0) { glEnable(GL_DEPTH_TEST); @@ -202,6 +203,9 @@ glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); } +#ifdef GUIPolygon_DEBUG_DRAW_VERTICES + GLHelper::debugVertices(myShape, 80 / s.scale); +#endif glPopMatrix(); drawName(myShape.getPolygonCenter(), s.scale, s.polyName); glPopName(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIPolygon.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIPolygon.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIPolygon.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIPolygon.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date June 2006 -/// @version $Id: GUIPolygon.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIPolygon.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The GUI-version of a polygon /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -37,6 +37,7 @@ #include #include #include +#include using namespace SUMO; // =========================================================================== diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIShapeContainer.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIShapeContainer.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIShapeContainer.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIShapeContainer.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,161 @@ +/****************************************************************************/ +/// @file GUIShapeContainer.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date 08.10.2009 +/// @version $Id: GUIShapeContainer.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Storage for geometrical objects extended by mutexes +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include "GUIShapeContainer.h" +#include +#include +#include +#include +#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +GUIShapeContainer::GUIShapeContainer(SUMORTree& vis) + : myVis(vis) {} + + +GUIShapeContainer::~GUIShapeContainer() {} + + +bool +GUIShapeContainer::addPOI(const std::string& id, const std::string& type, + const RGBColor& color, SUMOReal layer, SUMOReal angle, const std::string& imgFile, + const Position& pos, SUMOReal width, SUMOReal height) { + GUIPointOfInterest* p = new GUIPointOfInterest(id, type, color, pos, layer, angle, imgFile, width, height); + AbstractMutex::ScopedLocker locker(myLock); + if (!myPOIs.add(id, p)) { + delete p; + return false; + } else { + myVis.addAdditionalGLObject(p); + return true; + } +} + + +bool +GUIShapeContainer::addPolygon(const std::string& id, const std::string& type, + const RGBColor& color, SUMOReal layer, + SUMOReal angle, const std::string& imgFile, + const PositionVector& shape, bool fill) { + GUIPolygon* p = new GUIPolygon(id, type, color, shape, fill, layer, angle, imgFile); + AbstractMutex::ScopedLocker locker(myLock); + if (!myPolygons.add(id, p)) { + delete p; + return false; + } else { + myVis.addAdditionalGLObject(p); + return true; + } +} + + +bool +GUIShapeContainer::removePolygon(const std::string& id) { + AbstractMutex::ScopedLocker locker(myLock); + GUIPolygon* p = dynamic_cast(myPolygons.get(id)); + if (p == 0) { + return false; + } + myVis.removeAdditionalGLObject(p); + return myPolygons.remove(id); +} + + +bool +GUIShapeContainer::removePOI(const std::string& id) { + AbstractMutex::ScopedLocker locker(myLock); + GUIPointOfInterest* p = dynamic_cast(myPOIs.get(id)); + if (p == 0) { + return false; + } + myVis.removeAdditionalGLObject(p); + return myPOIs.remove(id); +} + + +void +GUIShapeContainer::movePOI(const std::string& id, const Position& pos) { + AbstractMutex::ScopedLocker locker(myLock); + GUIPointOfInterest* p = dynamic_cast(myPOIs.get(id)); + if (p != 0) { + myVis.removeAdditionalGLObject(p); + static_cast(p)->set(pos); + myVis.addAdditionalGLObject(p); + } +} + + +void +GUIShapeContainer::reshapePolygon(const std::string& id, const PositionVector& shape) { + AbstractMutex::ScopedLocker locker(myLock); + GUIPolygon* p = dynamic_cast(myPolygons.get(id)); + if (p != 0) { + myVis.removeAdditionalGLObject(p); + p->setShape(shape); + myVis.addAdditionalGLObject(p); + } +} + + + +std::vector +GUIShapeContainer::getPOIIds() const { + AbstractMutex::ScopedLocker locker(myLock); + std::vector ret; + const std::map& pois = getPOIs().getMyMap(); + for (std::map::const_iterator it = pois.begin(); it != pois.end(); ++it) { + ret.push_back(static_cast(it->second)->getGlID()); + } + return ret; +} + + +std::vector +GUIShapeContainer::getPolygonIDs() const { + AbstractMutex::ScopedLocker locker(myLock); + std::vector ret; + const std::map& polygons = getPolygons().getMyMap(); + for (std::map::const_iterator it = polygons.begin(); it != polygons.end(); ++it) { + ret.push_back(static_cast(it->second)->getGlID()); + } + return ret; +} + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIShapeContainer.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIShapeContainer.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/GUIShapeContainer.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/GUIShapeContainer.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,148 @@ +/****************************************************************************/ +/// @file GUIShapeContainer.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date 08.10.2009 +/// @version $Id: GUIShapeContainer.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Storage for geometrical objects extended by mutexes +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2009-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef GUIShapeContainer_h +#define GUIShapeContainer_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include + +// =========================================================================== +// class declarations +// =========================================================================== +class SUMORTree; +class Position; +class MFXMutex; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GUIShapeContainer + * @brief Storage for geometrical objects extended by mutexes + * @see ShapeContainer + */ +class GUIShapeContainer : public ShapeContainer { +public: + /// @brief Constructor + GUIShapeContainer(SUMORTree& vis); + + + /// @brief Destructor + virtual ~GUIShapeContainer(); + + /** @brief Builds a polygon using the given values and adds it to the container + * @param[in] id The name of the polygon + * @param[in] type The (abstract) type of the polygon + * @param[in] color The color of the polygon + * @param[in] layer The layer of the polygon + * @param[in] angle The rotation of the polygon + * @param[in] imgFile The raster image of the polygon + * @param[in] shape The shape of the polygon + * @param[in] fill Whether the polygon shall be filled + * @return whether the polygon could be added + */ + virtual bool addPolygon(const std::string& id, const std::string& type, + const RGBColor& color, SUMOReal layer, + SUMOReal angle, const std::string& imgFile, + const PositionVector& shape, bool fill); + + + /** @brief Builds a POI using the given values and adds it to the container + * @param[in] id The name of the POI + * @param[in] type The (abstract) type of the POI + * @param[in] color The color of the POI + * @param[in] layer The layer of the POI + * @param[in] angle The rotation of the POI + * @param[in] imgFile The raster image of the POI + * @param[in] pos The position of the POI + * @param[in] width The width of the POI image + * @param[in] height The height of the POI image + * @return whether the poi could be added + */ + virtual bool addPOI(const std::string& id, const std::string& type, + const RGBColor& color, SUMOReal layer, SUMOReal angle, const std::string& imgFile, + const Position& pos, SUMOReal width, SUMOReal height); + + + + /** @brief Removes a polygon from the container + * @param[in] id The id of the polygon + * @return Whether the polygon could be removed + */ + virtual bool removePolygon(const std::string& id); + + + /** @brief Removes a PoI from the container + * @param[in] id The id of the PoI + * @return Whether the poi could be removed + */ + virtual bool removePOI(const std::string& id); + + + + /** @brief Assigns a new position to the named PoI + * @param[in] id The id of the PoI to move + * @param[in] pos The PoI's new position + */ + virtual void movePOI(const std::string& id, const Position& pos); + + + /** @brief Assigns a shape to the named polygon + * @param[in] id The id of the polygon to reshape + * @param[in] shape The polygon's new shape + */ + virtual void reshapePolygon(const std::string& id, const PositionVector& shape); + + + + /// Returns the gl-ids of all pois + std::vector getPOIIds() const; + /// Returns the gl-ids of all polygons + std::vector getPolygonIDs() const; + + +private: + /// @brief The mutex for adding/removing operations + mutable MFXMutex myLock; + + /// @brief The RTree structure to add and remove visualization elements + SUMORTree& myVis; + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -6,5 +6,6 @@ GUIGlObjectStorage.cpp GUIGlObjectStorage.h \ GUIGlObjectTypes.h \ GUIGlObject_AbstractAdd.cpp GUIGlObject_AbstractAdd.h \ +GUIShapeContainer.cpp GUIShapeContainer.h \ GUIPointOfInterest.cpp GUIPointOfInterest.h \ GUIPolygon.cpp GUIPolygon.h diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/globjects/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/globjects/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/gui/globjects -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,37 +92,97 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libguiutilsglobjects_a_AR = $(AR) $(ARFLAGS) libguiutilsglobjects_a_LIBADD = am_libguiutilsglobjects_a_OBJECTS = GUIGLObjectPopupMenu.$(OBJEXT) \ GUIGlObject.$(OBJEXT) GUIGlObjectStorage.$(OBJEXT) \ - GUIGlObject_AbstractAdd.$(OBJEXT) GUIPointOfInterest.$(OBJEXT) \ - GUIPolygon.$(OBJEXT) + GUIGlObject_AbstractAdd.$(OBJEXT) GUIShapeContainer.$(OBJEXT) \ + GUIPointOfInterest.$(OBJEXT) GUIPolygon.$(OBJEXT) libguiutilsglobjects_a_OBJECTS = $(am_libguiutilsglobjects_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libguiutilsglobjects_a_SOURCES) DIST_SOURCES = $(libguiutilsglobjects_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -86,6 +191,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -112,9 +218,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -125,10 +235,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -229,6 +335,7 @@ GUIGlObjectStorage.cpp GUIGlObjectStorage.h \ GUIGlObjectTypes.h \ GUIGlObject_AbstractAdd.cpp GUIGlObject_AbstractAdd.h \ +GUIShapeContainer.cpp GUIShapeContainer.h \ GUIPointOfInterest.cpp GUIPointOfInterest.h \ GUIPolygon.cpp GUIPolygon.h @@ -269,10 +376,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libguiutilsglobjects.a: $(libguiutilsglobjects_a_OBJECTS) $(libguiutilsglobjects_a_DEPENDENCIES) - -rm -f libguiutilsglobjects.a - $(libguiutilsglobjects_a_AR) libguiutilsglobjects.a $(libguiutilsglobjects_a_OBJECTS) $(libguiutilsglobjects_a_LIBADD) - $(RANLIB) libguiutilsglobjects.a + +libguiutilsglobjects.a: $(libguiutilsglobjects_a_OBJECTS) $(libguiutilsglobjects_a_DEPENDENCIES) $(EXTRA_libguiutilsglobjects_a_DEPENDENCIES) + $(AM_V_at)-rm -f libguiutilsglobjects.a + $(AM_V_AR)$(libguiutilsglobjects_a_AR) libguiutilsglobjects.a $(libguiutilsglobjects_a_OBJECTS) $(libguiutilsglobjects_a_LIBADD) + $(AM_V_at)$(RANLIB) libguiutilsglobjects.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -286,27 +394,28 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIGlObject_AbstractAdd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIPointOfInterest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIPolygon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIShapeContainer.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -314,26 +423,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -345,15 +443,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -362,6 +456,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -410,10 +519,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -498,18 +612,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/flag.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/flag.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/flag.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/flag.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,26 @@ -/* Generated by reswrap version 3.0.0 */ +/****************************************************************************/ +/// @file flag.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2004-11-23 +/// @version $Id: flag.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Generated by reswrap version 3.0.0 +// created by reswrap from file flag.gif +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + -/* created by reswrap from file flag.gif */ const unsigned char flag[] = { 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x10, 0x00, 0xa2, 0xff, 0x00, 0xc0, 0xc0, 0xc0, 0xff, 0xc0, 0x00, 0xff, 0x00, 0x00, 0x12, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/flag_minus.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/flag_minus.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/flag_minus.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/flag_minus.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,25 @@ -/* Generated by reswrap version 3.0.0 */ +/****************************************************************************/ +/// @file flag_minus.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2004-11-23 +/// @version $Id: flag_minus.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Generated by reswrap version 3.0.0 +// created by reswrap from file flag_minus.gif +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ -/* created by reswrap from file flag_minus.gif */ const unsigned char flag_minus[] = { 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x10, 0x00, 0xa2, 0xff, 0x00, 0xc0, 0xc0, 0xc0, 0xff, 0xc0, 0x00, 0xff, 0x00, 0x00, 0x12, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/flag_plus.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/flag_plus.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/flag_plus.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/flag_plus.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,26 @@ -/* Generated by reswrap version 3.0.0 */ +/****************************************************************************/ +/// @file flag_plus.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2004-11-23 +/// @version $Id: flag_plus.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Generated by reswrap version 3.0.0 +// created by reswrap from file flag_plus.gif +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + -/* created by reswrap from file flag_plus.gif */ const unsigned char flag_plus[] = { 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x10, 0x00, 0xa2, 0xff, 0x00, 0xc0, 0xc0, 0xc0, 0xff, 0xc0, 0x00, 0xff, 0x00, 0x00, 0x12, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/GUIIcons.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/GUIIcons.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/GUIIcons.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/GUIIcons.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Andreas Gaubatz /// @date 2004 -/// @version $Id: GUIIcons.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIIcons.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An enumeration of icons used by the gui applications /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,6 +45,7 @@ ICON_EMPTY, ICON_OPEN_CONFIG, ICON_OPEN_NET, + ICON_OPEN_SHAPES, ICON_RELOAD, ICON_SAVE, ICON_CLOSE, @@ -63,9 +64,11 @@ ICON_LOCATEJUNCTION, ICON_LOCATEEDGE, ICON_LOCATEVEHICLE, + ICON_LOCATEPERSON, ICON_LOCATETLS, ICON_LOCATEADD, - ICON_LOCATESHAPE, + ICON_LOCATEPOI, + ICON_LOCATEPOLY, ICON_COLORWHEEL, ICON_SAVEDB, diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/GUIIconSubSys.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/GUIIconSubSys.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/GUIIconSubSys.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/GUIIconSubSys.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Andreas Gaubatz /// @date Mon, 08.03.2004 -/// @version $Id: GUIIconSubSys.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIIconSubSys.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Helper for icons loading and usage /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -38,6 +38,7 @@ #include "filesave.xpm" #include "fileopen.xpm" #include "netopen.xpm" +#include "shapeopen.xpm" #include "play.xpm" #include "stop.xpm" #include "step.xpm" @@ -55,9 +56,11 @@ #include "locate_junction.xpm" #include "locate_edge.xpm" #include "locate_vehicle.xpm" +#include "locate_person.xpm" #include "locate_tls.xpm" #include "locate_add.xpm" -#include "locate_shape.xpm" +#include "locate_poi.xpm" +#include "locate_poly.xpm" #include "colorwheel.xpm" #include "savedb.xpm" @@ -140,6 +143,7 @@ myIcons[ICON_EMPTY] = new FXXPMIcon(a, empty_xpm); myIcons[ICON_OPEN_CONFIG] = new FXXPMIcon(a, fileopen_xpm); myIcons[ICON_OPEN_NET] = new FXXPMIcon(a, netopen_xpm); + myIcons[ICON_OPEN_SHAPES] = new FXXPMIcon(a, shapeopen_xpm); myIcons[ICON_RELOAD] = new FXXPMIcon(a, reload_xpm); myIcons[ICON_SAVE] = new FXXPMIcon(a, filesave_xpm); myIcons[ICON_CLOSE] = 0;//new FXXPMIcon(a, close); @@ -164,9 +168,11 @@ myIcons[ICON_LOCATEJUNCTION] = new FXXPMIcon(a, locate_junction_xpm); myIcons[ICON_LOCATEEDGE] = new FXXPMIcon(a, locate_edge_xpm); myIcons[ICON_LOCATEVEHICLE] = new FXXPMIcon(a, locate_vehicle_xpm); + myIcons[ICON_LOCATEPERSON] = new FXXPMIcon(a, locate_person_xpm); myIcons[ICON_LOCATETLS] = new FXXPMIcon(a, locate_tls_xpm); myIcons[ICON_LOCATEADD] = new FXXPMIcon(a, locate_add_xpm); - myIcons[ICON_LOCATESHAPE] = new FXXPMIcon(a, locate_shape_xpm); + myIcons[ICON_LOCATEPOI] = new FXXPMIcon(a, locate_poi_xpm); + myIcons[ICON_LOCATEPOLY] = new FXXPMIcon(a, locate_poly_xpm); myIcons[ICON_COLORWHEEL] = new FXXPMIcon(a, colorwheel_xpm); myIcons[ICON_SAVEDB] = new FXXPMIcon(a, savedb_xpm); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/GUIIconSubSys.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/GUIIconSubSys.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/GUIIconSubSys.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/GUIIconSubSys.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file GUIIconSubSys.h /// @author Daniel Krajzewicz /// @date Jul 2003 -/// @version $Id: GUIIconSubSys.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIIconSubSys.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A class dividing the network in rectangular cells /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/GUITexturesHelper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/GUITexturesHelper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/GUITexturesHelper.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/GUITexturesHelper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file GUITexturesHelper.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Mon, 08.03.2004 -/// @version $Id: GUITexturesHelper.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUITexturesHelper.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Global storage for textures; manages and draws them /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/GUITexturesHelper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/GUITexturesHelper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/GUITexturesHelper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/GUITexturesHelper.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file GUITexturesHelper.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2006 -/// @version $Id: GUITexturesHelper.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUITexturesHelper.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Global storage for textures; manages and draws them /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/locate_person.xpm sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/locate_person.xpm --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/locate_person.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/locate_person.xpm 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,23 @@ +/* XPM */ +static const char * locate_person_xpm[] = { +"16 16 4 1", +" c None", +". c Black", +"X c Red", +"o c #851d1d", +" ... ", +" .. . . ", +" ..XX.. . ", +" .XXXXXX. . ", +" .XX.X. . ", +" .XXX. ", +" .X.. .. ", +" .XXXX...o. ", +" . XXXXXX. ", +" .XXX.. . ", +" .XXXXX...X. ", +" .XX...XXXX. ", +" .XX. .XX. ", +" .XXX. .. ", +" ... ", +" "}; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/locate_poi.xpm sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/locate_poi.xpm --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/locate_poi.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/locate_poi.xpm 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,23 @@ +/* XPM */ +static const char * locate_poi_xpm[] = { +"16 16 4 1", +" c None", +". c Black", +"X c Gray50", +"o c Red", +" ... ", +" .ooo. ... ", +" .ooo. . . ", +" .ooo. . ", +" ... . ", +" . ", +" ", +" . .. . ", +" .X. .XX. ", +" .XX. .XXX. ", +" .XXX. .XXX. ", +" .XXXX...XX.. ", +" .XXXXXXXX. ", +" .XXXXXXX. ", +" ....... ", +" "}; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/locate_poly.xpm sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/locate_poly.xpm --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/locate_poly.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/locate_poly.xpm 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,23 @@ +/* XPM */ +static const char * locate_poly_xpm[] = { +"16 16 4 1", +" c None", +". c Black", +"X c Gray50", +"o c Red", +" ... ", +" .XXX. ... ", +" .XXX. . . ", +" .XXX. . ", +" ... . ", +" . ", +" ", +" . .. . ", +" .o. .oo. ", +" .oo. .ooo. ", +" .ooo. .ooo. ", +" .oooo...oo.. ", +" .oooooooo. ", +" .ooooooo. ", +" ....... ", +" "}; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/locate_shape.xpm sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/locate_shape.xpm --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/locate_shape.xpm 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/locate_shape.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -/* XPM */ -static const char * locate_shape_xpm[] = { -"16 16 4 1", -" c None", -". c Black", -"X c Gray50", -"o c Red", -" ... ", -" .XXX. ... ", -" .XXX. . . ", -" .XXX. . ", -" ... . ", -" . ", -" ", -" . .. . ", -" .o. .oo. ", -" .oo. .ooo. ", -" .ooo. .ooo. ", -" .oooo...oo.. ", -" .oooooooo. ", -" .ooooooo. ", -" ....... ", -" "}; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -10,9 +10,10 @@ extract_streets.xpm eyedrop.xpm \ fileopen.xpm fileprint.xpm filesave.xpm \ flag.cpp flag_minus.cpp flag_plus.cpp halt.xpm locate.xpm \ -locate_add.xpm locate_edge.xpm locate_junction.xpm locate_shape.xpm \ +locate_add.xpm locate_edge.xpm locate_junction.xpm \ +locate_person.xpm locate_poi.xpm locate_poly.xpm \ locate_tls.xpm locate_vehicle.xpm \ -magnify.xpm zoomstyle.xpm manip.cpp netopen.xpm new_window.xpm no.xpm \ +magnify.xpm zoomstyle.xpm manip.cpp netopen.xpm shapeopen.xpm new_window.xpm no.xpm \ open_bmp_dialog.xpm opening.xpm \ paintbrush1x.xpm paintbrush2x.xpm paintbrush3x.xpm paintbrush4x.xpm \ paintbrush5x.xpm play.xpm \ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/gui/images -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,35 +92,95 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libguiutilsimages_a_AR = $(AR) $(ARFLAGS) libguiutilsimages_a_LIBADD = am_libguiutilsimages_a_OBJECTS = GUIIconSubSys.$(OBJEXT) \ GUITexturesHelper.$(OBJEXT) libguiutilsimages_a_OBJECTS = $(am_libguiutilsimages_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libguiutilsimages_a_SOURCES) DIST_SOURCES = $(libguiutilsimages_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -84,6 +189,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -110,9 +216,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -123,10 +233,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -231,9 +337,10 @@ extract_streets.xpm eyedrop.xpm \ fileopen.xpm fileprint.xpm filesave.xpm \ flag.cpp flag_minus.cpp flag_plus.cpp halt.xpm locate.xpm \ -locate_add.xpm locate_edge.xpm locate_junction.xpm locate_shape.xpm \ +locate_add.xpm locate_edge.xpm locate_junction.xpm \ +locate_person.xpm locate_poi.xpm locate_poly.xpm \ locate_tls.xpm locate_vehicle.xpm \ -magnify.xpm zoomstyle.xpm manip.cpp netopen.xpm new_window.xpm no.xpm \ +magnify.xpm zoomstyle.xpm manip.cpp netopen.xpm shapeopen.xpm new_window.xpm no.xpm \ open_bmp_dialog.xpm opening.xpm \ paintbrush1x.xpm paintbrush2x.xpm paintbrush3x.xpm paintbrush4x.xpm \ paintbrush5x.xpm play.xpm \ @@ -287,10 +394,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libguiutilsimages.a: $(libguiutilsimages_a_OBJECTS) $(libguiutilsimages_a_DEPENDENCIES) - -rm -f libguiutilsimages.a - $(libguiutilsimages_a_AR) libguiutilsimages.a $(libguiutilsimages_a_OBJECTS) $(libguiutilsimages_a_LIBADD) - $(RANLIB) libguiutilsimages.a + +libguiutilsimages.a: $(libguiutilsimages_a_OBJECTS) $(libguiutilsimages_a_DEPENDENCIES) $(EXTRA_libguiutilsimages_a_DEPENDENCIES) + $(AM_V_at)-rm -f libguiutilsimages.a + $(AM_V_AR)$(libguiutilsimages_a_AR) libguiutilsimages.a $(libguiutilsimages_a_OBJECTS) $(libguiutilsimages_a_LIBADD) + $(AM_V_at)$(RANLIB) libguiutilsimages.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -302,25 +410,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUITexturesHelper.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -328,26 +436,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -359,15 +456,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -376,6 +469,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -424,10 +532,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -512,18 +625,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/manip.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/manip.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/manip.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/manip.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,26 @@ -/* Generated by reswrap version 3.0.0 */ +/****************************************************************************/ +/// @file manip.cpp +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date 2004-11-23 +/// @version $Id: manip.cpp 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Generated by reswrap version 3.0.0 +// created by reswrap from file manip.gif +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + -/* created by reswrap from file manip.gif */ const unsigned char manip[] = { 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x10, 0x00, 0x10, 0x00, 0xa2, 0xff, 0x00, 0xc0, 0xc0, 0xc0, 0xf2, 0xe8, 0x3a, 0xef, 0xc0, 0x01, 0xa0, 0xa5, 0xc7, 0x9e, 0x66, 0x0d, 0x00, 0x00, 0x00, 0x00, diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/shapeopen.xpm sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/shapeopen.xpm --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/images/shapeopen.xpm 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/images/shapeopen.xpm 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,25 @@ +/* XPM */ +static const char *shapeopen_xpm[] = { +"16 15 7 1", +" c None", +". c #040404", +"X c #f3f704", +"o c #f3f7f3", +"O c Black", +"+ c #ff0000", +"@ c #808304", +" ... ", +" . . . ", +" .. ", +" ... ... ", +".XoX....... ", +".oXoXoXoXo. ", +".XoXoXoXoX. ", +".oXoXo@OOOOOOO ", +".XoXo@OO+++++OO ", +".oX.@OO+++++++OO", +".X.@@O+++++++++O", +"..@@@O+++++++++O", +".....OO+++++++OO", +" OO+++++OO ", +" OOOOOOO "}; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,7 +79,7 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/gui -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -44,20 +88,58 @@ CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -92,6 +174,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -118,9 +201,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -131,10 +218,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -270,22 +353,25 @@ -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -300,57 +386,12 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -366,12 +407,7 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -383,15 +419,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -400,6 +432,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -436,13 +483,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -477,10 +521,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -558,22 +607,20 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUIColorer.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUIColorer.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUIColorer.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUIColorer.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ -/****************************************************************************/ -/// @file GUIColorer.h -/// @author Michael Behrisch -/// @author Daniel Krajzewicz -/// @author Jakob Erdmann -/// @author Laura Bieker -/// @date Mon, 20.07.2009 -/// @version $Id: GUIColorer.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef GUIColorer_h -#define GUIColorer_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include "GUIColorScheme.h" - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class GUIColorer - * @brief Base class for coloring. Allows changing the used colors and sets - * the used color in dependence to a value - */ -class GUIColorer { -public: - /// @brief Constructor - GUIColorer() : myActiveScheme(0) { } - - /// @brief Destructor - virtual ~GUIColorer() { } - - /// @brief Fills the given combobox with the names of available colorings - void fill(FXComboBox& cb) { - for (std::vector::iterator i = mySchemes.begin(); i != mySchemes.end(); ++i) { - cb.appendItem((*i).getName().c_str()); - } - cb.setCurrentItem((FXint)myActiveScheme); - } - - void setActive(size_t scheme) { - if (scheme < mySchemes.size()) { - myActiveScheme = scheme; - } - } - - size_t getActive() const { - return myActiveScheme; - } - - GUIColorScheme& getScheme() { - return mySchemes[myActiveScheme]; - } - - const GUIColorScheme& getScheme() const { - return mySchemes[myActiveScheme]; - } - - GUIColorScheme* getSchemeByName(std::string name) { - for (std::vector::iterator i = mySchemes.begin(); i != mySchemes.end(); ++i) { - if ((*i).getName() == name) { - return &(*i); - } - } - return 0; - } - - void save(OutputDevice& dev) const { - for (std::vector::const_iterator i = mySchemes.begin(); i != mySchemes.end(); ++i) { - i->save(dev); - } - } - - bool operator==(const GUIColorer& c) const { - return myActiveScheme == c.myActiveScheme && mySchemes == c.mySchemes; - } - - - void addScheme(GUIColorScheme scheme) { - mySchemes.push_back(scheme); - } - - -protected: - size_t myActiveScheme; - std::vector mySchemes; - -}; - - -#endif - -/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUIColorScheme.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUIColorScheme.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUIColorScheme.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUIColorScheme.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,207 +0,0 @@ -/****************************************************************************/ -/// @file GUIColorScheme.h -/// @author Michael Behrisch -/// @author Daniel Krajzewicz -/// @date Mon, 20.07.2009 -/// @version $Id: GUIColorScheme.h 14425 2013-08-16 20:11:47Z behrisch $ -/// -// -/****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors -/****************************************************************************/ -// -// This file is part of SUMO. -// SUMO is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -/****************************************************************************/ -#ifndef GUIColorScheme_h -#define GUIColorScheme_h - - -// =========================================================================== -// included modules -// =========================================================================== -#ifdef _MSC_VER -#include -#else -#include -#endif - -#include -#include -#include -#include - - -// =========================================================================== -// class definitions -// =========================================================================== -/** - * @class GUIColorScheme - * @brief - */ -class GUIColorScheme { -public: - /// Constructor - GUIColorScheme(const std::string& name, const RGBColor& baseColor, - const std::string& colName = "", const bool isFixed = false) - : myName(name), myIsInterpolated(!isFixed), myIsFixed(isFixed) { - addColor(baseColor, 0, colName); - } - - void setThreshold(const size_t pos, const SUMOReal threshold) { - myThresholds[pos] = threshold; - } - - void setColor(const size_t pos, const RGBColor& color) { - myColors[pos] = color; - } - - bool setColor(const std::string& name, const RGBColor& color) { - std::vector::iterator nameIt = myNames.begin(); - std::vector::iterator colIt = myColors.begin(); - for (; nameIt != myNames.end(); ++nameIt, ++colIt) { - if (*nameIt == name) { - (*colIt) = color; - return true; - } - } - return false; - } - - unsigned int addColor(const RGBColor& color, const SUMOReal threshold, const std::string& name = "") { - std::vector::iterator colIt = myColors.begin(); - std::vector::iterator threshIt = myThresholds.begin(); - std::vector::iterator nameIt = myNames.begin(); - unsigned int pos = 0; - while (threshIt != myThresholds.end() && (*threshIt) < threshold) { - ++threshIt; - ++colIt; - ++nameIt; - pos++; - } - myColors.insert(colIt, color); - myThresholds.insert(threshIt, threshold); - myNames.insert(nameIt, name); - return pos; - } - - void removeColor(const size_t pos) { - assert(pos < myColors.size()); - myColors.erase(myColors.begin() + pos); - myThresholds.erase(myThresholds.begin() + pos); - myNames.erase(myNames.begin() + pos); - } - - void clear() { - myColors.clear(); - myThresholds.clear(); - myNames.clear(); - } - - const RGBColor getColor(const SUMOReal value) const { - if (myColors.size() == 1 || value < myThresholds.front()) { - return myColors.front(); - } - std::vector::const_iterator colIt = myColors.begin() + 1; - std::vector::const_iterator threshIt = myThresholds.begin() + 1; - while (threshIt != myThresholds.end() && (*threshIt) <= value) { - ++threshIt; - ++colIt; - } - if (threshIt == myThresholds.end()) { - return myColors.back(); - } - if (!myIsInterpolated) { - return *(colIt - 1); - } - SUMOReal lowVal = *(threshIt - 1); - return RGBColor::interpolate(*(colIt - 1), *colIt, (value - lowVal) / ((*threshIt) - lowVal)); - } - - void setInterpolated(const bool interpolate, SUMOReal interpolationStart = 0.f) { - myIsInterpolated = interpolate; - if (interpolate) { - myThresholds[0] = interpolationStart; - } - } - - const std::string& getName() const { - return myName; - } - - const std::vector& getColors() const { - return myColors; - } - - const std::vector& getThresholds() const { - return myThresholds; - } - - bool isInterpolated() const { - return myIsInterpolated; - } - - const std::vector& getNames() const { - return myNames; - } - - bool isFixed() const { - return myIsFixed; - } - - bool allowsNegativeValues() const { - return myAllowNegativeValues; - } - - void setAllowsNegativeValues(bool value) { - myAllowNegativeValues = value; - } - - void save(OutputDevice& dev) const { - dev << " \n"; - std::vector::const_iterator colIt = myColors.begin(); - std::vector::const_iterator threshIt = myThresholds.begin(); - std::vector::const_iterator nameIt = myNames.begin(); - while (threshIt != myThresholds.end()) { - dev << " \n"; - ++threshIt; - ++colIt; - ++nameIt; - } - dev << " \n"; - } - - bool operator==(const GUIColorScheme& c) const { - return myName == c.myName && myColors == c.myColors && myThresholds == c.myThresholds && myIsInterpolated == c.myIsInterpolated; - } - -private: - std::string myName; - std::vector myColors; - std::vector myThresholds; - bool myIsInterpolated; - std::vector myNames; - bool myIsFixed; - bool myAllowNegativeValues; - -}; - -#endif - -/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUICompleteSchemeStorage.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUICompleteSchemeStorage.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUICompleteSchemeStorage.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUICompleteSchemeStorage.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date 2006-01-09 -/// @version $Id: GUICompleteSchemeStorage.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUICompleteSchemeStorage.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Storage for available visualization settings /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -140,7 +140,9 @@ vs.backgroundColor = RGBColor(51, 128, 51, 255); vs.laneShowBorders = true; vs.hideConnectors = true; - vs.minVehicleSize = 0; + vs.vehicleSize.minSize = 0; + vs.personQuality = 2; + vs.containerQuality = 2; gSchemeStorage.add(vs); } myNumInitialSettings = (unsigned int) mySortedSchemeNames.size(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUICompleteSchemeStorage.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUICompleteSchemeStorage.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUICompleteSchemeStorage.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUICompleteSchemeStorage.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date :find(mySortedSchemeNames.begin(), mySortedSchemeNames.end(), name)==mySortedSchemeNames.end()) { -/// @version $Id: GUICompleteSchemeStorage.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUICompleteSchemeStorage.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Storage for available visualization settings /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUIPropertyScheme.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUIPropertyScheme.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUIPropertyScheme.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUIPropertyScheme.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,241 @@ +/****************************************************************************/ +/// @file GUIPropertyScheme.h +/// @author Michael Behrisch +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @date Mon, 20.07.2009 +/// @version $Id: GUIPropertyScheme.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef GUIPropertyScheme_h +#define GUIPropertyScheme_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GUIPropertyScheme + * This class provides a mapping from real values to properties (mainly colors). + * Each color is stored along with a threshold value. + * Color values between thresholds are obtained by interpolation + */ + +template +class GUIPropertyScheme { +public: + /// Constructor + GUIPropertyScheme(const std::string& name, const T& baseColor, + const std::string& colName = "", const bool isFixed = false, SUMOReal baseValue = 0) : + myName(name), myIsInterpolated(!isFixed), + myIsFixed(isFixed), + myAllowNegativeValues(false) { + addColor(baseColor, baseValue, colName); + } + + void setThreshold(const size_t pos, const SUMOReal threshold) { + myThresholds[pos] = threshold; + } + + void setColor(const size_t pos, const T& color) { + myColors[pos] = color; + } + + bool setColor(const std::string& name, const T& color) { + std::vector::iterator nameIt = myNames.begin(); + typename std::vector::iterator colIt = myColors.begin(); + for (; nameIt != myNames.end(); ++nameIt, ++colIt) { + if (*nameIt == name) { + (*colIt) = color; + return true; + } + } + return false; + } + + unsigned int addColor(const T& color, const SUMOReal threshold, const std::string& name = "") { + typename std::vector::iterator colIt = myColors.begin(); + std::vector::iterator threshIt = myThresholds.begin(); + std::vector::iterator nameIt = myNames.begin(); + unsigned int pos = 0; + while (threshIt != myThresholds.end() && (*threshIt) < threshold) { + ++threshIt; + ++colIt; + ++nameIt; + pos++; + } + myColors.insert(colIt, color); + myThresholds.insert(threshIt, threshold); + myNames.insert(nameIt, name); + return pos; + } + + void removeColor(const size_t pos) { + assert(pos < myColors.size()); + myColors.erase(myColors.begin() + pos); + myThresholds.erase(myThresholds.begin() + pos); + myNames.erase(myNames.begin() + pos); + } + + void clear() { + myColors.clear(); + myThresholds.clear(); + myNames.clear(); + } + + const T getColor(const SUMOReal value) const { + if (myColors.size() == 1 || value < myThresholds.front()) { + return myColors.front(); + } + typename std::vector::const_iterator colIt = myColors.begin() + 1; + std::vector::const_iterator threshIt = myThresholds.begin() + 1; + while (threshIt != myThresholds.end() && (*threshIt) <= value) { + ++threshIt; + ++colIt; + } + if (threshIt == myThresholds.end()) { + return myColors.back(); + } + if (!myIsInterpolated) { + return *(colIt - 1); + } + SUMOReal lowVal = *(threshIt - 1); + return interpolate(*(colIt - 1), *colIt, (value - lowVal) / ((*threshIt) - lowVal)); + } + + void setInterpolated(const bool interpolate, SUMOReal interpolationStart = 0.f) { + myIsInterpolated = interpolate; + if (interpolate) { + myThresholds[0] = interpolationStart; + } + } + + const std::string& getName() const { + return myName; + } + + const std::vector& getColors() const { + return myColors; + } + + const std::vector& getThresholds() const { + return myThresholds; + } + + bool isInterpolated() const { + return myIsInterpolated; + } + + const std::vector& getNames() const { + return myNames; + } + + bool isFixed() const { + return myIsFixed; + } + + bool allowsNegativeValues() const { + return myAllowNegativeValues; + } + + void setAllowsNegativeValues(bool value) { + myAllowNegativeValues = value; + } + + void save(OutputDevice& dev) const { + const std::string tag = getTagName(myColors); + + dev.openTag(tag); + dev.writeAttr(SUMO_ATTR_NAME, myName); + if (!myIsFixed) { + dev.writeAttr(SUMO_ATTR_INTERPOLATED, myIsInterpolated); + } + typename std::vector::const_iterator colIt = myColors.begin(); + std::vector::const_iterator threshIt = myThresholds.begin(); + std::vector::const_iterator nameIt = myNames.begin(); + while (threshIt != myThresholds.end()) { + dev.openTag(SUMO_TAG_ENTRY); + dev.writeAttr(SUMO_ATTR_COLOR, *colIt); + if (!myIsFixed) { + dev.writeAttr(SUMO_ATTR_THRESHOLD, *threshIt); + } + if ((*nameIt) != "") { + dev.writeAttr(SUMO_ATTR_NAME, *nameIt); + } + dev.closeTag(); + ++threshIt; + ++colIt; + ++nameIt; + } + dev.closeTag(); + } + + bool operator==(const GUIPropertyScheme& c) const { + return myName == c.myName && myColors == c.myColors && myThresholds == c.myThresholds && myIsInterpolated == c.myIsInterpolated; + } + + + /// @brief specializations for GUIColorScheme + RGBColor interpolate(const RGBColor& min, const RGBColor& max, SUMOReal weight) const { + return RGBColor::interpolate(min, max, weight); + } + + std::string getTagName(std::vector) const { + return toString(SUMO_TAG_COLORSCHEME); + } + + + /// @brief specializations for GUIScaleScheme + SUMOReal interpolate(const SUMOReal& min, const SUMOReal& max, SUMOReal weight) const { + return min + (max - min) * weight; + } + + std::string getTagName(std::vector) const { + return toString(SUMO_TAG_SCALINGSCHEME); + } + + +private: + std::string myName; + std::vector myColors; + std::vector myThresholds; + bool myIsInterpolated; + std::vector myNames; + bool myIsFixed; + bool myAllowNegativeValues; + +}; + +typedef GUIPropertyScheme GUIColorScheme; +typedef GUIPropertyScheme GUIScaleScheme; + +#endif + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUIPropertySchemeStorage.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUIPropertySchemeStorage.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUIPropertySchemeStorage.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUIPropertySchemeStorage.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,130 @@ +/****************************************************************************/ +/// @file GUIPropertySchemeStorage.h +/// @author Michael Behrisch +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Laura Bieker +/// @date Mon, 20.07.2009 +/// @version $Id: GUIPropertySchemeStorage.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef GUIPropertySchemeStorage_h +#define GUIPropertySchemeStorage_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include "GUIPropertyScheme.h" + + +// =========================================================================== +// class declarations +// =========================================================================== +class OutputDevice; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GUIPropertySchemeStorage + * @brief Base class for coloring. Allows changing the used colors and sets + * the used color in dependence to a value + */ +template +class GUIPropertySchemeStorage { +public: + /// @brief Constructor + GUIPropertySchemeStorage() : myActiveScheme(0) { } + + /// @brief Destructor + virtual ~GUIPropertySchemeStorage() { } + + /// @brief Fills the given combobox with the names of available colorings + void fill(FXComboBox& cb) { + for (typename std::vector::iterator i = mySchemes.begin(); i != mySchemes.end(); ++i) { + cb.appendItem((*i).getName().c_str()); + } + cb.setCurrentItem((FXint)myActiveScheme); + } + + void setActive(size_t scheme) { + if (scheme < mySchemes.size()) { + myActiveScheme = scheme; + } + } + + size_t getActive() const { + return myActiveScheme; + } + + T& getScheme() { + return mySchemes[myActiveScheme]; + } + + const T& getScheme() const { + return mySchemes[myActiveScheme]; + } + + T* getSchemeByName(std::string name) { + for (typename std::vector::iterator i = mySchemes.begin(); i != mySchemes.end(); ++i) { + if ((*i).getName() == name) { + return &(*i); + } + } + return 0; + } + + void save(OutputDevice& dev) const { + for (typename std::vector::const_iterator i = mySchemes.begin(); i != mySchemes.end(); ++i) { + i->save(dev); + } + } + + bool operator==(const GUIPropertySchemeStorage& c) const { + return myActiveScheme == c.myActiveScheme && mySchemes == c.mySchemes; + } + + + void addScheme(T scheme) { + mySchemes.push_back(scheme); + } + + size_t size() const { + return mySchemes.size(); + } + + +protected: + size_t myActiveScheme; + std::vector mySchemes; + +}; + +typedef GUIPropertySchemeStorage GUIColorer; +typedef GUIPropertySchemeStorage GUIScaler; + +#endif + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUISettingsHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUISettingsHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUISettingsHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUISettingsHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Jakob Erdmann /// @author Laura Bieker /// @date Fri, 24. Apr 2009 -/// @version $Id: GUISettingsHandler.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUISettingsHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // The dialog to change the view (gui) settings. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -54,7 +54,7 @@ // =========================================================================== GUISettingsHandler::GUISettingsHandler(const std::string& content, bool isFile) : SUMOSAXHandler(content), myDelay(-1), myLookFrom(-1, -1, -1), myLookAt(-1, -1, -1), - myCurrentColorer(SUMO_TAG_NOTHING), myCurrentScheme(0) { + myCurrentColorer(SUMO_TAG_NOTHING), myCurrentScheme(0), myJamSoundTime(-1) { if (isFile) { XMLSubSys::runParser(*this, content); } else { @@ -129,22 +129,28 @@ break; case SUMO_TAG_VIEWSETTINGS_EDGES: { int laneEdgeMode = TplConvert::_2int(attrs.getStringSecure("laneEdgeMode", "0").c_str()); + int laneEdgeScaleMode = TplConvert::_2int(attrs.getStringSecure("scaleMode", "0").c_str()); mySettings.laneShowBorders = TplConvert::_2bool(attrs.getStringSecure("laneShowBorders", toString(mySettings.laneShowBorders)).c_str()); mySettings.showLinkDecals = TplConvert::_2bool(attrs.getStringSecure("showLinkDecals", toString(mySettings.showLinkDecals)).c_str()); mySettings.showRails = TplConvert::_2bool(attrs.getStringSecure("showRails", toString(mySettings.showRails)).c_str()); mySettings.edgeName = parseTextSettings("edgeName", attrs, mySettings.edgeName); mySettings.internalEdgeName = parseTextSettings("internalEdgeName", attrs, mySettings.internalEdgeName); + mySettings.cwaEdgeName = parseTextSettings("cwaEdgeName", attrs, mySettings.cwaEdgeName); mySettings.streetName = parseTextSettings("streetName", attrs, mySettings.streetName); mySettings.hideConnectors = TplConvert::_2bool(attrs.getStringSecure("hideConnectors", toString(mySettings.hideConnectors)).c_str()); + mySettings.laneWidthExaggeration = TplConvert::_2SUMOReal(attrs.getStringSecure("widthExaggeration", toString(mySettings.laneWidthExaggeration)).c_str()); myCurrentColorer = element; #ifdef HAVE_INTERNAL mySettings.edgeColorer.setActive(laneEdgeMode); + mySettings.edgeScaler.setActive(laneEdgeScaleMode); #endif mySettings.laneColorer.setActive(laneEdgeMode); + mySettings.laneScaler.setActive(laneEdgeScaleMode); } break; case SUMO_TAG_COLORSCHEME: myCurrentScheme = 0; + myCurrentScaleScheme = 0; if (myCurrentColorer == SUMO_TAG_VIEWSETTINGS_EDGES) { myCurrentScheme = mySettings.laneColorer.getSchemeByName(attrs.getStringSecure(SUMO_ATTR_NAME, "")); #ifdef HAVE_INTERNAL @@ -156,6 +162,9 @@ if (myCurrentColorer == SUMO_TAG_VIEWSETTINGS_VEHICLES) { myCurrentScheme = mySettings.vehicleColorer.getSchemeByName(attrs.getStringSecure(SUMO_ATTR_NAME, "")); } + if (myCurrentColorer == SUMO_TAG_VIEWSETTINGS_PERSONS) { + myCurrentScheme = mySettings.personColorer.getSchemeByName(attrs.getStringSecure(SUMO_ATTR_NAME, "")); + } if (myCurrentColorer == SUMO_TAG_VIEWSETTINGS_JUNCTIONS) { myCurrentScheme = mySettings.junctionColorer.getSchemeByName(attrs.getStringSecure(SUMO_ATTR_NAME, "")); } @@ -165,35 +174,65 @@ myCurrentScheme->clear(); } break; + case SUMO_TAG_SCALINGSCHEME: + myCurrentScheme = 0; + myCurrentScaleScheme = 0; + if (myCurrentColorer == SUMO_TAG_VIEWSETTINGS_EDGES) { + myCurrentScaleScheme = mySettings.laneScaler.getSchemeByName(attrs.getStringSecure(SUMO_ATTR_NAME, "")); +#ifdef HAVE_INTERNAL + if (myCurrentScaleScheme == 0) { + myCurrentScaleScheme = mySettings.edgeScaler.getSchemeByName(attrs.getStringSecure(SUMO_ATTR_NAME, "")); + } +#endif + } + if (myCurrentScaleScheme && !myCurrentScaleScheme->isFixed()) { + bool ok = true; + myCurrentScaleScheme->setInterpolated(attrs.getOpt(SUMO_ATTR_INTERPOLATED, 0, ok, false)); + myCurrentScaleScheme->clear(); + } + break; + case SUMO_TAG_ENTRY: - if (myCurrentScheme) { + if (myCurrentScheme != 0) { bool ok = true; RGBColor color = attrs.get(SUMO_ATTR_COLOR, 0, ok); if (myCurrentScheme->isFixed()) { myCurrentScheme->setColor(attrs.getStringSecure(SUMO_ATTR_NAME, ""), color); } else { - myCurrentScheme->addColor(color, - attrs.get(SUMO_ATTR_THRESHOLD, 0, ok)); + myCurrentScheme->addColor(color, attrs.getOpt(SUMO_ATTR_THRESHOLD, 0, ok, 0)); + } + } else if (myCurrentScaleScheme != 0) { + bool ok = true; + SUMOReal scale = attrs.get(SUMO_ATTR_COLOR, 0, ok); + if (myCurrentScaleScheme->isFixed()) { + myCurrentScaleScheme->setColor(attrs.getStringSecure(SUMO_ATTR_NAME, ""), scale); + } else { + myCurrentScaleScheme->addColor(scale, attrs.getOpt(SUMO_ATTR_THRESHOLD, 0, ok, 0)); } } break; case SUMO_TAG_VIEWSETTINGS_VEHICLES: mySettings.vehicleColorer.setActive(TplConvert::_2int(attrs.getStringSecure("vehicleMode", "0").c_str())); mySettings.vehicleQuality = TplConvert::_2int(attrs.getStringSecure("vehicleQuality", toString(mySettings.vehicleQuality)).c_str()); - mySettings.minVehicleSize = TplConvert::_2SUMOReal(attrs.getStringSecure("minVehicleSize", toString(mySettings.minVehicleSize)).c_str()); - mySettings.vehicleExaggeration = TplConvert::_2SUMOReal(attrs.getStringSecure("vehicleExaggeration", toString(mySettings.vehicleExaggeration)).c_str()); mySettings.showBlinker = TplConvert::_2bool(attrs.getStringSecure("showBlinker", toString(mySettings.showBlinker)).c_str()); + mySettings.vehicleSize = parseSizeSettings("vehicle", attrs, mySettings.vehicleSize); mySettings.vehicleName = parseTextSettings("vehicleName", attrs, mySettings.vehicleName); myCurrentColorer = element; break; case SUMO_TAG_VIEWSETTINGS_PERSONS: mySettings.personColorer.setActive(TplConvert::_2int(attrs.getStringSecure("personMode", "0").c_str())); mySettings.personQuality = TplConvert::_2int(attrs.getStringSecure("personQuality", toString(mySettings.personQuality)).c_str()); - mySettings.minPersonSize = TplConvert::_2SUMOReal(attrs.getStringSecure("minPersonSize", toString(mySettings.minPersonSize)).c_str()); - mySettings.personExaggeration = TplConvert::_2SUMOReal(attrs.getStringSecure("personExaggeration", toString(mySettings.personExaggeration)).c_str()); + mySettings.personSize = parseSizeSettings("person", attrs, mySettings.personSize); mySettings.personName = parseTextSettings("personName", attrs, mySettings.personName); myCurrentColorer = element; break; + case SUMO_TAG_VIEWSETTINGS_CONTAINERS: + mySettings.containerColorer.setActive(TplConvert::_2int(attrs.getStringSecure("containerMode", "0").c_str())); + mySettings.containerQuality = TplConvert::_2int(attrs.getStringSecure("containerQuality", toString(mySettings.containerQuality)).c_str()); + mySettings.containerSize = parseSizeSettings("container", attrs, mySettings.containerSize); + mySettings.containerName = parseTextSettings("containerName", attrs, mySettings.containerName); + myCurrentColorer = element; + break; case SUMO_TAG_VIEWSETTINGS_JUNCTIONS: mySettings.junctionColorer.setActive(TplConvert::_2int(attrs.getStringSecure("junctionMode", "0").c_str())); mySettings.drawLinkTLIndex = TplConvert::_2bool(attrs.getStringSecure("drawLinkTLIndex", toString(mySettings.drawLinkTLIndex)).c_str()); @@ -201,22 +240,20 @@ mySettings.junctionName = parseTextSettings("junctionName", attrs, mySettings.junctionName); mySettings.internalJunctionName = parseTextSettings("internalJunctionName", attrs, mySettings.internalJunctionName); mySettings.showLane2Lane = TplConvert::_2bool(attrs.getStringSecure("showLane2Lane", toString(mySettings.showLane2Lane)).c_str()); + mySettings.drawJunctionShape = TplConvert::_2bool(attrs.getStringSecure("drawShape", toString(mySettings.drawJunctionShape)).c_str()); myCurrentColorer = element; break; case SUMO_TAG_VIEWSETTINGS_ADDITIONALS: mySettings.addMode = TplConvert::_2int(attrs.getStringSecure("addMode", toString(mySettings.addMode)).c_str()); - mySettings.minAddSize = TplConvert::_2SUMOReal(attrs.getStringSecure("minAddSize", toString(mySettings.minAddSize)).c_str()); - mySettings.addExaggeration = TplConvert::_2SUMOReal(attrs.getStringSecure("addExaggeration", toString(mySettings.addExaggeration)).c_str()); + mySettings.addSize = parseSizeSettings("add", attrs, mySettings.addSize); mySettings.addName = parseTextSettings("addName", attrs, mySettings.addName); break; case SUMO_TAG_VIEWSETTINGS_POIS: - mySettings.poiExaggeration = TplConvert::_2SUMOReal(attrs.getStringSecure("poiExaggeration", toString(mySettings.poiExaggeration)).c_str()); - mySettings.minPOISize = TplConvert::_2SUMOReal(attrs.getStringSecure("minPOISize", toString(mySettings.minPOISize)).c_str()); + mySettings.poiSize = parseSizeSettings("poi", attrs, mySettings.poiSize); mySettings.poiName = parseTextSettings("poiName", attrs, mySettings.poiName); break; case SUMO_TAG_VIEWSETTINGS_POLYS: - mySettings.polyExaggeration = TplConvert::_2SUMOReal(attrs.getStringSecure("polyExaggeration", toString(mySettings.polyExaggeration)).c_str()); - mySettings.minPolySize = TplConvert::_2SUMOReal(attrs.getStringSecure("minPolySize", toString(mySettings.minPolySize)).c_str()); + mySettings.polySize = parseSizeSettings("poly", attrs, mySettings.polySize); mySettings.polyName = parseTextSettings("polyName", attrs, mySettings.polyName); break; case SUMO_TAG_VIEWSETTINGS_LEGEND: @@ -242,6 +279,33 @@ myDecals.push_back(d); } break; + case SUMO_TAG_VIEWSETTINGS_LIGHT: { + GUISUMOAbstractView::Decal d; + d.filename = "light" + attrs.getOpt(SUMO_ATTR_INDEX, 0, ok, "0"); + d.centerX = attrs.getOpt(SUMO_ATTR_CENTER_X, 0, ok, d.centerX); + d.centerY = attrs.getOpt(SUMO_ATTR_CENTER_Y, 0, ok, d.centerY); + d.centerZ = attrs.getOpt(SUMO_ATTR_CENTER_Z, 0, ok, d.centerZ); + d.width = attrs.getOpt(SUMO_ATTR_WIDTH, 0, ok, d.width); + d.height = attrs.getOpt(SUMO_ATTR_HEIGHT, 0, ok, d.height); + d.altitude = TplConvert::_2SUMOReal(attrs.getStringSecure("altitude", toString(d.height)).c_str()); + d.rot = TplConvert::_2SUMOReal(attrs.getStringSecure("rotation", toString(d.rot)).c_str()); + d.tilt = TplConvert::_2SUMOReal(attrs.getStringSecure("tilt", toString(d.tilt)).c_str()); + d.roll = TplConvert::_2SUMOReal(attrs.getStringSecure("roll", toString(d.roll)).c_str()); + d.layer = attrs.getOpt(SUMO_ATTR_LAYER, 0, ok, d.layer); + d.initialised = false; + myDecals.push_back(d); + } + break; + case SUMO_TAG_VIEWSETTINGS_EVENT: { + const std::string id = attrs.get(SUMO_ATTR_ID, 0, ok); + const std::string cmd = attrs.get(SUMO_ATTR_COMMAND, 0, ok); + const SUMOReal prob = attrs.get(SUMO_ATTR_PROB, id.c_str(), ok); + myEventDistributions[id].add(prob, cmd); + } + break; + case SUMO_TAG_VIEWSETTINGS_EVENT_JAM_TIME: + myJamSoundTime = attrs.get(SUMO_ATTR_VALUE, 0, ok); + break; default: break; } @@ -260,6 +324,17 @@ } +GUIVisualizationSizeSettings +GUISettingsHandler::parseSizeSettings( + const std::string& prefix, const SUMOSAXAttributes& attrs, + GUIVisualizationSizeSettings defaults) { + return GUIVisualizationSizeSettings( + TplConvert::_2SUMOReal(attrs.getStringSecure(prefix + "_minSize", toString(defaults.minSize)).c_str()), + TplConvert::_2SUMOReal(attrs.getStringSecure(prefix + "_exaggeration", toString(defaults.exaggeration)).c_str()), + TplConvert::_2bool(attrs.getStringSecure(prefix + "_constantSize", toString(defaults.constantSize)).c_str())); +} + + std::string GUISettingsHandler::addSettings(GUISUMOAbstractView* view) const { if (mySettings.name != "") { @@ -337,5 +412,17 @@ return result; } + +RandomDistributor +GUISettingsHandler::getEventDistribution(const std::string& id) { + RandomDistributor result = myEventDistributions[id]; + if (result.getOverallProb() > 0 && result.getOverallProb() < 1) { + // unscaled probabilities are assumed, fill up with dummy event + result.add(1 - result.getOverallProb(), ""); + } + return result; +} + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUISettingsHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUISettingsHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUISettingsHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUISettingsHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @date Fri, 24. Apr 2009 -/// @version $Id: GUISettingsHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUISettingsHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // The handler for parsing gui settings from xml. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,6 +33,7 @@ #endif #include +#include // =========================================================================== @@ -139,6 +140,10 @@ return myViewType; } + RandomDistributor getEventDistribution(const std::string& id); + SUMOReal getJamSoundTime() { + return myJamSoundTime; + } private: /// @brief The settings to fill @@ -168,16 +173,28 @@ /// @brief The current color scheme GUIColorScheme* myCurrentScheme; + /// @brief The current scaling scheme + GUIScaleScheme* myCurrentScaleScheme; + /// @brief The parsed breakpoints std::vector myBreakpoints; + /// @brief The parsed event distributions + std::map > myEventDistributions; + SUMOReal myJamSoundTime; + private: - /// @brief parse combined settings of bool, size and color + /// @brief parse attributes for textSettings GUIVisualizationTextSettings parseTextSettings( const std::string& prefix, const SUMOSAXAttributes& attrs, GUIVisualizationTextSettings defaults); + /// @brief parse attributes for sizeSettings + GUIVisualizationSizeSettings parseSizeSettings( + const std::string& prefix, const SUMOSAXAttributes& attrs, + GUIVisualizationSizeSettings defaults); + }; #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUIVisualizationSettings.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUIVisualizationSettings.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUIVisualizationSettings.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUIVisualizationSettings.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIVisualizationSettings.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: GUIVisualizationSettings.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Stores the information about how to visualize structures /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,7 +33,7 @@ #include #include #include "GUIVisualizationSettings.h" -#include "GUIColorScheme.h" +#include "GUIPropertyScheme.h" #ifdef CHECK_MEMORY_LEAKS #include @@ -56,62 +56,93 @@ laneShowBorders(false), showLinkDecals(true), showRails(true), edgeName(false, 50, RGBColor(255, 128, 0, 255)), internalEdgeName(false, 40, RGBColor(128, 64, 0, 255)), + cwaEdgeName(false, 50, RGBColor::MAGENTA), streetName(false, 55, RGBColor::YELLOW), hideConnectors(false), laneWidthExaggeration(1), - vehicleQuality(0), minVehicleSize(1), vehicleExaggeration(1), showBlinker(true), + vehicleQuality(0), showBlinker(true), drawLaneChangePreference(false), drawMinGap(false), + showBTRange(false), vehicleSize(1), vehicleName(false, 50, RGBColor(204, 153, 0, 255)), - personQuality(0), minPersonSize(1), personExaggeration(1), + personQuality(0), + personSize(1), personName(false, 50, RGBColor(0, 153, 204, 255)), + containerQuality(0), + containerSize(1), + containerName(false, 50, RGBColor(0, 153, 204, 255)), drawLinkTLIndex(false), drawLinkJunctionIndex(false), junctionName(false, 50, RGBColor(0, 255, 128, 255)), internalJunctionName(false, 50, RGBColor(0, 204, 128, 255)), - showLane2Lane(false), addMode(0), minAddSize(1), addExaggeration(1), + showLane2Lane(false), drawJunctionShape(true), addMode(0), + addSize(1), addName(false, 50, RGBColor(255, 0, 128, 255)), - minPOISize(0), poiExaggeration(1), poiName(false, 50, RGBColor(255, 0, 128, 255)), - minPolySize(0), polyExaggeration(1), polyName(false, 50, RGBColor(255, 0, 128, 255)), + poiSize(0), poiName(false, 50, RGBColor(255, 0, 128, 255)), + polySize(0), polyName(false, 50, RGBColor(255, 0, 128, 255)), showSizeLegend(true), gaming(false), - selectionScale(1) { + selectionScale(1), + drawForSelecting(false) { /// add lane coloring schemes - GUIColorScheme scheme = GUIColorScheme("uniform", RGBColor::BLACK, "", true); - laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by selection (lane-/streetwise)", RGBColor(179, 179, 179, 255), "unselected", true); - scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected"); - laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by vclass", RGBColor::BLACK, "all", true); - scheme.addColor(RGBColor(0, 26, 128, 255), 1, "public"); + GUIColorScheme scheme = GUIColorScheme("uniform", RGBColor::BLACK, "road", true); + scheme.addColor(RGBColor::GREY, 1, "sidewalk"); + scheme.addColor(RGBColor(192, 66, 44), 2, "bike lane"); + scheme.addColor(RGBColor(0, 0, 0, 0), 3, "green verge"); + scheme.addColor(RGBColor(150, 200, 200), 4, "waterway"); + laneColorer.addScheme(scheme); + scheme = GUIColorScheme("by selection (lane-/streetwise)", RGBColor(128, 128, 128, 255), "unselected", true); + scheme.addColor(RGBColor(0, 80, 180, 255), 1, "selected"); + laneColorer.addScheme(scheme); + scheme = GUIColorScheme("by permission code", RGBColor(240, 240, 240), "nobody"); + scheme.addColor(RGBColor(10, 10, 10), (SUMOReal)SVC_PASSENGER, "passenger"); + scheme.addColor(RGBColor(128, 128, 128), (SUMOReal)SVC_PEDESTRIAN, "pedestrian"); + scheme.addColor(RGBColor(80, 80, 80), (SUMOReal)(SVC_PEDESTRIAN | SVC_DELIVERY), "pedestrian_delivery"); + scheme.addColor(RGBColor(192, 66, 44), (SUMOReal)SVC_BICYCLE, "bicycle"); + scheme.addColor(RGBColor(40, 100, 40), (SUMOReal)SVC_BUS, "bus"); + scheme.addColor(RGBColor(166, 147, 26), (SUMOReal)SVC_TAXI, "taxi"); + scheme.addColor(RGBColor::BLACK, (SUMOReal)(SVCAll & ~SVC_PEDESTRIAN), "disallow_pedestrian"); + scheme.addColor(RGBColor(64, 0, 86), (SUMOReal)(SVCAll & ~(SVC_PEDESTRIAN | SVC_BICYCLE | SVC_MOPED)), "disallow_apedestrian_bicycle"); + scheme.addColor(RGBColor(150, 200, 200), (SUMOReal)SVC_SHIP, "waterway"); + scheme.addColor(RGBColor::GREEN, (SUMOReal)SVCAll, "all"); laneColorer.addScheme(scheme); // ... traffic states ... scheme = GUIColorScheme("by allowed speed (lanewise)", RGBColor::RED); - scheme.addColor(RGBColor::BLUE, (SUMOReal)(150.0 / 3.6)); + scheme.addColor(RGBColor::YELLOW, (SUMOReal)(30 / 3.6)); + scheme.addColor(RGBColor::GREEN, (SUMOReal)(55 / 3.6)); + scheme.addColor(RGBColor::CYAN, (SUMOReal)(80 / 3.6)); + scheme.addColor(RGBColor::BLUE, (SUMOReal)(120 / 3.6)); + scheme.addColor(RGBColor::MAGENTA, (SUMOReal)(150 / 3.6)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by current occupancy (lanewise)", RGBColor::BLUE); + scheme = GUIColorScheme("by current occupancy (lanewise, brutto)", RGBColor::BLUE); scheme.addColor(RGBColor::RED, (SUMOReal)0.95); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by first vehicle waiting time (lanewise)", RGBColor::GREEN); - scheme.addColor(RGBColor::RED, (SUMOReal)200); + scheme = GUIColorScheme("by current occupancy (lanewise, netto)", RGBColor::BLUE); + scheme.addColor(RGBColor::RED, (SUMOReal)0.95); + laneColorer.addScheme(scheme); + scheme = GUIColorScheme("by first vehicle waiting time (lanewise)", RGBColor::BLUE); + scheme.addColor(RGBColor::CYAN, (SUMOReal)30); + scheme.addColor(RGBColor::GREEN, (SUMOReal)100); + scheme.addColor(RGBColor::YELLOW, (SUMOReal)200); + scheme.addColor(RGBColor::RED, (SUMOReal)300); laneColorer.addScheme(scheme); scheme = GUIColorScheme("by lane number (streetwise)", RGBColor::RED); scheme.addColor(RGBColor::BLUE, (SUMOReal)5); laneColorer.addScheme(scheme); // ... emissions ... - scheme = GUIColorScheme("by CO2 emissions (HBEFA)", RGBColor::GREEN); + scheme = GUIColorScheme("by CO2 emissions", RGBColor::GREEN); scheme.addColor(RGBColor::RED, (SUMOReal)(10. / 7.5 / 5.)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by CO emissions (HBEFA)", RGBColor::GREEN); + scheme = GUIColorScheme("by CO emissions", RGBColor::GREEN); scheme.addColor(RGBColor::RED, (SUMOReal)(0.05 / 7.5 / 2.)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by PMx emissions (HBEFA)", RGBColor::GREEN); + scheme = GUIColorScheme("by PMx emissions", RGBColor::GREEN); scheme.addColor(RGBColor::RED, (SUMOReal)(.005 / 7.5 / 5.)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by NOx emissions (HBEFA)", RGBColor::GREEN); + scheme = GUIColorScheme("by NOx emissions", RGBColor::GREEN); scheme.addColor(RGBColor::RED, (SUMOReal)(.125 / 7.5 / 5.)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by HC emissions (HBEFA)", RGBColor::GREEN); + scheme = GUIColorScheme("by HC emissions", RGBColor::GREEN); scheme.addColor(RGBColor::RED, (SUMOReal)(.02 / 7.5 / 4.)); laneColorer.addScheme(scheme); - scheme = GUIColorScheme("by fuel consumption (HBEFA)", RGBColor::GREEN); + scheme = GUIColorScheme("by fuel consumption", RGBColor::GREEN); scheme.addColor(RGBColor::RED, (SUMOReal)(.005 / 7.5 * 100.)); laneColorer.addScheme(scheme); scheme = GUIColorScheme("by noise emissions (Harmonoise)", RGBColor::GREEN); @@ -134,6 +165,58 @@ scheme.addColor(RGBColor::GREEN, (SUMOReal)2.0); scheme.addColor(RGBColor::BLUE, (SUMOReal)4.0); laneColorer.addScheme(scheme); + laneColorer.addScheme(GUIColorScheme("by angle", RGBColor::YELLOW, "", true)); + scheme = GUIColorScheme("by loaded weight", RGBColor::GREEN); + scheme.addColor(RGBColor::RED, (SUMOReal)100); + scheme.setAllowsNegativeValues(true); + laneColorer.addScheme(scheme); + scheme = GUIColorScheme("by priority", RGBColor::YELLOW); + scheme.addColor(RGBColor::RED, (SUMOReal) - 20); + scheme.addColor(RGBColor::GREEN, (SUMOReal)20); + scheme.setAllowsNegativeValues(true); + laneColorer.addScheme(scheme); + scheme = GUIColorScheme("by height at start", RGBColor::RED); + scheme.addColor(RGBColor::BLUE, (SUMOReal) - 10); + scheme.addColor(RGBColor::YELLOW, (SUMOReal)50); + scheme.addColor(RGBColor::GREEN, (SUMOReal)100); + scheme.addColor(RGBColor::MAGENTA, (SUMOReal)200); + scheme.setAllowsNegativeValues(true); + laneColorer.addScheme(scheme); + scheme = GUIColorScheme("by height at segment start", RGBColor::RED); + scheme.addColor(RGBColor::BLUE, (SUMOReal) - 10); + scheme.addColor(RGBColor::YELLOW, (SUMOReal)50); + scheme.addColor(RGBColor::GREEN, (SUMOReal)100); + scheme.addColor(RGBColor::MAGENTA, (SUMOReal)200); + scheme.setAllowsNegativeValues(true); + laneColorer.addScheme(scheme); + scheme = GUIColorScheme("by inclination", RGBColor::GREY); + scheme.addColor(RGBColor::YELLOW, (SUMOReal) .1); + scheme.addColor(RGBColor::RED, (SUMOReal) .3); + scheme.addColor(RGBColor::GREEN, (SUMOReal) - .1); + scheme.addColor(RGBColor::BLUE, (SUMOReal) - .3); + scheme.setAllowsNegativeValues(true); + laneColorer.addScheme(scheme); + scheme = GUIColorScheme("by inclination at segment start", RGBColor::GREY); + scheme.addColor(RGBColor::YELLOW, (SUMOReal) .1); + scheme.addColor(RGBColor::RED, (SUMOReal) .3); + scheme.addColor(RGBColor::GREEN, (SUMOReal) - .1); + scheme.addColor(RGBColor::BLUE, (SUMOReal) - .3); + scheme.setAllowsNegativeValues(true); + laneColorer.addScheme(scheme); + scheme = GUIColorScheme("by average speed", RGBColor::RED); + scheme.addColor(RGBColor::YELLOW, (SUMOReal)(30 / 3.6)); + scheme.addColor(RGBColor::GREEN, (SUMOReal)(55 / 3.6)); + scheme.addColor(RGBColor::CYAN, (SUMOReal)(80 / 3.6)); + scheme.addColor(RGBColor::BLUE, (SUMOReal)(120 / 3.6)); + scheme.addColor(RGBColor::MAGENTA, (SUMOReal)(150 / 3.6)); + laneColorer.addScheme(scheme); + scheme = GUIColorScheme("by average relative speed ", RGBColor::RED); + scheme.addColor(RGBColor::YELLOW, (SUMOReal)(0.25)); + scheme.addColor(RGBColor::GREEN, (SUMOReal)(0.5)); + scheme.addColor(RGBColor::CYAN, (SUMOReal)(0.75)); + scheme.addColor(RGBColor::BLUE, (SUMOReal)(1)); + scheme.addColor(RGBColor::MAGENTA, (SUMOReal)(1.25)); + laneColorer.addScheme(scheme); /// add vehicle coloring schemes @@ -146,34 +229,51 @@ vehicleColorer.addScheme(GUIColorScheme("arrival position as HSV", RGBColor::YELLOW, "", true)); vehicleColorer.addScheme(GUIColorScheme("direction/distance as HSV", RGBColor::YELLOW, "", true)); scheme = GUIColorScheme("by speed", RGBColor::RED); - scheme.addColor(RGBColor::BLUE, (SUMOReal)(150.0 / 3.6)); + scheme.addColor(RGBColor::YELLOW, (SUMOReal)(30 / 3.6)); + scheme.addColor(RGBColor::GREEN, (SUMOReal)(55 / 3.6)); + scheme.addColor(RGBColor::CYAN, (SUMOReal)(80 / 3.6)); + scheme.addColor(RGBColor::BLUE, (SUMOReal)(120 / 3.6)); + scheme.addColor(RGBColor::MAGENTA, (SUMOReal)(150 / 3.6)); vehicleColorer.addScheme(scheme); scheme = GUIColorScheme("by waiting time", RGBColor::BLUE); - scheme.addColor(RGBColor::RED, (SUMOReal)(5 * 60)); + scheme.addColor(RGBColor::CYAN, (SUMOReal)30); + scheme.addColor(RGBColor::GREEN, (SUMOReal)100); + scheme.addColor(RGBColor::YELLOW, (SUMOReal)200); + scheme.addColor(RGBColor::RED, (SUMOReal)300); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by time since last lanechange", RGBColor::WHITE); - scheme.addColor(RGBColor::GREY, (SUMOReal)(5 * 60)); + scheme = GUIColorScheme("by time since lane change", RGBColor(179, 179, 179, 255), "0"); + scheme.addColor(RGBColor(189, 189, 179, 255), -180); + scheme.addColor(RGBColor(255, 255, 0, 255), -20); + scheme.addColor(RGBColor(255, 0, 0, 255), -1); + scheme.addColor(RGBColor(0, 0, 255, 255), 1); + scheme.addColor(RGBColor(0, 255, 255, 255), 20); + scheme.addColor(RGBColor(179, 189, 189, 255), 180); + scheme.setAllowsNegativeValues(true); vehicleColorer.addScheme(scheme); scheme = GUIColorScheme("by max speed", RGBColor::RED); - scheme.addColor(RGBColor::BLUE, (SUMOReal)(150.0 / 3.6)); + scheme.addColor(RGBColor::YELLOW, (SUMOReal)(30 / 3.6)); + scheme.addColor(RGBColor::GREEN, (SUMOReal)(55 / 3.6)); + scheme.addColor(RGBColor::CYAN, (SUMOReal)(80 / 3.6)); + scheme.addColor(RGBColor::BLUE, (SUMOReal)(120 / 3.6)); + scheme.addColor(RGBColor::MAGENTA, (SUMOReal)(150 / 3.6)); vehicleColorer.addScheme(scheme); // ... emissions ... - scheme = GUIColorScheme("by CO2 emissions (HBEFA)", RGBColor::GREEN); + scheme = GUIColorScheme("by CO2 emissions", RGBColor::GREEN); scheme.addColor(RGBColor::RED, (SUMOReal)5.); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by CO emissions (HBEFA)", RGBColor::GREEN); + scheme = GUIColorScheme("by CO emissions", RGBColor::GREEN); scheme.addColor(RGBColor::RED, (SUMOReal)0.05); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by PMx emissions (HBEFA)", RGBColor::GREEN); + scheme = GUIColorScheme("by PMx emissions", RGBColor::GREEN); scheme.addColor(RGBColor::RED, (SUMOReal).005); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by NOx emissions (HBEFA)", RGBColor::GREEN); + scheme = GUIColorScheme("by NOx emissions", RGBColor::GREEN); scheme.addColor(RGBColor::RED, (SUMOReal).125); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by HC emissions (HBEFA)", RGBColor::GREEN); + scheme = GUIColorScheme("by HC emissions", RGBColor::GREEN); scheme.addColor(RGBColor::RED, (SUMOReal).02); vehicleColorer.addScheme(scheme); - scheme = GUIColorScheme("by fuel consumption (HBEFA)", RGBColor::GREEN); + scheme = GUIColorScheme("by fuel consumption", RGBColor::GREEN); scheme.addColor(RGBColor::RED, (SUMOReal).005); vehicleColorer.addScheme(scheme); scheme = GUIColorScheme("by noise emissions (Harmonoise)", RGBColor::GREEN); @@ -186,34 +286,195 @@ scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true); scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected"); vehicleColorer.addScheme(scheme); + scheme = GUIColorScheme("by offset from best lane", RGBColor(179, 179, 179, 255), "0"); + scheme.addColor(RGBColor(255, 0, 0, 255), -3, "-3"); + scheme.addColor(RGBColor(255, 255, 0, 255), -1, "-1"); + scheme.addColor(RGBColor(0, 255, 255, 255), 1, "1"); + scheme.addColor(RGBColor(0, 0, 255, 255), 3, "3"); + scheme.setAllowsNegativeValues(true); + vehicleColorer.addScheme(scheme); + scheme = GUIColorScheme("by acceleration", RGBColor(179, 179, 179, 255), "0"); + scheme.addColor(RGBColor(255, 0, 0, 255), -4.5 /* -SUMOVTypeParameter::getDefaultDecel() */); + scheme.addColor(RGBColor(255, 255, 0, 255), -0.1); + scheme.addColor(RGBColor(0, 255, 255, 255), 0.1); + scheme.addColor(RGBColor(0, 0, 255, 255), 2.6 /* SUMOVTypeParameter::getDefaultAccel() */); + scheme.setAllowsNegativeValues(true); + vehicleColorer.addScheme(scheme); + scheme = GUIColorScheme("by time gap", RGBColor(255, 255, 0, 255), "0"); + scheme.addColor(RGBColor(179, 179, 179, 255), -1); + scheme.addColor(RGBColor(0, 255, 255, 255), 1); + scheme.addColor(RGBColor(0, 0, 255, 255), 2); + scheme.setAllowsNegativeValues(true); + vehicleColorer.addScheme(scheme); + vehicleColorer.addScheme(GUIColorScheme("random", RGBColor::YELLOW, "", true)); /// add person coloring schemes personColorer.addScheme(GUIColorScheme("given person/type color", RGBColor::YELLOW, "", true)); personColorer.addScheme(GUIColorScheme("uniform", RGBColor::YELLOW, "", true)); personColorer.addScheme(GUIColorScheme("given/assigned person color", RGBColor::YELLOW, "", true)); personColorer.addScheme(GUIColorScheme("given/assigned type color", RGBColor::YELLOW, "", true)); + scheme = GUIColorScheme("by speed", RGBColor::RED); + scheme.addColor(RGBColor::YELLOW, (SUMOReal)(2.5 / 3.6)); + scheme.addColor(RGBColor::GREEN, (SUMOReal)(5 / 3.6)); + scheme.addColor(RGBColor::BLUE, (SUMOReal)(10 / 3.6)); + personColorer.addScheme(scheme); scheme = GUIColorScheme("by mode", RGBColor::YELLOW); // walking scheme.addColor(RGBColor::BLUE, (SUMOReal)(1)); // riding scheme.addColor(RGBColor::RED, (SUMOReal)(2)); // stopped scheme.addColor(RGBColor::GREEN, (SUMOReal)(3)); // waiting for ride personColorer.addScheme(scheme); scheme = GUIColorScheme("by waiting time", RGBColor::BLUE); - scheme.addColor(RGBColor::RED, (SUMOReal)(5 * 60)); + scheme.addColor(RGBColor::CYAN, (SUMOReal)30); + scheme.addColor(RGBColor::GREEN, (SUMOReal)100); + scheme.addColor(RGBColor::YELLOW, (SUMOReal)200); + scheme.addColor(RGBColor::RED, (SUMOReal)300); personColorer.addScheme(scheme); + scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true); + scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected"); + personColorer.addScheme(scheme); + personColorer.addScheme(GUIColorScheme("by angle", RGBColor::YELLOW, "", true)); + personColorer.addScheme(GUIColorScheme("random", RGBColor::YELLOW, "", true)); + + /// add container coloring schemes + containerColorer.addScheme(GUIColorScheme("given container/type color", RGBColor::YELLOW, "", true)); + containerColorer.addScheme(GUIColorScheme("uniform", RGBColor::YELLOW, "", true)); + containerColorer.addScheme(GUIColorScheme("given/assigned container color", RGBColor::YELLOW, "", true)); + containerColorer.addScheme(GUIColorScheme("given/assigned type color", RGBColor::YELLOW, "", true)); + scheme = GUIColorScheme("by speed", RGBColor::RED); + scheme.addColor(RGBColor::YELLOW, (SUMOReal)(2.5 / 3.6)); + scheme.addColor(RGBColor::GREEN, (SUMOReal)(5 / 3.6)); + scheme.addColor(RGBColor::BLUE, (SUMOReal)(10 / 3.6)); + containerColorer.addScheme(scheme); + scheme = GUIColorScheme("by mode", RGBColor::YELLOW); // walking + scheme.addColor(RGBColor::BLUE, (SUMOReal)(1)); // riding + scheme.addColor(RGBColor::RED, (SUMOReal)(2)); // stopped + scheme.addColor(RGBColor::GREEN, (SUMOReal)(3)); // waiting for ride + containerColorer.addScheme(scheme); + scheme = GUIColorScheme("by waiting time", RGBColor::BLUE); + scheme.addColor(RGBColor::CYAN, (SUMOReal)30); + scheme.addColor(RGBColor::GREEN, (SUMOReal)100); + scheme.addColor(RGBColor::YELLOW, (SUMOReal)200); + scheme.addColor(RGBColor::RED, (SUMOReal)300); + containerColorer.addScheme(scheme); + scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true); + scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected"); + containerColorer.addScheme(scheme); + containerColorer.addScheme(GUIColorScheme("by angle", RGBColor::YELLOW, "", true)); + + /// add junction coloring schemes + scheme = GUIColorScheme("uniform", RGBColor::BLACK, "", true); + scheme.addColor(RGBColor(150, 200, 200), 1, "waterway"); + junctionColorer.addScheme(scheme); + scheme = GUIColorScheme("by selection", RGBColor(128, 128, 128, 255), "unselected", true); + scheme.addColor(RGBColor(0, 80, 180, 255), 1, "selected"); + junctionColorer.addScheme(scheme); + scheme = GUIColorScheme("by type", RGBColor::GREEN, "traffic_light", true); + scheme.addColor(RGBColor(0, 128, 0), 1, "traffic_light_unregulated"); + scheme.addColor(RGBColor::YELLOW, 2, "priority"); + scheme.addColor(RGBColor::RED, 3, "priority_stop"); + scheme.addColor(RGBColor::BLUE, 4, "right_before_left"); + scheme.addColor(RGBColor::CYAN, 5, "allway_stop"); + scheme.addColor(RGBColor::GREY, 6, "district"); + scheme.addColor(RGBColor::MAGENTA, 7, "unregulated"); + scheme.addColor(RGBColor::BLACK, 8, "dead_end"); + scheme.addColor(RGBColor::ORANGE, 9, "rail_signal"); + junctionColorer.addScheme(scheme); + + + /// add lane scaling schemes + { + GUIScaleScheme scheme = GUIScaleScheme("default", 1, "uniform", true); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by selection (lane-/streetwise)", 0.5, "unselected", true); + scheme.addColor(5, 1, "selected"); + laneScaler.addScheme(scheme); + // ... traffic states ... + scheme = GUIScaleScheme("by allowed speed (lanewise)", 0); + scheme.addColor(10, (SUMOReal)(150.0 / 3.6)); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by current occupancy (lanewise, brutto)", 0); + scheme.addColor(10, (SUMOReal)0.95); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by current occupancy (lanewise, netto)", 0); + scheme.addColor(10, (SUMOReal)0.95); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by first vehicle waiting time (lanewise)", 0); + scheme.addColor(10, (SUMOReal)300); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by lane number (streetwise)", 1); + scheme.addColor(10, (SUMOReal)5); + laneScaler.addScheme(scheme); + // ... emissions ... + scheme = GUIScaleScheme("by CO2 emissions", 0); + scheme.addColor(10, (SUMOReal)(10. / 7.5 / 5.)); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by CO emissions", 0); + scheme.addColor(10, (SUMOReal)(0.05 / 7.5 / 2.)); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by PMx emissions", 0); + scheme.addColor(10, (SUMOReal)(.005 / 7.5 / 5.)); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by NOx emissions", 0); + scheme.addColor(10, (SUMOReal)(.125 / 7.5 / 5.)); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by HC emissions", 0); + scheme.addColor(10, (SUMOReal)(.02 / 7.5 / 4.)); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by fuel consumption", 0); + scheme.addColor(10, (SUMOReal)(.005 / 7.5 * 100.)); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by noise emissions (Harmonoise)", 0); + scheme.addColor(10, (SUMOReal)100); + laneScaler.addScheme(scheme); + // ... weights (experimental) ... + scheme = GUIScaleScheme("by global travel time", 0); + scheme.addColor(10, (SUMOReal)100); + scheme.setAllowsNegativeValues(true); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by global speed percentage", 0); + scheme.addColor(10, (SUMOReal)100); + scheme.setAllowsNegativeValues(true); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by given length/geometrical length", 0); + scheme.addColor(10, (SUMOReal)10.0); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by loaded weight", 0); + scheme.addColor(-1000, (SUMOReal) - 1000); + scheme.addColor(1000, (SUMOReal)1000); + scheme.setAllowsNegativeValues(true); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by priority", 1); + scheme.addColor(0.5, (SUMOReal) - 20); + scheme.addColor(5, (SUMOReal)20); + scheme.setAllowsNegativeValues(true); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by average speed", 0); + scheme.addColor(10, (SUMOReal)(150.0 / 3.6)); + laneScaler.addScheme(scheme); + scheme = GUIScaleScheme("by average relative speed", 0); + scheme.addColor(0.5, (SUMOReal)(0.5)); + scheme.addColor(2, (SUMOReal)(1)); + scheme.addColor(10, (SUMOReal)(2)); + laneScaler.addScheme(scheme); + } #ifdef HAVE_INTERNAL /// add edge coloring schemes edgeColorer.addScheme(GUIColorScheme("uniform (streetwise)", RGBColor::BLACK, "", true)); - scheme = GUIColorScheme("by selection (streetwise)", RGBColor(179, 179, 179, 255), "unselected", true); - scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected"); + scheme = GUIColorScheme("by selection (streetwise)", RGBColor(128, 128, 128, 255), "unselected", true); + scheme.addColor(RGBColor(0, 80, 180, 255), 1, "selected"); edgeColorer.addScheme(scheme); scheme = GUIColorScheme("by purpose (streetwise)", RGBColor(), "normal", true); scheme.addColor(RGBColor(128, 0, 128, 255), 1, "connector"); // see MSEdge::EdgeBasicFunction::EDGEFUNCTION_CONNECTOR scheme.addColor(RGBColor::BLUE, 2, "internal"); // see MSEdge::EdgeBasicFunction::EDGEFUNCTION_INTERNAL edgeColorer.addScheme(scheme); scheme = GUIColorScheme("by allowed speed (streetwise)", RGBColor::RED); - scheme.addColor(RGBColor::BLUE, (SUMOReal)(150.0 / 3.6)); + scheme.addColor(RGBColor::YELLOW, (SUMOReal)(30 / 3.6)); + scheme.addColor(RGBColor::GREEN, (SUMOReal)(55 / 3.6)); + scheme.addColor(RGBColor::CYAN, (SUMOReal)(80 / 3.6)); + scheme.addColor(RGBColor::BLUE, (SUMOReal)(120 / 3.6)); + scheme.addColor(RGBColor::MAGENTA, (SUMOReal)(150 / 3.6)); edgeColorer.addScheme(scheme); scheme = GUIColorScheme("by current occupancy (streetwise)", RGBColor::BLUE); scheme.addColor(RGBColor::RED, (SUMOReal)0.95); @@ -227,12 +488,31 @@ scheme = GUIColorScheme("by relative speed (streetwise)", RGBColor::RED); scheme.addColor(RGBColor::BLUE, (SUMOReal)1); edgeColorer.addScheme(scheme); + + /// add edge scaling schemes + { + edgeScaler.addScheme(GUIScaleScheme("uniform", 1, "", true)); + GUIScaleScheme scheme = GUIScaleScheme("by selection (streetwise)", 0.5, "unselected", true); + scheme.addColor(5, 1, "selected"); + edgeScaler.addScheme(scheme); + scheme = GUIScaleScheme("by allowed speed (streetwise)", 0); + scheme.addColor(10, (SUMOReal)(150.0 / 3.6)); + edgeScaler.addScheme(scheme); + scheme = GUIScaleScheme("by current occupancy (streetwise)", 0); + scheme.addColor(10, (SUMOReal)0.95); + edgeScaler.addScheme(scheme); + scheme = GUIScaleScheme("by current speed (streetwise)", 0); + scheme.addColor(10, (SUMOReal)(150.0 / 3.6)); + edgeScaler.addScheme(scheme); + scheme = GUIScaleScheme("by current flow (streetwise)", 0); + scheme.addColor(20, (SUMOReal)5000); + edgeScaler.addScheme(scheme); + scheme = GUIScaleScheme("by relative speed (streetwise)", 0); + scheme.addColor(20, (SUMOReal)1); + edgeScaler.addScheme(scheme); + } #endif - junctionColorer.addScheme(GUIColorScheme("uniform", RGBColor::BLACK, "", true)); - scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true); - scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected"); - junctionColorer.addScheme(scheme); } @@ -247,6 +527,17 @@ } +size_t +GUIVisualizationSettings::getLaneEdgeScaleMode() const { +#ifdef HAVE_INTERNAL + if (UseMesoSim) { + return edgeScaler.getActive(); + } +#endif + return laneScaler.getActive(); +} + + GUIColorScheme& GUIVisualizationSettings::getLaneEdgeScheme() { #ifdef HAVE_INTERNAL @@ -258,74 +549,128 @@ } +GUIScaleScheme& +GUIVisualizationSettings::getLaneEdgeScaleScheme() { +#ifdef HAVE_INTERNAL + if (UseMesoSim) { + return edgeScaler.getScheme(); + } +#endif + return laneScaler.getScheme(); +} + void GUIVisualizationSettings::save(OutputDevice& dev) const { - dev << "\n"; - dev << " \n"; - dev << " \n"; - dev << " \n"; - dev << " \n"; + dev.openTag(SUMO_TAG_VIEWSETTINGS_SCHEME); + dev.writeAttr(SUMO_ATTR_NAME, name); + dev.openTag(SUMO_TAG_VIEWSETTINGS_OPENGL); + dev.writeAttr("antialiase", antialiase); + dev.writeAttr("dither", dither); + dev.closeTag(); + dev.openTag(SUMO_TAG_VIEWSETTINGS_BACKGROUND); + dev.writeAttr("backgroundColor", backgroundColor); + dev.writeAttr("showGrid", showGrid); + dev.writeAttr("gridXSize", gridXSize); + dev.writeAttr("gridYSize", gridYSize); + dev.closeTag(); + // edges + dev.openTag(SUMO_TAG_VIEWSETTINGS_EDGES); + dev.writeAttr("laneEdgeMode", getLaneEdgeMode()); + dev.writeAttr("scaleMode", getLaneEdgeScaleMode()); + dev.writeAttr("laneShowBorders", laneShowBorders); + dev.writeAttr("showLinkDecals", showLinkDecals); + dev.writeAttr("showRails", showRails); + dev.writeAttr("hideConnectors", hideConnectors); + dev.writeAttr("widthExaggeration", laneWidthExaggeration); + dev.lf(); + dev << " "; + edgeName.print(dev, "edgeName"); + dev.lf(); + dev << " "; + internalEdgeName.print(dev, "internalEdgeName"); + dev.lf(); + dev << " "; + cwaEdgeName.print(dev, "cwaEdgeName"); + dev.lf(); + dev << " "; + streetName.print(dev, "streetName"); laneColorer.save(dev); + laneScaler.save(dev); #ifdef HAVE_INTERNAL edgeColorer.save(dev); + edgeScaler.save(dev); #endif - dev << " \n"; - - dev << " \n"; + dev.closeTag(); + // vehicles + dev.openTag(SUMO_TAG_VIEWSETTINGS_VEHICLES); + dev.writeAttr("vehicleMode", vehicleColorer.getActive()); + dev.writeAttr("vehicleQuality", vehicleQuality); + vehicleSize.print(dev, "vehicle"); + dev.writeAttr("showBlinker", showBlinker); + dev.lf(); + dev << " "; + vehicleName.print(dev, "vehicleName"); vehicleColorer.save(dev); - dev << " \n"; - dev << " \n"; + dev.closeTag(); + // persons + dev.openTag(SUMO_TAG_VIEWSETTINGS_PERSONS); + dev.writeAttr("personMode", personColorer.getActive()); + dev.writeAttr("personQuality", personQuality); + personSize.print(dev, "person"); + dev.lf(); + dev << " "; + personName.print(dev, "personName"); personColorer.save(dev); - dev << " \n"; - - dev << " \n"; + dev.closeTag(); + // persons + dev.openTag(SUMO_TAG_VIEWSETTINGS_CONTAINERS); + dev.writeAttr("containerMode", containerColorer.getActive()); + dev.writeAttr("containerQuality", containerQuality); + personSize.print(dev, "container"); + dev.lf(); + dev << " "; + personName.print(dev, "containerName"); + personColorer.save(dev); + dev.closeTag(); + // junctions + dev.openTag(SUMO_TAG_VIEWSETTINGS_JUNCTIONS); + dev.writeAttr("junctionMode", junctionColorer.getActive()); + dev.writeAttr("drawLinkTLIndex", drawLinkTLIndex); + dev.writeAttr("drawLinkJunctionIndex", drawLinkJunctionIndex); + dev.lf(); + dev << " "; + junctionName.print(dev, "junctionName"); + dev.lf(); + dev << " "; + internalJunctionName.print(dev, "internalJunctionName"); + dev.lf(); + dev << " "; + dev.writeAttr("showLane2Lane", showLane2Lane); + dev.writeAttr("drawShape", drawJunctionShape); junctionColorer.save(dev); - dev << " \n"; + dev.closeTag(); + // additionals + dev.openTag(SUMO_TAG_VIEWSETTINGS_ADDITIONALS); + dev.writeAttr("addMode", addMode); + addSize.print(dev, "add"); + addName.print(dev, "addName"); + dev.closeTag(); + // pois + dev.openTag(SUMO_TAG_VIEWSETTINGS_POIS); + poiSize.print(dev, "poi"); + poiName.print(dev, "poiName"); + dev.closeTag(); + // polys + dev.openTag(SUMO_TAG_VIEWSETTINGS_POLYS); + polySize.print(dev, "poly"); + polyName.print(dev, "polyName"); + dev.closeTag(); + // legend + dev.openTag(SUMO_TAG_VIEWSETTINGS_LEGEND); + dev.writeAttr("showSizeLegend", showSizeLegend); + dev.closeTag(); - dev << " \n"; - - dev << " \n"; - - dev << " \n"; - - dev << " \n"; - dev << " \n"; - dev << "\n"; + dev.closeTag(); } @@ -354,10 +699,16 @@ if (!(edgeColorer == v2.edgeColorer)) { return false; } + if (!(edgeScaler == v2.edgeScaler)) { + return false; + } #endif if (!(laneColorer == v2.laneColorer)) { return false; } + if (!(laneScaler == v2.laneScaler)) { + return false; + } if (laneShowBorders != v2.laneShowBorders) { return false; } @@ -373,6 +724,9 @@ if (internalEdgeName != v2.internalEdgeName) { return false; } + if (cwaEdgeName != v2.cwaEdgeName) { + return false; + } if (streetName != v2.streetName) { return false; } @@ -388,10 +742,7 @@ if (vehicleQuality != v2.vehicleQuality) { return false; } - if (minVehicleSize != v2.minVehicleSize) { - return false; - } - if (vehicleExaggeration != v2.vehicleExaggeration) { + if (vehicleSize != v2.vehicleSize) { return false; } if (showBlinker != v2.showBlinker) { @@ -403,6 +754,9 @@ if (drawMinGap != v2.drawMinGap) { return false; } + if (showBTRange != v2.showBTRange) { + return false; + } if (vehicleName != v2.vehicleName) { return false; } @@ -412,13 +766,22 @@ if (personQuality != v2.personQuality) { return false; } - if (minPersonSize != v2.minPersonSize) { + if (personSize != v2.personSize) { return false; } - if (personExaggeration != v2.personExaggeration) { + if (personName != v2.personName) { return false; } - if (personName != v2.personName) { + if (!(containerColorer == v2.containerColorer)) { + return false; + } + if (containerQuality != v2.containerQuality) { + return false; + } + if (containerSize != v2.containerSize) { + return false; + } + if (containerName != v2.containerName) { return false; } if (!(junctionColorer == v2.junctionColorer)) { @@ -441,33 +804,26 @@ return false; } - if (addMode != v2.addMode) { + if (drawJunctionShape != v2.drawJunctionShape) { return false; } - if (minAddSize != v2.minAddSize) { + + if (addMode != v2.addMode) { return false; } - if (addExaggeration != v2.addExaggeration) { + if (addSize != v2.addSize) { return false; } if (addName != v2.addName) { return false; } - - if (minPOISize != v2.minPOISize) { - return false; - } - if (poiExaggeration != v2.poiExaggeration) { + if (poiSize != v2.poiSize) { return false; } if (poiName != v2.poiName) { return false; } - - if (minPolySize != v2.minPolySize) { - return false; - } - if (polyExaggeration != v2.polyExaggeration) { + if (polySize != v2.polySize) { return false; } if (polyName != v2.polyName) { @@ -482,6 +838,12 @@ } +SUMOReal +GUIVisualizationSizeSettings::getExaggeration(const GUIVisualizationSettings& s) const { + /// @note should look normal-sized at zoom 1000 + return (constantSize && !s.drawForSelecting) ? MAX2((SUMOReal)exaggeration, exaggeration * 20 / s.scale) : exaggeration; +} /****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUIVisualizationSettings.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUIVisualizationSettings.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/GUIVisualizationSettings.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/GUIVisualizationSettings.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIVisualizationSettings.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIVisualizationSettings.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Stores the information about how to visualize structures /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -37,7 +37,7 @@ #include #include #include -#include "GUIColorer.h" +#include "GUIPropertySchemeStorage.h" // =========================================================================== @@ -45,6 +45,7 @@ // =========================================================================== class BaseSchemeInfoSource; class OutputDevice; +class GUIVisualizationSettings; // =========================================================================== @@ -70,13 +71,45 @@ return !((*this) == other); } - std::string print(const std::string& name) const { - return name + "_show=\"" + toString(show) + "\" " + - name + "_size=\"" + toString(size) + "\" " + - name + "_color=\"" + toString(color) + "\" "; + void print(OutputDevice& dev, const std::string& name) const { + dev.writeAttr(name + "_show", show); + dev.writeAttr(name + "_size", size); + dev.writeAttr(name + "_color", color); } }; + +struct GUIVisualizationSizeSettings { + GUIVisualizationSizeSettings(float _minSize, float _exaggeration = 1.0, bool _constantSize = false) : + minSize(_minSize), exaggeration(_exaggeration), constantSize(_constantSize) {} + + /// @brief The minimum size to draw this object + float minSize; + /// @brief The size exaggeration (upscale) + float exaggeration; + // @brief whether the object shall be drawn with constant size regardless of zoom + bool constantSize; + + bool operator==(const GUIVisualizationSizeSettings& other) { + return constantSize == other.constantSize && + minSize == other.minSize && + exaggeration == other.exaggeration; + } + bool operator!=(const GUIVisualizationSizeSettings& other) { + return !((*this) == other); + } + + void print(OutputDevice& dev, const std::string& name) const { + dev.writeAttr(name + "_minSize", minSize); + dev.writeAttr(name + "_exaggeration", exaggeration); + dev.writeAttr(name + "_constantSize", constantSize); + } + + /// @brief return the drawing size including exaggeration and constantSize values + SUMOReal getExaggeration(const GUIVisualizationSettings& s) const; +}; + + /** * @class GUIVisualizationSettings * @brief Stores the information about how to visualize structures @@ -113,12 +146,16 @@ #ifdef HAVE_INTERNAL /// @brief The mesoscopic edge colorer GUIColorer edgeColorer; + /// @brief The mesoscopic edge scaler + GUIScaler edgeScaler; /// @brief this should be set at the same time as MSGlobals::gUseMesoSim static bool UseMesoSim; #endif /// @brief The lane colorer GUIColorer laneColorer; + /// @brief The lane scaler + GUIScaler laneScaler; /// @brief Information whether lane borders shall be drawn bool laneShowBorders; /// @brief Information whether link textures (arrows) shall be drawn @@ -126,7 +163,7 @@ /// @brief Information whether rails shall be drawn bool showRails; // Setting bundles for optional drawing names with size and color - GUIVisualizationTextSettings edgeName, internalEdgeName, streetName; + GUIVisualizationTextSettings edgeName, internalEdgeName, cwaEdgeName, streetName; bool hideConnectors; /// @brief The lane exaggeration (upscale thickness) @@ -141,16 +178,16 @@ GUIColorer vehicleColorer; /// @brief The quality of vehicle drawing int vehicleQuality; - /// @brief The minimum size of vehicles to let them be drawn - float minVehicleSize; - /// @brief The vehicle exaggeration (upscale) - float vehicleExaggeration; /// @brief Information whether vehicle blinkers shall be drawn bool showBlinker; /// @brief Information whether the lane change preference shall be drawn bool drawLaneChangePreference; /// @brief Information whether the minimum gap shall be drawn bool drawMinGap; + /// @brief Information whether the communication range shall be drawn + bool showBTRange; + // Setting bundles for controling the size of the drawn vehicles + GUIVisualizationSizeSettings vehicleSize; // Setting bundles for optional drawing vehicle names GUIVisualizationTextSettings vehicleName; //@} @@ -163,15 +200,27 @@ GUIColorer personColorer; /// @brief The quality of person drawing int personQuality; - /// @brief The minimum size of persons to let them be drawn - float minPersonSize; - /// @brief The person exaggeration (upscale) - float personExaggeration; + // Setting bundles for controling the size of the drawn persons + GUIVisualizationSizeSettings personSize; // Setting bundles for optional drawing person names GUIVisualizationTextSettings personName; //@} + /// @name container visualization settings + //@{ + + /// @brief The container colorer + GUIColorer containerColorer; + /// @brief The quality of container drawing + int containerQuality; + // Setting bundles for controling the size of the drawn containers + GUIVisualizationSizeSettings containerSize; + // Setting bundles for optional drawing person names + GUIVisualizationTextSettings containerName; + //@} + + /// @name junction visualization settings //@{ @@ -183,11 +232,11 @@ bool drawLinkJunctionIndex; // Setting bundles for optional drawing junction names GUIVisualizationTextSettings junctionName, internalJunctionName; - //@} - - /// @brief Information whether lane-to-lane arrows shall be drawn bool showLane2Lane; + /// @brief whether the shape of the junction should be drawn + bool drawJunctionShape; + //@} /// @name Additional structures visualization settings @@ -196,10 +245,8 @@ /// @brief The additional structures visualization scheme // @todo decouple addExageration for POIs, Polygons, Triggers etc int addMode; - /// @brief The minimum size of additional structures to let them be drawn - float minAddSize; - /// @brief The additional structures exaggeration (upscale) - float addExaggeration; + // Setting bundles for controling the size of additional items + GUIVisualizationSizeSettings addSize; // Setting bundles for optional drawing additional names GUIVisualizationTextSettings addName; //@} @@ -208,18 +255,14 @@ /// @name shapes visualization settings //@{ - /// @brief The minimum size of shapes to let them be drawn - float minPOISize; - /// @brief The additional shapes (upscale) - float poiExaggeration; + // Setting bundles for controling the size of the drawn POIs + GUIVisualizationSizeSettings poiSize; // Setting bundles for optional drawing poi names GUIVisualizationTextSettings poiName; - /// @brief The minimum size of shapes to let them be drawn - float minPolySize; - /// @brief The additional shapes (upscale) - float polyExaggeration; - // Setting bundles for optional drawing poi names + // Setting bundles for controling the size of the drawn polygons + GUIVisualizationSizeSettings polySize; + // Setting bundles for optional drawing polygon names GUIVisualizationTextSettings polyName; //@} @@ -238,6 +281,9 @@ /// @brief the current selection scaling in NETEDIT (temporary) SUMOReal selectionScale; + /// @brief whether drawing is performed for the purpose of selecting objects + bool drawForSelecting; + /** @brief Writes the settings into an output device * @param[in] dev The device to write the settings into */ @@ -248,12 +294,22 @@ */ size_t getLaneEdgeMode() const; + /** @brief Returns the number of the active lane (edge) scaling schme + * @return number of the active scheme + */ + size_t getLaneEdgeScaleMode() const; + /** @brief Returns the current lane (edge) coloring schme * @return current scheme */ GUIColorScheme& getLaneEdgeScheme(); - /** @brief Assignment operator */ + /** @brief Returns the current lane (edge) scaling schme + * @return current scheme + */ + GUIScaleScheme& getLaneEdgeScaleScheme(); + + /** @brief Comparison operator */ bool operator==(const GUIVisualizationSettings& vs2); }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ noinst_LIBRARIES = libguiutilssettings.a -libguiutilssettings_a_SOURCES = GUIColorer.h GUIColorScheme.h \ -GUICompleteSchemeStorage.cpp GUICompleteSchemeStorage.h \ +libguiutilssettings_a_SOURCES = GUICompleteSchemeStorage.cpp GUICompleteSchemeStorage.h \ +GUIPropertyScheme.h GUIPropertySchemeStorage.h \ GUISettingsHandler.cpp GUISettingsHandler.h \ GUIVisualizationSettings.cpp GUIVisualizationSettings.h diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/settings/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/settings/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/gui/settings -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,36 +92,96 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libguiutilssettings_a_AR = $(AR) $(ARFLAGS) libguiutilssettings_a_LIBADD = am_libguiutilssettings_a_OBJECTS = GUICompleteSchemeStorage.$(OBJEXT) \ GUISettingsHandler.$(OBJEXT) \ GUIVisualizationSettings.$(OBJEXT) libguiutilssettings_a_OBJECTS = $(am_libguiutilssettings_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libguiutilssettings_a_SOURCES) DIST_SOURCES = $(libguiutilssettings_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -85,6 +190,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -111,9 +217,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -124,10 +234,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -222,8 +328,8 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libguiutilssettings.a -libguiutilssettings_a_SOURCES = GUIColorer.h GUIColorScheme.h \ -GUICompleteSchemeStorage.cpp GUICompleteSchemeStorage.h \ +libguiutilssettings_a_SOURCES = GUICompleteSchemeStorage.cpp GUICompleteSchemeStorage.h \ +GUIPropertyScheme.h GUIPropertySchemeStorage.h \ GUISettingsHandler.cpp GUISettingsHandler.h \ GUIVisualizationSettings.cpp GUIVisualizationSettings.h @@ -264,10 +370,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libguiutilssettings.a: $(libguiutilssettings_a_OBJECTS) $(libguiutilssettings_a_DEPENDENCIES) - -rm -f libguiutilssettings.a - $(libguiutilssettings_a_AR) libguiutilssettings.a $(libguiutilssettings_a_OBJECTS) $(libguiutilssettings_a_LIBADD) - $(RANLIB) libguiutilssettings.a + +libguiutilssettings.a: $(libguiutilssettings_a_OBJECTS) $(libguiutilssettings_a_DEPENDENCIES) $(EXTRA_libguiutilssettings_a_DEPENDENCIES) + $(AM_V_at)-rm -f libguiutilssettings.a + $(AM_V_AR)$(libguiutilssettings_a_AR) libguiutilssettings.a $(libguiutilssettings_a_OBJECTS) $(libguiutilssettings_a_LIBADD) + $(AM_V_at)$(RANLIB) libguiutilssettings.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -280,25 +387,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUIVisualizationSettings.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -306,26 +413,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -337,15 +433,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -354,6 +446,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -402,10 +509,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -490,18 +602,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/tracker/GUIParameterTracker.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/tracker/GUIParameterTracker.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/tracker/GUIParameterTracker.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/tracker/GUIParameterTracker.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIParameterTracker.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIParameterTracker.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A window which displays the time line of one (or more) value(s) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/tracker/GUIParameterTracker.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/tracker/GUIParameterTracker.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/tracker/GUIParameterTracker.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/tracker/GUIParameterTracker.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIParameterTracker.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIParameterTracker.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A window which displays the time line of one (or more) value(s) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/tracker/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/tracker/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/tracker/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/tracker/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/gui/tracker -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,35 +92,95 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libguiutilstracker_a_AR = $(AR) $(ARFLAGS) libguiutilstracker_a_LIBADD = am_libguiutilstracker_a_OBJECTS = GUIParameterTracker.$(OBJEXT) \ TrackerValueDesc.$(OBJEXT) libguiutilstracker_a_OBJECTS = $(am_libguiutilstracker_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libguiutilstracker_a_SOURCES) DIST_SOURCES = $(libguiutilstracker_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -84,6 +189,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -110,9 +216,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -123,10 +233,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -262,10 +368,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libguiutilstracker.a: $(libguiutilstracker_a_OBJECTS) $(libguiutilstracker_a_DEPENDENCIES) - -rm -f libguiutilstracker.a - $(libguiutilstracker_a_AR) libguiutilstracker.a $(libguiutilstracker_a_OBJECTS) $(libguiutilstracker_a_LIBADD) - $(RANLIB) libguiutilstracker.a + +libguiutilstracker.a: $(libguiutilstracker_a_OBJECTS) $(libguiutilstracker_a_DEPENDENCIES) $(EXTRA_libguiutilstracker_a_DEPENDENCIES) + $(AM_V_at)-rm -f libguiutilstracker.a + $(AM_V_AR)$(libguiutilstracker_a_AR) libguiutilstracker.a $(libguiutilstracker_a_OBJECTS) $(libguiutilstracker_a_LIBADD) + $(AM_V_at)$(RANLIB) libguiutilstracker.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -277,25 +384,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TrackerValueDesc.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -303,26 +410,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -334,15 +430,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -351,6 +443,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -399,10 +506,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -487,18 +599,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/tracker/TrackerValueDesc.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/tracker/TrackerValueDesc.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/tracker/TrackerValueDesc.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/tracker/TrackerValueDesc.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Sept 2002 -/// @version $Id: TrackerValueDesc.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TrackerValueDesc.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Storage for a tracked value /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/tracker/TrackerValueDesc.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/tracker/TrackerValueDesc.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/tracker/TrackerValueDesc.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/tracker/TrackerValueDesc.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: TrackerValueDesc.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TrackerValueDesc.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Representation of a timeline of floats with their names and moments /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIAppEnum.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIAppEnum.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIAppEnum.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIAppEnum.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Andreas Gaubatz /// @date Mon, 08.03.2004 -/// @version $Id: GUIAppEnum.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIAppEnum.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Message and object IDs used by the FOX-version of the gui /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -73,6 +73,8 @@ MID_OPEN_CONFIG, /// Open network - ID MID_OPEN_NETWORK, + /// Load additional file with poi and polygons + MID_OPEN_SHAPES, /// Reload the previously loaded simulation MID_RELOAD, /// Loads a file previously loaded @@ -135,6 +137,8 @@ MID_APPSETTINGS, /// Gaming mode - menu entry MID_GAMING, + /// Fullscreen mode - menu entry + MID_FULLSCREEN, /// Locator configuration - menu entry MID_LISTINTERNAL, /// The Simulation delay control @@ -159,6 +163,8 @@ MID_LOCATEEDGE, /// Locate vehicle - button MID_LOCATEVEHICLE, + /// Locate person - button + MID_LOCATEPERSON, /// Locate TLS - button MID_LOCATETLS, /// Locate addtional structure - button @@ -251,6 +257,10 @@ MID_SHOW_FOES, MID_SHOW_LFLINKITEMS, MID_HIDE_LFLINKITEMS, + /// Show persons's path on walkingarea + MID_SHOW_WALKINGAREA_PATH, + /// Hide persons's path on walkingarea + MID_HIDE_WALKINGAREA_PATH, //@} @@ -413,6 +423,14 @@ MID_GNE_OPEN_ATTRIBUTE_EDITOR, /** split an edge */ MID_GNE_SPLIT_EDGE, + /** split an edge */ + MID_GNE_SPLIT_EDGE_BIDI, + /** reverse an edge */ + MID_GNE_REVERSE_EDGE, + /** add reverse edge */ + MID_GNE_ADD_REVERSE_EDGE, + /** edit junction shape */ + MID_GNE_NODE_SHAPE, /** set non-default geometry endpoint */ MID_GNE_SET_EDGE_ENDPOINT, /** restore geometry endpoint to node position */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDanielPerspectiveChanger.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDanielPerspectiveChanger.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDanielPerspectiveChanger.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDanielPerspectiveChanger.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIDanielPerspectiveChanger.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDanielPerspectiveChanger.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A class that allows to steer the visual output in dependence to /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -199,7 +199,7 @@ const int xdiff = myMouseXPosition - e->win_x; const int ydiff = myMouseYPosition - e->win_y; const bool moved = xdiff != 0 || ydiff != 0; - const bool pastDelay = FXThread::time() > (myMouseDownTime + myDragDelay); + const bool pastDelay = !gSchemeStorage.getDefault().gaming && FXThread::time() > (myMouseDownTime + myDragDelay); switch (myMouseButtonState) { case MOUSEBTN_LEFT: if (pastDelay) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDanielPerspectiveChanger.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDanielPerspectiveChanger.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDanielPerspectiveChanger.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDanielPerspectiveChanger.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIDanielPerspectiveChanger.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDanielPerspectiveChanger.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A class that allows to steer the visual output in dependence to /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_EditViewport.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_EditViewport.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_EditViewport.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_EditViewport.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file GUIDialog_EditViewport.cpp /// @author Daniel Krajzewicz /// @author Laura Bieker +/// @author Michael Behrisch /// @date Mon, 25.04.2005 -/// @version $Id: GUIDialog_EditViewport.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDialog_EditViewport.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // A dialog to change the viewport /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -79,43 +80,21 @@ ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT); } FXMatrix* m1 = new FXMatrix(f1, 2, MATRIX_BY_COLUMNS); - { - new FXLabel(m1, "Zoom:", 0, LAYOUT_CENTER_Y); - myZoom = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - myZoom->setRange(0.0001, 100000); - myZoom->setNumberFormat(4); - } - { - new FXLabel(m1, "X:", 0, LAYOUT_CENTER_Y); - myXOff = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - myXOff->setRange(-1000000, 1000000); - myXOff->setNumberFormat(4); - } - { - new FXLabel(m1, "Y:", 0, LAYOUT_CENTER_Y); - myYOff = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - myYOff->setRange(-1000000, 1000000); - myYOff->setNumberFormat(4); - } + new FXLabel(m1, "Zoom:", 0, LAYOUT_CENTER_Y); + myZoom = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); + myZoom->setRange(0.0001, 100000); + myZoom->setNumberFormat(4); + new FXLabel(m1, "X:", 0, LAYOUT_CENTER_Y); + myXOff = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK | SPINDIAL_NOMIN | SPINDIAL_NOMAX); + new FXLabel(m1, "Y:", 0, LAYOUT_CENTER_Y); + myYOff = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK | SPINDIAL_NOMIN | SPINDIAL_NOMAX); #ifdef HAVE_OSG - { - new FXLabel(m1, "LookAtX:", 0, LAYOUT_CENTER_Y); - myLookAtX = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - myLookAtX->setRange(-1000000, 100000); - myLookAtX->setNumberFormat(4); - } - { - new FXLabel(m1, "LookAtY:", 0, LAYOUT_CENTER_Y); - myLookAtY = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - myLookAtY->setRange(-1000000, 1000000); - myLookAtY->setNumberFormat(4); - } - { - new FXLabel(m1, "LookAtZ:", 0, LAYOUT_CENTER_Y); - myLookAtZ = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - myLookAtZ->setRange(-1000000, 1000000); - myLookAtZ->setNumberFormat(4); - } + new FXLabel(m1, "LookAtX:", 0, LAYOUT_CENTER_Y); + myLookAtX = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK | SPINDIAL_NOMIN | SPINDIAL_NOMAX); + new FXLabel(m1, "LookAtY:", 0, LAYOUT_CENTER_Y); + myLookAtY = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK | SPINDIAL_NOMIN | SPINDIAL_NOMAX); + new FXLabel(m1, "LookAtZ:", 0, LAYOUT_CENTER_Y); + myLookAtZ = new FXRealSpinDial(m1, 16, this, MID_CHANGED, LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK | SPINDIAL_NOMIN | SPINDIAL_NOMAX); #endif // ok/cancel new FXHorizontalSeparator(f1, SEPARATOR_GROOVE | LAYOUT_FILL_X); @@ -195,24 +174,15 @@ long GUIDialog_EditViewport::onCmdSave(FXObject*, FXSelector, void* /*data*/) { - FXFileDialog opendialog(this, "Save Viewport"); - opendialog.setIcon(GUIIconSubSys::getIcon(ICON_EMPTY)); - opendialog.setSelectMode(SELECTFILE_ANY); - opendialog.setPatternList("*.xml"); - if (gCurrentFolder.length() != 0) { - opendialog.setDirectory(gCurrentFolder); - } - if (!opendialog.execute() || !MFXUtils::userPermitsOverwritingWhenFileExists(this, opendialog.getFilename())) { + FXString file = MFXUtils::getFilename2Write(this, "Save Viewport", ".xml", GUIIconSubSys::getIcon(ICON_EMPTY), gCurrentFolder); + if (file == "") { return 1; } try { - OutputDevice& dev = OutputDevice::getDevice(opendialog.getFilename().text()); - dev << "\n"; - dev << " getValue() << "\" x=\"" << myXOff->getValue() << "\" y=\"" << myYOff->getValue(); -#ifdef HAVE_OSG - dev << "\" centerX=\"" << myLookAtX->getValue() << "\" centerY=\"" << myLookAtY->getValue() << "\" centerZ=\"" << myLookAtZ->getValue(); -#endif - dev << "\"/>\n\n"; + OutputDevice& dev = OutputDevice::getDevice(file.text()); + dev.openTag(SUMO_TAG_VIEWSETTINGS); + writeXML(dev); + dev.closeTag(); dev.close(); } catch (IOError& e) { FXMessageBox::error(this, MBOX_OK, "Storing failed!", "%s", e.what()); @@ -222,6 +192,20 @@ void +GUIDialog_EditViewport::writeXML(OutputDevice& dev) { + dev.openTag(SUMO_TAG_VIEWPORT); + dev.writeAttr(SUMO_ATTR_ZOOM, myZoom->getValue()); + dev.writeAttr(SUMO_ATTR_X, myXOff->getValue()); + dev.writeAttr(SUMO_ATTR_Y, myYOff->getValue()); +#ifdef HAVE_OSG + dev.writeAttr(SUMO_ATTR_CENTER_X, myLookAtX->getValue()); + dev.writeAttr(SUMO_ATTR_CENTER_Y, myLookAtY->getValue()); + dev.writeAttr(SUMO_ATTR_CENTER_Z, myLookAtZ->getValue()); +#endif + dev.closeTag(); +} + +void GUIDialog_EditViewport::setValues(SUMOReal zoom, SUMOReal xoff, SUMOReal yoff) { myZoom->setValue(zoom); myXOff->setValue(xoff); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_EditViewport.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_EditViewport.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_EditViewport.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_EditViewport.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2005-05-04 -/// @version $Id: GUIDialog_EditViewport.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDialog_EditViewport.h 18096 2015-03-17 09:50:59Z behrisch $ /// // A dialog to change the viewport /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -97,7 +97,8 @@ long onCmdSave(FXObject*, FXSelector, void*); /// @} - + /// write the settings to the given device + void writeXML(OutputDevice& dev); /** @brief Sets the given values into the dialog * @param[in] zoom Current view's zoom diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_GLObjChooser.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_GLObjChooser.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_GLObjChooser.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_GLObjChooser.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIDialog_GLObjChooser.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDialog_GLObjChooser.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Class for the window that allows to choose a street, junction or vehicle /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -70,11 +70,9 @@ GUIGlChildWindow* parent, FXIcon* icon, const FXString& title, - GUIGlObjectType type, const std::vector& ids, GUIGlObjectStorage& glStorage): FXMainWindow(parent->getApp(), title, icon, NULL, DECOR_ALL, 20, 20, 300, 300), - myObjectType(type), myParent(parent) { FXHorizontalFrame* hbox = new FXHorizontalFrame(this, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0); // build the list @@ -96,9 +94,9 @@ } // build the buttons FXVerticalFrame* layout = new FXVerticalFrame(hbox, LAYOUT_TOP, 0, 0, 0, 0, 4, 4, 4, 4); - new FXButton(layout, "Center\t\t", GUIIconSubSys::getIcon(ICON_RECENTERVIEW), - this, MID_CHOOSER_CENTER, ICON_BEFORE_TEXT | LAYOUT_FILL_X | FRAME_THICK | FRAME_RAISED, - 0, 0, 0, 0, 4, 4, 4, 4); + myCenterButton = new FXButton(layout, "Center\t\t", GUIIconSubSys::getIcon(ICON_RECENTERVIEW), + this, MID_CHOOSER_CENTER, ICON_BEFORE_TEXT | LAYOUT_FILL_X | FRAME_THICK | FRAME_RAISED, + 0, 0, 0, 0, 4, 4, 4, 4); new FXHorizontalSeparator(layout, SEPARATOR_GROOVE | LAYOUT_FILL_X); new FXButton(layout, "Hide Unselected\t\t", GUIIconSubSys::getIcon(ICON_FLAG), this, MID_CHOOSER_FILTER, ICON_BEFORE_TEXT | LAYOUT_FILL_X | FRAME_THICK | FRAME_RAISED, @@ -109,7 +107,6 @@ 0, 0, 0, 0, 4, 4, 4, 4); myParent->getParent()->addChild(this); - myTextEntry->setFocus(); } @@ -118,6 +115,13 @@ } +void +GUIDialog_GLObjChooser::show() { + FXMainWindow::show(); + myTextEntry->setFocus(); +} + + long GUIDialog_GLObjChooser::onCmdCenter(FXObject*, FXSelector, void*) { int selected = myList->getCurrentItem(); @@ -139,12 +143,17 @@ GUIDialog_GLObjChooser::onChgText(FXObject*, FXSelector, void*) { int id = myList->findItem(myTextEntry->getText(), -1, SEARCH_PREFIX); if (id < 0) { + if (myList->getNumItems() > 0) { + myList->deselectItem(myList->getCurrentItem()); + } + myCenterButton->disable(); return 1; } myList->deselectItem(myList->getCurrentItem()); myList->makeItemVisible(id); myList->selectItem(id); myList->setCurrentItem(id, true); + myCenterButton->enable(); return 1; } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_GLObjChooser.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_GLObjChooser.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_GLObjChooser.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_GLObjChooser.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIDialog_GLObjChooser.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDialog_GLObjChooser.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Class for the window that allows to choose a street, junction or vehicle /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -65,11 +65,9 @@ * @param[in] parent The calling view * @param[in] icon The icon to use * @param[in] title The title to use - * @param[in] type The type of gl-objects to show instances of * @param[in] glStorage The storage to retrieve ids from */ GUIDialog_GLObjChooser(GUIGlChildWindow* parent, FXIcon* icon, const FXString& title, - GUIGlObjectType type, const std::vector& ids, GUIGlObjectStorage& glStorage); @@ -109,13 +107,15 @@ long onCmdFilter(FXObject*, FXSelector, void*); /// @} + /// @brief sets the focus after the window is created to work-around bug in libfox + void show(); private: /// @brief The list that holds the ids FXList* myList; - /// @brief The artifact to choose - GUIGlObjectType myObjectType; + /// @brief The button that triggers centering on the select object + FXButton* myCenterButton; /// @brief The parent window GUIGlChildWindow* myParent; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_ViewSettings.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_ViewSettings.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_ViewSettings.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_ViewSettings.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Wed, 21. Dec 2005 -/// @version $Id: GUIDialog_ViewSettings.cpp 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: GUIDialog_ViewSettings.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // The dialog to change the view (gui) settings. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -46,6 +46,7 @@ #include #include #include +#include "GUIDialog_EditViewport.h" #include "GUIDialog_ViewSettings.h" #ifdef CHECK_MEMORY_LEAKS @@ -89,9 +90,10 @@ GUIVisualizationSettings* settings, std::vector* decals, MFXMutex* decalsLock) : - FXDialogBox(parent, "View Settings", DECOR_TITLE | DECOR_BORDER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), + FXDialogBox(parent, "View Settings", DECOR_TITLE | DECOR_BORDER | DECOR_RESIZE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), myParent(parent), mySettings(settings), - myDecals(decals), myDecalsLock(decalsLock), myDecalsTable(0) { + myDecals(decals), myDecalsLock(decalsLock), + myDecalsTable(0) { myBackup = (*mySettings); FXVerticalFrame* contentFrame = @@ -124,6 +126,12 @@ GUIIconSubSys::getIcon(ICON_OPEN_CONFIG), this, MID_SIMPLE_VIEW_IMPORT, ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT); + new FXVerticalSeparator(frame0); + new FXLabel(frame0, "Export includes:", 0, LAYOUT_CENTER_Y); + mySaveViewPort = new FXCheckButton(frame0, "Viewport"); + mySaveDelay = new FXCheckButton(frame0, "Delay"); + mySaveDecals = new FXCheckButton(frame0, "Decals"); + } // FXTabBook* tabbook = @@ -132,8 +140,9 @@ { // tab for the background new FXTabItem(tabbook, "Background", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4); + FXScrollWindow* genScroll = new FXScrollWindow(tabbook); FXVerticalFrame* frame1 = - new FXVerticalFrame(tabbook, FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); + new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); FXMatrix* m11 = new FXMatrix(frame1, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, @@ -185,26 +194,44 @@ { // tab for the streets new FXTabItem(tabbook, "Streets", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4); - + FXScrollWindow* genScroll = new FXScrollWindow(tabbook); FXVerticalFrame* frame2 = - new FXVerticalFrame(tabbook, FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); + new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); + // ... color settings + FXVerticalFrame* frame22 = + new FXVerticalFrame(frame2, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); FXMatrix* m21 = - new FXMatrix(frame2, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, + new FXMatrix(frame22, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, 0, 0, 0, 0, 10, 10, 10, 2, 5, 5); new FXLabel(m21, "Color", 0, LAYOUT_CENTER_Y); myLaneEdgeColorMode = new FXComboBox(m21, 30, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC); - myLaneEdgeColorMode->setNumVisible(10); myLaneColorInterpolation = new FXCheckButton(m21, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL); - FXScrollWindow* genScroll = new FXScrollWindow(frame2, LAYOUT_FILL_X | LAYOUT_SIDE_TOP | FRAME_RAISED | FRAME_THICK | LAYOUT_FIX_HEIGHT, 0, 0, 0, 80); - myLaneColorSettingFrame = - new FXVerticalFrame(genScroll, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2); -//we should insert a FXScrollWindow around the frame2 + myLaneColorSettingFrame = new FXVerticalFrame(frame22, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2); + + new FXHorizontalSeparator(frame2, SEPARATOR_GROOVE | LAYOUT_FILL_X); + // ... scale settings + FXVerticalFrame* frame23 = + new FXVerticalFrame(frame2, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); + FXMatrix* m23 = + new FXMatrix(frame23, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, + 0, 0, 0, 0, 10, 10, 10, 2, 5, 5); + new FXLabel(m23, "Scale width", 0, LAYOUT_CENTER_Y); + myLaneEdgeScaleMode = new FXComboBox(m23, 30, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC); + myLaneScaleInterpolation = new FXCheckButton(m23, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL); + myLaneScaleSettingFrame = new FXVerticalFrame(frame23, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2); + #ifdef HAVE_INTERNAL if (GUIVisualizationSettings::UseMesoSim) { mySettings->edgeColorer.fill(*myLaneEdgeColorMode); + mySettings->edgeScaler.fill(*myLaneEdgeScaleMode); + myLaneEdgeColorMode->setNumVisible((int)mySettings->edgeColorer.size()); + myLaneEdgeScaleMode->setNumVisible((int)mySettings->edgeScaler.size()); } else { #endif mySettings->laneColorer.fill(*myLaneEdgeColorMode); + mySettings->laneScaler.fill(*myLaneEdgeScaleMode); + myLaneEdgeColorMode->setNumVisible((int)mySettings->laneColorer.size()); + myLaneEdgeScaleMode->setNumVisible((int)mySettings->laneScaler.size()); #ifdef HAVE_INTERNAL } #endif @@ -236,12 +263,14 @@ myEdgeNamePanel = new NamePanel(m22, this, "Show edge name", mySettings->edgeName); myStreetNamePanel = new NamePanel(m22, this, "Show street name", mySettings->streetName); myInternalEdgeNamePanel = new NamePanel(m22, this, "Show internal edge name", mySettings->internalEdgeName); + myCwaEdgeNamePanel = new NamePanel(m22, this, "Show crossing and walkingarea name", mySettings->cwaEdgeName); } { // vehicles new FXTabItem(tabbook, "Vehicles", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4); + FXScrollWindow* genScroll = new FXScrollWindow(tabbook); FXVerticalFrame* frame3 = - new FXVerticalFrame(tabbook, FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); + new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); FXMatrix* m31 = new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, @@ -263,12 +292,11 @@ new FXLabel(m32, "Color", 0, LAYOUT_CENTER_Y); myVehicleColorMode = new FXComboBox(m32, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC); mySettings->vehicleColorer.fill(*myVehicleColorMode); - myVehicleColorMode->setNumVisible(10); + myVehicleColorMode->setNumVisible((int)mySettings->vehicleColorer.size()); myVehicleColorInterpolation = new FXCheckButton(m32, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL); - FXScrollWindow* genScroll = new FXScrollWindow(frame3, LAYOUT_FILL_X | LAYOUT_SIDE_TOP | FRAME_RAISED | FRAME_THICK | LAYOUT_FIX_HEIGHT, 0, 0, 0, 80); myVehicleColorSettingFrame = - new FXVerticalFrame(genScroll, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2); + new FXVerticalFrame(frame3, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2); new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X); @@ -281,6 +309,9 @@ myShowMinGap = new FXCheckButton(m33, "Show minimum gap", this, MID_SIMPLE_VIEW_COLORCHANGE); myShowMinGap->setCheck(mySettings->drawMinGap); new FXLabel(m33, " ", 0, LAYOUT_CENTER_Y); + myShowBTRange = new FXCheckButton(m33, "Show Bluetooth range", this, MID_SIMPLE_VIEW_COLORCHANGE); + myShowBTRange->setCheck(mySettings->showBTRange); + new FXLabel(m33, " ", 0, LAYOUT_CENTER_Y); /* myShowLaneChangePreference = new FXCheckButton(m33, "Show lane change preference", this, MID_SIMPLE_VIEW_COLORCHANGE); myShowLaneChangePreference->setCheck(mySettings->drawLaneChangePreference); @@ -299,30 +330,15 @@ FXMatrix* m34 = new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS, 0, 0, 0, 0, 10, 10, 10, 10, 5, 5); - FXMatrix* m341 = - new FXMatrix(m34, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS, - 0, 0, 0, 0, 10, 10, 0, 0, 5, 5); - new FXLabel(m341, "Minimum size", 0, LAYOUT_CENTER_Y); - myVehicleMinSizeDialer = - new FXRealSpinDial(m341, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, - LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - myVehicleMinSizeDialer->setValue(mySettings->minVehicleSize); - FXMatrix* m342 = - new FXMatrix(m34, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS, - 0, 0, 0, 0, 10, 10, 0, 0, 5, 5); - new FXLabel(m342, "Exaggerate by", 0, LAYOUT_CENTER_Y); - myVehicleUpscaleDialer = - new FXRealSpinDial(m342, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, - LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - myVehicleUpscaleDialer->setRange(0, 10000); - myVehicleUpscaleDialer->setValue(mySettings->vehicleExaggeration); + myVehicleSizePanel = new SizePanel(m34, this, mySettings->vehicleSize); } { // persons new FXTabItem(tabbook, "Persons", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4); + FXScrollWindow* genScroll = new FXScrollWindow(tabbook); FXVerticalFrame* frame3 = - new FXVerticalFrame(tabbook, FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); + new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); FXMatrix* m101 = new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, @@ -347,9 +363,8 @@ myPersonColorMode->setNumVisible(10); myPersonColorInterpolation = new FXCheckButton(m102, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL); - FXScrollWindow* genScroll = new FXScrollWindow(frame3, LAYOUT_FILL_X | LAYOUT_SIDE_TOP | FRAME_RAISED | FRAME_THICK | LAYOUT_FIX_HEIGHT, 0, 0, 0, 80); myPersonColorSettingFrame = - new FXVerticalFrame(genScroll, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2); + new FXVerticalFrame(frame3, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2); new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X); @@ -363,41 +378,73 @@ FXMatrix* m104 = new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS, 0, 0, 0, 0, 10, 10, 10, 10, 5, 5); - FXMatrix* m1041 = - new FXMatrix(m104, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS, - 0, 0, 0, 0, 10, 10, 0, 0, 5, 5); - new FXLabel(m1041, "Minimum size", 0, LAYOUT_CENTER_Y); - myPersonMinSizeDialer = - new FXRealSpinDial(m1041, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, - LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - myPersonMinSizeDialer->setValue(mySettings->minPersonSize); - FXMatrix* m1042 = - new FXMatrix(m104, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS, - 0, 0, 0, 0, 10, 10, 0, 0, 5, 5); - new FXLabel(m1042, "Exaggerate by", 0, LAYOUT_CENTER_Y); - myPersonUpscaleDialer = - new FXRealSpinDial(m1042, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, - LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - myPersonUpscaleDialer->setRange(0, 10000); - myPersonUpscaleDialer->setValue(mySettings->personExaggeration); + myPersonSizePanel = new SizePanel(m104, this, mySettings->personSize); + } + + { + // containers + new FXTabItem(tabbook, "Containers", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4); + FXScrollWindow* genScroll = new FXScrollWindow(tabbook); + FXVerticalFrame* frame3 = + new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); + + FXMatrix* m101 = + new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, + 0, 0, 0, 0, 10, 10, 10, 2, 5, 5); + new FXLabel(m101, "Show As", 0, LAYOUT_CENTER_Y); + myContainerShapeDetail = new FXComboBox(m101, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC); + myContainerShapeDetail->appendItem("'triangles'"); + myContainerShapeDetail->appendItem("'boxes'"); + myContainerShapeDetail->appendItem("'simple shapes'"); + myContainerShapeDetail->appendItem("'raster images'"); + myContainerShapeDetail->setNumVisible(4); + myContainerShapeDetail->setCurrentItem(settings->containerQuality); + + new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X); + + FXMatrix* m102 = + new FXMatrix(frame3, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, + 0, 0, 0, 0, 10, 10, 10, 2, 5, 5); + new FXLabel(m102, "Color", 0, LAYOUT_CENTER_Y); + myContainerColorMode = new FXComboBox(m102, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC); + mySettings->containerColorer.fill(*myContainerColorMode); + myContainerColorMode->setNumVisible(9); + myContainerColorInterpolation = new FXCheckButton(m102, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL); + + myContainerColorSettingFrame = + new FXVerticalFrame(frame3, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2); + + new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X); + + FXMatrix* m103 = + new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, + 0, 0, 0, 0, 10, 10, 10, 10, 5, 5); + myContainerNamePanel = new NamePanel(m103, this, "Show container name", mySettings->containerName); + + new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X); + + FXMatrix* m104 = + new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS, + 0, 0, 0, 0, 10, 10, 10, 10, 5, 5); + myContainerSizePanel = new SizePanel(m104, this, mySettings->containerSize); } { // nodes - new FXTabItem(tabbook, "Nodes", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4); + new FXTabItem(tabbook, "Junctions", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4); + FXScrollWindow* genScroll = new FXScrollWindow(tabbook); FXVerticalFrame* frame4 = - new FXVerticalFrame(tabbook, FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); + new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); FXMatrix* m41 = new FXMatrix(frame4, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, 0, 0, 0, 0, 10, 10, 10, 2, 5, 5); new FXLabel(m41, "Color", 0, LAYOUT_CENTER_Y); myJunctionColorMode = new FXComboBox(m41, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC); mySettings->junctionColorer.fill(*myJunctionColorMode); - myJunctionColorMode->setNumVisible(2); + myJunctionColorMode->setNumVisible(3); myJunctionColorInterpolation = new FXCheckButton(m41, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL); - FXScrollWindow* genScroll = new FXScrollWindow(frame4, LAYOUT_FILL_X | LAYOUT_SIDE_TOP | FRAME_RAISED | FRAME_THICK | LAYOUT_FIX_HEIGHT, 0, 0, 0, 80); myJunctionColorSettingFrame = - new FXVerticalFrame(genScroll, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2); + new FXVerticalFrame(frame4, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2); new FXHorizontalSeparator(frame4, SEPARATOR_GROOVE | LAYOUT_FILL_X); FXMatrix* m42 = @@ -414,10 +461,14 @@ new FXLabel(m42, " ", 0, LAYOUT_CENTER_Y); myJunctionNamePanel = new NamePanel(m42, this, "Show junction name", mySettings->junctionName); myInternalJunctionNamePanel = new NamePanel(m42, this, "Show internal junction name", mySettings->internalJunctionName); + myDrawJunctionShape = new FXCheckButton(m42, "Draw junction shape", this, MID_SIMPLE_VIEW_COLORCHANGE); + myDrawJunctionShape->setCheck(mySettings->drawJunctionShape); } { + // detectors / triggers new FXTabItem(tabbook, "Detectors/Trigger", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4); + FXScrollWindow* genScroll = new FXScrollWindow(tabbook); FXVerticalFrame* frame5 = - new FXVerticalFrame(tabbook, FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); + new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); FXMatrix* m51 = new FXMatrix(frame5, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, @@ -428,24 +479,7 @@ FXMatrix* m52 = new FXMatrix(frame5, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, 0, 0, 0, 0, 10, 10, 10, 10, 5, 5); - FXMatrix* m521 = - new FXMatrix(m52, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, - 0, 0, 0, 0, 10, 10, 0, 0, 5, 5); - new FXLabel(m521, "Minimum size", 0, LAYOUT_CENTER_Y); - myDetectorMinSizeDialer = - new FXRealSpinDial(m521, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, - LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - FXMatrix* m522 = - new FXMatrix(m52, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, - 0, 0, 0, 0, 10, 10, 0, 0, 5, 5); - myDetectorMinSizeDialer->setValue(mySettings->minAddSize); - new FXLabel(m522, "Exaggerate by", 0, LAYOUT_CENTER_Y); - myDetectorUpscaleDialer = - new FXRealSpinDial(m522, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, - LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - myDetectorUpscaleDialer->setRange(0, 10000); - myDetectorUpscaleDialer->setValue(mySettings->addExaggeration); - + myAddSizePanel = new SizePanel(m52, this, mySettings->addSize); /* new FXLabel(m522, "Color", 0, LAYOUT_CENTER_Y); @@ -455,9 +489,11 @@ 0, 0, 100, 0, 0, 0, 0, 0); */ } { + // POIs new FXTabItem(tabbook, "POIs", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4); + FXScrollWindow* genScroll = new FXScrollWindow(tabbook); FXVerticalFrame* frame6 = - new FXVerticalFrame(tabbook, FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); + new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); FXMatrix* m61 = new FXMatrix(frame6, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, @@ -468,29 +504,14 @@ FXMatrix* m62 = new FXMatrix(frame6, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, 0, 0, 0, 0, 10, 10, 10, 10, 5, 5); - FXMatrix* m621 = - new FXMatrix(m62, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, - 0, 0, 0, 0, 10, 10, 0, 0, 5, 5); - new FXLabel(m621, "Minimum size to show", 0, LAYOUT_CENTER_Y); - myPOIMinSizeDialer = - new FXRealSpinDial(m621, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, - LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - FXMatrix* m622 = - new FXMatrix(m62, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, - 0, 0, 0, 0, 10, 10, 0, 0, 5, 5); - myPOIMinSizeDialer->setValue(mySettings->minPOISize); - new FXLabel(m622, "Exaggerate by", 0, LAYOUT_CENTER_Y); - myPOIUpscaleDialer = - new FXRealSpinDial(m622, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, - LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - myPOIUpscaleDialer->setRange(0, 10000); - myPOIUpscaleDialer->setValue(mySettings->addExaggeration); - + myPOISizePanel = new SizePanel(m62, this, mySettings->poiSize); } { + // Polygons new FXTabItem(tabbook, "Polygons", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4); + FXScrollWindow* genScroll = new FXScrollWindow(tabbook); FXVerticalFrame* frame9 = - new FXVerticalFrame(tabbook, FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); + new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); FXMatrix* m91 = new FXMatrix(frame9, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, @@ -498,32 +519,14 @@ myPolyNamePanel = new NamePanel(m91, this, "Show polygon names", mySettings->polyName); new FXHorizontalSeparator(frame9 , SEPARATOR_GROOVE | LAYOUT_FILL_X); - FXMatrix* m92 = - new FXMatrix(frame9, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, - 0, 0, 0, 0, 10, 10, 10, 10, 5, 5); - FXMatrix* m921 = - new FXMatrix(m92, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, - 0, 0, 0, 0, 10, 10, 0, 0, 5, 5); - new FXLabel(m921, "Minimum size to show", 0, LAYOUT_CENTER_Y); - myPolyMinSizeDialer = - new FXRealSpinDial(m921, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, - LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - FXMatrix* m922 = - new FXMatrix(m92, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, - 0, 0, 0, 0, 10, 10, 0, 0, 5, 5); - myPolyMinSizeDialer->setValue(mySettings->minPolySize); - new FXLabel(m922, "Exaggerate by", 0, LAYOUT_CENTER_Y); - myPolyUpscaleDialer = - new FXRealSpinDial(m922, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, - LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); - myPolyUpscaleDialer->setRange(0, 10000); - myPolyUpscaleDialer->setValue(mySettings->addExaggeration); - + myPolySizePanel = new SizePanel(m91, this, mySettings->polySize); }{ + // Legend new FXTabItem(tabbook, "Legend", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4); + FXScrollWindow* genScroll = new FXScrollWindow(tabbook); FXVerticalFrame* frame7 = - new FXVerticalFrame(tabbook, FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); + new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); FXMatrix* m72 = new FXMatrix(frame7, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, @@ -532,9 +535,11 @@ myShowSizeLegend->setCheck(mySettings->showSizeLegend); new FXLabel(m72, ""); } { + // openGL new FXTabItem(tabbook, "openGL", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4); + FXScrollWindow* genScroll = new FXScrollWindow(tabbook); FXVerticalFrame* frame8 = - new FXVerticalFrame(tabbook, FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); + new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2); FXMatrix* m82 = new FXMatrix(frame8, 1, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS, @@ -551,20 +556,34 @@ rebuildColorMatrices(false); setIcon(GUIIconSubSys::getIcon(ICON_EMPTY)); + + const FXint minSize = 400; + setX(MIN2(getApp()->reg().readIntEntry("VIEWSETTINGS", "x", 150), getApp()->getRootWindow()->getWidth() - minSize)); + setY(MIN2(getApp()->reg().readIntEntry("VIEWSETTINGS", "y", 150), getApp()->getRootWindow()->getHeight() - minSize)); + setWidth(MAX2(getApp()->reg().readIntEntry("VIEWSETTINGS", "width", 700), minSize)); + setHeight(MAX2(getApp()->reg().readIntEntry("VIEWSETTINGS", "height", 500), minSize)); } GUIDialog_ViewSettings::~GUIDialog_ViewSettings() { myParent->remove(this); - delete myEdgeNamePanel; + // delete name panels + delete myInternalJunctionNamePanel; delete myInternalEdgeNamePanel; + delete myCwaEdgeNamePanel; delete myStreetNamePanel; delete myJunctionNamePanel; - delete myInternalJunctionNamePanel; delete myVehicleNamePanel; delete myAddNamePanel; delete myPOINamePanel; delete myPolyNamePanel; + delete myEdgeNamePanel; + // delete size panels + delete myVehicleSizePanel; + delete myPersonSizePanel; + delete myPOISizePanel; + delete myPolySizePanel; + delete myAddSizePanel; } @@ -578,6 +597,7 @@ long GUIDialog_ViewSettings::onCmdOk(FXObject*, FXSelector, void*) { + saveWindowSize(); hide(); return 1; } @@ -585,6 +605,7 @@ long GUIDialog_ViewSettings::onCmdCancel(FXObject*, FXSelector, void*) { + saveWindowSize(); hide(); (*mySettings) = myBackup; return 1; @@ -611,31 +632,37 @@ myBackgroundColor->setRGBA(MFXUtils::getFXColor(mySettings->backgroundColor)); myLaneEdgeColorMode->setCurrentItem((FXint) mySettings->getLaneEdgeMode()); + myLaneEdgeScaleMode->setCurrentItem((FXint) mySettings->getLaneEdgeScaleMode()); myShowLaneBorders->setCheck(mySettings->laneShowBorders); myShowLaneDecals->setCheck(mySettings->showLinkDecals); myShowRails->setCheck(mySettings->showRails); myEdgeNamePanel->update(mySettings->edgeName); myInternalEdgeNamePanel->update(mySettings->internalEdgeName); + myCwaEdgeNamePanel->update(mySettings->cwaEdgeName); myStreetNamePanel->update(mySettings->streetName); myHideMacroConnectors->setCheck(mySettings->hideConnectors); myLaneWidthUpscaleDialer->setValue(mySettings->laneWidthExaggeration); myVehicleColorMode->setCurrentItem((FXint) mySettings->vehicleColorer.getActive()); myVehicleShapeDetail->setCurrentItem(mySettings->vehicleQuality); - myVehicleUpscaleDialer->setValue(mySettings->vehicleExaggeration); - myVehicleMinSizeDialer->setValue(mySettings->minVehicleSize); myShowBlinker->setCheck(mySettings->showBlinker); myShowMinGap->setCheck(mySettings->drawMinGap); + myShowBTRange->setCheck(mySettings->showBTRange); /* myShowLaneChangePreference->setCheck(mySettings->drawLaneChangePreference); */ myVehicleNamePanel->update(mySettings->vehicleName); + myVehicleSizePanel->update(mySettings->vehicleSize); myPersonColorMode->setCurrentItem((FXint) mySettings->personColorer.getActive()); myPersonShapeDetail->setCurrentItem(mySettings->personQuality); - myPersonUpscaleDialer->setValue(mySettings->personExaggeration); - myPersonMinSizeDialer->setValue(mySettings->minPersonSize); myPersonNamePanel->update(mySettings->personName); + myPersonSizePanel->update(mySettings->personSize); + + myContainerColorMode->setCurrentItem((FXint) mySettings->containerColorer.getActive()); + myContainerShapeDetail->setCurrentItem(mySettings->containerQuality); + myContainerNamePanel->update(mySettings->containerName); + myContainerSizePanel->update(mySettings->containerSize); myJunctionColorMode->setCurrentItem((FXint) mySettings->junctionColorer.getActive()); myShowTLIndex->setCheck(mySettings->drawLinkTLIndex); @@ -643,19 +670,17 @@ myJunctionNamePanel->update(mySettings->junctionName); myInternalJunctionNamePanel->update(mySettings->internalJunctionName); - myDetectorUpscaleDialer->setValue(mySettings->addExaggeration); - myDetectorMinSizeDialer->setValue(mySettings->minAddSize); myAddNamePanel->update(mySettings->addName); + myAddSizePanel->update(mySettings->addSize); - myPOIUpscaleDialer->setValue(mySettings->poiExaggeration); - myPOIMinSizeDialer->setValue(mySettings->minPOISize); myPOINamePanel->update(mySettings->poiName); + myPOISizePanel->update(mySettings->poiSize); - myPolyUpscaleDialer->setValue(mySettings->polyExaggeration); - myPolyMinSizeDialer->setValue(mySettings->minPolySize); myPolyNamePanel->update(mySettings->polyName); + myPolySizePanel->update(mySettings->polySize); myShowLane2Lane->setCheck(mySettings->showLane2Lane); + myDrawJunctionShape->setCheck(mySettings->drawJunctionShape); myAntialiase->setCheck(mySettings->antialiase); myDither->setCheck(mySettings->dither); myShowSizeLegend->setCheck(mySettings->showSizeLegend); @@ -720,12 +745,67 @@ } +bool +GUIDialog_ViewSettings::updateScaleRanges(FXObject* sender, std::vector::const_iterator scaleIt, + std::vector::const_iterator scaleEnd, + std::vector::const_iterator threshIt, + std::vector::const_iterator threshEnd, + std::vector::const_iterator buttonIt, + GUIScaleScheme& scheme) { + size_t pos = 0; + while (scaleIt != scaleEnd) { + if (scheme.isFixed()) { + if (sender == *scaleIt) { + scheme.setColor(pos, (*scaleIt)->getValue()); + } + } else { + if (sender == *threshIt) { + const SUMOReal val = (*threshIt)->getValue(); + double lo, hi; + if (pos != 0) { + threshIt--; + (*threshIt)->getRange(lo, hi); + (*threshIt)->setRange(lo, val); + threshIt++; + } + threshIt++; + if (threshIt != threshEnd) { + (*threshIt)->getRange(lo, hi); + (*threshIt)->setRange(val, hi); + } + scheme.setThreshold(pos, val); + return false; + } + if (sender == *scaleIt) { + scheme.setColor(pos, (*scaleIt)->getValue()); + return false; + } + if (sender == *buttonIt) { + if (pos == 0) { + scheme.addColor((*scaleIt)->getValue(), (*threshIt)->getValue()); + } else { + scheme.removeColor(pos); + } + return true; + } + ++threshIt; + ++buttonIt; + } + ++scaleIt; + pos++; + } + return false; +} + + long GUIDialog_ViewSettings::onCmdColorChange(FXObject* sender, FXSelector, void* /*val*/) { GUIVisualizationSettings tmpSettings = *mySettings; size_t prevLaneMode = mySettings->getLaneEdgeMode(); + size_t prevLaneScaleMode = mySettings->getLaneEdgeScaleMode(); size_t prevVehicleMode = mySettings->vehicleColorer.getActive(); size_t prevPersonMode = mySettings->personColorer.getActive(); + size_t prevContainerMode = mySettings->containerColorer.getActive(); size_t prevJunctionMode = mySettings->junctionColorer.getActive(); bool doRebuildColorMatrices = false; @@ -738,9 +818,11 @@ #ifdef HAVE_INTERNAL if (GUIVisualizationSettings::UseMesoSim) { tmpSettings.edgeColorer.setActive(myLaneEdgeColorMode->getCurrentItem()); + tmpSettings.edgeScaler.setActive(myLaneEdgeScaleMode->getCurrentItem()); } else { #endif tmpSettings.laneColorer.setActive(myLaneEdgeColorMode->getCurrentItem()); + tmpSettings.laneScaler.setActive(myLaneEdgeScaleMode->getCurrentItem()); #ifdef HAVE_INTERNAL } #endif @@ -749,26 +831,31 @@ tmpSettings.showRails = (myShowRails->getCheck() != FALSE); tmpSettings.edgeName = myEdgeNamePanel->getSettings(); tmpSettings.internalEdgeName = myInternalEdgeNamePanel->getSettings(); + tmpSettings.cwaEdgeName = myCwaEdgeNamePanel->getSettings(); tmpSettings.streetName = myStreetNamePanel->getSettings(); tmpSettings.hideConnectors = (myHideMacroConnectors->getCheck() != FALSE); tmpSettings.laneWidthExaggeration = (SUMOReal) myLaneWidthUpscaleDialer->getValue(); tmpSettings.vehicleColorer.setActive(myVehicleColorMode->getCurrentItem()); tmpSettings.vehicleQuality = myVehicleShapeDetail->getCurrentItem(); - tmpSettings.vehicleExaggeration = (SUMOReal) myVehicleUpscaleDialer->getValue(); - tmpSettings.minVehicleSize = (SUMOReal) myVehicleMinSizeDialer->getValue(); tmpSettings.showBlinker = (myShowBlinker->getCheck() != FALSE); tmpSettings.drawMinGap = (myShowMinGap->getCheck() != FALSE); + tmpSettings.showBTRange = (myShowBTRange->getCheck() != FALSE); /* tmpSettings.drawLaneChangePreference = (myShowLaneChangePreference->getCheck() != FALSE); */ tmpSettings.vehicleName = myVehicleNamePanel->getSettings(); + tmpSettings.vehicleSize = myVehicleSizePanel->getSettings(); tmpSettings.personColorer.setActive(myPersonColorMode->getCurrentItem()); tmpSettings.personQuality = myPersonShapeDetail->getCurrentItem(); - tmpSettings.personExaggeration = (SUMOReal) myPersonUpscaleDialer->getValue(); - tmpSettings.minPersonSize = (SUMOReal) myPersonMinSizeDialer->getValue(); tmpSettings.personName = myPersonNamePanel->getSettings(); + tmpSettings.personSize = myPersonSizePanel->getSettings(); + + tmpSettings.containerColorer.setActive(myContainerColorMode->getCurrentItem()); + tmpSettings.containerQuality = myContainerShapeDetail->getCurrentItem(); + tmpSettings.containerName = myContainerNamePanel->getSettings(); + tmpSettings.containerSize = myContainerSizePanel->getSettings(); tmpSettings.junctionColorer.setActive(myJunctionColorMode->getCurrentItem()); tmpSettings.drawLinkTLIndex = (myShowTLIndex->getCheck() != FALSE); @@ -776,24 +863,22 @@ tmpSettings.junctionName = myJunctionNamePanel->getSettings(); tmpSettings.internalJunctionName = myInternalJunctionNamePanel->getSettings(); - tmpSettings.addExaggeration = (SUMOReal) myDetectorUpscaleDialer->getValue(); - tmpSettings.minAddSize = (SUMOReal) myDetectorMinSizeDialer->getValue(); tmpSettings.addName = myAddNamePanel->getSettings(); + tmpSettings.addSize = myAddSizePanel->getSettings(); - tmpSettings.poiExaggeration = (SUMOReal) myPOIUpscaleDialer->getValue(); - tmpSettings.minPOISize = (SUMOReal) myPOIMinSizeDialer->getValue(); tmpSettings.poiName = myPOINamePanel->getSettings(); + tmpSettings.poiSize = myPOISizePanel->getSettings(); - tmpSettings.polyExaggeration = (SUMOReal) myPolyUpscaleDialer->getValue(); - tmpSettings.minPolySize = (SUMOReal) myPolyMinSizeDialer->getValue(); tmpSettings.polyName = myPolyNamePanel->getSettings(); + tmpSettings.polySize = myPolySizePanel->getSettings(); tmpSettings.showLane2Lane = (myShowLane2Lane->getCheck() != FALSE); + tmpSettings.drawJunctionShape = (myDrawJunctionShape->getCheck() != FALSE); tmpSettings.antialiase = (myAntialiase->getCheck() != FALSE); tmpSettings.dither = (myDither->getCheck() != FALSE); tmpSettings.showSizeLegend = (myShowSizeLegend->getCheck() != FALSE); - // lanes + // lanes (colors) if (tmpSettings.getLaneEdgeMode() == prevLaneMode) { if (updateColorRanges(sender, myLaneColors.begin(), myLaneColors.end(), myLaneThresholds.begin(), myLaneThresholds.end(), myLaneButtons.begin(), @@ -807,6 +892,20 @@ } else { doRebuildColorMatrices = true; } + // lanes (scaling) + if (tmpSettings.getLaneEdgeScaleMode() == prevLaneScaleMode) { + if (updateScaleRanges(sender, myLaneScales.begin(), myLaneScales.end(), + myLaneScaleThresholds.begin(), myLaneScaleThresholds.end(), myLaneScaleButtons.begin(), + tmpSettings.getLaneEdgeScaleScheme())) { + doRebuildColorMatrices = true; + } + if (sender == myLaneScaleInterpolation) { + tmpSettings.getLaneEdgeScaleScheme().setInterpolated(myLaneScaleInterpolation->getCheck() != FALSE); + doRebuildColorMatrices = true; + } + } else { + doRebuildColorMatrices = true; + } // vehicles if (tmpSettings.vehicleColorer.getActive() == prevVehicleMode) { if (updateColorRanges(sender, myVehicleColors.begin(), myVehicleColors.end(), @@ -835,6 +934,20 @@ } else { doRebuildColorMatrices = true; } + // containers + if (tmpSettings.containerColorer.getActive() == prevContainerMode) { + if (updateColorRanges(sender, myContainerColors.begin(), myContainerColors.end(), + myContainerThresholds.begin(), myContainerThresholds.end(), myContainerButtons.begin(), + tmpSettings.containerColorer.getScheme())) { + doRebuildColorMatrices = true; + } + if (sender == myContainerColorInterpolation) { + tmpSettings.containerColorer.getScheme().setInterpolated(myContainerColorInterpolation->getCheck() != FALSE); + doRebuildColorMatrices = true; + } + } else { + doRebuildColorMatrices = true; + } // junctions if (tmpSettings.junctionColorer.getActive() == prevJunctionMode) { if (updateColorRanges(sender, myJunctionColors.begin(), myJunctionColors.end(), @@ -895,34 +1008,40 @@ mySchemeName->setCurrentItem(index); mySettings = &gSchemeStorage.get(settingsName); } + if (handler.hasDecals()) { + myDecalsLock->lock(); + (*myDecals) = handler.getDecals(); + rebuildList(); + myParent->update(); + myDecalsLock->unlock(); + } + Position lookFrom, lookAt; + handler.setViewport(lookFrom, lookAt); + if (lookFrom.z() > 0) { + myParent->setViewport(lookFrom, lookAt); + } + rebuildColorMatrices(true); } void -GUIDialog_ViewSettings::saveDecals(const std::string& file) const { - try { - OutputDevice& dev = OutputDevice::getDevice(file); - dev << "\n"; - std::vector::iterator j; - for (j = myDecals->begin(); j != myDecals->end(); ++j) { - GUISUMOAbstractView::Decal& d = *j; - dev << " \n"; - } - dev << "\n"; - dev.close(); - } catch (IOError& e) { - FXMessageBox::error(myParent, MBOX_OK, "Storing failed!", "%s", e.what()); +GUIDialog_ViewSettings::saveDecals(OutputDevice& dev) const { + std::vector::iterator j; + for (j = myDecals->begin(); j != myDecals->end(); ++j) { + GUISUMOAbstractView::Decal& d = *j; + dev.openTag(SUMO_TAG_VIEWSETTINGS_DECAL); + dev.writeAttr("filename", d.filename); + dev.writeAttr(SUMO_ATTR_CENTER_X, d.centerX); + dev.writeAttr(SUMO_ATTR_CENTER_Y, d.centerY); + dev.writeAttr(SUMO_ATTR_CENTER_Z, d.centerZ); + dev.writeAttr(SUMO_ATTR_WIDTH, d.width); + dev.writeAttr(SUMO_ATTR_HEIGHT, d.height); + dev.writeAttr("altitude", d.altitude); + dev.writeAttr("rotation", d.rot); + dev.writeAttr("tilt", d.tilt); + dev.writeAttr("roll", d.roll); + dev.writeAttr(SUMO_ATTR_LAYER, d.layer); + dev.closeTag(); } } @@ -1021,19 +1140,26 @@ long GUIDialog_ViewSettings::onCmdExportSetting(FXObject*, FXSelector, void* /*data*/) { - FXFileDialog opendialog(this, "Export view settings"); - opendialog.setIcon(GUIIconSubSys::getIcon(ICON_EMPTY)); - opendialog.setSelectMode(SELECTFILE_ANY); - opendialog.setPatternList("*.xml"); - if (gCurrentFolder.length() != 0) { - opendialog.setDirectory(gCurrentFolder); - } - if (!opendialog.execute() || !MFXUtils::userPermitsOverwritingWhenFileExists(this, opendialog.getFilename())) { + FXString file = MFXUtils::getFilename2Write(this, "Export view settings", ".xml", GUIIconSubSys::getIcon(ICON_EMPTY), gCurrentFolder); + if (file == "") { return 1; } try { - OutputDevice& dev = OutputDevice::getDevice(opendialog.getFilename().text()); + OutputDevice& dev = OutputDevice::getDevice(file.text()); + dev.openTag(SUMO_TAG_VIEWSETTINGS); mySettings->save(dev); + if (mySaveViewPort->getCheck()) { + myParent->getViewportEditor()->writeXML(dev); + } + if (mySaveDelay->getCheck()) { + dev.openTag(SUMO_TAG_DELAY); + dev.writeAttr(SUMO_ATTR_VALUE, myParent->getDelay()); + dev.closeTag(); + } + if (mySaveDecals->getCheck()) { + saveDecals(dev); + } + dev.closeTag(); dev.close(); } catch (IOError& e) { FXMessageBox::error(this, MBOX_OK, "Storing failed!", "%s", e.what()); @@ -1045,8 +1171,9 @@ long GUIDialog_ViewSettings::onUpdExportSetting(FXObject* sender, FXSelector, void* ptr) { sender->handle(this, - mySchemeName->getCurrentItem() < (int) gSchemeStorage.getNumInitialSettings() - ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), + (mySchemeName->getCurrentItem() < (int) gSchemeStorage.getNumInitialSettings() + && !mySaveViewPort->getCheck() && !mySaveDelay->getCheck() && !mySaveDecals->getCheck()) ? + FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), ptr); return 1; } @@ -1088,17 +1215,19 @@ long GUIDialog_ViewSettings::onCmdSaveDecals(FXObject*, FXSelector, void* /*data*/) { - FXFileDialog opendialog(this, "Save Decals"); - opendialog.setIcon(GUIIconSubSys::getIcon(ICON_EMPTY)); - opendialog.setSelectMode(SELECTFILE_ANY); - opendialog.setPatternList("*.xml"); - if (gCurrentFolder.length() != 0) { - opendialog.setDirectory(gCurrentFolder); - } - if (!opendialog.execute() || !MFXUtils::userPermitsOverwritingWhenFileExists(this, opendialog.getFilename())) { + FXString file = MFXUtils::getFilename2Write(this, "Save Decals", ".xml", GUIIconSubSys::getIcon(ICON_EMPTY), gCurrentFolder); + if (file == "") { return 1; } - saveDecals(opendialog.getFilename().text()); + try { + OutputDevice& dev = OutputDevice::getDevice(file.text()); + dev.openTag("decals"); + saveDecals(dev); + dev.closeTag(); + dev.close(); + } catch (IOError& e) { + FXMessageBox::error(myParent, MBOX_OK, "Storing failed!", "%s", e.what()); + } return 1; } @@ -1212,6 +1341,64 @@ } +FXMatrix* +GUIDialog_ViewSettings::rebuildScaleMatrix(FXVerticalFrame* frame, + std::vector& scales, + std::vector& thresholds, + std::vector& buttons, + FXCheckButton* interpolation, + GUIScaleScheme& scheme) { + MFXUtils::deleteChildren(frame); + FXMatrix* m = new FXMatrix(frame, 3, + LAYOUT_FILL_X | MATRIX_BY_COLUMNS, + 0, 0, 0, 0, 10, 10, 0, 0, 5, 3); + scales.clear(); + thresholds.clear(); + buttons.clear(); + const bool fixed = scheme.isFixed(); + std::vector::const_iterator scaleIt = scheme.getColors().begin(); + std::vector::const_iterator threshIt = scheme.getThresholds().begin(); + std::vector::const_iterator nameIt = scheme.getNames().begin(); + FX::FXString buttonText = "Add"; + while (scaleIt != scheme.getColors().end()) { + FXRealSpinDial* scaleDialer = new FXRealSpinDial(m, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK | SPINDIAL_NOMAX); + scaleDialer->setValue(*scaleIt); + scales.push_back(scaleDialer); + if (fixed) { + new FXLabel(m, nameIt->c_str()); + new FXLabel(m, ""); + } else { + const int dialerOptions = scheme.allowsNegativeValues() ? SPINDIAL_NOMIN : 0; + FXRealSpinDial* threshDialer = new FXRealSpinDial(m, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK | SPINDIAL_NOMAX | dialerOptions); + threshDialer->setValue(*threshIt); + thresholds.push_back(threshDialer); + buttons.push_back(new FXButton(m, buttonText, NULL, this, MID_SIMPLE_VIEW_COLORCHANGE, BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_CENTER_X, 0, 0, 0, 0, 20, 20, 4, 4)); + buttonText = "Remove"; + } + scaleIt++; + threshIt++; + nameIt++; + } + interpolation->setCheck(scheme.isInterpolated()); + if (fixed) { + interpolation->disable(); + } else { + if (scales.size() > 1) { + interpolation->enable(); + if (interpolation->getCheck() != FALSE) { + thresholds.front()->enable(); + } else { + thresholds.front()->disable(); + } + } else { + interpolation->disable(); + thresholds.front()->disable(); + } + } + return m; +} + + void GUIDialog_ViewSettings::rebuildColorMatrices(bool doCreate) { // decals @@ -1236,21 +1423,35 @@ m->create(); } myLaneColorSettingFrame->getParent()->recalc(); + + m = rebuildScaleMatrix(myLaneScaleSettingFrame, myLaneScales, myLaneScaleThresholds, myLaneScaleButtons, myLaneScaleInterpolation, mySettings->getLaneEdgeScaleScheme()); + if (doCreate) { + m->create(); + } + myLaneScaleSettingFrame->getParent()->recalc(); + m = rebuildColorMatrix(myVehicleColorSettingFrame, myVehicleColors, myVehicleThresholds, myVehicleButtons, myVehicleColorInterpolation, mySettings->vehicleColorer.getScheme()); if (doCreate) { m->create(); } - myPersonColorSettingFrame->getParent()->recalc(); + myVehicleColorSettingFrame->getParent()->recalc(); + m = rebuildColorMatrix(myPersonColorSettingFrame, myPersonColors, myPersonThresholds, myPersonButtons, myPersonColorInterpolation, mySettings->personColorer.getScheme()); if (doCreate) { m->create(); } myPersonColorSettingFrame->getParent()->recalc(); + m = rebuildColorMatrix(myContainerColorSettingFrame, myContainerColors, myContainerThresholds, myContainerButtons, myContainerColorInterpolation, mySettings->containerColorer.getScheme()); + if (doCreate) { + m->create(); + } + myContainerColorSettingFrame->getParent()->recalc(); m = rebuildColorMatrix(myJunctionColorSettingFrame, myJunctionColors, myJunctionThresholds, myJunctionButtons, myJunctionColorInterpolation, mySettings->junctionColorer.getScheme()); if (doCreate) { m->create(); } myJunctionColorSettingFrame->getParent()->recalc(); + layout(); update(); } @@ -1397,6 +1598,7 @@ 0, 0, 100, 0, 0, 0, 0, 0); } + GUIVisualizationTextSettings GUIDialog_ViewSettings::NamePanel::getSettings() { return GUIVisualizationTextSettings(myCheck->getCheck() != FALSE, @@ -1410,5 +1612,53 @@ mySizeDial->setValue(settings.size); myColorWell->setRGBA(MFXUtils::getFXColor(settings.color)); } + + +GUIDialog_ViewSettings::SizePanel::SizePanel( + FXMatrix* parent, + GUIDialog_ViewSettings* target, + const GUIVisualizationSizeSettings& settings) { + myCheck = new FXCheckButton(parent, "Draw with constant size when zoomed out", target, MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL); + myCheck->setCheck(settings.constantSize); + new FXLabel(parent, ""); + FXMatrix* m1 = new FXMatrix(parent, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS, + 0, 0, 0, 0, 10, 10, 0, 0, 5, 5); + new FXLabel(m1, "Minimum Size", 0, LAYOUT_CENTER_Y); + myMinSizeDial = new FXRealSpinDial(m1, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, + LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); + myMinSizeDial->setValue(settings.minSize); + FXMatrix* m2 = new FXMatrix(parent, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS, + 0, 0, 0, 0, 10, 10, 0, 0, 5, 5); + new FXLabel(m2, "Exaggerate by", 0, LAYOUT_CENTER_Y); + myExaggerateDial = new FXRealSpinDial(m2, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, + LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK); + myExaggerateDial->setRange(0, 10000); + myExaggerateDial->setValue(settings.exaggeration); +} + + +GUIVisualizationSizeSettings +GUIDialog_ViewSettings::SizePanel::getSettings() { + return GUIVisualizationSizeSettings( + myMinSizeDial->getValue(), myExaggerateDial->getValue(), myCheck->getCheck() != FALSE); +} + + +void +GUIDialog_ViewSettings::SizePanel::update(const GUIVisualizationSizeSettings& settings) { + myCheck->setCheck(settings.constantSize); + myMinSizeDial->setValue(settings.minSize); + myExaggerateDial->setValue(settings.exaggeration); +} + + +void +GUIDialog_ViewSettings::saveWindowSize() { + getApp()->reg().writeIntEntry("VIEWSETTINGS", "x", getX()); + getApp()->reg().writeIntEntry("VIEWSETTINGS", "y", getY()); + getApp()->reg().writeIntEntry("VIEWSETTINGS", "width", getWidth()); + getApp()->reg().writeIntEntry("VIEWSETTINGS", "height", getHeight()); +} + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_ViewSettings.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_ViewSettings.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_ViewSettings.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIDialog_ViewSettings.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Wed, 21. Dec 2005 -/// @version $Id: GUIDialog_ViewSettings.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIDialog_ViewSettings.h 18096 2015-03-17 09:50:59Z behrisch $ /// // The dialog to change the view (gui) settings. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -72,6 +72,19 @@ FXColorWell* myColorWell; }; + class SizePanel { + public: + SizePanel(FXMatrix* parent, GUIDialog_ViewSettings* target, + const GUIVisualizationSizeSettings& settings); + + GUIVisualizationSizeSettings getSettings(); + void update(const GUIVisualizationSizeSettings& settings); + + FXRealSpinDial* myMinSizeDial; + FXRealSpinDial* myExaggerateDial; + FXCheckButton* myCheck; + }; + /** @brief Constructor * @param[in] parent The view to report changed settings to * @param[in, out] settings The current settings that can be changed @@ -163,8 +176,14 @@ std::vector::const_iterator buttonIt, GUIColorScheme& scheme); - /** @brief Rebuilds color changing dialogs after choosing another coloring scheme - * @param[in] doCreate Whether "create" shall be called (only if built the first time) + bool updateScaleRanges(FXObject* sender, std::vector::const_iterator colIt, + std::vector::const_iterator colEnd, + std::vector::const_iterator threshIt, + std::vector::const_iterator threshEnd, + std::vector::const_iterator buttonIt, + GUIScaleScheme& scheme); + + /** @brief Rebuilds manipulators for the current coloring scheme */ FXMatrix* rebuildColorMatrix(FXVerticalFrame* frame, std::vector& colors, @@ -173,6 +192,15 @@ FXCheckButton* interpolation, GUIColorScheme& scheme); + /** @brief Rebuilds manipulators for the current scaling scheme + */ + FXMatrix* rebuildScaleMatrix(FXVerticalFrame* frame, + std::vector& scales, + std::vector& thresholds, + std::vector& buttons, + FXCheckButton* interpolation, + GUIScaleScheme& scheme); + /** @brief Rebuilds color changing dialogs after choosing another coloring scheme * @param[in] doCreate Whether "create" shall be called (only if built the first time) @@ -193,7 +221,7 @@ /** @brief Writes the currently used decals into a file * @param[in] file The name of the file to write the decals into */ - void saveDecals(const std::string& file) const; + void saveDecals(OutputDevice& dev) const; /** @brief Loads decals from a file @@ -201,6 +229,8 @@ */ void loadDecals(const std::string& file); + /// @brief save window position and size to the registry + void saveWindowSize(); private: /// @brief The parent view (which settings are changed) @@ -228,6 +258,7 @@ FXVerticalFrame* myDecalsFrame; MFXAddEditTypedTable* myDecalsTable; + /// ... lane colorer FXComboBox* myLaneEdgeColorMode; FXVerticalFrame* myLaneColorSettingFrame; std::vector myLaneColors; @@ -235,6 +266,14 @@ std::vector myLaneButtons; FXCheckButton* myLaneColorInterpolation; + /// ... lane scaler + FXComboBox* myLaneEdgeScaleMode; + FXVerticalFrame* myLaneScaleSettingFrame; + std::vector myLaneScales; + std::vector myLaneScaleThresholds; + std::vector myLaneScaleButtons; + FXCheckButton* myLaneScaleInterpolation; + FXCheckButton* myShowLaneBorders, *myShowLaneDecals, *myShowRails, *myHideMacroConnectors; FXRealSpinDial* myLaneWidthUpscaleDialer; @@ -245,8 +284,7 @@ std::vector myVehicleThresholds; std::vector myVehicleButtons; FXCheckButton* myVehicleColorInterpolation; - FXRealSpinDial* myVehicleMinSizeDialer, *myVehicleUpscaleDialer; - FXCheckButton* myShowBlinker, *myShowMinGap; /* *myShowLaneChangePreference,*/ + FXCheckButton* myShowBlinker, *myShowMinGap, *myShowBTRange; /* *myShowLaneChangePreference,*/ FXComboBox* myPersonColorMode, *myPersonShapeDetail; FXVerticalFrame* myPersonColorSettingFrame; @@ -254,7 +292,14 @@ std::vector myPersonThresholds; std::vector myPersonButtons; FXCheckButton* myPersonColorInterpolation; - FXRealSpinDial* myPersonMinSizeDialer, *myPersonUpscaleDialer; + + FXComboBox* myContainerColorMode, *myContainerShapeDetail; + FXVerticalFrame* myContainerColorSettingFrame; + std::vector myContainerColors; + std::vector myContainerThresholds; + std::vector myContainerButtons; + FXCheckButton* myContainerColorInterpolation; + FXRealSpinDial* myContainerMinSizeDialer, *myContainerUpscaleDialer; FXComboBox* myJunctionColorMode; FXVerticalFrame* myJunctionColorSettingFrame; @@ -264,19 +309,22 @@ FXCheckButton* myJunctionColorInterpolation; FXCheckButton* myShowTLIndex, *myShowJunctionIndex; - FXRealSpinDial* myDetectorMinSizeDialer, *myDetectorUpscaleDialer; - FXRealSpinDial* myPOIMinSizeDialer, *myPOIUpscaleDialer; - FXRealSpinDial* myPolyMinSizeDialer, *myPolyUpscaleDialer; - FXCheckButton* myShowLane2Lane; + FXCheckButton* myDrawJunctionShape; FXCheckButton* myAntialiase; FXCheckButton* myDither; FXCheckButton* myShowSizeLegend; - NamePanel* myEdgeNamePanel, *myInternalEdgeNamePanel, *myStreetNamePanel, + NamePanel* myEdgeNamePanel, *myInternalEdgeNamePanel, *myCwaEdgeNamePanel, *myStreetNamePanel, *myJunctionNamePanel, *myInternalJunctionNamePanel, - *myVehicleNamePanel, *myPersonNamePanel, + *myVehicleNamePanel, *myPersonNamePanel, *myContainerNamePanel, *myAddNamePanel, *myPOINamePanel, *myPolyNamePanel; + + SizePanel* myVehicleSizePanel, *myPersonSizePanel, *myContainerSizePanel, *myPOISizePanel, *myPolySizePanel, *myAddSizePanel; + + + // load/save-menu + FXCheckButton* mySaveViewPort, *mySaveDelay, *mySaveDecals; /// @} diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIGlChildWindow.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIGlChildWindow.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIGlChildWindow.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIGlChildWindow.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 29.05.2005 -/// @version $Id: GUIGlChildWindow.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGlChildWindow.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIGlChildWindow.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIGlChildWindow.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIGlChildWindow.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIGlChildWindow.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Fri, 29.04.2005 -/// @version $Id: GUIGlChildWindow.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIGlChildWindow.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIMainWindow.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIMainWindow.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIMainWindow.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIMainWindow.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Tue, 29.05.2005 -/// @version $Id: GUIMainWindow.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIMainWindow.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -72,6 +72,7 @@ throw ProcessError("MainWindow initialized twice"); } myInstance = this; + //myGLVisual->setStencilSize(8); // enable stencil buffer } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIMainWindow.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIMainWindow.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIMainWindow.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIMainWindow.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Fri, 29.04.2005 -/// @version $Id: GUIMainWindow.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIMainWindow.h 18095 2015-03-17 09:39:00Z behrisch $ /// // /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -85,6 +85,13 @@ static GUIMainWindow* getInstance(); + /** @brief Returns the delay (should be overwritten by subclasses if applicable) + * @return parsed delay in milliseconds + */ + virtual SUMOReal getDelay() const { + return 0; + } + protected: std::vector mySubWindows; std::vector myTrackerWindows; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIPerspectiveChanger.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIPerspectiveChanger.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIPerspectiveChanger.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIPerspectiveChanger.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIPerspectiveChanger.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIPerspectiveChanger.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A class that allows to steer the visual output in dependence to user /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIPerspectiveChanger.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIPerspectiveChanger.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUIPerspectiveChanger.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUIPerspectiveChanger.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GUIPerspectiveChanger.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GUIPerspectiveChanger.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A virtual class that allows to steer the visual output in dependence to /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUISUMOAbstractView.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUISUMOAbstractView.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUISUMOAbstractView.cpp 2014-03-16 09:53:43.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUISUMOAbstractView.cpp 2015-04-17 00:20:33.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Laura Bieker /// @author Andreas Gaubatz /// @date Sept 2002 -/// @version $Id: GUISUMOAbstractView.cpp 14465 2013-08-22 07:00:47Z namdre $ +/// @version $Id: GUISUMOAbstractView.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // The base class for a view /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -284,6 +284,12 @@ if (type == GLO_POI || type == GLO_POLYGON) { layer = dynamic_cast(o)->getLayer(); } +#ifdef HAVE_INTERNAL + if (type == GLO_LANE && GUIVisualizationSettings::UseMesoSim) { + // do not select lanes in meso mode + continue; + } +#endif // check whether the current object is above a previous one if (layer > maxLayer) { idMax = id; @@ -297,6 +303,34 @@ std::vector +GUISUMOAbstractView::getObjectsAtPosition(Position pos, SUMOReal radius) { + Boundary selection; + selection.add(pos); + selection.grow(radius); + const std::vector ids = getObjectsInBoundary(selection); + std::vector result; + // Interpret results + for (std::vector::const_iterator it = ids.begin(); it != ids.end(); it++) { + GUIGlID id = *it; + GUIGlObject* o = GUIGlObjectStorage::gIDStorage.getObjectBlocking(id); + if (o == 0) { + continue; + } + if (o->getGlID() == 0) { + continue; + } + //std::cout << "point selection hit " << o->getMicrosimID() << "\n"; + GUIGlObjectType type = o->getType(); + if (type != 0) { + result.push_back(id); + } + GUIGlObjectStorage::gIDStorage.unblockObject(id); + } + return result; +} + + +std::vector GUISUMOAbstractView::getObjectsInBoundary(const Boundary& bound) { const int NB_HITS_MAX = 1024 * 1024; // Prepare the selection mode @@ -310,16 +344,24 @@ applyGLTransform(false); // paint in select mode + myVisualizationSettings->drawForSelecting = true; int hits2 = doPaintGL(GL_SELECT, bound); + myVisualizationSettings->drawForSelecting = false; // Get the results nb_hits = glRenderMode(GL_RENDER); if (nb_hits == -1) { myApp->setStatusBarText("Selection in boundary failed. Try to select fewer than " + toString(hits2) + " items"); } std::vector result; + GLuint numNames; + GLuint* ptr = hits; for (int i = 0; i < nb_hits; ++i) { - assert(i * 4 + 3 < NB_HITS_MAX); - result.push_back(hits[i * 4 + 3]); + numNames = *ptr; + ptr += 3; + for (int j = 0; j < (int)numNames; j++) { + result.push_back(*ptr); + ptr++; + } } // switch viewport back to normal myChanger->setViewport(oldViewPort); @@ -466,7 +508,9 @@ if (o != 0 && dynamic_cast(o) != 0) { if (applyZoom && zoomDist < 0) { myChanger->setViewport(o->getCenteringBoundary()); + update(); // only update when centering onto an object once } else { + // called during tracking. update is triggered somewhere else myChanger->centerTo(o->getCenteringBoundary().getCenter(), zoomDist, applyZoom); } } @@ -588,8 +632,9 @@ long -GUISUMOAbstractView::onRightBtnRelease(FXObject*, FXSelector , void* data) { +GUISUMOAbstractView::onRightBtnRelease(FXObject* o, FXSelector sel, void* data) { destroyPopup(); + onMouseMove(o, sel, data); if (!myChanger->onRightBtnRelease(data) && !myApp->isGaming()) { openObjectDialog(); } @@ -600,21 +645,19 @@ long GUISUMOAbstractView::onMouseWheel(FXObject*, FXSelector , void* data) { - myChanger->onMouseWheel(data); + if (!myApp->isGaming()) { + myChanger->onMouseWheel(data); + } return 1; } long GUISUMOAbstractView::onMouseMove(FXObject*, FXSelector , void* data) { - SUMOReal xpos = myChanger->getXPos(); - SUMOReal ypos = myChanger->getYPos(); - SUMOReal zoom = myChanger->getZoom(); if (myViewportChooser == 0 || !myViewportChooser->haveGrabbed()) { myChanger->onMouseMove(data); } - if (myViewportChooser != 0 && - (xpos != myChanger->getXPos() || ypos != myChanger->getYPos() || zoom != myChanger->getZoom())) { + if (myViewportChooser != 0) { myViewportChooser->setValues(myChanger->getZoom(), myChanger->getXPos(), myChanger->getYPos()); } updatePositionInformation(); @@ -768,7 +811,7 @@ glGetIntegerv(GL_VIEWPORT, viewport); while (state == GL2PS_OVERFLOW) { buffsize += 1024 * 1024; - gl2psBeginPage(destFile.c_str(), "sumo-gui; http://sumo.sf.net", viewport, format, GL2PS_SIMPLE_SORT, + gl2psBeginPage(destFile.c_str(), "sumo-gui; http://sumo.dlr.de", viewport, format, GL2PS_SIMPLE_SORT, GL2PS_DRAW_BACKGROUND | GL2PS_USE_CURRENT_VIEWPORT, GL_RGBA, 0, NULL, 0, 0, 0, buffsize, fp, "out.eps"); glMatrixMode(GL_MODELVIEW); @@ -876,14 +919,21 @@ myVisualizationChanger->show(); } - -void -GUISUMOAbstractView::showViewportEditor() { +GUIDialog_EditViewport* +GUISUMOAbstractView::getViewportEditor() { if (myViewportChooser == 0) { myViewportChooser = new GUIDialog_EditViewport(this, "Edit Viewport...", 0, 0); myViewportChooser->create(); } + myViewportChooser->setValues(myChanger->getZoom(), myChanger->getXPos(), myChanger->getYPos()); + return myViewportChooser; +} + + +void +GUISUMOAbstractView::showViewportEditor() { + getViewportEditor(); // make sure it exists; Position p(myChanger->getXPos(), myChanger->getYPos(), myChanger->getZoom()); myViewportChooser->setOldValues(p, Position::INVALID); myViewportChooser->show(); @@ -1090,5 +1140,11 @@ glTranslated(-bound.xmin(), -bound.ymin(), 0); } + +SUMOReal +GUISUMOAbstractView::getDelay() const { + return myApp->getDelay(); +} + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUISUMOAbstractView.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUISUMOAbstractView.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/GUISUMOAbstractView.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/GUISUMOAbstractView.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Andreas Gaubatz /// @date Sept 2002 -/// @version $Id: GUISUMOAbstractView.h 14494 2013-08-24 21:47:48Z behrisch $ +/// @version $Id: GUISUMOAbstractView.h 18096 2015-03-17 09:50:59Z behrisch $ /// // The base class for a view /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -189,8 +189,11 @@ /// @} + /// @brief get the viewport and create it on first access + GUIDialog_EditViewport* getViewportEditor(); virtual void showViewportEditor(); + void showViewschemeEditor(); void showToolTips(bool val); virtual bool setColorScheme(const std::string&) { @@ -302,10 +305,14 @@ } - const GUIVisualizationSettings* getVisualisationSettings() { + GUIVisualizationSettings* getVisualisationSettings() { return myVisualizationSettings; } + /** @brief Returns the delay of the parent application + * @return delay in milliseconds + */ + SUMOReal getDelay() const; protected: /// performs the painting of the simulation @@ -336,6 +343,9 @@ /// returns the id of the object at position using GL_SELECT GUIGlID getObjectAtPosition(Position pos); + /// returns the ids of the object at position within the given (rectangular) radius using GL_SELECT + std::vector getObjectsAtPosition(Position pos, SUMOReal radius); + /// returns the ids of all objects in the given boundary std::vector getObjectsInBoundary(const Boundary& bound); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/gui/windows/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/gui/windows/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/gui/windows -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,6 +92,10 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libguiutilsWindows_a_AR = $(AR) $(ARFLAGS) libguiutilsWindows_a_LIBADD = am_libguiutilsWindows_a_OBJECTS = \ @@ -56,30 +105,86 @@ GUIMainWindow.$(OBJEXT) GUIPerspectiveChanger.$(OBJEXT) \ GUISUMOAbstractView.$(OBJEXT) GUIDialog_GLObjChooser.$(OBJEXT) libguiutilsWindows_a_OBJECTS = $(am_libguiutilsWindows_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libguiutilsWindows_a_SOURCES) DIST_SOURCES = $(libguiutilsWindows_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -88,6 +193,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -114,9 +220,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -127,10 +237,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -273,10 +379,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libguiutilsWindows.a: $(libguiutilsWindows_a_OBJECTS) $(libguiutilsWindows_a_DEPENDENCIES) - -rm -f libguiutilsWindows.a - $(libguiutilsWindows_a_AR) libguiutilsWindows.a $(libguiutilsWindows_a_OBJECTS) $(libguiutilsWindows_a_LIBADD) - $(RANLIB) libguiutilsWindows.a + +libguiutilsWindows.a: $(libguiutilsWindows_a_OBJECTS) $(libguiutilsWindows_a_DEPENDENCIES) $(EXTRA_libguiutilsWindows_a_DEPENDENCIES) + $(AM_V_at)-rm -f libguiutilsWindows.a + $(AM_V_AR)$(libguiutilsWindows_a_AR) libguiutilsWindows.a $(libguiutilsWindows_a_OBJECTS) $(libguiutilsWindows_a_LIBADD) + $(AM_V_at)$(RANLIB) libguiutilsWindows.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -294,25 +401,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GUISUMOAbstractView.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -320,26 +427,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -351,15 +447,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -368,6 +460,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -416,10 +523,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -504,18 +616,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/importio/LineHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/importio/LineHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/importio/LineHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/importio/LineHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Fri, 19 Jul 2002 -/// @version $Id: LineHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: LineHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Interface definition for a class which retrieves lines from a LineHandler /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/importio/LineReader.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/importio/LineReader.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/importio/LineReader.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/importio/LineReader.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Laura Bieker /// @author Michael Behrisch /// @date Fri, 19 Jul 2002 -/// @version $Id: LineReader.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: LineReader.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Retrieves a file linewise and reports the lines to a handler. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/importio/LineReader.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/importio/LineReader.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/importio/LineReader.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/importio/LineReader.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Fri, 19 Jul 2002 -/// @version $Id: LineReader.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: LineReader.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Retrieves a file linewise and reports the lines to a handler. /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/importio/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/importio/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/importio/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/importio/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/importio -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,35 +92,95 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libimportio_a_AR = $(AR) $(ARFLAGS) libimportio_a_LIBADD = am_libimportio_a_OBJECTS = LineReader.$(OBJEXT) \ NamedColumnsParser.$(OBJEXT) libimportio_a_OBJECTS = $(am_libimportio_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libimportio_a_SOURCES) DIST_SOURCES = $(libimportio_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -84,6 +189,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -110,9 +216,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -123,10 +233,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -264,10 +370,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libimportio.a: $(libimportio_a_OBJECTS) $(libimportio_a_DEPENDENCIES) - -rm -f libimportio.a - $(libimportio_a_AR) libimportio.a $(libimportio_a_OBJECTS) $(libimportio_a_LIBADD) - $(RANLIB) libimportio.a + +libimportio.a: $(libimportio_a_OBJECTS) $(libimportio_a_DEPENDENCIES) $(EXTRA_libimportio_a_DEPENDENCIES) + $(AM_V_at)-rm -f libimportio.a + $(AM_V_AR)$(libimportio_a_AR) libimportio.a $(libimportio_a_OBJECTS) $(libimportio_a_LIBADD) + $(AM_V_at)$(RANLIB) libimportio.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -279,25 +386,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NamedColumnsParser.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -305,26 +412,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -336,15 +432,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -353,6 +445,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -401,10 +508,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -489,18 +601,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/importio/NamedColumnsParser.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/importio/NamedColumnsParser.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/importio/NamedColumnsParser.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/importio/NamedColumnsParser.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Fri, 19 Jul 2002 -/// @version $Id: NamedColumnsParser.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NamedColumnsParser.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A parser to retrieve information from a table with known column /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/importio/NamedColumnsParser.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/importio/NamedColumnsParser.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/importio/NamedColumnsParser.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/importio/NamedColumnsParser.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Fri, 19 Jul 2002 -/// @version $Id: NamedColumnsParser.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: NamedColumnsParser.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A parser to retrieve information from a table with known columns /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/BinaryFormatter.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/BinaryFormatter.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/BinaryFormatter.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/BinaryFormatter.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file BinaryFormatter.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @author Michael Behrisch /// @date 2012 -/// @version $Id: BinaryFormatter.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: BinaryFormatter.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Static storage of an output device and its base (abstract) implementation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -53,6 +55,19 @@ void +BinaryFormatter::writeStaticHeader(std::ostream& into) { + FileHelpers::writeByte(into, BF_BYTE); + FileHelpers::writeByte(into, 1); + FileHelpers::writeByte(into, BF_STRING); + FileHelpers::writeString(into, VERSION_STRING); + writeStringList(into, SUMOXMLDefinitions::Tags.getStrings()); + writeStringList(into, SUMOXMLDefinitions::Attrs.getStrings()); + writeStringList(into, SUMOXMLDefinitions::NodeTypes.getStrings()); + writeStringList(into, SUMOXMLDefinitions::EdgeFunctions.getStrings()); +} + + +void BinaryFormatter::writeStringList(std::ostream& into, const std::vector& list) { FileHelpers::writeByte(into, BF_LIST); FileHelpers::writeInt(into, (int)list.size()); @@ -62,6 +77,7 @@ } } + bool BinaryFormatter::writeXMLHeader(std::ostream& into, const std::string& rootElement, diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/BinaryFormatter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/BinaryFormatter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/BinaryFormatter.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/BinaryFormatter.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file BinaryFormatter.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @author Michael Behrisch /// @date 2012 -/// @version $Id: BinaryFormatter.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: BinaryFormatter.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Output formatter for plain XML output /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -30,10 +32,6 @@ #include #endif -#ifdef HAVE_VERSION_H -#include -#endif - #include #include #include @@ -196,6 +194,17 @@ static void writeAttr(dummy& into, const std::string& attr, const T& val); + /** @brief writes a preformatted tag to the device but ensures that any + * pending tags are closed + * @param[in] into The output stream to use + * @param[in] val The preformatted data + */ + void writePreformattedTag(std::ostream& into, const std::string& val) { + FileHelpers::writeString(into, val); + } + + + /* we need to use dummy templating here to compile those functions where they get called to avoid an explicit dependency of utils/iodevices on the edge implementations */ template @@ -218,6 +227,15 @@ } + /** @brief writes the part of the header which is always unchanged. + * + * This method exists only to reduce include dependencies of BinaryFormatter.h (which promote to OutputDevice.h, ...) + * + * @param[in] into The output stream to use + */ + static void writeStaticHeader(std::ostream& into); + + /** @brief writes a list of strings * * @param[in] into The output stream to use @@ -245,15 +263,7 @@ template bool BinaryFormatter::writeHeader(std::ostream& into, const SumoXMLTag& rootElement) { if (myXMLStack.empty()) { - FileHelpers::writeByte(into, BF_BYTE); - FileHelpers::writeByte(into, 1); - FileHelpers::writeByte(into, BF_STRING); - FileHelpers::writeString(into, VERSION_STRING); - writeStringList(into, SUMOXMLDefinitions::Tags.getStrings()); - writeStringList(into, SUMOXMLDefinitions::Attrs.getStrings()); - writeStringList(into, SUMOXMLDefinitions::NodeTypes.getStrings()); - writeStringList(into, SUMOXMLDefinitions::EdgeFunctions.getStrings()); - + writeStaticHeader(into); const unsigned int numEdges = (const unsigned int)E::dictSize(); FileHelpers::writeByte(into, BF_LIST); FileHelpers::writeInt(into, numEdges); @@ -266,10 +276,10 @@ for (unsigned int i = 0; i < numEdges; i++) { E* e = E::dictionary(i); FileHelpers::writeByte(into, BF_LIST); - FileHelpers::writeInt(into, e->getNoFollowing()); - for (unsigned int j = 0; j < e->getNoFollowing(); j++) { + FileHelpers::writeInt(into, e->getNumSuccessors()); + for (unsigned int j = 0; j < e->getNumSuccessors(); j++) { FileHelpers::writeByte(into, BF_INTEGER); - FileHelpers::writeInt(into, e->getFollower(j)->getNumericalID()); + FileHelpers::writeInt(into, e->getSuccessors()[j]->getNumericalID()); } } openTag(into, rootElement); @@ -293,7 +303,6 @@ } } - template<> void BinaryFormatter::writeAttr(std::ostream& into, const SumoXMLAttr attr, const bool& val); template<> void BinaryFormatter::writeAttr(std::ostream& into, const SumoXMLAttr attr, const SUMOReal& val); template<> void BinaryFormatter::writeAttr(std::ostream& into, const SumoXMLAttr attr, const int& val); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/BinaryInputDevice.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/BinaryInputDevice.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/BinaryInputDevice.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/BinaryInputDevice.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2005-09-15 -/// @version $Id: BinaryInputDevice.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: BinaryInputDevice.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Encapsulates binary reading operations on a file /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/BinaryInputDevice.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/BinaryInputDevice.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/BinaryInputDevice.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/BinaryInputDevice.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file BinaryInputDevice.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date 2005-09-15 -/// @version $Id: BinaryInputDevice.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: BinaryInputDevice.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Encapsulates binary reading operations on a file /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/iodevices -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,6 +92,10 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libiodevices_a_AR = $(AR) $(ARFLAGS) libiodevices_a_LIBADD = am_libiodevices_a_OBJECTS = OutputDevice.$(OBJEXT) \ @@ -55,30 +104,86 @@ OutputDevice_File.$(OBJEXT) OutputDevice_String.$(OBJEXT) \ OutputDevice_Network.$(OBJEXT) PlainXMLFormatter.$(OBJEXT) libiodevices_a_OBJECTS = $(am_libiodevices_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libiodevices_a_SOURCES) DIST_SOURCES = $(libiodevices_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -87,6 +192,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -113,9 +219,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -126,10 +236,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -273,10 +379,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libiodevices.a: $(libiodevices_a_OBJECTS) $(libiodevices_a_DEPENDENCIES) - -rm -f libiodevices.a - $(libiodevices_a_AR) libiodevices.a $(libiodevices_a_OBJECTS) $(libiodevices_a_LIBADD) - $(RANLIB) libiodevices.a + +libiodevices.a: $(libiodevices_a_OBJECTS) $(libiodevices_a_DEPENDENCIES) $(EXTRA_libiodevices_a_DEPENDENCIES) + $(AM_V_at)-rm -f libiodevices.a + $(AM_V_AR)$(libiodevices_a_AR) libiodevices.a $(libiodevices_a_OBJECTS) $(libiodevices_a_LIBADD) + $(AM_V_at)$(RANLIB) libiodevices.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -295,25 +402,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PlainXMLFormatter.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -321,26 +428,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -352,15 +448,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -369,6 +461,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -417,10 +524,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -505,18 +617,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_CERR.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_CERR.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_CERR.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_CERR.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2004 -/// @version $Id: OutputDevice_CERR.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OutputDevice_CERR.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // An output device that encapsulates cout /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_CERR.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_CERR.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_CERR.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_CERR.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2004 -/// @version $Id: OutputDevice_CERR.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OutputDevice_CERR.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An output device that encapsulates cerr /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_COUT.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_COUT.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_COUT.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_COUT.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2004 -/// @version $Id: OutputDevice_COUT.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OutputDevice_COUT.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // An output device that encapsulates cout /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_COUT.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_COUT.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_COUT.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_COUT.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2004 -/// @version $Id: OutputDevice_COUT.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OutputDevice_COUT.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An output device that encapsulates cout /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date 2004 -/// @version $Id: OutputDevice.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OutputDevice.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Static storage of an output device and its base (abstract) implementation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,6 +45,7 @@ #include #include #include +#include #include #ifdef CHECK_MEMORY_LEAKS @@ -85,7 +86,20 @@ } } else { const size_t len = name.length(); - dev = new OutputDevice_File(name, len > 4 && name.substr(len - 4) == ".sbx"); + std::string name2 = name; + if (OptionsCont::getOptions().isSet("output-prefix")) { + std::string prefix = OptionsCont::getOptions().getString("output-prefix"); + size_t metaTimeIndex = prefix.find("TIME"); + if (metaTimeIndex != std::string::npos) { + time_t rawtime; + char buffer [80]; + time(&rawtime); + strftime(buffer, 80, "%F-%H-%M-%S", localtime(&rawtime)); + prefix.replace(metaTimeIndex, 4, std::string(buffer)); + } + name2 = FileHelpers::prependToLastPathComponent(prefix, name); + } + dev = new OutputDevice_File(name2, len > 4 && name.substr(len - 4) == ".sbx"); } dev->setPrecision(); dev->getOStream() << std::setiosflags(std::ios::fixed); @@ -96,14 +110,15 @@ bool OutputDevice::createDeviceByOption(const std::string& optionName, - const std::string& rootElement) { + const std::string& rootElement, + const std::string& schemaFile) { if (!OptionsCont::getOptions().isSet(optionName)) { return false; } OutputDevice& dev = OutputDevice::getDevice(OptionsCont::getOptions().getString(optionName)); if (rootElement != "") { - if (rootElement == "routes" || rootElement == "netstate") { - dev.writeXMLHeader(rootElement, "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/" + rootElement + "_file.xsd\""); + if (schemaFile != "") { + dev.writeXMLHeader(rootElement, "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.dlr.de/xsd/" + schemaFile + "\""); } else { dev.writeXMLHeader(rootElement); } @@ -124,10 +139,31 @@ void OutputDevice::closeAll() { - while (myOutputDevices.size() != 0) { - myOutputDevices.begin()->second->close(); + std::vector errorDevices; + std::vector nonErrorDevices; + for (std::map::iterator i = myOutputDevices.begin(); i != myOutputDevices.end(); ++i) { + if (MsgHandler::getErrorInstance()->isRetriever(i->second)) { + errorDevices.push_back(i->second); + } else { + nonErrorDevices.push_back(i->second); + } + } + for (std::vector::iterator i = nonErrorDevices.begin(); i != nonErrorDevices.end(); ++i) { + try { + (*i)->close(); + } catch (const IOError& e) { + WRITE_ERROR("Error on closing output devices."); + WRITE_ERROR(e.what()); + } + } + for (std::vector::iterator i = errorDevices.begin(); i != errorDevices.end(); ++i) { + try { + (*i)->close(); + } catch (const IOError& e) { + std::cerr << "Error on closing error output devices." << std::endl; + std::cerr << e.what() << std::endl; + } } - myOutputDevices.clear(); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_File.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_File.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_File.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_File.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file OutputDevice_File.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date 2004 -/// @version $Id: OutputDevice_File.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OutputDevice_File.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // An output device that encapsulates an ofstream /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_File.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_File.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_File.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_File.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2004 -/// @version $Id: OutputDevice_File.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OutputDevice_File.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An output device that encapsulates an ofstream /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @author Michael Behrisch +/// @author Mario Krumnow /// @date 2004 -/// @version $Id: OutputDevice.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OutputDevice.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Static storage of an output device and its base (abstract) implementation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -97,13 +98,15 @@ * within XML-declarations of structures which paths already is aware of the * cwd. * - * @param[in] optionName The name of the option to use for retrieving the output definition + * @param[in] optionName The name of the option to use for retrieving the output definition * @param[in] rootElement The root element to use (XML-output) + * @param[in] schemaFile The basename of the schema file to use (XML-output) * @return Whether a device was built (the option was set) * @exception IOError If the output could not be built for any reason (error message is supplied) */ static bool createDeviceByOption(const std::string& optionName, - const std::string& rootElement = ""); + const std::string& rootElement = "", + const std::string& schemaFile = ""); /** @brief Returns the device described by the option @@ -291,6 +294,17 @@ return *this; } + + /** @brief writes a preformatted tag to the device but ensures that any + * pending tags are closed + * @param[in] val The preformatted data + * @return The OutputDevice for further processing + */ + OutputDevice& writePreformattedTag(const std::string& val) { + myFormatter->writePreformattedTag(getOStream(), val); + return *this; + } + /** @brief Retrieves a message to this device. * diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_Network.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_Network.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_Network.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_Network.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Felix Brack /// @date 2006 -/// @version $Id: OutputDevice_Network.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OutputDevice_Network.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // An output device for TCP/IP Network connections /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -30,6 +30,11 @@ #include #endif // #ifdef _MSC_VER +#ifdef WIN32 +#include +#else +#include +#endif #include #include "OutputDevice_Network.h" #include "foreign/tcpip/socket.h" @@ -46,10 +51,20 @@ OutputDevice_Network::OutputDevice_Network(const std::string& host, const int port) { mySocket = new tcpip::Socket(host, port); - try { - mySocket->connect(); - } catch (tcpip::SocketException& e) { - throw IOError(toString(e.what()) + " (host: " + host + ", port: " + toString(port) + ")"); + for (int wait = 1000; true; wait += 1000) { + try { + mySocket->connect(); + break; + } catch (tcpip::SocketException& e) { + if (wait == 9000) { + throw IOError(toString(e.what()) + " (host: " + host + ", port: " + toString(port) + ")"); + } +#ifdef WIN32 + Sleep(wait); +#else + usleep(wait * 1000); +#endif + } } } @@ -71,7 +86,11 @@ std::string toSend = myMessage.str(); std::vector msg; msg.insert(msg.end(), toSend.begin(), toSend.end()); - mySocket->send(msg); + try { + mySocket->send(msg); + } catch (tcpip::SocketException& e) { + throw IOError(toString(e.what())); + } myMessage.str(""); } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_Network.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_Network.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_Network.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_Network.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Daniel Krajzewicz /// @author Felix Brack /// @date 2006 -/// @version $Id: OutputDevice_Network.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OutputDevice_Network.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An output device for TCP/IP Network connections /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_String.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_String.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_String.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_String.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file OutputDevice_String.cpp /// @author Michael Behrisch /// @date 2009 -/// @version $Id: OutputDevice_String.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OutputDevice_String.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // An output device that encapsulates a stringstream /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2009-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_String.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_String.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputDevice_String.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputDevice_String.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,12 +2,12 @@ /// @file OutputDevice_String.h /// @author Michael Behrisch /// @date 2009 -/// @version $Id: OutputDevice_String.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OutputDevice_String.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An output device that encapsulates a stringstream /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2009-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputFormatter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputFormatter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/OutputFormatter.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/OutputFormatter.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file OutputFormatter.h +/// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2012 -/// @version $Id: OutputFormatter.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OutputFormatter.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Abstract base class for output formatters /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -109,6 +110,7 @@ */ virtual bool closeTag(std::ostream& into) = 0; + virtual void writePreformattedTag(std::ostream& into, const std::string& val) = 0; }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/PlainXMLFormatter.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/PlainXMLFormatter.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/PlainXMLFormatter.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/PlainXMLFormatter.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file PlainXMLFormatter.cpp +/// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2012 -/// @version $Id: PlainXMLFormatter.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PlainXMLFormatter.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Static storage of an output device and its base (abstract) implementation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -110,5 +111,14 @@ } +void +PlainXMLFormatter::writePreformattedTag(std::ostream& into, const std::string& val) { + if (myHavePendingOpener) { + into << ">\n"; + myHavePendingOpener = false; + } + into << val; +} + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/PlainXMLFormatter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/PlainXMLFormatter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/iodevices/PlainXMLFormatter.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/iodevices/PlainXMLFormatter.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file PlainXMLFormatter.h +/// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date 2012 -/// @version $Id: PlainXMLFormatter.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PlainXMLFormatter.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Output formatter for plain XML output /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -112,6 +113,14 @@ bool closeTag(std::ostream& into); + /** @brief writes a preformatted tag to the device but ensures that any + * pending tags are closed + * @param[in] into The output stream to use + * @param[in] val The preformatted data + */ + void writePreformattedTag(std::ostream& into, const std::string& val); + + /** @brief writes an arbitrary attribute * * @param[in] into The output stream to use diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -6,6 +6,6 @@ TRACI_DIRS = traci endif -SUBDIRS = common distribution \ +SUBDIRS = common distribution emissions \ geom importio iodevices options shapes \ -xml $(GUI_DIRS) $(TRACI_DIRS) +vehicle xml $(GUI_DIRS) $(TRACI_DIRS) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,7 +79,7 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -44,24 +88,62 @@ CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = common distribution geom importio iodevices options \ - shapes xml foxtools gui traci +DIST_SUBDIRS = common distribution emissions geom importio iodevices \ + options shapes vehicle xml foxtools gui traci DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -93,6 +175,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -119,9 +202,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -132,10 +219,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -231,9 +314,9 @@ top_srcdir = @top_srcdir@ @WITH_GUI_TRUE@GUI_DIRS = foxtools gui @TRACI_TRUE@TRACI_DIRS = traci -SUBDIRS = common distribution \ +SUBDIRS = common distribution emissions \ geom importio iodevices options shapes \ -xml $(GUI_DIRS) $(TRACI_DIRS) +vehicle xml $(GUI_DIRS) $(TRACI_DIRS) all: all-recursive @@ -276,22 +359,25 @@ -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -306,57 +392,12 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -372,12 +413,7 @@ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -389,15 +425,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -406,6 +438,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -442,13 +489,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -483,10 +527,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -564,22 +613,20 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/options -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,36 +92,96 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = liboptions_a_AR = $(AR) $(ARFLAGS) liboptions_a_LIBADD = am_liboptions_a_OBJECTS = Option.$(OBJEXT) OptionsCont.$(OBJEXT) \ OptionsIO.$(OBJEXT) OptionsLoader.$(OBJEXT) \ OptionsParser.$(OBJEXT) liboptions_a_OBJECTS = $(am_liboptions_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(liboptions_a_SOURCES) DIST_SOURCES = $(liboptions_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -85,6 +190,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -111,9 +217,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -124,10 +234,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -265,10 +371,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -liboptions.a: $(liboptions_a_OBJECTS) $(liboptions_a_DEPENDENCIES) - -rm -f liboptions.a - $(liboptions_a_AR) liboptions.a $(liboptions_a_OBJECTS) $(liboptions_a_LIBADD) - $(RANLIB) liboptions.a + +liboptions.a: $(liboptions_a_OBJECTS) $(liboptions_a_DEPENDENCIES) $(EXTRA_liboptions_a_DEPENDENCIES) + $(AM_V_at)-rm -f liboptions.a + $(AM_V_AR)$(liboptions_a_AR) liboptions.a $(liboptions_a_OBJECTS) $(liboptions_a_LIBADD) + $(AM_V_at)$(RANLIB) liboptions.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -283,25 +390,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionsParser.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -309,26 +416,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -340,15 +436,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -357,6 +449,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -405,10 +512,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -493,18 +605,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/Option.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/Option.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/Option.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/Option.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 17 Dec 2001 -/// @version $Id: Option.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Option.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A class representing a single program option /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/Option.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/Option.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/Option.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/Option.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file Option.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Mon, 17 Dec 2001 -/// @version $Id: Option.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Option.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Classes representing a single program option (with different types) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsCont.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsCont.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsCont.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsCont.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date Mon, 17 Dec 2001 -/// @version $Id: OptionsCont.cpp 14429 2013-08-17 19:57:16Z behrisch $ +/// @version $Id: OptionsCont.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A storage for options (typed value containers) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -71,7 +71,7 @@ OptionsCont::OptionsCont() : myAddresses(), myValues(), myDeprecatedSynonymes(), myHaveInformedAboutDeprecatedDivider(false) { - myCopyrightNotices.push_back("Copyright (C) 2001-2013 DLR and contributors; http://sumo-sim.org"); + myCopyrightNotices.push_back("Copyright (C) 2001-2015 DLR and contributors; http://sumo.dlr.de"); } @@ -318,7 +318,9 @@ } conv += tmp; } - (*i)->set(conv); + if (conv != (*i)->getString()) { + (*i)->set(conv); + } } } } @@ -340,9 +342,9 @@ ok = false; } for (std::vector::const_iterator fileIt = files.begin(); fileIt != files.end(); ++fileIt) { - if (!FileHelpers::exists(*fileIt)) { + if (!FileHelpers::isReadable(*fileIt)) { if (*fileIt != "") { - WRITE_ERROR("File '" + *fileIt + "' does not exist."); + WRITE_ERROR("File '" + *fileIt + "' is not accessible."); ok = false; } else { WRITE_WARNING("Empty file name given; ignoring."); @@ -713,8 +715,8 @@ } } os << std::endl; - os << "Report bugs at ." << std::endl; - os << "Get in contact via ." << std::endl; + os << "Report bugs at ." << std::endl; + os << "Get in contact via ." << std::endl; } @@ -722,7 +724,7 @@ OptionsCont::writeConfiguration(std::ostream& os, bool filled, bool complete, bool addComments) const { os << "\n\n"; - os << "" << std::endl << std::endl; + os << "" << std::endl << std::endl; for (std::vector::const_iterator i = mySubTopics.begin(); i != mySubTopics.end(); ++i) { std::string subtopic = *i; if (subtopic == "Configuration" && !complete) { diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsCont.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsCont.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsCont.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsCont.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date Mon, 17 Dec 2001 -/// @version $Id: OptionsCont.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OptionsCont.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A storage for options (typed value containers) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -103,7 +103,7 @@ * done using addDescription(, , ). * @see addDescription * - * @see http://sumo-sim.org/wiki/index.php/OptionsSubSystem + * @see http://sumo.dlr.de/wiki/index.php/OptionsSubSystem */ class OptionsCont { public: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsIO.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsIO.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsIO.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsIO.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 17 Dec 2001 -/// @version $Id: OptionsIO.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OptionsIO.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Helper for parsing command line arguments and reading configuration files /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -92,8 +92,8 @@ return; } std::string path = oc.getString("configuration-file"); - if (!FileHelpers::exists(path)) { - throw ProcessError("Could not find configuration '" + oc.getString("configuration-file") + "'."); + if (!FileHelpers::isReadable(path)) { + throw ProcessError("Could not access configuration '" + oc.getString("configuration-file") + "'."); } PROGRESS_BEGIN_MESSAGE("Loading configuration"); // build parser diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsIO.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsIO.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsIO.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsIO.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 17 Dec 2001 -/// @version $Id: OptionsIO.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OptionsIO.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Helper for parsing command line arguments and reading configuration files /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsLoader.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsLoader.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsLoader.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsLoader.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 17 Dec 2001 -/// @version $Id: OptionsLoader.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OptionsLoader.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A SAX-Handler for loading options /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsLoader.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsLoader.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsLoader.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsLoader.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 17 Dec 2001 -/// @version $Id: OptionsLoader.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OptionsLoader.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A SAX-Handler for loading options /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsParser.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsParser.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsParser.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsParser.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 17 Dec 2001 -/// @version $Id: OptionsParser.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OptionsParser.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Parses the command line arguments /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsParser.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsParser.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/options/OptionsParser.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/options/OptionsParser.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 17 Dec 2001 -/// @version $Id: OptionsParser.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: OptionsParser.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Parses command line arguments /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/Makefile.am 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -3,4 +3,5 @@ libshapes_a_SOURCES = PointOfInterest.h \ Shape.cpp Shape.h \ Polygon.cpp Polygon.h \ +ShapeHandler.cpp ShapeHandler.h \ ShapeContainer.cpp ShapeContainer.h diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/shapes -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,35 +92,95 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libshapes_a_AR = $(AR) $(ARFLAGS) libshapes_a_LIBADD = am_libshapes_a_OBJECTS = Shape.$(OBJEXT) Polygon.$(OBJEXT) \ - ShapeContainer.$(OBJEXT) + ShapeHandler.$(OBJEXT) ShapeContainer.$(OBJEXT) libshapes_a_OBJECTS = $(am_libshapes_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libshapes_a_SOURCES) DIST_SOURCES = $(libshapes_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -84,6 +189,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -110,9 +216,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -123,10 +233,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -224,6 +330,7 @@ libshapes_a_SOURCES = PointOfInterest.h \ Shape.cpp Shape.h \ Polygon.cpp Polygon.h \ +ShapeHandler.cpp ShapeHandler.h \ ShapeContainer.cpp ShapeContainer.h all: all-am @@ -263,10 +370,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libshapes.a: $(libshapes_a_OBJECTS) $(libshapes_a_DEPENDENCIES) - -rm -f libshapes.a - $(libshapes_a_AR) libshapes.a $(libshapes_a_OBJECTS) $(libshapes_a_LIBADD) - $(RANLIB) libshapes.a + +libshapes.a: $(libshapes_a_OBJECTS) $(libshapes_a_DEPENDENCIES) $(EXTRA_libshapes_a_DEPENDENCIES) + $(AM_V_at)-rm -f libshapes.a + $(AM_V_AR)$(libshapes_a_AR) libshapes.a $(libshapes_a_OBJECTS) $(libshapes_a_LIBADD) + $(AM_V_at)$(RANLIB) libshapes.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -277,27 +385,28 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Polygon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Shape.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ShapeContainer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ShapeHandler.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -305,26 +414,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -336,15 +434,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -353,6 +447,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -401,10 +510,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -489,18 +603,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/PointOfInterest.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/PointOfInterest.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/PointOfInterest.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/PointOfInterest.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Jakob Erdmann /// @author Michael Behrisch +/// @author Melanie Knocke /// @date 2005-09-15 -/// @version $Id: PointOfInterest.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: PointOfInterest.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A point-of-interest (2D) /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -70,11 +71,15 @@ myHalfImgHeight(height / 2.0) {} + /// @brief Destructor virtual ~PointOfInterest() { } + + /// @name Getter /// @{ + /// @brief Returns whether the image width of the POI inline SUMOReal getWidth() const { return myHalfImgWidth * 2.0; @@ -87,8 +92,10 @@ /// @} + /// @name Setter /// @{ + /// @brief set the image width of the POI inline void setWidth(SUMOReal width) { myHalfImgWidth = width / 2.0; @@ -101,6 +108,7 @@ /// @} + protected: ///@brief The half width of the image when rendering this POI SUMOReal myHalfImgWidth; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/Polygon.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/Polygon.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/Polygon.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/Polygon.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file Polygon.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Jun 2004 -/// @version $Id: Polygon.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Polygon.cpp 18137 2015-03-24 15:12:38Z behrisch $ /// // A 2D-polygon /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -29,6 +30,9 @@ #include #endif +#include +#include +#include #include "Polygon.h" using namespace SUMO; @@ -52,6 +56,36 @@ Polygon::~Polygon() {} +void +Polygon::writeXML(OutputDevice& out, bool geo) { + out.openTag(SUMO_TAG_POLY); + out.writeAttr(SUMO_ATTR_ID, StringUtils::escapeXML(getID())); + out.writeAttr(SUMO_ATTR_TYPE, StringUtils::escapeXML(getType())); + out.writeAttr(SUMO_ATTR_COLOR, getColor()); + out.writeAttr(SUMO_ATTR_FILL, getFill()); + out.writeAttr(SUMO_ATTR_LAYER, getLayer()); + PositionVector shape = getShape(); + if (geo) { + out.writeAttr(SUMO_ATTR_GEO, true); + for (int i = 0; i < (int) shape.size(); i++) { + GeoConvHelper::getFinal().cartesian2geo(shape[i]); + } + } + out.writeAttr(SUMO_ATTR_SHAPE, shape); + if (getAngle() != Shape::DEFAULT_ANGLE) { + out.writeAttr(SUMO_ATTR_ANGLE, getAngle()); + } + if (getImgFile() != Shape::DEFAULT_IMG_FILE) { + out.writeAttr(SUMO_ATTR_IMGFILE, getImgFile()); + } + for (std::map::const_iterator j = getMap().begin(); j != getMap().end(); ++j) { + out.openTag(SUMO_TAG_PARAM); + out.writeAttr(SUMO_ATTR_KEY, (*j).first); + out.writeAttr(SUMO_ATTR_VALUE, (*j).second); + out.closeTag(); + } + out.closeTag(); +} /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/Polygon.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/Polygon.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/Polygon.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/Polygon.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,15 @@ /// @file Polygon.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann +/// @author Melanie Knocke /// @date Jun 2004 -/// @version $Id: Polygon.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Polygon.h 18096 2015-03-17 09:50:59Z behrisch $ /// // A 2D- or 3D-polygon /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2004-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,6 +37,8 @@ #include #include "Shape.h" +class OutputDevice; + // we need to put this into a namespace to avoid clashing with wingdi.h::Polygon function namespace SUMO { @@ -63,12 +67,15 @@ SUMOReal angle = DEFAULT_ANGLE, const std::string& imgFile = DEFAULT_IMG_FILE); + /// @brief Destructor virtual ~Polygon(); + /// @name Getter /// @{ + /** @brief Returns whether the shape of the polygon * @return The shape of the polygon */ @@ -76,6 +83,7 @@ return myShape; } + /** @brief Returns whether the polygon is filled * @return Whether the polygon is filled */ @@ -88,6 +96,7 @@ /// @name Setter /// @{ + /** @brief Sets whether the polygon shall be filled * @param[in] fill Whether the polygon shall be filled */ @@ -104,6 +113,10 @@ } /// @} + /* @brief polygon definition to the given device + * @param[in] geo Whether to write the output in geo-coordinates + */ + void writeXML(OutputDevice& out, bool geo = false); protected: /// @brief The positions of the polygon diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/ShapeContainer.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/ShapeContainer.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/ShapeContainer.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/ShapeContainer.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Sept 2002 -/// @version $Id: ShapeContainer.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ShapeContainer.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Storage for geometrical objects, sorted by the layers they are in /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/ShapeContainer.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/ShapeContainer.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/ShapeContainer.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/ShapeContainer.h 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file ShapeContainer.h /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date 2005-09-15 -/// @version $Id: ShapeContainer.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: ShapeContainer.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Storage for geometrical objects, sorted by the layers they are in /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2005-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -61,7 +62,7 @@ /// @brief Destructor virtual ~ShapeContainer(); - typedef NamedObjectCont Polygons; + typedef NamedObjectCont< SUMO::Polygon* > Polygons; typedef NamedObjectCont< PointOfInterest*> POIs; /** @brief Builds a polygon using the given values and adds it to the container diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/Shape.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/Shape.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/Shape.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/Shape.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file Shape.cpp /// @author Jakob Erdmann +/// @author Michael Behrisch /// @date Oct 2012 -/// @version $Id: Shape.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Shape.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A 2D- or 3D-Shape /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -37,6 +38,7 @@ // =========================================================================== // static member definitions // =========================================================================== +const std::string Shape::DEFAULT_TYPE = ""; const SUMOReal Shape::DEFAULT_LAYER = 128; const SUMOReal Shape::DEFAULT_ANGLE = 0; const std::string Shape::DEFAULT_IMG_FILE = ""; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/Shape.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/Shape.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/Shape.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/Shape.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,14 @@ /****************************************************************************/ /// @file Shape.h /// @author Jakob Erdmann +/// @author Michael Behrisch /// @date Oct 2012 -/// @version $Id: Shape.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: Shape.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A 2D- or 3D-Shape /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -145,6 +146,7 @@ } /// @} + static const std::string DEFAULT_TYPE; static const SUMOReal DEFAULT_LAYER; static const SUMOReal DEFAULT_ANGLE; static const std::string DEFAULT_IMG_FILE; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/ShapeHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/ShapeHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/ShapeHandler.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/ShapeHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,175 @@ + +/****************************************************************************/ +/// @file ShapeHandler.cpp +/// @author Jakob Erdmann +/// @date Feb 2015 +/// @version $Id: ShapeHandler.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// The XML-Handler for network loading +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "Shape.h" +#include "ShapeContainer.h" +#include "ShapeHandler.h" + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// method definitions +// =========================================================================== +ShapeHandler::ShapeHandler(const std::string& file, ShapeContainer& sc) : + SUMOSAXHandler(file), + myShapeContainer(sc) {} + + +ShapeHandler::~ShapeHandler() {} + + +void +ShapeHandler::myStartElement(int element, + const SUMOSAXAttributes& attrs) { + try { + switch (element) { + case SUMO_TAG_POLY: + addPoly(attrs); + break; + case SUMO_TAG_POI: + addPOI(attrs); + break; + default: + break; + } + } catch (InvalidArgument& e) { + WRITE_ERROR(e.what()); + } +} + + + +void +ShapeHandler::addPOI(const SUMOSAXAttributes& attrs) { + bool ok = true; + const SUMOReal INVALID_POSITION(-1000000); + std::string id = attrs.get(SUMO_ATTR_ID, 0, ok); + SUMOReal x = attrs.getOpt(SUMO_ATTR_X, id.c_str(), ok, INVALID_POSITION); + SUMOReal y = attrs.getOpt(SUMO_ATTR_Y, id.c_str(), ok, INVALID_POSITION); + SUMOReal lon = attrs.getOpt(SUMO_ATTR_LON, id.c_str(), ok, INVALID_POSITION); + SUMOReal lat = attrs.getOpt(SUMO_ATTR_LAT, id.c_str(), ok, INVALID_POSITION); + SUMOReal lanePos = attrs.getOpt(SUMO_ATTR_POSITION, id.c_str(), ok, INVALID_POSITION); + SUMOReal layer = attrs.getOpt(SUMO_ATTR_LAYER, id.c_str(), ok, (SUMOReal)GLO_POI); + std::string type = attrs.getOpt(SUMO_ATTR_TYPE, id.c_str(), ok, ""); + std::string laneID = attrs.getOpt(SUMO_ATTR_LANE, id.c_str(), ok, ""); + RGBColor color = attrs.hasAttribute(SUMO_ATTR_COLOR) ? attrs.get(SUMO_ATTR_COLOR, id.c_str(), ok) : RGBColor::RED; + SUMOReal angle = attrs.getOpt(SUMO_ATTR_ANGLE, id.c_str(), ok, Shape::DEFAULT_ANGLE); + std::string imgFile = attrs.getOpt(SUMO_ATTR_IMGFILE, id.c_str(), ok, Shape::DEFAULT_IMG_FILE); + if (imgFile != "" && !FileHelpers::isAbsolute(imgFile)) { + imgFile = FileHelpers::getConfigurationRelative(getFileName(), imgFile); + } + SUMOReal width = attrs.getOpt(SUMO_ATTR_WIDTH, id.c_str(), ok, Shape::DEFAULT_IMG_WIDTH); + SUMOReal height = attrs.getOpt(SUMO_ATTR_HEIGHT, id.c_str(), ok, Shape::DEFAULT_IMG_HEIGHT); + if (!ok) { + return; + } + Position pos(x, y); + if (x == INVALID_POSITION || y == INVALID_POSITION) { + // try computing x,y from lane,pos + if (laneID != "") { + pos = getLanePos(id, laneID, lanePos); + } else { + // try computing x,y from lon,lat + if (lat == INVALID_POSITION || lon == INVALID_POSITION) { + WRITE_ERROR("Either (x,y), (lon,lat) or (lane,pos) must be specified for poi '" + id + "'."); + return; + } else if (!GeoConvHelper::getFinal().usingGeoProjection()) { + WRITE_ERROR("(lon, lat) is specified for poi '" + id + "' but no geo-conversion is specified for the network."); + return; + } + pos.set(lon, lat); + GeoConvHelper::getFinal().x2cartesian_const(pos); + } + } + if (!myShapeContainer.addPOI(id, type, color, layer, angle, imgFile, pos, width, height)) { + WRITE_ERROR("PoI '" + id + "' already exists."); + } +} + + +void +ShapeHandler::addPoly(const SUMOSAXAttributes& attrs) { + bool ok = true; + std::string id = attrs.get(SUMO_ATTR_ID, 0, ok); + // get the id, report an error if not given or empty... + if (!ok) { + return; + } + SUMOReal layer = attrs.getOpt(SUMO_ATTR_LAYER, id.c_str(), ok, Shape::DEFAULT_LAYER); + bool fill = attrs.getOpt(SUMO_ATTR_FILL, id.c_str(), ok, false); + std::string type = attrs.getOpt(SUMO_ATTR_TYPE, id.c_str(), ok, Shape::DEFAULT_TYPE); + std::string colorStr = attrs.get(SUMO_ATTR_COLOR, id.c_str(), ok); + RGBColor color = attrs.get(SUMO_ATTR_COLOR, id.c_str(), ok); + PositionVector shape = attrs.get(SUMO_ATTR_SHAPE, id.c_str(), ok); + if (attrs.getOpt(SUMO_ATTR_GEO, id.c_str(), ok, false)) { + for (int i = 0; i < (int) shape.size(); i++) { + GeoConvHelper::getFinal().x2cartesian_const(shape[i]); + } + } + SUMOReal angle = attrs.getOpt(SUMO_ATTR_ANGLE, id.c_str(), ok, Shape::DEFAULT_ANGLE); + std::string imgFile = attrs.getOpt(SUMO_ATTR_IMGFILE, id.c_str(), ok, Shape::DEFAULT_IMG_FILE); + if (imgFile != "" && !FileHelpers::isAbsolute(imgFile)) { + imgFile = FileHelpers::getConfigurationRelative(getFileName(), imgFile); + } + if (shape.size() != 0) { + if (!myShapeContainer.addPolygon(id, type, color, layer, angle, imgFile, shape, fill)) { + WRITE_WARNING("Skipping redefinition of polygon '" + id + "'."); + } + } +} + + + +bool +ShapeHandler::loadFiles(const std::vector& files, ShapeHandler& sh) { + for (std::vector::const_iterator fileIt = files.begin(); fileIt != files.end(); ++fileIt) { + if (!XMLSubSys::runParser(sh, *fileIt, false)) { + WRITE_MESSAGE("Loading of shapes from " + *fileIt + " failed."); + return false; + } + } + return true; +} +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/ShapeHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/ShapeHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/shapes/ShapeHandler.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/shapes/ShapeHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,124 @@ + +/****************************************************************************/ +/// @file ShapeHandler.h +/// @author Jakob Erdmann +/// @date Feb 2015 +/// @version $Id: ShapeHandler.h 17945 2015-02-23 09:36:21Z behrisch $ +/// +// The XML-Handler for network loading +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef ShapeHandler_h +#define ShapeHandler_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class ShapeContainer; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class ShapeHandler + * @brief The XML-Handler for network loading + * + * The SAX2-handler responsible for parsing networks and routes to load. + * This is an extension of the MSRouteHandler as routes and vehicles may also + * be loaded from network descriptions. + */ +class ShapeHandler : public SUMOSAXHandler { +public: + +public: + /** @brief Constructor + * + * @param[in] file Name of the parsed file + * @param[in, out] net The network to fill + * @param[in] detBuilder The detector builder to use + * @param[in] triggerBuilder The trigger builder to use + * @param[in] edgeBuilder The builder of edges to use + * @param[in] junctionBuilder The builder of junctions to use + */ + ShapeHandler(const std::string& file, ShapeContainer& sc); + + /// @brief Destructor + virtual ~ShapeHandler(); + + /// @brief loads all of the given files + static bool loadFiles(const std::vector& files, ShapeHandler& sh); + + +protected: + /// @name inherited from GenericSAXHandler + //@{ + + /** @brief Called on the opening of a tag; + * + * @param[in] element ID of the currently opened element + * @param[in] attrs Attributes within the currently opened element + * @exception ProcessError If something fails + * @see GenericSAXHandler::myStartElement + * @todo Refactor/describe + */ + virtual void myStartElement(int element, + const SUMOSAXAttributes& attrs); + + + //@} + + + /// @brief get position for a given laneID + virtual Position getLanePos(const std::string& poiID, const std::string& laneID, SUMOReal lanePos) = 0; + + +private: + + /// adds a polygon + void addPOI(const SUMOSAXAttributes& attrs); + + /// adds a polygon + void addPoly(const SUMOSAXAttributes& attrs); + + ShapeContainer& myShapeContainer; + + +private: + /** invalid copy constructor */ + ShapeHandler(const ShapeHandler& s); + + /** invalid assignment operator */ + ShapeHandler& operator=(const ShapeHandler& s); + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/traci/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/traci/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/traci/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/traci/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/traci -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,34 +92,94 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libtraci_a_AR = $(AR) $(ARFLAGS) libtraci_a_LIBADD = am_libtraci_a_OBJECTS = TraCIAPI.$(OBJEXT) libtraci_a_OBJECTS = $(am_libtraci_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libtraci_a_SOURCES) DIST_SOURCES = $(libtraci_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -83,6 +188,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -109,9 +215,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -122,10 +232,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -258,10 +364,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libtraci.a: $(libtraci_a_OBJECTS) $(libtraci_a_DEPENDENCIES) - -rm -f libtraci.a - $(libtraci_a_AR) libtraci.a $(libtraci_a_OBJECTS) $(libtraci_a_LIBADD) - $(RANLIB) libtraci.a + +libtraci.a: $(libtraci_a_OBJECTS) $(libtraci_a_DEPENDENCIES) $(EXTRA_libtraci_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtraci.a + $(AM_V_AR)$(libtraci_a_AR) libtraci.a $(libtraci_a_OBJECTS) $(libtraci_a_LIBADD) + $(AM_V_at)$(RANLIB) libtraci.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -272,25 +379,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TraCIAPI.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -298,26 +405,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -329,15 +425,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -346,6 +438,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -394,10 +501,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -482,18 +594,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/traci/TraCIAPI.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/traci/TraCIAPI.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/traci/TraCIAPI.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/traci/TraCIAPI.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,16 @@ /****************************************************************************/ /// @file TraCIAPI.h /// @author Daniel Krajzewicz +/// @author Mario Krumnow +/// @author Jakob Erdmann +/// @author Michael Behrisch /// @date 30.05.2012 -/// @version $Id: TraCIAPI.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIAPI.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // C++ TraCI client API implementation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -859,6 +862,16 @@ } +// --------------------------------------------------------------------------- +// TraCIAPI::AreaDetector-methods +// --------------------------------------------------------------------------- +std::vector +TraCIAPI::AreaScope::getIDList() const { + return myParent.getStringVector(CMD_GET_AREAL_DETECTOR_VARIABLE, ID_LIST, ""); +} + + + // --------------------------------------------------------------------------- // TraCIAPI::MeMeScope-methods diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/traci/TraCIAPI.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/traci/TraCIAPI.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/traci/TraCIAPI.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/traci/TraCIAPI.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file TraCIAPI.h /// @author Daniel Krajzewicz +/// @author Mario Krumnow +/// @author Michael Behrisch /// @date 30.05.2012 -/// @version $Id: TraCIAPI.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: TraCIAPI.h 18095 2015-03-17 09:39:00Z behrisch $ /// // C++ TraCI client API implementation /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -381,7 +383,26 @@ }; + /** @class AreaScope + * @brief Scope for interaction with areal detectors + */ + class AreaScope : public TraCIScopeWrapper { + public: + AreaScope(TraCIAPI& parent) : TraCIScopeWrapper(parent) {} + virtual ~AreaScope() {} + + std::vector getIDList() const; + int getJamLengthVehicle(const std::string& laneID) const; + SUMOReal getJamLengthMeters(const std::string& laneID) const; + private: + /// @brief invalidated copy constructor + AreaScope(const AreaScope& src); + + /// @brief invalidated assignment operator + AreaScope& operator=(const AreaScope& src); + + }; /** @class MeMeScope diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/AStarRouter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/AStarRouter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/AStarRouter.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/AStarRouter.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,295 @@ +/****************************************************************************/ +/// @file AStarRouter.h +/// @author Jakob Erdmann +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @date January 2012 +/// @version $Id: AStarRouter.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A* Algorithm using euclidean distance heuristic. +// Based on DijkstraRouterTT. For routing by effort a novel heuristic would be needed. +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef AStarRouter_h +#define AStarRouter_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "SUMOAbstractRouter.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class AStarRouter + * @brief Computes the shortest path through a network using the Dijkstra algorithm. + * + * The template parameters are: + * @param E The edge class to use (MSEdge/ROEdge) + * @param V The vehicle class to use (MSVehicle/ROVehicle) + * @param PF The prohibition function to use (prohibited_withRestrictions/prohibited_noRestrictions) + * @param EC The class to retrieve the effort for an edge from + * + * The router is edge-based. It must know the number of edges for internal reasons + * and whether a missing connection between two given edges (unbuild route) shall + * be reported as an error or as a warning. + * + */ +template +class AStarRouter : public SUMOAbstractRouter, public PF { + +public: + typedef SUMOReal(* Operation)(const E* const, const V* const, SUMOReal); + typedef std::vector > LookupTable; + /// Constructor + AStarRouter(size_t noE, bool unbuildIsWarning, Operation operation, const LookupTable* const lookup = 0): + SUMOAbstractRouter(operation, "AStarRouter"), + myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()), + myLookupTable(lookup) { + for (size_t i = 0; i < noE; i++) { + myEdgeInfos.push_back(EdgeInfo(i)); + } + } + + /// Destructor + virtual ~AStarRouter() {} + + virtual SUMOAbstractRouter* clone() const { + return new AStarRouter(myEdgeInfos.size(), myErrorMsgHandler == MsgHandler::getWarningInstance(), this->myOperation, myLookupTable); + } + + static LookupTable* createLookupTable(const std::string& filename, const int size) { + LookupTable* const result = new LookupTable(); + BinaryInputDevice dev(filename); + for (int i = 0; i < size; i++) { + for (int j = 0; j < size; j++) { + SUMOReal val; + dev >> val; + (*result)[i].push_back(val); + } + } + return result; + } + + /** + * @struct EdgeInfo + * A definition about a route's edge with the effort needed to reach it and + * the information about the previous edge. + */ + class EdgeInfo { + public: + /// Constructor + EdgeInfo(size_t id) : + edge(E::dictionary(id)), + traveltime(std::numeric_limits::max()), + heuristicTime(std::numeric_limits::max()), + prev(0), + visited(false) + {} + + /// The current edge + const E* edge; + + /// Effort to reach the edge + SUMOReal traveltime; + + /// Estimated time to reach the edge (traveltime + lower bound on remaining time) + SUMOReal heuristicTime; + + /// The previous edge + EdgeInfo* prev; + + /// The previous edge + bool visited; + + inline void reset() { + // heuristicTime is set before adding to the frontier, thus no reset is needed + traveltime = std::numeric_limits::max(); + visited = false; + } + + }; + + /** + * @class EdgeInfoComparator + * Class to compare (and so sort) nodes by their effort + */ + class EdgeInfoComparator { + public: + /// Comparing method + bool operator()(const EdgeInfo* nod1, const EdgeInfo* nod2) const { + if (nod1->heuristicTime == nod2->heuristicTime) { + return nod1->edge->getNumericalID() > nod2->edge->getNumericalID(); + } + return nod1->heuristicTime > nod2->heuristicTime; + } + }; + + void init() { + // all EdgeInfos touched in the previous query are either in myFrontierList or myFound: clean those up + for (typename std::vector::iterator i = myFrontierList.begin(); i != myFrontierList.end(); i++) { + (*i)->reset(); + } + myFrontierList.clear(); + for (typename std::vector::iterator i = myFound.begin(); i != myFound.end(); i++) { + (*i)->reset(); + } + myFound.clear(); + } + + + /** @brief Builds the route between the given edges using the minimum travel time */ + virtual void compute(const E* from, const E* to, const V* const vehicle, + SUMOTime msTime, std::vector& into) { + assert(from != 0 && to != 0); + this->startQuery(); + const SUMOVehicleClass vClass = vehicle == 0 ? SVC_IGNORING : vehicle->getVClass(); + const SUMOReal time = STEPS2TIME(msTime); + init(); + // add begin node + EdgeInfo* const fromInfo = &(myEdgeInfos[from->getNumericalID()]); + fromInfo->traveltime = 0; + fromInfo->prev = 0; + myFrontierList.push_back(fromInfo); + // loop + int num_visited = 0; + while (!myFrontierList.empty()) { + num_visited += 1; + // use the node with the minimal length + EdgeInfo* const minimumInfo = myFrontierList.front(); + const E* const minEdge = minimumInfo->edge; + pop_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); + myFrontierList.pop_back(); + myFound.push_back(minimumInfo); + // check whether the destination node was already reached + if (minEdge == to) { + buildPathFrom(minimumInfo, into); + this->endQuery(num_visited); + // DEBUG + //std::cout << "visited " + toString(num_visited) + " edges (final path length: " + toString(into.size()) + ")\n"; + return; + } + minimumInfo->visited = true; + const SUMOReal traveltime = minimumInfo->traveltime + this->getEffort(minEdge, vehicle, time + minimumInfo->traveltime); + // admissible A* heuristic: straight line distance at maximum speed + const SUMOReal heuristic_remaining = myLookupTable == 0 ? minEdge->getDistanceTo(to) / vehicle->getMaxSpeed() : (*myLookupTable)[minEdge->getNumericalID()][to->getNumericalID()] / vehicle->getChosenSpeedFactor(); + // check all ways from the node with the minimal length + const std::vector& successors = minEdge->getSuccessors(vClass); + for (typename std::vector::const_iterator it = successors.begin(); it != successors.end(); ++it) { + const E* const follower = *it; + EdgeInfo* const followerInfo = &(myEdgeInfos[follower->getNumericalID()]); + // check whether it can be used + if (PF::operator()(follower, vehicle)) { + continue; + } + const SUMOReal oldEffort = followerInfo->traveltime; + if (!followerInfo->visited && traveltime < oldEffort) { + followerInfo->traveltime = traveltime; + followerInfo->heuristicTime = traveltime + heuristic_remaining; + /* the code below results in fewer edges being looked up but is more costly due to the effort + calculations. Overall it resulted in a slowdown in the Berlin tests but could be made configurable someday. + followerInfo->heuristicTime = traveltime; + if (follower != to) { + if (myLookupTable == 0) { + // admissible A* heuristic: straight line distance at maximum speed + followerInfo->heuristicTime += this->getEffort(follower, vehicle, time + traveltime) + follower->getDistanceTo(to) / vehicle->getMaxSpeed(); + } else { + followerInfo->heuristicTime += this->getEffort(follower, vehicle, time + traveltime) + (*myLookupTable)[follower->getNumericalID()][to->getNumericalID()] / vehicle->getChosenSpeedFactor(); + } + }*/ + followerInfo->prev = minimumInfo; + if (oldEffort == std::numeric_limits::max()) { + myFrontierList.push_back(followerInfo); + push_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); + } else { + push_heap(myFrontierList.begin(), + find(myFrontierList.begin(), myFrontierList.end(), followerInfo) + 1, + myComparator); + } + } + } + } + this->endQuery(num_visited); + myErrorMsgHandler->inform("No connection between '" + from->getID() + "' and '" + to->getID() + "' found."); + } + + + SUMOReal recomputeCosts(const std::vector& edges, const V* const v, SUMOTime msTime) const { + const SUMOReal time = STEPS2TIME(msTime); + SUMOReal costs = 0; + for (typename std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + if (PF::operator()(*i, v)) { + return -1; + } + costs += this->getEffort(*i, v, time + costs); + } + return costs; + } + +public: + /// Builds the path from marked edges + void buildPathFrom(EdgeInfo* rbegin, std::vector& edges) { + std::deque tmp; + while (rbegin != 0) { + tmp.push_front((E*) rbegin->edge); // !!! + rbegin = rbegin->prev; + } + std::copy(tmp.begin(), tmp.end(), std::back_inserter(edges)); + } + +protected: + /// The container of edge information + std::vector myEdgeInfos; + + /// A container for reusage of the min edge heap + std::vector myFrontierList; + /// @brief list of visited Edges (for resetting) + std::vector myFound; + + EdgeInfoComparator myComparator; + + /// @brief the handler for routing errors + MsgHandler* const myErrorMsgHandler; + + /// @brief the lookup table for travel time heuristics + const LookupTable* const myLookupTable; + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/BulkStarRouter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/BulkStarRouter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/BulkStarRouter.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/BulkStarRouter.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,383 @@ +/****************************************************************************/ +/// @file BulkStarRouter.h +/// @author Jakob Erdmann +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date February 2012 +/// @version $Id: BulkStarRouter.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// A* Algorithm using shortest-path-in-fast-graph-heuristic for bulk routing +// This router is made for routing multiple sources (at different times) to the same destination +// In the reverse graph (using maximum edge speed) a lower-bound shortest path tree from the target is built. +// These optimistic distances are then used as admissable heuristc +// when routing forward in the time-dependent graph from multiple sources. +// @note: this heuristic does not perform well if the actual vehicles are much slower than the maximum edge speeds +// @note: this heuristic also does not perform well if the actual vehicles have usage restrictions +// @todo: add option for setting maximum speed +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef BulkStarRouter_h +#define BulkStarRouter_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class BulkStarRouterTT + * @brief Computes the shortest path through a network using the Dijkstra algorithm. + * + * The template parameters are: + * @param E The edge class to use (MSEdge/ROEdge) + * @param V The vehicle class to use (MSVehicle/ROVehicle) + * @param PF The prohibition function to use (prohibited_withRestrictions/prohibited_noRestrictions) + * @param EC The class to retrieve the effort for an edge from + * + * The router is edge-based. It must know the number of edges for internal reasons + * and whether a missing connection between two given edges (unbuild route) shall + * be reported as an error or as a warning. + * + */ +template +class BulkStarRouter: public SUMOAbstractRouter, public PF { + +public: + /// Type of the function that is used to retrieve the edge effort. + typedef SUMOReal(* Operation)(const E* const, const V* const, SUMOReal); + typedef SUMOReal(E::* MinTTOperation)(const V* const) const; + + + /// Constructor + BulkStarRouter(size_t noE, bool unbuildIsWarning, Operation operation, MinTTOperation minTTOperation) : + SUMOAbstractRouter(operation, "BulkStarRouter"), + myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()), + myMinTTOperation(minTTOperation), + myPreparedDestination(0) { + for (size_t i = 0; i < noE; i++) { + myEdgeInfos.push_back(EdgeInfo(i)); + } + } + + /// Destructor + virtual ~BulkStarRouter() {} + + virtual SUMOAbstractRouter* clone() const { + return new BulkStarRouter(myEdgeInfos.size(), myErrorMsgHandler == MsgHandler::getWarningInstance(), this->myOperation, myMinTTOperation); + } + + /** + * @struct EdgeInfo + * A definition about a route's edge with the effort needed to reach it and + * the information about the previous edge. + */ + class EdgeInfo { + public: + /// Constructor + EdgeInfo(size_t id) : + edge(E::dictionary(id)), + traveltime(std::numeric_limits::max()), + heuristicTime(std::numeric_limits::max()), + minRemaining(0), + prev(0), + visited(false) {} + + /// The current edge + const E* edge; + + /// Effort to reach the edge + SUMOReal traveltime; + + /// Estimated time to reach the edge (traveltime + lower bound on remaining time) + SUMOReal heuristicTime; + + /// minimum time to destination + SUMOReal minRemaining; + + /// The previous edge + EdgeInfo* prev; + + /// The previous edge + bool visited; + + inline void reset() { + // heuristicTime is set before adding to the frontier, thus no reset is needed + traveltime = std::numeric_limits::max(); + visited = false; + } + }; + + /** + * @class EdgeInfoComparator + * Class to compare (and so sort) nodes by their effort + */ + class EdgeInfoComparator { + public: + /// Comparing method + bool operator()(const EdgeInfo* nod1, const EdgeInfo* nod2) const { + if (nod1->heuristicTime == nod2->heuristicTime) { + return nod1->edge->getNumericalID() > nod2->edge->getNumericalID(); + } + return nod1->heuristicTime > nod2->heuristicTime; + } + }; + + inline SUMOReal getMinEffort(const E* const e, const V* const v) const { + return (e->*myMinTTOperation)(v); + } + + + /** @brief Builds a complete shorteset path tree in the (static) reverse + * graph from destination (Dijkstra until all EdgeInfos are visited) + * @param[in] destination The common destination for the following routes + * @param[in] fastestVehicle An optimistic vehicle (fastest, least restriction) for the following routes + * @param[in] skip Whether to shortcut the preparation (query uses euclidean heuristic) + * */ + void prepare(const E* destination, const V* fastestVehicle, bool skip) { + if (skip) { + myPreparedDestination = 0; + return; + } + myPreparedDestination = destination; + for (typename std::vector::iterator i = myEdgeInfos.begin(); i != myEdgeInfos.end(); i++) { + (*i).reset(); + (*i).minRemaining = 0; + } + myFrontier.clear(); + myFound.clear(); + // add begin node + EdgeInfo* const fromInfo = &(myEdgeInfos[destination->getNumericalID()]); + fromInfo->traveltime = 0; + fromInfo->prev = 0; + myFrontier.push_back(fromInfo); + // loop + int num_visited = 0; + while (!myFrontier.empty()) { + num_visited += 1; + // use the node with the minimal length + EdgeInfo* const minimumInfo = myFrontier.front(); + const E* const minEdge = minimumInfo->edge; + pop_heap(myFrontier.begin(), myFrontier.end(), myComparator); + myFrontier.pop_back(); + myFound.push_back(minimumInfo); + minimumInfo->visited = true; + const SUMOReal traveltime = minimumInfo->traveltime + getMinEffort(minEdge, fastestVehicle); + // check all ways from the node with the minimal length + for (typename std::vector::const_iterator it = minEdge->getPredecessors().begin(); it != minEdge->getPredecessors().end(); it++) { + const E* const follower = *it; + EdgeInfo* const followerInfo = &(myEdgeInfos[follower->getNumericalID()]); + const SUMOReal oldEffort = followerInfo->traveltime; + if (!followerInfo->visited && traveltime < oldEffort) { + followerInfo->traveltime = traveltime; + followerInfo->minRemaining = traveltime; + followerInfo->heuristicTime = traveltime; // plain dijkstra + followerInfo->prev = minimumInfo; + if (oldEffort == std::numeric_limits::max()) { + myFrontier.push_back(followerInfo); + push_heap(myFrontier.begin(), myFrontier.end(), myComparator); + } else { + push_heap(myFrontier.begin(), + find(myFrontier.begin(), myFrontier.end(), followerInfo) + 1, + myComparator); + } + } + } + } + // DEBUG + //std::cout << "visited " + toString(num_visited) + " edges during pre-computation\n"; + + // DEBUG + //std::vector debugPath; + //for (typename std::vector::iterator it = myEdgeInfos.begin(); it != myEdgeInfos.end(); it++) { + // if (it->edge->getID() == "src") { + // buildPathFrom(&(*it), debugPath); + // std::cout << "shortest path in reverse graph:\n"; + // for (typename std::vector::iterator it_path = debugPath.begin(); it_path != debugPath.end(); it_path++) { + // std::cout << (*it_path)->getID() << " "; + // } + // std::cout << "\n"; + // } + //} + } + + + void init() { + // all EdgeInfos touched in the previous query are either in myFrontier or myFound: clean those up + for (typename std::vector::iterator i = myFrontier.begin(); i != myFrontier.end(); i++) { + (*i)->reset(); + } + myFrontier.clear(); + for (typename std::vector::iterator i = myFound.begin(); i != myFound.end(); i++) { + (*i)->reset(); + } + myFound.clear(); + } + + + /** @brief Builds the route between the given edges using the minimum travel time */ + void compute(const E* from, const E* to, const V* const vehicle, + SUMOTime msTime, std::vector& into) { + assert(from != 0 && to != 0); + this->startQuery(); + const SUMOVehicleClass vClass = vehicle == 0 ? SVC_IGNORING : vehicle->getVClass(); + init(); + const Prepared prepared = (myPreparedDestination == 0 ? + NO : (myPreparedDestination == to ? YES_EXACT : YES)); + const SUMOReal time = STEPS2TIME(msTime); + const EdgeInfo& toInfo = myEdgeInfos[to->getNumericalID()]; + EdgeInfo* const fromInfo = &(myEdgeInfos[from->getNumericalID()]); + fromInfo->traveltime = 0; + fromInfo->prev = 0; + myFrontier.push_back(fromInfo); + // loop + int num_visited = 0; + while (!myFrontier.empty()) { + num_visited += 1; + // use the node with the minimal length + EdgeInfo* const minimumInfo = myFrontier.front(); + const E* const minEdge = minimumInfo->edge; + pop_heap(myFrontier.begin(), myFrontier.end(), myComparator); + myFrontier.pop_back(); + myFound.push_back(minimumInfo); + // check whether the destination node was already reached + if (minEdge == to) { + buildPathFrom(minimumInfo, into); + this->endQuery(num_visited); + // DEBUG + //std::cout << "visited " + toString(num_visited) + " edges (final path length: " + toString(into.size()) + ")\n"; + return; + } + minimumInfo->visited = true; + const SUMOReal traveltime = minimumInfo->traveltime + this->getEffort(minEdge, vehicle, time + minimumInfo->traveltime); + // check all ways from the node with the minimal length + const std::vector& successors = minEdge->getSuccessors(vClass); + for (typename std::vector::const_iterator it = successors.begin(); it != successors.end(); ++it) { + const E* const follower = *it; + EdgeInfo* const followerInfo = &(myEdgeInfos[follower->getNumericalID()]); + // check whether it can be used + if (PF::operator()(follower, vehicle)) { + continue; + } + const SUMOReal oldEffort = followerInfo->traveltime; + if (!followerInfo->visited && traveltime < oldEffort) { + followerInfo->traveltime = traveltime; + // admissible A* heuristic: + SUMOReal heuristic_remaining = 0; + switch (prepared) { + case NO: + // straight line distance at maximum speed + heuristic_remaining = minEdge->getDistanceTo(to) / vehicle->getMaxSpeed(); + break; + case YES_EXACT: + // shortest path for fastest vehicle in uncongested network + heuristic_remaining = minimumInfo->minRemaining; + break; + case YES: + // triangle inequality + heuristic_remaining = MAX2( + minimumInfo->minRemaining - toInfo.minRemaining, + minEdge->getDistanceTo(to) / vehicle->getMaxSpeed()); + break; + } + followerInfo->heuristicTime = traveltime + heuristic_remaining; + followerInfo->prev = minimumInfo; + if (oldEffort == std::numeric_limits::max()) { + myFrontier.push_back(followerInfo); + push_heap(myFrontier.begin(), myFrontier.end(), myComparator); + } else { + push_heap(myFrontier.begin(), + find(myFrontier.begin(), myFrontier.end(), followerInfo) + 1, + myComparator); + } + } + } + } + this->endQuery(num_visited); + myErrorMsgHandler->inform("No connection between '" + from->getID() + "' and '" + to->getID() + "' found."); + } + + + SUMOReal recomputeCosts(const std::vector& edges, const V* const v, SUMOTime msTime) const { + const SUMOReal time = STEPS2TIME(msTime); + SUMOReal costs = 0; + for (typename std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + if (PF::operator()(*i, v)) { + return -1; + } + costs += this->getEffort(*i, v, time + costs); + } + return costs; + } + +public: + /// Builds the path from marked edges + void buildPathFrom(EdgeInfo* rbegin, std::vector& edges) { + std::deque tmp; + while (rbegin != 0) { + tmp.push_front((E*) rbegin->edge); // !!! + rbegin = rbegin->prev; + } + std::copy(tmp.begin(), tmp.end(), std::back_inserter(edges)); + } + +private: + enum Prepared { + NO, + YES, + YES_EXACT // optimistic shortest paths are computed for the current destination + }; + + /// The container of edge information + std::vector myEdgeInfos; + + /// A container for reusage of the min edge heap + std::vector myFrontier; + /// @brief list of visited Edges (for resetting) + std::vector myFound; + + EdgeInfoComparator myComparator; + + /// @brief the handler for routing errors + MsgHandler* const myErrorMsgHandler; + + MinTTOperation myMinTTOperation; + + const E* myPreparedDestination; +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/CHRouter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/CHRouter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/CHRouter.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/CHRouter.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,870 @@ +/****************************************************************************/ +/// @file CHRouter.h +/// @author Jakob Erdmann +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date February 2012 +/// @version $Id: CHRouter.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Shortest Path search using a Contraction Hierarchy +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef CHRouter_h +#define CHRouter_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "SPTree.h" + +//#define CHRouter_DEBUG_QUERY +//#define CHRouter_DEBUG_QUERY_PERF +//#define CHRouter_DEBUG_CONTRACTION +//#define CHRouter_DEBUG_CONTRACTION_WITNESSES +//#define CHRouter_DEBUG_CONTRACTION_QUEUE +//#define CHRouter_DEBUG_CONTRACTION_DEGREE +//#define CHRouter_DEBUG_WEIGHTS + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class CHRouter + * @brief Computes the shortest path through a contracted network + * + * The template parameters are: + * @param E The edge class to use (MSEdge/ROEdge) + * @param V The vehicle class to use (MSVehicle/ROVehicle) + * @param PF The prohibition function to use (prohibited_withRestrictions/prohibited_noRestrictions) + * + * The router is edge-based. It must know the number of edges for internal reasons + * and whether a missing connection between two given edges (unbuild route) shall + * be reported as an error or as a warning. + * + */ +template +class CHRouter: public SUMOAbstractRouter, public PF { + +public: + class EdgeInfo; + + /// Type of the function that is used to retrieve the edge effort. + typedef SUMOReal(* Operation)(const E* const, const V* const, SUMOReal); + + /// A meeting point of the two search scopes + typedef std::pair Meeting; + + /// A set of (found) Edges + typedef std::set EdgeSet; + + /// The found route (used as output parameter) + typedef std::vector Result; + + /// @brief Forward/backward connection with associated forward/backward cost + // forward connections are used only in forward search + // backward connections are used only in backwards search + class Connection { + public: + Connection(EdgeInfo* t, SUMOReal c, SVCPermissions p): target(t), cost(c), permissions(p) {} + EdgeInfo* target; + SUMOReal cost; + SVCPermissions permissions; + }; + + /** + * @struct EdgeInfo + * A definition about a route's edge with the effort needed to reach it and + * the information about the previous edge. + */ + class EdgeInfo { + public: + /// Constructor + EdgeInfo(size_t id) : + edge(E::dictionary(id)), + traveltime(std::numeric_limits::max()), + prev(0), + visited(false) + {} + + /// The current edge + const E* edge; + + /// Effort to reach the edge + SUMOReal traveltime; + + /// The previous edge + EdgeInfo* prev; + + /// Whether the shortest path to this edge is already found + bool visited; + + /// Connections to higher ranked nodes + std::vector upward; + + /// the contraction rank (higher means more important) + int rank; + + inline void reset() { + traveltime = std::numeric_limits::max(); + visited = false; + } + }; + + + /** + * @class Unidirectional + * class for searching in one direction + */ + class Unidirectional: public PF { + public: + /// @brief Constructor + Unidirectional(size_t numEdges, bool forward): + myAmForward(forward), + myVehicle(0) { + for (size_t i = 0; i < numEdges; i++) { + myEdgeInfos.push_back(EdgeInfo(i)); + } + } + + inline bool found(const E* edge) const { + return myFound.count(edge) > 0; + } + + inline EdgeInfo* getEdgeInfo(const E* const edge) { + return &(myEdgeInfos[edge->getNumericalID()]); + } + + inline const EdgeInfo* getEdgeInfo(const E* const edge) const { + return &(myEdgeInfos[edge->getNumericalID()]); + } + + /** + * @class EdgeInfoByEffortComparator + * Class to compare (and so sort) nodes by their effort + */ + class EdgeInfoByTTComparator { + public: + /// Comparing method + bool operator()(const EdgeInfo* nod1, const EdgeInfo* nod2) const { + if (nod1->traveltime == nod2->traveltime) { + return nod1->edge->getNumericalID() > nod2->edge->getNumericalID(); + } + return nod1->traveltime > nod2->traveltime; + } + }; + + + void init(const E* const start, const V* const vehicle) { + assert(vehicle != 0); + // all EdgeInfos touched in the previous query are either in myFrontier or myFound: clean those up + for (typename std::vector::iterator i = myFrontier.begin(); i != myFrontier.end(); i++) { + (*i)->reset(); + } + myFrontier.clear(); + for (typename EdgeSet::iterator i = myFound.begin(); i != myFound.end(); i++) { + getEdgeInfo(*i)->reset(); + } + myFound.clear(); + myVehicle = vehicle; + EdgeInfo* startInfo = getEdgeInfo(start); + startInfo->traveltime = 0; + startInfo->prev = 0; + myFrontier.push_back(startInfo); + } + + + /** @brief explore on element from the frontier,update minTTSeen and meeting + * if an EdgeInfo found by the otherSearch is encountered + * returns whether stepping should continue + */ + bool step(const Unidirectional& otherSearch, SUMOReal& minTTSeen, Meeting& meeting) { + // pop the node with the minimal length + EdgeInfo* const minimumInfo = myFrontier.front(); + pop_heap(myFrontier.begin(), myFrontier.end(), myComparator); + myFrontier.pop_back(); + // check for a meeting with the other search + const E* const minEdge = minimumInfo->edge; +#ifdef CHRouter_DEBUG_QUERY + std::cout << "DEBUG: " << (myAmForward ? "Forward" : "Backward") << " hit '" << minEdge->getID() << "' Q: "; + for (typename std::vector::iterator it = myFrontier.begin(); it != myFrontier.end(); it++) { + std::cout << (*it)->traveltime << "," << (*it)->edge->getID() << " "; + } + std::cout << "\n"; +#endif + if (otherSearch.found(minEdge)) { + const EdgeInfo* const otherInfo = otherSearch.getEdgeInfo(minEdge); + const SUMOReal ttSeen = minimumInfo->traveltime + otherInfo->traveltime; +#ifdef CHRouter_DEBUG_QUERY + std::cout << "DEBUG: " << (myAmForward ? "Forward" : "Backward") << "-Search hit other search at '" << minEdge->getID() << "', tt: " << ttSeen << " \n"; +#endif + if (ttSeen < minTTSeen) { + minTTSeen = ttSeen; + if (myAmForward) { + meeting.first = minimumInfo; + meeting.second = otherInfo; + } else { + meeting.first = otherInfo; + meeting.second = minimumInfo; + } + } + } + // prepare next steps + minimumInfo->visited = true; + // XXX we only need to keep found elements if they have a higher rank than the lowest rank in the other search queue + myFound.insert(minimumInfo->edge); + for (typename std::vector::iterator it = minimumInfo->upward.begin(); it != minimumInfo->upward.end(); it++) { + EdgeInfo* upwardInfo = it->target; + const SUMOReal traveltime = minimumInfo->traveltime + it->cost; + const SUMOVehicleClass svc = myVehicle->getVClass(); + // check whether it can be used + if ((it->permissions & svc) != svc) { + continue; + } + const SUMOReal oldTraveltime = upwardInfo->traveltime; + if (!upwardInfo->visited && traveltime < oldTraveltime) { + upwardInfo->traveltime = traveltime; + upwardInfo->prev = minimumInfo; + if (oldTraveltime == std::numeric_limits::max()) { + myFrontier.push_back(upwardInfo); + push_heap(myFrontier.begin(), myFrontier.end(), myComparator); + } else { + push_heap(myFrontier.begin(), + find(myFrontier.begin(), myFrontier.end(), upwardInfo) + 1, + myComparator); + } + } + } + // @note: this effectively does a full dijkstra search. + // the effort compared to the naive stopping criterion is thus + // quadrupled. We could implement a better stopping criterion (Holte) + // However since the search shall take place in a contracted graph + // it probably does not matter + return !myFrontier.empty() && myFrontier.front()->traveltime < minTTSeen; + } + + + // reset state before rebuilding the contraction hierarchy + void reset() { + for (typename std::vector::iterator it = myEdgeInfos.begin(); it != myEdgeInfos.end(); ++it) { + it->upward.clear(); + } + } + + private: + /// @brief the role of this search + bool myAmForward; + /// @brief the min edge heap + std::vector myFrontier; + /// @brief the set of visited (settled) Edges + EdgeSet myFound; + /// @brief The container of edge information + std::vector myEdgeInfos; + + EdgeInfoByTTComparator myComparator; + + const V* myVehicle; + + }; + + class CHInfo; + + /// @brief Forward/backward connection with associated FORWARD cost + class CHConnection { + public: + CHConnection(CHInfo* t, SUMOReal c, SVCPermissions p, int u): + target(t), cost(c), permissions(p), underlying(u) {} + CHInfo* target; + SUMOReal cost; + SVCPermissions permissions; + /// the number of connections underlying this connection + int underlying; + }; + + typedef std::vector CHConnections; + typedef std::pair CHConnectionPair; + typedef std::vector CHConnectionPairs; + + /** @brief Constructor + * @param[in] validatePermissions Whether a multi-permission hierarchy shall be built + * If set to false, the net is pruned in synchronize() and the + * hierarchy is tailored to the vClass of the defaultVehicle + * @note: defaultVehicle is not transient and must be kept after constructor finishes + */ + CHRouter(size_t numEdges, bool unbuildIsWarning, Operation operation, + const SUMOVehicleClass svc, + SUMOTime weightPeriod, + bool validatePermissions): + SUMOAbstractRouter(operation, "CHRouter"), + myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()), + myForwardSearch(numEdges, true), + myBackwardSearch(numEdges, false), + mySPTree(new SPTree(4, validatePermissions)), + myWeightPeriod(weightPeriod), + myValidUntil(0), + mySVC(svc), + myUpdateCount(0) { + for (size_t i = 0; i < numEdges; i++) { + myCHInfos.push_back(CHInfo(i)); + } + } + + /// Destructor + virtual ~CHRouter() { + delete mySPTree; + } + + + virtual SUMOAbstractRouter* clone() const { + return new CHRouter(myCHInfos.size(), myErrorMsgHandler == MsgHandler::getWarningInstance(), this->myOperation, + mySVC, myWeightPeriod, mySPTree->validatePermissions()); + } + + /** @brief Builds the route between the given edges using the minimum traveltime in the contracted graph + * @note: since the contracted graph is static (weights averaged over time) + * the computed routes only approximated shortest paths in the real graph + * */ + virtual void compute(const E* from, const E* to, const V* const vehicle, + SUMOTime msTime, Result& into) { + assert(from != 0 && to != 0); + assert(mySPTree->validatePermissions() || vehicle->getVClass() == mySVC || mySVC == SVC_IGNORING); + // do we need to rebuild the hierarchy? + if (msTime >= myValidUntil) { + while (msTime >= myValidUntil) { + myValidUntil += myWeightPeriod; + } + buildContractionHierarchy(myValidUntil - myWeightPeriod, vehicle); + } + // ready for routing + this->startQuery(); + myForwardSearch.init(from, vehicle); + myBackwardSearch.init(to, vehicle); + SUMOReal minTTSeen = std::numeric_limits::max(); + Meeting meeting(static_cast(0), static_cast(0)); + bool continueForward = true; + bool continueBackward = true; + int num_visited_fw = 0; + int num_visited_bw = 0; + while (continueForward || continueBackward) { + if (continueForward) { + continueForward = myForwardSearch.step(myBackwardSearch, minTTSeen, meeting); + num_visited_fw += 1; + } + if (continueBackward) { + continueBackward = myBackwardSearch.step(myForwardSearch, minTTSeen, meeting); + num_visited_bw += 1; + } + } + if (minTTSeen < std::numeric_limits::max()) { + buildPathFromMeeting(meeting, into); + } else { + myErrorMsgHandler->inform("No connection between '" + from->getID() + "' and '" + to->getID() + "' found."); + } +#ifdef CHRouter_DEBUG_QUERY_PERF + std::cout << "visited " << num_visited_fw + num_visited_bw << " edges (" << num_visited_fw << "," << num_visited_bw << ") ,final path length: " + toString(into.size()) + ")\n"; +#endif + this->endQuery(num_visited_bw + num_visited_fw); + } + + + SUMOReal recomputeCosts(const std::vector& edges, const V* const v, SUMOTime msTime) const { + const SUMOReal time = STEPS2TIME(msTime); + SUMOReal costs = 0; + for (typename std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + if (PF::operator()(*i, v)) { + return -1; + } + costs += this->getEffort(*i, v, time + costs); + } + return costs; + } + + /// normal routing methods + + /// Builds the path from marked edges + void buildPathFromMeeting(Meeting meeting, Result& into) { + std::deque tmp; + const EdgeInfo* backtrack = meeting.first; + while (backtrack != 0) { + tmp.push_front((E*) backtrack->edge); // !!! + backtrack = backtrack->prev; + } + backtrack = meeting.second->prev; // don't use central edge twice + while (backtrack != 0) { + tmp.push_back((E*) backtrack->edge); // !!! + backtrack = backtrack->prev; + } + // expand shortcuts + const E* prev = 0; + while (!tmp.empty()) { + const E* cur = tmp.front(); + tmp.pop_front(); + if (prev == 0) { + into.push_back(cur); + prev = cur; + } else { + const E* via = getVia(prev, cur); + if (via == 0) { + into.push_back(cur); + prev = cur; + } else { + tmp.push_front(cur); + tmp.push_front(via); + } + } + } + } + + /// contraction related members + typedef std::pair ConstEdgePair; + typedef std::pair EdgePair; + + struct Shortcut { + Shortcut(EdgePair e, SUMOReal c, int u, SVCPermissions p): + edgePair(e), cost(c), underlying(u), permissions(p) {} + EdgePair edgePair; + SUMOReal cost; + int underlying; + SVCPermissions permissions; + }; + + typedef std::vector Shortcuts; + typedef std::map ShortcutVia; + + /* @brief container class to use when building the contraction hierarchy. + * instances are reused every time the hierarchy is rebuilt (new time slice) + * but they must be synchronized first */ + class CHInfo { + public: + /// @brief Constructor + CHInfo(size_t id) : + edge(E::dictionary(id)), + contractedNeighbors(0), + rank(-1), + level(0), + underlyingTotal(0), + visited(false), + traveltime(std::numeric_limits::max()) + {} + + /// @brief recompute the contraction priority and report whether it changed + bool updatePriority(SPTree* spTree) { + if (spTree != 0) { + updateShortcuts(spTree); + updateLevel(); + } else { + contractedNeighbors += 1; // called when a connected edge was contracted + } + const SUMOReal oldPriority = priority; + // priority term as used by abraham [] + const int edge_difference = (int)followers.size() + (int)approaching.size() - 2 * (int)shortcuts.size(); + priority = (SUMOReal)(2 * edge_difference - contractedNeighbors - underlyingTotal - 5 * level); + return priority != oldPriority; + } + + /// compute needed shortcuts when contracting this edge + void updateShortcuts(SPTree* spTree) { + const bool validatePermissions = spTree->validatePermissions(); +#ifdef CHRouter_DEBUG_CONTRACTION_DEGREE + const int degree = approaching.size() + followers.size(); + std::cout << "computing shortcuts for '" + edge->getID() + "' with degree " + toString(degree) + "\n"; +#endif + shortcuts.clear(); + underlyingTotal = 0; + for (typename CHConnections::iterator it_a = approaching.begin(); it_a != approaching.end(); it_a++) { + CHConnection& aInfo = *it_a; + // build shortest path tree in a fixed neighborhood + spTree->rebuildFrom(aInfo.target, this); + for (typename CHConnections::iterator it_f = followers.begin(); it_f != followers.end(); it_f++) { + CHConnection& fInfo = *it_f; + const SUMOReal viaCost = aInfo.cost + fInfo.cost; + const SVCPermissions viaPermissions = (aInfo.permissions & fInfo.permissions); + if (fInfo.target->traveltime > viaCost) { + // found no faster path -> we need a shortcut via edge +#ifdef CHRouter_DEBUG_CONTRACTION_WITNESSES + debugNoWitness(aInfo, fInfo); +#endif + const int underlying = aInfo.underlying + fInfo.underlying; + underlyingTotal += underlying; + shortcuts.push_back(Shortcut(EdgePair(aInfo.target->edge, fInfo.target->edge), + viaCost, underlying, viaPermissions)); + + } else if (validatePermissions) { + if ((fInfo.target->permissions & viaPermissions) != viaPermissions) { + // witness has weaker restrictions. try to find another witness + spTree->registerForValidation(&aInfo, &fInfo); + } else { +#ifdef CHRouter_DEBUG_CONTRACTION_WITNESSES + debugNoWitness(aInfo, fInfo); +#endif + } + } else { +#ifdef CHRouter_DEBUG_CONTRACTION_WITNESSES + debugNoWitness(aInfo, fInfo); +#endif + } + } + } + // insert shortcuts needed due to unmet permissions + if (validatePermissions) { + const CHConnectionPairs& pairs = spTree->getNeededShortcuts(this); + for (typename CHConnectionPairs::const_iterator it = pairs.begin(); it != pairs.end(); ++it) { + const CHConnection* aInfo = it->first; + const CHConnection* fInfo = it->second; + const SUMOReal viaCost = aInfo->cost + fInfo->cost; + const SVCPermissions viaPermissions = (aInfo->permissions & fInfo->permissions); + const int underlying = aInfo->underlying + fInfo->underlying; + underlyingTotal += underlying; + shortcuts.push_back(Shortcut(EdgePair(aInfo->target->edge, fInfo->target->edge), + viaCost, underlying, viaPermissions)); + } + } + } + + + // update level as defined by Abraham + void updateLevel() { + int maxLower = std::numeric_limits::min(); + int otherRank; + for (typename CHConnections::iterator it = approaching.begin(); it != approaching.end(); it++) { + otherRank = it->target->rank; + if (otherRank < rank) { + maxLower = MAX2(rank, maxLower); + } + } + for (typename CHConnections::iterator it = followers.begin(); it != followers.end(); it++) { + otherRank = it->target->rank; + if (otherRank < rank) { + maxLower = MAX2(rank, maxLower); + } + } + if (maxLower == std::numeric_limits::min()) { + level = 0; + } else { + level = maxLower + 1; + } + } + + // resets state before rebuilding the hierarchy + void resetContractionState() { + contractedNeighbors = 0; + rank = -1; + level = 0; + underlyingTotal = 0; + shortcuts.clear(); + followers.clear(); + approaching.clear(); + } + + + /// @brief The current edge - not const since it may receive shortcut edges + E* edge; + /// @brief The contraction priority + SUMOReal priority; + /// @brief The needed shortcuts + Shortcuts shortcuts; + /// @brief priority subterms + int contractedNeighbors; + int rank; + int level; + int underlyingTotal; + + /// @brief connections (only valid after synchronization) + CHConnections followers; + CHConnections approaching; + + + /// members used in SPTree + bool visited; + /// Effort to reach the edge + SUMOReal traveltime; + /// number of edges from start + int depth; + /// the permissions when reaching this edge on the fastest path + // @note: we may miss some witness paths by making traveltime the only + // criteria durinng search + SVCPermissions permissions; + + inline void reset() { + traveltime = std::numeric_limits::max(); + visited = false; + } + + + /// debugging methods + inline void debugNoWitness(const CHConnection& aInfo, const CHConnection& fInfo) { + std::cout << "adding shortcut between " << aInfo.target->edge->getID() << ", " << fInfo.target->edge->getID() << " via " << edge->getID() << "\n"; + } + + inline void debugWitness(const CHConnection& aInfo, const CHConnection& fInfo) { + const SUMOReal viaCost = aInfo.cost + fInfo.cost; + std::cout << "found witness with lenght " << fInfo.target->traveltime << " against via " << edge->getID() << " (length " << viaCost << ") for " << aInfo.target->edge->getID() << ", " << fInfo.target->edge->getID() << "\n"; + } + + }; + +private: + + /** + * @class EdgeInfoByRankComparator + * Class to compare (and so sort) nodes by their contraction priority + */ + class CHInfoComparator { + public: + /// Comparing method + bool operator()(const CHInfo* a, const CHInfo* b) const { + if (a->priority == b->priority) { + return a->edge->getNumericalID() > b->edge->getNumericalID(); + } else { + return a->priority < b->priority; + }; + } + }; + + + inline CHInfo* getCHInfo(const E* const edge) { + return &(myCHInfos[edge->getNumericalID()]); + } + + + /// @brief copy connections from the original net (modified destructively during contraction) + void synchronize(CHInfo& info, SUMOReal time, const V* const vehicle) { + // forward and backward connections are used only in forward search, + // thus approaching costs are those of the approaching edge and not of the edge itself + const bool prune = !mySPTree->validatePermissions(); + const E* const edge = info.edge; + if (prune && ((edge->getPermissions() & mySVC) != mySVC)) { + return; + } + const SUMOReal cost = this->getEffort(edge, vehicle, time); + + const std::vector& successors = edge->getSuccessors(mySVC); + for (typename std::vector::const_iterator it = successors.begin(); it != successors.end(); ++it) { + const E* fEdge = *it; + if (prune && ((fEdge->getPermissions() & mySVC) != mySVC)) { + continue; + } + CHInfo* follower = getCHInfo(fEdge); + SVCPermissions permissions = (edge->getPermissions() & follower->edge->getPermissions()); + info.followers.push_back(CHConnection(follower, cost, permissions, 1)); + follower->approaching.push_back(CHConnection(&info, cost, permissions, 1)); + } +#ifdef CHRouter_DEBUG_WEIGHTS + std::cout << time << ": " << edge->getID() << " cost: " << cost << "\n"; +#endif + // @todo: check whether we even need to save approaching in ROEdge; + } + + + /// @brief remove all connections to/from the given edge (assume it exists only once) + void disconnect(CHConnections& connections, CHInfo* other) { + for (typename CHConnections::iterator it = connections.begin(); it != connections.end(); it++) { + if (it->target == other) { + connections.erase(it); + return; + } + } + assert(false); + } + + + void buildContractionHierarchy(SUMOTime time, const V* const vehicle) { + const size_t numEdges = myCHInfos.size(); + const std::string vClass = (mySPTree->validatePermissions() ? + "all vehicle classes " : "vClass='" + SumoVehicleClassStrings.getString(mySVC) + "' "); + PROGRESS_BEGIN_MESSAGE("Building Contraction Hierarchy for " + vClass + + "and time=" + time2string(time) + " (" + toString(numEdges) + " edges)\n"); + const long startMillis = SysUtils::getCurrentMillis(); + // init queue + std::vector queue; // max heap: edge to be contracted is front + myShortcuts.clear(); + // reset previous connections etc + myForwardSearch.reset(); + myBackwardSearch.reset(); + for (size_t i = 0; i < numEdges; i++) { + myCHInfos[i].resetContractionState(); + } + // copy connections from the original net + const SUMOReal time_seconds = STEPS2TIME(time); // timelines store seconds! + for (size_t i = 0; i < numEdges; i++) { + synchronize(myCHInfos[i], time_seconds, vehicle); + } + // synchronization is finished. now we can compute priorities for the first time + for (size_t i = 0; i < numEdges; i++) { + myCHInfos[i].updatePriority(mySPTree); + queue.push_back(&(myCHInfos[i])); + } + make_heap(queue.begin(), queue.end(), myCmp); + int contractionRank = 0; + // contraction loop + while (!queue.empty()) { + while (tryUpdateFront(queue)) {} + CHInfo* max = queue.front(); + max->rank = contractionRank; +#ifdef CHRouter_DEBUG_CONTRACTION + std::cout << "contracting '" << max->edge->getID() << "' with prio: " << max->priority << " (rank " << contractionRank << ")\n"; +#endif + E* edge = max->edge; + // add outgoing connections to the forward search + EdgeInfo* edgeInfoFW = myForwardSearch.getEdgeInfo(edge); + edgeInfoFW->rank = contractionRank; + for (typename CHConnections::iterator it = max->followers.begin(); it != max->followers.end(); it++) { + CHConnection& con = *it; + EdgeInfo* followerInfoFW = myForwardSearch.getEdgeInfo(con.target->edge); + edgeInfoFW->upward.push_back(Connection(followerInfoFW, con.cost, con.permissions)); + disconnect(con.target->approaching, max); + con.target->updatePriority(0); + } + // add incoming connections to the backward search + EdgeInfo* edgeInfoBW = myBackwardSearch.getEdgeInfo(edge); + edgeInfoBW->rank = contractionRank; + for (typename CHConnections::iterator it = max->approaching.begin(); it != max->approaching.end(); it++) { + CHConnection& con = *it; + EdgeInfo* approachingInfoBW = myBackwardSearch.getEdgeInfo(con.target->edge); + edgeInfoBW->upward.push_back(Connection(approachingInfoBW, con.cost, con.permissions)); + disconnect(con.target->followers, max); + con.target->updatePriority(0); + } + // add shortcuts to the net + for (typename Shortcuts::iterator it = max->shortcuts.begin(); it != max->shortcuts.end(); it++) { + EdgePair& edgePair = it->edgePair; + myShortcuts[edgePair] = edge; + CHInfo* from = getCHInfo(edgePair.first); + CHInfo* to = getCHInfo(edgePair.second); + from->followers.push_back(CHConnection(to, it->cost, it->permissions, it->underlying)); + to->approaching.push_back(CHConnection(from, it->cost, it->permissions, it->underlying)); + } + // remove from queue + pop_heap(queue.begin(), queue.end(), myCmp); + queue.pop_back(); + /* + if (contractionRank % 10000 == 0) { + // update all and rebuild queue + for (typename std::vector::iterator it = queue.begin(); it != queue.end(); ++it) { + (*it)->updatePriority(mySPTree); + } + make_heap(queue.begin(), queue.end(), myCmp); + } + */ + contractionRank++; + } + // reporting + const long duration = SysUtils::getCurrentMillis() - startMillis; + WRITE_MESSAGE("Created " + toString(myShortcuts.size()) + " shortcuts."); + WRITE_MESSAGE("Recomputed priority " + toString(myUpdateCount) + " times."); + MsgHandler::getMessageInstance()->endProcessMsg("done (" + toString(duration) + "ms)."); + PROGRESS_DONE_MESSAGE(); + // declare new validUntil (prevent overflow) + if (myWeightPeriod < std::numeric_limits::max()) { + myValidUntil = time + myWeightPeriod; + } else { + myValidUntil = myWeightPeriod; + } + myUpdateCount = 0; + } + + // retrieve the via edge for a shortcut + const E* getVia(const E* forwardFrom, const E* forwardTo) { + ConstEdgePair forward(forwardFrom, forwardTo); + typename ShortcutVia::iterator it = myShortcuts.find(forward); + if (it != myShortcuts.end()) { + return it->second; + } else { + return 0; + } + } + + + /** @brief tries to update the priority of the first edge + * @return wether updating changed the first edge + */ + bool tryUpdateFront(std::vector& queue) { + myUpdateCount++; + CHInfo* max = queue.front(); +#ifdef CHRouter_DEBUG_CONTRACTION_QUEUE + std::cout << "updating '" << max->edge->getID() << "'\n"; + debugPrintQueue(queue); +#endif + if (max->updatePriority(mySPTree)) { + pop_heap(queue.begin(), queue.end(), myCmp); + push_heap(queue.begin(), queue.end(), myCmp); + return true; + } else { + return false; + } + } + + // helper method for debugging + void debugPrintQueue(std::vector& queue) { + for (typename std::vector::iterator it = queue.begin(); it != queue.end(); it++) { + CHInfo* chInfo = *it; + std::cout << "(" << chInfo->edge->getID() << "," << chInfo->priority << ") "; + } + std::cout << "\n"; + } + +private: + /// @brief the handler for routing errors + MsgHandler* const myErrorMsgHandler; + + /// @brief the unidirectional search queues + Unidirectional myForwardSearch; + Unidirectional myBackwardSearch; + + /// @brief map from (forward) shortcut to via-Edge + ShortcutVia myShortcuts; + + /// @brief static vector for lookup + std::vector myCHInfos; + + /// @brief Comparator for contraction priority + CHInfoComparator myCmp; + + /// @brief the shortest path tree to use when searching for shortcuts + SPTree* mySPTree; + + /// @brief the validity duration of one weight interval + const SUMOTime myWeightPeriod; + + /// @brief the validity duration of the current hierarchy (exclusive) + SUMOTime myValidUntil; + + /// @brief the permissions for which the hierarchy was constructed + SUMOVehicleClass mySVC; + + /// @brief counters for performance logging + int myUpdateCount; +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/CHRouterWrapper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/CHRouterWrapper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/CHRouterWrapper.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/CHRouterWrapper.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,142 @@ +/****************************************************************************/ +/// @file CHRouterWrapper.h +/// @author Jakob Erdmann +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date March 2012 +/// @version $Id: CHRouterWrapper.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Wraps multiple CHRouters for different vehicle types +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef CHRouterWrapper_h +#define CHRouterWrapper_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "CHRouter.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class CHRouterWrapper + * @brief Computes the shortest path through a contracted network + * + * The template parameters are: + * @param E The edge class to use (MSEdge/ROEdge) + * @param V The vehicle class to use (MSVehicle/ROVehicle) + * @param PF The prohibition function to use (prohibited_withRestrictions/prohibited_noRestrictions) + * + * The router is edge-based. It must know the number of edges for internal reasons + * and whether a missing connection between two given edges (unbuild route) shall + * be reported as an error or as a warning. + * + */ +template +class CHRouterWrapper: public SUMOAbstractRouter, public PF { + +public: + /// Type of the function that is used to retrieve the edge effort. + typedef SUMOReal(* Operation)(const E* const, const V* const, SUMOReal); + + /** @brief Constructor + */ + CHRouterWrapper(size_t dictSize, bool ignoreErrors, Operation operation, SUMOTime begin, SUMOTime weightPeriod): + SUMOAbstractRouter(operation, "CHRouterWrapper"), + myDictSize(dictSize), + myIgnoreErrors(ignoreErrors), + myBegin(begin), + myWeightPeriod(weightPeriod) + {} + + ~CHRouterWrapper() { + for (typename RouterMap::iterator i = myRouters.begin(); i != myRouters.end(); ++i) { + delete(*i).second; + } + } + + + virtual SUMOAbstractRouter* clone() const { + return new CHRouterWrapper(myDictSize, myIgnoreErrors, this->myOperation, myBegin, myWeightPeriod); + } + + void compute(const E* from, const E* to, const V* const vehicle, + SUMOTime msTime, std::vector& into) { + const std::pair svc = std::make_pair(vehicle->getVClass(), vehicle->getMaxSpeed()); + if (myRouters.count(svc) == 0) { + // create new router for the given permissions and maximum speed + // XXX a new router may also be needed if vehicles differ in speed factor + myRouters[svc] = new CHRouterType( + myDictSize, myIgnoreErrors, &E::getTravelTimeStatic, svc.first, myWeightPeriod, false); + } + myRouters[svc]->compute(from, to, vehicle, msTime, into); + } + + + SUMOReal recomputeCosts(const std::vector& edges, + const V* const v, SUMOTime msTime) const { + const SUMOReal time = STEPS2TIME(msTime); + SUMOReal costs = 0; + for (typename std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + if (PF::operator()(*i, v)) { + WRITE_WARNING("Vehicle '" + v->getID() + "' is restricted from using its assigned route."); + return -1; + } + costs += this->getEffort(*i, v, time + costs); + } + return costs; + } + + +private: + typedef CHRouter > CHRouterType; + typedef std::map, CHRouterType*> RouterMap; + + RouterMap myRouters; + + /// @brief number of edges with numerical id + size_t myDictSize; + + bool myIgnoreErrors; + + SUMOTime myBegin; + SUMOTime myWeightPeriod; +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/DijkstraRouterEffort.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/DijkstraRouterEffort.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/DijkstraRouterEffort.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/DijkstraRouterEffort.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,260 @@ +/****************************************************************************/ +/// @file DijkstraRouterEffort.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date Mon, 25 July 2005 +/// @version $Id: DijkstraRouterEffort.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Dijkstra shortest path algorithm using other values +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef DijkstraRouterEffort_h +#define DijkstraRouterEffort_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "SUMOAbstractRouter.h" + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class DijkstraRouterEffort + * @brief Computes the shortest path through a network using the Dijkstra algorithm. + * + * The template parameters are: + * @param E The edge class to use (MSEdge/ROEdge) + * @param V The vehicle class to use (MSVehicle/ROVehicle) + * @param PF The prohibition function to use (prohibited_withRestrictions/prohibited_noRestrictions) + * @param EC The class to retrieve the effort for an edge from + * + * The router is edge-based. It must know the number of edges for internal reasons + * and whether a missing connection between two given edges (unbuild route) shall + * be reported as an error or as a warning. + * + */ +template +class DijkstraRouterEffort : public SUMOAbstractRouter, public PF { + +public: + typedef SUMOReal(* Operation)(const E* const, const V* const, SUMOReal); + /// Constructor + DijkstraRouterEffort(size_t noE, bool unbuildIsWarning, Operation effortOperation, Operation ttOperation) : + SUMOAbstractRouter(effortOperation, "DijkstraRouterEffort"), myTTOperation(ttOperation), + myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()) { + for (size_t i = 0; i < noE; i++) { + myEdgeInfos.push_back(EdgeInfo(i)); + } + } + + /// Destructor + virtual ~DijkstraRouterEffort() { } + + virtual SUMOAbstractRouter* clone() const { + return new DijkstraRouterEffort(myEdgeInfos.size(), myErrorMsgHandler == MsgHandler::getWarningInstance(), this->myOperation, myTTOperation); + } + + /** + * @struct EdgeInfo + * A definition about a route's edge with the effort needed to reach it and + * the information about the previous edge. + */ + class EdgeInfo { + public: + /// Constructor + EdgeInfo(size_t id) + : edge(E::dictionary(id)), effort(std::numeric_limits::max()), leaveTime(0), prev(0), visited(false) {} + + /// The current edge + const E* edge; + + /// Effort to reach the edge + SUMOReal effort; + + /// The time the vehicle leaves the edge + SUMOReal leaveTime; + + /// The previous edge + EdgeInfo* prev; + + /// The previous edge + bool visited; + + inline void reset() { + effort = std::numeric_limits::max(); + visited = false; + } + }; + + /** + * @class EdgeInfoByEffortComparator + * Class to compare (and so sort) nodes by their effort + */ + class EdgeInfoByEffortComparator { + public: + /// Comparing method + bool operator()(EdgeInfo* nod1, EdgeInfo* nod2) const { + if (nod1->effort == nod2->effort) { + return nod1->edge->getNumericalID() > nod2->edge->getNumericalID(); + } + return nod1->effort > nod2->effort; + } + }; + + inline SUMOReal getTravelTime(const E* const e, const V* const v, SUMOReal t) const { + return (*myTTOperation)(e, v, t); + } + + void init() { + // all EdgeInfos touched in the previous query are either in myFrontierList or myFound: clean those up + for (typename std::vector::iterator i = myFrontierList.begin(); i != myFrontierList.end(); i++) { + (*i)->reset(); + } + myFrontierList.clear(); + for (typename std::vector::iterator i = myFound.begin(); i != myFound.end(); i++) { + (*i)->reset(); + } + myFound.clear(); + } + + + /** @brief Builds the route between the given edges using the minimum effort at the given time + The definition of the effort depends on the wished routing scheme */ + virtual void compute(const E* from, const E* to, const V* const vehicle, + SUMOTime msTime, std::vector& into) { + assert(from != 0 && to != 0); + this->startQuery(); + const SUMOVehicleClass vClass = vehicle == 0 ? SVC_IGNORING : vehicle->getVClass(); + init(); + // add begin node + EdgeInfo* const fromInfo = &(myEdgeInfos[from->getNumericalID()]); + fromInfo->effort = 0; + fromInfo->prev = 0; + fromInfo->leaveTime = STEPS2TIME(msTime); + myFrontierList.push_back(fromInfo); + // loop + int num_visited = 0; + while (!myFrontierList.empty()) { + num_visited += 1; + // use the node with the minimal length + EdgeInfo* const minimumInfo = myFrontierList.front(); + const E* const minEdge = minimumInfo->edge; + pop_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); + myFrontierList.pop_back(); + myFound.push_back(minimumInfo); + // check whether the destination node was already reached + if (minEdge == to) { + buildPathFrom(minimumInfo, into); + this->endQuery(num_visited); + return; + } + minimumInfo->visited = true; + const SUMOReal effort = minimumInfo->effort + this->getEffort(minEdge, vehicle, minimumInfo->leaveTime); + const SUMOReal leaveTime = minimumInfo->leaveTime + getTravelTime(minEdge, vehicle, minimumInfo->leaveTime); + // check all ways from the node with the minimal length + const std::vector& successors = minEdge->getSuccessors(vClass); + for (typename std::vector::const_iterator it = successors.begin(); it != successors.end(); ++it) { + const E* const follower = *it; + EdgeInfo* const followerInfo = &(myEdgeInfos[follower->getNumericalID()]); + // check whether it can be used + if (PF::operator()(follower, vehicle)) { + continue; + } + const SUMOReal oldEffort = followerInfo->effort; + if (!followerInfo->visited && effort < oldEffort) { + followerInfo->effort = effort; + followerInfo->leaveTime = leaveTime; + followerInfo->prev = minimumInfo; + if (oldEffort == std::numeric_limits::max()) { + myFrontierList.push_back(followerInfo); + push_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); + } else { + push_heap(myFrontierList.begin(), + find(myFrontierList.begin(), myFrontierList.end(), followerInfo) + 1, + myComparator); + } + } + } + } + this->endQuery(num_visited); + myErrorMsgHandler->inform("No connection between '" + from->getID() + "' and '" + to->getID() + "' found."); + } + + + SUMOReal recomputeCosts(const std::vector& edges, const V* const v, SUMOTime msTime) const { + SUMOReal costs = 0; + SUMOReal t = STEPS2TIME(msTime); + for (typename std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + if (PF::operator()(*i, v)) { + return -1; + } + costs += this->getEffort(*i, v, t); + t += getTravelTime(*i, v, t); + } + return costs; + } + +public: + /// Builds the path from marked edges + void buildPathFrom(EdgeInfo* rbegin, std::vector& edges) { + std::deque tmp; + while (rbegin != 0) { + tmp.push_front((E*) rbegin->edge); // !!! + rbegin = rbegin->prev; + } + std::copy(tmp.begin(), tmp.end(), std::back_inserter(edges)); + } + +private: + /// @brief The object's operation to perform for travel times + Operation myTTOperation; + + /// The container of edge information + std::vector myEdgeInfos; + + /// A container for reusage of the min edge heap + std::vector myFrontierList; + /// @brief list of visited Edges (for resetting) + std::vector myFound; + + EdgeInfoByEffortComparator myComparator; + + /// @brief the handler for routing errors + MsgHandler* const myErrorMsgHandler; + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/DijkstraRouterTT.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/DijkstraRouterTT.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/DijkstraRouterTT.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/DijkstraRouterTT.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,270 @@ +/****************************************************************************/ +/// @file DijkstraRouterTT.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date Mon, 25 July 2005 +/// @version $Id: DijkstraRouterTT.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Dijkstra shortest path algorithm using travel time +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef DijkstraRouterTT_h +#define DijkstraRouterTT_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "SUMOAbstractRouter.h" + +//#define DijkstraRouterTT_DEBUG_QUERY +//#define DijkstraRouterTT_DEBUG_QUERY_PERF + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class DijkstraRouterTT + * @brief Computes the shortest path through a network using the Dijkstra algorithm. + * + * The template parameters are: + * @param E The edge class to use (MSEdge/ROEdge) + * @param V The vehicle class to use (MSVehicle/ROVehicle) + * @param PF The prohibition function to use (prohibited_withRestrictions/prohibited_noRestrictions) + * @param EC The class to retrieve the effort for an edge from + * + * The router is edge-based. It must know the number of edges for internal reasons + * and whether a missing connection between two given edges (unbuild route) shall + * be reported as an error or as a warning. + * + */ +template +class DijkstraRouterTT : public SUMOAbstractRouter, public PF { + +public: + typedef SUMOReal(* Operation)(const E* const, const V* const, SUMOReal); + /// Constructor + DijkstraRouterTT(size_t noE, bool unbuildIsWarning, Operation operation) : + SUMOAbstractRouter(operation, "DijkstraRouterTT"), + myErrorMsgHandler(unbuildIsWarning ? MsgHandler::getWarningInstance() : MsgHandler::getErrorInstance()) { + for (size_t i = 0; i < noE; i++) { + myEdgeInfos.push_back(EdgeInfo(i)); + } + } + + /// Destructor + virtual ~DijkstraRouterTT() { } + + virtual SUMOAbstractRouter* clone() const { + return new DijkstraRouterTT(myEdgeInfos.size(), myErrorMsgHandler == MsgHandler::getWarningInstance(), this->myOperation); + } + + /** + * @struct EdgeInfo + * A definition about a route's edge with the effort needed to reach it and + * the information about the previous edge. + */ + class EdgeInfo { + public: + /// Constructor + EdgeInfo(size_t id) + : edge(E::dictionary(id)), traveltime(std::numeric_limits::max()), prev(0), visited(false) {} + + /// The current edge + const E* edge; + + /// Effort to reach the edge + SUMOReal traveltime; + + /// The previous edge + EdgeInfo* prev; + + /// The previous edge + bool visited; + + inline void reset() { + traveltime = std::numeric_limits::max(); + visited = false; + } + }; + + /** + * @class EdgeInfoByEffortComparator + * Class to compare (and so sort) nodes by their effort + */ + class EdgeInfoByTTComparator { + public: + /// Comparing method + bool operator()(const EdgeInfo* nod1, const EdgeInfo* nod2) const { + if (nod1->traveltime == nod2->traveltime) { + return nod1->edge->getNumericalID() > nod2->edge->getNumericalID(); + } + return nod1->traveltime > nod2->traveltime; + } + }; + + void init() { + // all EdgeInfos touched in the previous query are either in myFrontierList or myFound: clean those up + for (typename std::vector::iterator i = myFrontierList.begin(); i != myFrontierList.end(); i++) { + (*i)->reset(); + } + myFrontierList.clear(); + for (typename std::vector::iterator i = myFound.begin(); i != myFound.end(); i++) { + (*i)->reset(); + } + myFound.clear(); + } + + + /** @brief Builds the route between the given edges using the minimum effort at the given time + The definition of the effort depends on the wished routing scheme */ + virtual void compute(const E* from, const E* to, const V* const vehicle, + SUMOTime msTime, std::vector& into) { + assert(from != 0 && (vehicle == 0 || to != 0)); + this->startQuery(); + const SUMOVehicleClass vClass = vehicle == 0 ? SVC_IGNORING : vehicle->getVClass(); + const SUMOReal time = STEPS2TIME(msTime); + init(); + // add begin node + EdgeInfo* const fromInfo = &(myEdgeInfos[from->getNumericalID()]); + fromInfo->traveltime = 0; + fromInfo->prev = 0; + myFrontierList.push_back(fromInfo); + // loop + int num_visited = 0; + while (!myFrontierList.empty()) { + num_visited += 1; + // use the node with the minimal length + EdgeInfo* const minimumInfo = myFrontierList.front(); + const E* const minEdge = minimumInfo->edge; + pop_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); + myFrontierList.pop_back(); + myFound.push_back(minimumInfo); +#ifdef DijkstraRouterTT_DEBUG_QUERY + std::cout << "DEBUG: hit '" << minEdge->getID() << "' TT: " << minimumInfo->traveltime << " Q: "; + for (typename std::vector::iterator it = myFrontierList.begin(); it != myFrontierList.end(); it++) { + std::cout << (*it)->traveltime << "," << (*it)->edge->getID() << " "; + } + std::cout << "\n"; +#endif + // check whether the destination node was already reached + if (minEdge == to) { + buildPathFrom(minimumInfo, into); + this->endQuery(num_visited); +#ifdef DijkstraRouterTT_DEBUG_QUERY_PERF + std::cout << "visited " + toString(num_visited) + " edges (final path length: " + toString(into.size()) + ")\n"; +#endif + return; + } + minimumInfo->visited = true; + const SUMOReal traveltime = minimumInfo->traveltime + this->getEffort(minEdge, vehicle, time + minimumInfo->traveltime); + // check all ways from the node with the minimal length + const std::vector& successors = minEdge->getSuccessors(vClass); + for (typename std::vector::const_iterator it = successors.begin(); it != successors.end(); ++it) { + const E* const follower = *it; + EdgeInfo* const followerInfo = &(myEdgeInfos[follower->getNumericalID()]); + // check whether it can be used + if (PF::operator()(follower, vehicle)) { + continue; + } + const SUMOReal oldEffort = followerInfo->traveltime; + if (!followerInfo->visited && traveltime < oldEffort) { + followerInfo->traveltime = traveltime; + followerInfo->prev = minimumInfo; + if (oldEffort == std::numeric_limits::max()) { + myFrontierList.push_back(followerInfo); + push_heap(myFrontierList.begin(), myFrontierList.end(), myComparator); + } else { + push_heap(myFrontierList.begin(), + find(myFrontierList.begin(), myFrontierList.end(), followerInfo) + 1, + myComparator); + } + } + } + } + this->endQuery(num_visited); +#ifdef DijkstraRouterTT_DEBUG_QUERY_PERF + std::cout << "visited " + toString(num_visited) + " edges (final path length: " + toString(into.size()) + ")\n"; +#endif + if (to != 0) { + myErrorMsgHandler->inform("No connection between '" + from->getID() + "' and '" + to->getID() + "' found."); + } + } + + + SUMOReal recomputeCosts(const std::vector& edges, const V* const v, SUMOTime msTime) const { + const SUMOReal time = STEPS2TIME(msTime); + SUMOReal costs = 0; + for (typename std::vector::const_iterator i = edges.begin(); i != edges.end(); ++i) { + if (PF::operator()(*i, v)) { + return -1; + } + costs += this->getEffort(*i, v, time + costs); + } + return costs; + } + +public: + /// Builds the path from marked edges + void buildPathFrom(EdgeInfo* rbegin, std::vector& edges) { + std::deque tmp; + while (rbegin != 0) { + tmp.push_front((E*) rbegin->edge); // !!! + rbegin = rbegin->prev; + } + std::copy(tmp.begin(), tmp.end(), std::back_inserter(edges)); + } + + const EdgeInfo& getEdgeInfo(size_t index) const { + return myEdgeInfos[index]; + } + +private: + /// The container of edge information + std::vector myEdgeInfos; + + /// A container for reusage of the min edge heap + std::vector myFrontierList; + /// @brief list of visited Edges (for resetting) + std::vector myFound; + + EdgeInfoByTTComparator myComparator; + + /// @brief the handler for routing errors + MsgHandler* const myErrorMsgHandler; +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/GawronCalculator.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/GawronCalculator.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/GawronCalculator.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/GawronCalculator.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,125 @@ +/****************************************************************************/ +/// @file GawronCalculator.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date Sept 2002 +/// @version $Id: GawronCalculator.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Calculators for route costs and probabilities +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef GawronCalculator_h +#define GawronCalculator_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class GawronCalculator + * @brief Cost calculation with Gawron's method. + */ +template +class GawronCalculator : public RouteCostCalculator { +public: + /// Constructor + GawronCalculator(const SUMOReal beta, const SUMOReal a) : myBeta(beta), myA(a) {} + + /// Destructor + virtual ~GawronCalculator() {} + + void setCosts(R* route, const SUMOReal costs, const bool isActive = false) const { + if (isActive) { + route->setCosts(costs); + } else { + route->setCosts(myBeta * costs + ((SUMOReal) 1.0 - myBeta) * route->getCosts()); + } + } + + /** @brief calculate the probabilities */ + void calculateProbabilities(std::vector alternatives, const V* const /* veh */, const SUMOTime /* time */) { + for (typename std::vector::iterator i = alternatives.begin(); i != alternatives.end() - 1; i++) { + R* pR = *i; + for (typename std::vector::iterator j = i + 1; j != alternatives.end(); j++) { + R* pS = *j; + // see [Gawron, 1998] (4.2) + const SUMOReal delta = + (pS->getCosts() - pR->getCosts()) / + (pS->getCosts() + pR->getCosts()); + // see [Gawron, 1998] (4.3a, 4.3b) + SUMOReal newPR = gawronF(pR->getProbability(), pS->getProbability(), delta); + SUMOReal newPS = pR->getProbability() + pS->getProbability() - newPR; + if (ISNAN(newPR) || ISNAN(newPS)) { + newPR = pS->getCosts() > pR->getCosts() + ? (SUMOReal) 1. : 0; + newPS = pS->getCosts() > pR->getCosts() + ? 0 : (SUMOReal) 1.; + } + newPR = MIN2((SUMOReal) MAX2(newPR, (SUMOReal) 0), (SUMOReal) 1); + newPS = MIN2((SUMOReal) MAX2(newPS, (SUMOReal) 0), (SUMOReal) 1); + pR->setProbability(newPR); + pS->setProbability(newPS); + } + } + } + +private: + /** @brief Performs the gawron - f() function + From "Dynamic User Equilibria..." */ + SUMOReal gawronF(const SUMOReal pdr, const SUMOReal pds, const SUMOReal x) const { + if (pdr * gawronG(myA, x) + pds == 0) { + return std::numeric_limits::max(); + } + return (pdr * (pdr + pds) * gawronG(myA, x)) / + (pdr * gawronG(myA, x) + pds); + } + + /** @brief Performs the gawron - g() function + From "Dynamic User Equilibria..." */ + SUMOReal gawronG(const SUMOReal a, const SUMOReal x) const { + if (((1.0 - (x * x)) == 0)) { + return std::numeric_limits::max(); + } + return (SUMOReal) exp((a * x) / (1.0 - (x * x))); + } + +private: + /// @brief gawron beta - value + const SUMOReal myBeta; + + /// @brief gawron a - value + const SUMOReal myA; + +private: + /** @brief invalidated assignment operator */ + GawronCalculator& operator=(const GawronCalculator& s); + +}; +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/LogitCalculator.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/LogitCalculator.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/LogitCalculator.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/LogitCalculator.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,165 @@ +/****************************************************************************/ +/// @file LogitCalculator.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date Sept 2002 +/// @version $Id: LogitCalculator.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Calculators for route costs and probabilities +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef LogitCalculator_h +#define LogitCalculator_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class LogitCalculator + * @brief Cost calculation with c-logit or logit method. + */ +template +class LogitCalculator : public RouteCostCalculator { +public: + /// Constructor + LogitCalculator(const SUMOReal beta, const SUMOReal gamma, + const SUMOReal theta) : myBeta(beta), myGamma(gamma), myTheta(theta) {} + + /// Destructor + virtual ~LogitCalculator() {} + + void setCosts(R* route, const SUMOReal costs, const bool /* isActive */) const { + route->setCosts(costs); + } + + /** @brief calculate the probabilities in the logit model */ + void calculateProbabilities(std::vector alternatives, const V* const veh, const SUMOTime time) { + const SUMOReal theta = myTheta >= 0 ? myTheta : getThetaForCLogit(alternatives); + const SUMOReal beta = myBeta >= 0 ? myBeta : getBetaForCLogit(alternatives); + if (beta > 0) { + // calculate commonalities + for (typename std::vector::const_iterator i = alternatives.begin(); i != alternatives.end(); i++) { + const R* pR = *i; + SUMOReal lengthR = 0; + const std::vector& edgesR = pR->getEdgeVector(); + for (typename std::vector::const_iterator edge = edgesR.begin(); edge != edgesR.end(); ++edge) { + //@todo we should use costs here + lengthR += (*edge)->getTravelTime(veh, STEPS2TIME(time)); + } + SUMOReal overlapSum = 0; + for (typename std::vector::const_iterator j = alternatives.begin(); j != alternatives.end(); j++) { + const R* pS = *j; + SUMOReal overlapLength = 0.; + SUMOReal lengthS = 0; + const std::vector& edgesS = pS->getEdgeVector(); + for (typename std::vector::const_iterator edge = edgesS.begin(); edge != edgesS.end(); ++edge) { + lengthS += (*edge)->getTravelTime(veh, STEPS2TIME(time)); + if (std::find(edgesR.begin(), edgesR.end(), *edge) != edgesR.end()) { + overlapLength += (*edge)->getTravelTime(veh, STEPS2TIME(time)); + } + } + overlapSum += pow(overlapLength / sqrt(lengthR * lengthS), myGamma); + } + myCommonalities[pR] = beta * log(overlapSum); + } + } + for (typename std::vector::iterator i = alternatives.begin(); i != alternatives.end(); i++) { + R* pR = *i; + SUMOReal weightedSum = 0; + for (typename std::vector::iterator j = alternatives.begin(); j != alternatives.end(); j++) { + R* pS = *j; + weightedSum += exp(theta * (pR->getCosts() - pS->getCosts() + myCommonalities[pR] - myCommonalities[pS])); + } + pR->setProbability(1. / weightedSum); + } + } + + +private: + /** @brief calculate the scaling factor in the logit model */ + SUMOReal getBetaForCLogit(const std::vector alternatives) const { + SUMOReal min = std::numeric_limits::max(); + for (typename std::vector::const_iterator i = alternatives.begin(); i != alternatives.end(); i++) { + const SUMOReal cost = (*i)->getCosts() / 3600.; + if (cost < min) { + min = cost; + } + } + return min; + } + + /** @brief calculate the scaling factor in the logit model */ + SUMOReal getThetaForCLogit(const std::vector alternatives) const { + // @todo this calculation works for travel times only + SUMOReal sum = 0.; + SUMOReal diff = 0.; + SUMOReal min = std::numeric_limits::max(); + for (typename std::vector::const_iterator i = alternatives.begin(); i != alternatives.end(); i++) { + const SUMOReal cost = (*i)->getCosts() / 3600.; + sum += cost; + if (cost < min) { + min = cost; + } + } + const SUMOReal meanCost = sum / SUMOReal(alternatives.size()); + for (typename std::vector::const_iterator i = alternatives.begin(); i != alternatives.end(); i++) { + diff += pow((*i)->getCosts() / 3600. - meanCost, 2); + } + const SUMOReal cvCost = sqrt(diff / SUMOReal(alternatives.size())) / meanCost; + // @todo re-evaluate function + // if (cvCost > 0.04) { // Magic numbers from Lohse book + return 3.1415926535897932384626433832795 / (sqrt(6.) * cvCost * (min + 1.1)) / 3600.; + // } + // return 1./3600.; + } + + +private: + /// @brief logit beta - value + const SUMOReal myBeta; + + /// @brief logit gamma - value + const SUMOReal myGamma; + + /// @brief logit theta - value + const SUMOReal myTheta; + + /// @brief The route commonality factors for c-logit + std::map myCommonalities; + +private: + /** @brief invalidated assignment operator */ + LogitCalculator& operator=(const LogitCalculator& s); + +}; + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/Makefile.am sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/Makefile.am --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/Makefile.am 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,11 @@ +noinst_LIBRARIES = libvehicle.a + +libvehicle_a_SOURCES = AStarRouter.h \ +BulkStarRouter.h \ +CHRouter.h CHRouterWrapper.h \ +DijkstraRouterTT.h DijkstraRouterEffort.h \ +GawronCalculator.h LogitCalculator.h RouteCostCalculator.h \ +PedestrianRouter.h SUMOAbstractRouter.h \ +SPTree.h SUMOVehicle.h \ +SUMOVehicleParameter.cpp SUMOVehicleParameter.h \ +SUMOVTypeParameter.cpp SUMOVTypeParameter.h diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,625 @@ +# Makefile.in generated by automake 1.13.4 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/utils/vehicle +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libvehicle_a_AR = $(AR) $(ARFLAGS) +libvehicle_a_LIBADD = +am_libvehicle_a_OBJECTS = SUMOVehicleParameter.$(OBJEXT) \ + SUMOVTypeParameter.$(OBJEXT) +libvehicle_a_OBJECTS = $(am_libvehicle_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libvehicle_a_SOURCES) +DIST_SOURCES = $(libvehicle_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_CPPFLAGS = @AM_CPPFLAGS@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ +FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ +GDAL_LDFLAGS = @GDAL_LDFLAGS@ +GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_XERCES = @LIB_XERCES@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OSG_LIBS = @OSG_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROJ_LDFLAGS = @PROJ_LDFLAGS@ +PYTHON_LIBS = @PYTHON_LIBS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XERCES_CFLAGS = @XERCES_CFLAGS@ +XERCES_LDFLAGS = @XERCES_LDFLAGS@ +XERCES_LIBS = @XERCES_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LIBRARIES = libvehicle.a +libvehicle_a_SOURCES = AStarRouter.h \ +BulkStarRouter.h \ +CHRouter.h CHRouterWrapper.h \ +DijkstraRouterTT.h DijkstraRouterEffort.h \ +GawronCalculator.h LogitCalculator.h RouteCostCalculator.h \ +PedestrianRouter.h SUMOAbstractRouter.h \ +SPTree.h SUMOVehicle.h \ +SUMOVehicleParameter.cpp SUMOVehicleParameter.h \ +SUMOVTypeParameter.cpp SUMOVTypeParameter.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/utils/vehicle/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/utils/vehicle/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +libvehicle.a: $(libvehicle_a_OBJECTS) $(libvehicle_a_DEPENDENCIES) $(EXTRA_libvehicle_a_DEPENDENCIES) + $(AM_V_at)-rm -f libvehicle.a + $(AM_V_AR)$(libvehicle_a_AR) libvehicle.a $(libvehicle_a_OBJECTS) $(libvehicle_a_LIBADD) + $(AM_V_at)$(RANLIB) libvehicle.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOVTypeParameter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SUMOVehicleParameter.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/PedestrianRouter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/PedestrianRouter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/PedestrianRouter.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/PedestrianRouter.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,565 @@ +/****************************************************************************/ +/// @file PedestrianRouter.h +/// @author Jakob Erdmann +/// @date Mon, 03 March 2014 +/// @version $Id: PedestrianRouter.h 18096 2015-03-17 09:50:59Z behrisch $ +/// +// The Pedestrian Router build a special network and (delegegates to a SUMOAbstractRouter) +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef PedestrianRouter_h +#define PedestrianRouter_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define TL_RED_PENALTY 20 + +//#define PedestrianRouter_DEBUG_NETWORK +//#define PedestrianRouter_DEBUG_ROUTES +//#define PedestrianRouter_DEBUG_EFFORTS + +template +inline const L* getSidewalk(const E* edge) { + if (edge == 0) { + return 0; + } + const std::vector& lanes = edge->getLanes(); + for (typename std::vector::const_iterator it = lanes.begin(); it != lanes.end(); ++it) { + if ((*it)->allowsVehicleClass(SVC_PEDESTRIAN)) { + return *it; + } + } + return 0; +} + +// =========================================================================== +// class definitions +// =========================================================================== + +/// @brief the "vehicle" type that is given to the internal router (SUMOAbstractRouter) +template +struct PedestrianTrip { + + PedestrianTrip(const E* _from, const E* _to, SUMOReal _departPos, SUMOReal _arrivalPos, SUMOReal _speed, SUMOReal _departTime, const N* _node) : + from(_from), + to(_to), + node(_node), + departPos(_departPos < 0 ? _from->getLength() + _departPos : _departPos), + arrivalPos(_arrivalPos < 0 ? _to->getLength() + _arrivalPos : _arrivalPos), + speed(_speed), + departTime(_departTime) + {} + + // exists just for debugging purposes + std::string getID() const { + return from->getID() + ":" + to->getID() + ":" + toString(departTime); + } + + + inline SUMOVehicleClass getVClass() const { + return SVC_PEDESTRIAN; + } + + const E* from; + const E* to; + const N* node; // indicates whether only routing across this node shall be performed + const SUMOReal departPos; + const SUMOReal arrivalPos; + const SUMOReal speed; + const SUMOReal departTime; +private: + /// @brief Invalidated assignment operator. + PedestrianTrip& operator=(const PedestrianTrip&); +}; + + +/// @brief the edge type that is given to the internal router (SUMOAbstractRouter) +template +class PedestrianEdge : public Named { + typedef std::pair EdgePair; + /* brief build the pedestrian network (once) + * @param noE The number of edges in the dictionary of E + */ + +public: + static size_t dictSize() { + return myEdgeDict.size(); + } + + static void cleanup() { + myFromToLookup.clear(); + myBidiLookup.clear(); + myEdgeDict.clear(); + } + + static void initPedestrianNetwork(size_t noE) { + if (myEdgeDict.size() > 0) { + return; + } +#ifdef PedestrianRouter_DEBUG_NETWORK + std::cout << "initPedestrianNetwork\n"; +#endif + // build the Pedestrian edges + bool haveSeenWalkingArea = false; + unsigned int numericalID = 0; + for (size_t i = 0; i < noE; i++) { + E* edge = E::dictionary(i); + const L* lane = getSidewalk(edge); + if (edge->isInternal() || lane == 0) { + continue; + } else if (edge->isWalkingArea()) { + // only a single edge + myEdgeDict.push_back(PedestrianEdge(numericalID++, edge, lane, true)); + haveSeenWalkingArea = true; + } else { // regular edge or crossing + // forward and backward edges + myEdgeDict.push_back(PedestrianEdge(numericalID++, edge, lane, true)); + myEdgeDict.push_back(PedestrianEdge(numericalID++, edge, lane, false)); + // depart and arrival edges for (the router can decide the initial direction to take and the direction to arrive from) + myEdgeDict.push_back(PedestrianEdge(numericalID++, edge, lane, true, true)); + myEdgeDict.push_back(PedestrianEdge(numericalID++, edge, lane, false, true)); + } + + } + // build the lookup tables after myEdgeDict is complete + numericalID = 0; + for (size_t i = 0; i < noE; i++) { + E* edge = E::dictionary(i); + const L* lane = getSidewalk(edge); + if (edge->isInternal() || lane == 0) { + continue; + } else if (edge->isWalkingArea()) { + // only a single edge. Connectors are used when routing across a single intersecton + myBidiLookup[edge] = std::make_pair(&myEdgeDict[numericalID], &myEdgeDict[numericalID]); + myFromToLookup[edge] = std::make_pair(&myEdgeDict[numericalID], &myEdgeDict[numericalID]); + numericalID += 1; + } else { // regular edge or crossing + myBidiLookup[edge] = std::make_pair(&myEdgeDict[numericalID], &myEdgeDict[numericalID + 1]); + myFromToLookup[edge] = std::make_pair(&myEdgeDict[numericalID + 2], &myEdgeDict[numericalID + 3]); + numericalID += 4; + } + } + + // build the connections + for (size_t i = 0; i < noE; i++) { + E* edge = E::dictionary(i); + const L* sidewalk = getSidewalk(edge); + if (edge->isInternal() || sidewalk == 0) { + continue; + } + // find all incoming and outgoing lanes for the sidewalk and + // connect the corresponding PedestrianEdges + const EdgePair& pair = getBothDirections(edge); +#ifdef PedestrianRouter_DEBUG_NETWORK + std::cout << " building connections from " << sidewalk->getID() << "\n"; +#endif + if (haveSeenWalkingArea) { + std::vector outgoing = sidewalk->getOutgoingLanes(); + // if one of the outgoing lanes is a walking area it must be used. + // All other connections shall be ignored + bool hasWalkingArea = false; + for (typename std::vector::iterator it = outgoing.begin(); it != outgoing.end(); ++it) { + const L* target = *it; + const E* targetEdge = &(target->getEdge()); + if (targetEdge->isWalkingArea()) { + hasWalkingArea = true; + break; + } + } + for (typename std::vector::iterator it = outgoing.begin(); it != outgoing.end(); ++it) { + const L* target = *it; + const E* targetEdge = &(target->getEdge()); + const bool used = (target == getSidewalk(targetEdge) + && (!hasWalkingArea || targetEdge->isWalkingArea())); +#ifdef PedestrianRouter_DEBUG_NETWORK + const L* potTarget = getSidewalk(targetEdge); + std::cout << " lane=" << (potTarget == 0 ? "NULL" : potTarget->getID()) << (used ? "(used)" : "") << "\n"; +#endif + if (used) { + const EdgePair& targetPair = getBothDirections(targetEdge); + pair.first->myFollowingEdges.push_back(targetPair.first); + targetPair.second->myFollowingEdges.push_back(pair.second); +#ifdef PedestrianRouter_DEBUG_NETWORK + std::cout << " " << pair.first->getID() << " -> " << targetPair.first->getID() << "\n"; + std::cout << " " << targetPair.second->getID() << " -> " << pair.second->getID() << "\n"; +#endif + } + } + } else { + // we have a network without pedestrian structures. Assume that + // all sidewalks at a crossing are interconnected + const N* toNode = edge->getToJunction(); + std::vector outgoing = toNode->getOutgoing(); + for (typename std::vector::iterator it = outgoing.begin(); it != outgoing.end(); ++it) { + // build forward and backward connections for all outgoing sidewalks + const E* targetEdge = *it; + const L* target = getSidewalk(targetEdge); + if (targetEdge->isInternal() || target == 0) { + continue; + } + const EdgePair& targetPair = getBothDirections(targetEdge); + pair.first->myFollowingEdges.push_back(targetPair.first); + targetPair.second->myFollowingEdges.push_back(pair.second); +#ifdef PedestrianRouter_DEBUG_NETWORK + std::cout << " " << pair.first->getID() << " -> " << targetPair.first->getID() << "\n"; + std::cout << " " << targetPair.second->getID() << " -> " << pair.second->getID() << "\n"; +#endif + } + std::vector incoming = toNode->getIncoming(); + for (typename std::vector::iterator it = incoming.begin(); it != incoming.end(); ++it) { + // build forward-to-backward connections for all incoming sidewalks + const E* targetEdge = *it; + const L* target = getSidewalk(targetEdge); + if (targetEdge->isInternal() || target == 0 || targetEdge == edge) { + continue; + } + const EdgePair& targetPair = getBothDirections(targetEdge); + pair.first->myFollowingEdges.push_back(targetPair.second); // change direction +#ifdef PedestrianRouter_DEBUG_NETWORK + std::cout << " " << pair.first->getID() << " -> " << targetPair.second->getID() << "\n"; +#endif + + } + const N* fromNode = edge->getFromJunction(); + outgoing = fromNode->getOutgoing(); + for (typename std::vector::iterator it = outgoing.begin(); it != outgoing.end(); ++it) { + // build backward-to-forward connections for all outgoing sidewalks at the fromNode + const E* targetEdge = *it; + const L* target = getSidewalk(targetEdge); + if (targetEdge->isInternal() || target == 0 || targetEdge == edge) { + continue; + } + const EdgePair& targetPair = getBothDirections(targetEdge); + pair.second->myFollowingEdges.push_back(targetPair.first); +#ifdef PedestrianRouter_DEBUG_NETWORK + std::cout << " " << pair.second->getID() << " -> " << targetPair.first->getID() << "\n"; +#endif + } + } + if (edge->isWalkingArea()) { + continue; + } + // build connections from depart connector + PedestrianEdge* startConnector = getDepartEdge(edge); + startConnector->myFollowingEdges.push_back(pair.first); + startConnector->myFollowingEdges.push_back(pair.second); + // build connections to arrival connector + PedestrianEdge* endConnector = getArrivalEdge(edge); + pair.first->myFollowingEdges.push_back(endConnector); + pair.second->myFollowingEdges.push_back(endConnector); +#ifdef PedestrianRouter_DEBUG_NETWORK + std::cout << " " << startConnector->getID() << " -> " << pair.first->getID() << "\n"; + std::cout << " " << startConnector->getID() << " -> " << pair.second->getID() << "\n"; + std::cout << " " << pair.first->getID() << " -> " << endConnector->getID() << "\n"; + std::cout << " " << pair.second->getID() << " -> " << endConnector->getID() << "\n"; +#endif + } + } + + bool includeInRoute(bool allEdges) const { + return !myAmConnector && (allEdges || (!myEdge->isCrossing() && !myEdge->isWalkingArea())); + } + + const E* getEdge() const { + return myEdge; + } + + /// @brief Returns the pair of forward and backward edge + static const EdgePair& getBothDirections(const E* e) { + typename std::map::const_iterator it = myBidiLookup.find(e); + if (it == myBidiLookup.end()) { + assert(false); + throw ProcessError("Edge '" + e->getID() + "' not found in pedestrian network '"); + } + return (*it).second; + } + + /// @brief Returns the departing Pedestrian edge + static PedestrianEdge* getDepartEdge(const E* e) { + typename std::map::const_iterator it = myFromToLookup.find(e); + if (it == myFromToLookup.end()) { + assert(false); + throw ProcessError("Edge '" + e->getID() + "' not found in pedestrian network '"); + } + return (*it).second.first; + } + + /// @brief Returns the arriving Pedestrian edge + static PedestrianEdge* getArrivalEdge(const E* e) { + typename std::map::const_iterator it = myFromToLookup.find(e); + if (it == myFromToLookup.end()) { + assert(false); + throw ProcessError("Edge '" + e->getID() + "' not found in pedestrian network '"); + } + return (*it).second.second; + } + + /// @name The interface as required by SUMOAbstractRouter routes + /// @{ + + unsigned int getNumericalID() const { + return myNumericalID; + } + + /// @brief Returns the PedstrianEdge with the given numericalID + static const PedestrianEdge* dictionary(size_t index) { + assert(index < myEdgeDict.size()); + return &myEdgeDict[index]; + } + + unsigned int getNumSuccessors() const { + return (unsigned int)myFollowingEdges.size(); + } + + const std::vector& getSuccessors() const { + return myFollowingEdges; + } + + const std::vector& getSuccessors(SUMOVehicleClass /*vClass*/) const { + // the network is already tailored for pedestrians. No need to check for permissions here + return myFollowingEdges; + } + + bool prohibits(const PedestrianTrip* const trip) const { + if (trip->node == 0) { + // network only includes PedestrianEdges + return false; + } else { + // limit routing to the surroundings of the specified node + return (myEdge->getFromJunction() != trip->node + && myEdge->getToJunction() != trip->node); + } + } + + /// @} + + /*@brief the function called by RouterTT_direct + * (distance is used as effort, effort is assumed to be independent of time + */ + static SUMOReal getEffort(const PedestrianEdge* const edge, const PedestrianTrip* const trip, SUMOReal time) { + if (edge->myAmConnector) { + return 0; + } + SUMOReal length = edge->myEdge->getLength(); + if (edge->myEdge == trip->from) { + if (edge->myForward) { + length -= trip->departPos; + } else { + length = trip->departPos; + } + } + if (edge->myEdge == trip->to) { + if (edge->myForward) { + length = trip->arrivalPos; + } else { + length -= trip->arrivalPos; + } + } + // ensure that 'normal' edges always have a higher weight than connector edges + length = MAX2(length, POSITION_EPS); + SUMOReal tlsDelay = 0; + // @note pedestrian traffic lights should never have LINKSTATE_TL_REDYELLOW + if (edge->myEdge->isCrossing() && edge->myLane->getIncomingLinkState() == LINKSTATE_TL_RED) { + // red traffic lights occurring later in the route may be green by the time we arive + tlsDelay += MAX2(SUMOReal(0), TL_RED_PENALTY - (time - trip->departTime)); + + } +#ifdef PedestrianRouter_DEBUG_EFFORTS + std::cout << " effort for " << trip->getID() << " at " << time << " edge=" << edge->getID() << " effort=" << length / trip->speed + tlsDelay << " l=" << length << " s=" << trip->speed << " tlsDelay=" << tlsDelay << "\n"; +#endif + return length / trip->speed + tlsDelay; + } + +private: + PedestrianEdge(unsigned int numericalID, const E* edge, const L* lane, bool forward, bool connector = false) : + Named(edge->getID() + (edge->isWalkingArea() ? "" : + ((forward ? "_fwd" : "_bwd") + std::string(connector ? "_connector" : "")))), + myNumericalID(numericalID), + myEdge(edge), + myLane(lane), + myForward(forward), + myAmConnector(connector) { } + + /// @brief the index in myEdgeDict + unsigned int myNumericalID; + + /// @brief the original edge + const E* myEdge; + + /// @brief the original edge + const L* myLane; + + /// @brief the direction of this edge + bool myForward; + + /// @brief the direction of this edge + bool myAmConnector; + + /// @brief List of edges that may be approached from this edge + std::vector myFollowingEdges; + + /// @brief the edge dictionary + static std::vector myEdgeDict; + + /// @brief retrieve the forward and backward edge for the given input edge E + static std::map myBidiLookup; + + /// @brief retrieve the depart and arrival edge for the given input edge E + static std::map myFromToLookup; + +}; + + +/** + * @class PedestrianRouter + * The router for pedestrians (on a bidirectional network of sidewalks and crossings + */ +template +class PedestrianRouter : public SUMOAbstractRouter > { +public: + + typedef PedestrianEdge _PedestrianEdge; + typedef PedestrianTrip _PedestrianTrip; + + /// Constructor + PedestrianRouter(): + SUMOAbstractRouter(0, "PedestrianRouter") { + _PedestrianEdge::initPedestrianNetwork(E::dictSize()); + myInternalRouter = new INTERNALROUTER(_PedestrianEdge::dictSize(), true, &_PedestrianEdge::getEffort); + } + + /// Destructor + virtual ~PedestrianRouter() { + delete myInternalRouter; + } + + virtual SUMOAbstractRouter >* clone() const { + return new PedestrianRouter(); + } + + /** @brief Builds the route between the given edges using the minimum effort at the given time + The definition of the effort depends on the wished routing scheme */ + void compute(const E* from, const E* to, SUMOReal departPos, SUMOReal arrivalPos, SUMOReal speed, + SUMOTime msTime, const N* onlyNode, std::vector& into, bool allEdges = false) { + //startQuery(); + if (getSidewalk(from) == 0) { + WRITE_WARNING("Departure edge '" + from->getID() + "' does not allow pedestrians."); + return; + } + if (getSidewalk(to) == 0) { + WRITE_WARNING("Destination edge '" + to->getID() + "' does not allow pedestrians."); + return; + } + _PedestrianTrip trip(from, to, departPos, arrivalPos, speed, msTime, onlyNode); + std::vector intoPed; + myInternalRouter->compute(_PedestrianEdge::getDepartEdge(from), + _PedestrianEdge::getArrivalEdge(to), &trip, msTime, intoPed); + for (size_t i = 0; i < intoPed.size(); ++i) { + if (intoPed[i]->includeInRoute(allEdges)) { + into.push_back(intoPed[i]->getEdge()); + } + } +#ifdef PedestrianRouter_DEBUG_ROUTES + SUMOReal time = msTime; + for (size_t i = 0; i < intoPed.size(); ++i) { + time += myInternalRouter->getEffort(intoPed[i], &trip, time); + } + std::cout << TIME2STEPS(msTime) << " trip from " << from->getID() << " to " << to->getID() + << " departPos=" << departPos + << " arrivalPos=" << arrivalPos + << " onlyNode=" << (onlyNode == 0 ? "NULL" : onlyNode->getID()) + << " edges=" << toString(intoPed) + << " resultEdges=" << toString(into) + << " time=" << time + << "\n"; +#endif + //endQuery(); + } + + /** @brief Builds the route between the given edges using the minimum effort at the given time + The definition of the effort depends on the wished routing scheme */ + void compute(const E*, const E*, const _PedestrianTrip* const, + SUMOTime, std::vector&) { + throw ProcessError("Do not use this method"); + } + + SUMOReal recomputeCosts(const std::vector&, const _PedestrianTrip* const, SUMOTime) const { + throw ProcessError("Do not use this method"); + } + + void prohibit(const std::vector& toProhibit) { + std::vector<_PedestrianEdge*> toProhibitPE; + for (typename std::vector::const_iterator it = toProhibit.begin(); it != toProhibit.end(); ++it) { + toProhibitPE.push_back(_PedestrianEdge::getBothDirections(*it).first); + toProhibitPE.push_back(_PedestrianEdge::getBothDirections(*it).second); + } + myInternalRouter->prohibit(toProhibitPE); + } + +private: + INTERNALROUTER* myInternalRouter; + + +private: + /// @brief Invalidated assignment operator + PedestrianRouter& operator=(const PedestrianRouter& s); + +private: + +}; + +// common specializations +template +class PedestrianRouterDijkstra : public PedestrianRouter < E, L, N, + DijkstraRouterTT, PedestrianTrip, prohibited_withRestrictions, PedestrianTrip > > > { }; + + +// =========================================================================== +// static member definitions (PedestrianEdge) +// =========================================================================== + +template +std::vector > PedestrianEdge::myEdgeDict; + +template +std::map::EdgePair> PedestrianEdge::myBidiLookup; + +template +std::map::EdgePair> PedestrianEdge::myFromToLookup; + +#endif + + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/RouteCostCalculator.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/RouteCostCalculator.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/RouteCostCalculator.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/RouteCostCalculator.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,125 @@ +/****************************************************************************/ +/// @file RouteCostCalculator.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date Sept 2002 +/// @version $Id: RouteCostCalculator.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Calculators for route costs and probabilities +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef RouteCostCalculator_h +#define RouteCostCalculator_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class RouteCostCalculator + * @brief Abstract base class providing static factory method. + */ +template +class RouteCostCalculator { +public: + static RouteCostCalculator& getCalculator(); + + static void cleanup() { + delete myInstance; + myInstance = 0; + } + + virtual void setCosts(R* route, const SUMOReal costs, const bool isActive = false) const = 0; + + /** @brief calculate the probabilities in the logit model */ + virtual void calculateProbabilities(std::vector alternatives, const V* const veh, const SUMOTime time) = 0; + + unsigned int getMaxRouteNumber() const { + return myMaxRouteNumber; + } + + bool keepRoutes() const { + return myKeepRoutes; + } + + bool skipRouteCalculation() const { + return mySkipRouteCalculation; + } + +protected: + /// @brief Constructor + RouteCostCalculator() { + OptionsCont& oc = OptionsCont::getOptions(); + myMaxRouteNumber = oc.getInt("max-alternatives"); + myKeepRoutes = oc.getBool("keep-all-routes"); + mySkipRouteCalculation = oc.getBool("skip-new-routes"); + } + + /// @brief Destructor + virtual ~RouteCostCalculator() {} + +private: + static RouteCostCalculator* myInstance; + + /// @brief The maximum route alternatives number + unsigned int myMaxRouteNumber; + + /// @brief Information whether all routes should be saved + bool myKeepRoutes; + + /// @brief Information whether new routes should be calculated + bool mySkipRouteCalculation; + +}; + + +// =========================================================================== +// static member definitions +// =========================================================================== +template +RouteCostCalculator* RouteCostCalculator::myInstance = 0; + + +#include "GawronCalculator.h" +#include "LogitCalculator.h" + +template +RouteCostCalculator& RouteCostCalculator::getCalculator() { + if (myInstance == 0) { + OptionsCont& oc = OptionsCont::getOptions(); + if (oc.getString("route-choice-method") == "logit") { + myInstance = new LogitCalculator(oc.getFloat("logit.beta"), oc.getFloat("logit.gamma"), oc.getFloat("logit.theta")); + } else if (oc.getString("route-choice-method") == "gawron") { + myInstance = new GawronCalculator(oc.getFloat("gawron.beta"), oc.getFloat("gawron.a")); + } + } + return *myInstance; +} +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/SPTree.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/SPTree.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/SPTree.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/SPTree.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,250 @@ +/****************************************************************************/ +/// @file SPTree.h +/// @author Laura Bieker +/// @author Michael Behrisch +/// @date February 2012 +/// @version $Id: SPTree.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Shortest Path tree of limited depth using Dijkstras algorithm +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef SPTree_h +#define SPTree_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +template +class SPTree { + +public: + typedef std::vector CHConnections; + typedef std::pair CHConnectionPair; + typedef std::vector CHConnectionPairs; + + /** + * @class EdgeInfoByEffortComparator + * Class to compare (and so sort) nodes by their effort + */ + class EdgeByTTComparator { + public: + /// Comparing method + bool operator()(const E* a, const E* b) const { + if (a->traveltime == b->traveltime) { + return a->edge->getNumericalID() > b->edge->getNumericalID(); + } + return a->traveltime > b->traveltime; + } + }; + + + /** + * @brief Constructor + */ + SPTree(int maxDepth, bool validatePermissions) : + myMaxDepth(maxDepth), + myValidatePermissions(validatePermissions) + { } + + + void init() { + // all EdgeInfos touched in the previous query are either in myFrontier or myFound: clean those up + for (typename std::vector::iterator i = myFrontier.begin(); i != myFrontier.end(); i++) { + (*i)->reset(); + } + myFrontier.clear(); + for (typename std::vector::iterator i = myFound.begin(); i != myFound.end(); i++) { + (*i)->reset(); + } + myFound.clear(); + } + + + /** + * @brief build a shortest path tree from start to a depth of myMaxdepth. The given + * edge is excluded from this tree + */ + void rebuildFrom(E* start, const E* excluded) { + init(); + start->traveltime = 0; + start->depth = 0; + start->permissions = start->edge->getPermissions(); + myFrontier.push_back(start); + // build SPT + while (!myFrontier.empty()) { + E* min = myFrontier.front(); + pop_heap(myFrontier.begin(), myFrontier.end(), myCmp); + myFrontier.pop_back(); + myFound.push_back(min); + min->visited = true; + if (min->depth < myMaxDepth) { + for (typename CHConnections::iterator it = min->followers.begin(); it != min->followers.end(); it++) { + C& con = *it; + E* follower = con.target; + if (follower == excluded) { + continue; + } + const SUMOReal traveltime = min->traveltime + con.cost; + const SUMOReal oldTraveltime = follower->traveltime; + if (!follower->visited && traveltime < oldTraveltime) { + follower->traveltime = traveltime; + follower->depth = min->depth + 1; + follower->permissions = (min->permissions & con.permissions); + if (oldTraveltime == std::numeric_limits::max()) { + myFrontier.push_back(follower); + push_heap(myFrontier.begin(), myFrontier.end(), myCmp); + } else { + push_heap(myFrontier.begin(), + find(myFrontier.begin(), myFrontier.end(), follower) + 1, + myCmp); + } + } + } + } + } + } + + + /// @brief whether permissions should be validated; + inline bool validatePermissions() { + return myValidatePermissions; + } + + /// @brief save source/target pair for later validation + void registerForValidation(const C* aInfo, const C* fInfo) { + assert(myValidatePermissions); + myShortcutsToValidate.push_back(CHConnectionPair(aInfo, fInfo)); + } + + + /* @brief for each path source->excluded->target try to find a witness with a witness + * with equal permissions */ + const CHConnectionPairs& getNeededShortcuts(const E* excluded) { + assert(myValidatePermissions); + myNeededShortcuts.clear(); + for (typename CHConnectionPairs::iterator it = myShortcutsToValidate.begin(); it != myShortcutsToValidate.end(); ++it) { + const C* const aInfo = it->first; + const C* const fInfo = it->second; + const SUMOReal bestWitness = dijkstraTT( + aInfo->target, fInfo->target, excluded, (aInfo->permissions & fInfo->permissions)); + const SUMOReal viaCost = aInfo->cost + fInfo->cost; + if (viaCost < bestWitness) { + myNeededShortcuts.push_back(*it); + } + } + myShortcutsToValidate.clear(); + return myNeededShortcuts; + } + + +private: + // perform dijkstra search under permission constraints + SUMOReal dijkstraTT(E* start, E* dest, const E* excluded, SVCPermissions permissions) { + init(); + start->traveltime = 0; + start->depth = 0; + myFrontier.push_back(start); + // build SPT + while (!myFrontier.empty()) { + E* min = myFrontier.front(); + if (min == dest) { + return dest->traveltime; + } + pop_heap(myFrontier.begin(), myFrontier.end(), myCmp); + myFrontier.pop_back(); + myFound.push_back(min); + min->visited = true; + if (min->depth < myMaxDepth) { + for (typename CHConnections::iterator it = min->followers.begin(); it != min->followers.end(); it++) { + C& con = *it; + E* follower = con.target; + if (follower == excluded) { + continue; + } + if ((con.permissions & permissions) != permissions) { + continue; + } + const SUMOReal traveltime = min->traveltime + con.cost; + const SUMOReal oldTraveltime = follower->traveltime; + if (!follower->visited && traveltime < oldTraveltime) { + follower->traveltime = traveltime; + follower->depth = min->depth + 1; + follower->permissions = (min->permissions & con.permissions); + if (oldTraveltime == std::numeric_limits::max()) { + myFrontier.push_back(follower); + push_heap(myFrontier.begin(), myFrontier.end(), myCmp); + } else { + push_heap(myFrontier.begin(), + find(myFrontier.begin(), myFrontier.end(), follower) + 1, + myCmp); + } + } + } + } + } + return dest->traveltime; + } + + + // helper method for debugging + void debugPrintVector(std::vector& vec, E* start, const E* excluded) { + std::cout << "computed SPT from '" << start->edge->getID() << "' (excluding " << excluded->edge->getID() << ") with " << myFound.size() << " edges\n"; + for (typename std::vector::iterator it = vec.begin(); it != vec.end(); it++) { + E* e = *it; + std::cout << "(" << e->edge->getID() << "," << e->traveltime << ") "; + } + std::cout << "\n"; + } + + /// @brief the min edge heap + std::vector myFrontier; + /// @brief the list of visited edges (used when resetting) + std::vector myFound; + + /// @brief comparator for search queue + EdgeByTTComparator myCmp; + + /// @brief maximum search depth + int myMaxDepth; + + /// @brief whether permissions should be validated + bool myValidatePermissions; + + /// @brief vector of needed shortcuts after validation + CHConnectionPairs myShortcutsToValidate; + /// @brief vector of needed shortcuts after validation + CHConnectionPairs myNeededShortcuts; +}; + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/SUMOAbstractRouter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/SUMOAbstractRouter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/SUMOAbstractRouter.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/SUMOAbstractRouter.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,158 @@ +/****************************************************************************/ +/// @file SUMOAbstractRouter.h +/// @author Daniel Krajzewicz +/// @author Michael Behrisch +/// @author Jakob Erdmann +/// @date 25.Jan 2006 +/// @version $Id: SUMOAbstractRouter.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// The dijkstra-router +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2006-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef SUMOAbstractRouter_h +#define SUMOAbstractRouter_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class SUMOAbstractRouter + * The interface for routing the vehicles over the network. + */ +template +class SUMOAbstractRouter { +public: + /// Type of the function that is used to retrieve the edge effort. + typedef SUMOReal(* Operation)(const E* const, const V* const, SUMOReal); + + /// Constructor + SUMOAbstractRouter(Operation operation, const std::string& type): + myOperation(operation), + myType(type), + myQueryVisits(0), + myNumQueries(0), + myQueryStartTime(0), + myQueryTimeSum(0) + { } + + /// Destructor + virtual ~SUMOAbstractRouter() { + if (myNumQueries > 0) { + WRITE_MESSAGE(myType + " answered " + toString(myNumQueries) + " queries and explored " + toString(double(myQueryVisits) / myNumQueries) + " edges on average."); + WRITE_MESSAGE(myType + " spent " + toString(myQueryTimeSum) + "ms answering queries (" + toString(double(myQueryTimeSum) / myNumQueries) + "ms on average)."); + } + } + + virtual SUMOAbstractRouter* clone() const = 0; + + /** @brief Builds the route between the given edges using the minimum effort at the given time + The definition of the effort depends on the wished routing scheme */ + virtual void compute(const E* from, const E* to, const V* const vehicle, + SUMOTime msTime, std::vector& into) = 0; + + virtual SUMOReal recomputeCosts(const std::vector& edges, + const V* const v, SUMOTime msTime) const = 0; + + // interface extension for BulkStarRouter + virtual void prepare(const E*, const V*, bool) { + assert(false); + } + + inline SUMOReal getEffort(const E* const e, const V* const v, SUMOReal t) const { + return (*myOperation)(e, v, t); + } + + inline void startQuery() { + myNumQueries++; + myQueryStartTime = SysUtils::getCurrentMillis(); + } + + inline void endQuery(int visits) { + myQueryVisits += visits; + myQueryTimeSum += (SysUtils::getCurrentMillis() - myQueryStartTime); + } + +protected: + /// @brief The object's operation to perform. + Operation myOperation; + +private: + /// @brief the type of this router + const std::string myType; + + /// @brief counters for performance logging + SUMOLong myQueryVisits; + SUMOLong myNumQueries; + /// @brief the time spent querying in milliseconds + SUMOLong myQueryStartTime; + SUMOLong myQueryTimeSum; +private: + /// @brief Invalidated assignment operator + SUMOAbstractRouter& operator=(const SUMOAbstractRouter& s); +}; + + +template +struct prohibited_withRestrictions { +public: + inline bool operator()(const E* edge, const V* vehicle) const { + if (std::find(myProhibited.begin(), myProhibited.end(), edge) != myProhibited.end()) { + return true; + } + return edge->prohibits(vehicle); + } + + void prohibit(const std::vector& toProhibit) { + myProhibited = toProhibit; + } + +protected: + std::vector myProhibited; + +}; + +template +struct prohibited_noRestrictions { +public: + inline bool operator()(const E*, const V*) const { + return false; + } +}; + + + + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/SUMOVehicle.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/SUMOVehicle.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/SUMOVehicle.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/SUMOVehicle.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,274 @@ +/****************************************************************************/ +/// @file SUMOVehicle.h +/// @author Michael Behrisch +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @date Tue, 17 Feb 2009 +/// @version $Id: SUMOVehicle.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Abstract base class for vehicle representations +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef SUMOVehicle_h +#define SUMOVehicle_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class MSVehicleType; +class MSRoute; +class MSEdge; +class MSLane; +class MSDevice; +class MSPerson; +class MSContainer; +class SUMOSAXAttributes; + +typedef std::vector ConstMSEdgeVector; + + +// =========================================================================== +// class definitions +// =========================================================================== +/** + * @class SUMOVehicle + * @brief Representation of a vehicle + */ +class SUMOVehicle { +public: + /// @brief Destructor + virtual ~SUMOVehicle() {} + + /** @brief Get the vehicle's ID + * @return The the ID of the vehicle + */ + virtual const std::string& getID() const = 0; + + /** @brief Get the vehicle's position along the lane + * @return The position of the vehicle (in m from the lane's begin) + */ + virtual SUMOReal getPositionOnLane() const = 0; + + /** @brief Get the vehicle's angle + * @return The angle of the vehicle (in degree) + */ + virtual SUMOReal getAngle() const = 0; + + /** @brief Return current position (x/y, cartesian) + * + * If the vehicle is not in the net, Position::INVALID. + * @param[in] offset optional offset in longitudinal direction + * @return The current position (in cartesian coordinates) + * @see myLane + */ + virtual Position getPosition(const SUMOReal offset = 0) const = 0; + + /** @brief Returns the vehicle's maximum speed + * @return The vehicle's maximum speed + */ + virtual SUMOReal getMaxSpeed() const = 0; + + /** @brief Returns the vehicle's current speed + * @return The vehicle's speed + */ + virtual SUMOReal getSpeed() const = 0; + + /** @brief Returns the vehicle's type + * @return The vehicle's type + */ + virtual const MSVehicleType& getVehicleType() const = 0; + + /** @brief Returns the vehicle's access class + * @return The vehicle's access class + */ + virtual SUMOVehicleClass getVClass() const = 0; + + /// Returns the current route + virtual const MSRoute& getRoute() const = 0; + + /** @brief Returns the nSuccs'th successor of edge the vehicle is currently at + * + * If the rest of the route (counted from the current edge) than nSuccs, + * 0 is returned. + * @param[in] nSuccs The number of edge to look forward + * @return The nSuccs'th following edge in the vehicle's route + */ + virtual const MSEdge* succEdge(unsigned int nSuccs) const = 0; + + /// Replaces the current route by the given edges + virtual bool replaceRouteEdges(ConstMSEdgeVector& edges, bool onInit = false) = 0; + + /// Replaces the current route by the given one + virtual bool replaceRoute(const MSRoute* route, bool onInit = false, int offset = 0) = 0; + + /** @brief Performs a rerouting using the given router + * + * Tries to find a new route between the current edge and the destination edge, first. + * Tries to replace the current route by the new one using replaceRoute. + * + * @param[in] t The time for which the route is computed + * @param[in] router The router to use + * @see replaceRoute + */ + virtual void reroute(SUMOTime t, SUMOAbstractRouter& router, const bool onInit = false, const bool withTaz = false) = 0; + + + /** @brief Returns an iterator pointing to the current edge in this vehicles route + * @return The current route pointer + */ + virtual const ConstMSEdgeVector::const_iterator& getCurrentRouteEdge() const = 0; + + /** @brief Returns the vehicle's acceleration + * @return The acceleration + */ + virtual SUMOReal getAcceleration() const = 0; + + /** @brief Returns the slope of the road at vehicle's position + * @return The slope + */ + virtual SUMOReal getSlope() const = 0; + + /** @brief Returns the edge the vehicle is currently at + * + * @return The current edge in the vehicle's route + */ + virtual const MSEdge* getEdge() const = 0; + + /** @brief Returns the vehicle's parameter (including departure definition) + * + * @return The vehicle's parameter + */ + virtual const SUMOVehicleParameter& getParameter() const = 0; + + /** @brief Called when the vehicle is inserted into the network + * + * Sets optional information about departure time, informs the vehicle + * control about a further running vehicle. + */ + virtual void onDepart() = 0; + + /** @brief Returns the information whether the vehicle is on a road (is simulated) + * @return Whether the vehicle is simulated + */ + virtual bool isOnRoad() const = 0; + + /** @brief Returns this vehicle's real departure time + * @return This vehicle's real departure time + */ + virtual SUMOTime getDeparture() const = 0; + + /** @brief Returns this vehicle's desired arrivalPos for its current route + * (may change on reroute) + * @return This vehicle's real arrivalPos + */ + virtual SUMOReal getArrivalPos() const = 0; + + /** @brief Returns whether this vehicle has departed + */ + virtual bool hasDeparted() const = 0; + + /** @brief Returns whether this vehicle has arrived + */ + virtual bool hasArrived() const = 0; + + /** @brief Returns the number of new routes this vehicle got + * @return the number of new routes this vehicle got + */ + virtual unsigned int getNumberReroutes() const = 0; + + /** @brief Returns this vehicle's devices + * @return This vehicle's devices + */ + virtual const std::vector& getDevices() const = 0; + + /** @brief Adds a person to this vehicle + * + * May do nothing since persons are not supported by default + * + * @param[in] person The person to add + */ + virtual void addPerson(MSPerson* person) = 0; + + /** @brief Adds a container to this vehicle + * + * May do nothing since containers are not supported by default + * + * @param[in] container The container to add + */ + virtual void addContainer(MSContainer* container) = 0; + + /** @brief Adds a stop + * + * The stop is put into the sorted list. + * @param[in] stop The stop to add + * @return Whether the stop could be added + */ + virtual bool addStop(const SUMOVehicleParameter::Stop& stopPar, std::string& errorMsg, SUMOTime untilOffset = 0) = 0; + + /** @brief Returns whether the vehicle is at a stop + * @return Whether the has stopped + */ + virtual bool isStopped() const = 0; + + + /** @brief Returns whether the vehicle is at a stop and waiting for a person or container to continue + */ + virtual bool isStoppedTriggered() const = 0; + + /// @brief Returns a device of the given type if it exists or 0 + virtual MSDevice* getDevice(const std::type_info& type) const = 0; + + + virtual SUMOReal getChosenSpeedFactor() const = 0; + + virtual void setChosenSpeedFactor(const SUMOReal factor) = 0; + + virtual SUMOTime getWaitingTime() const = 0; + + /// @brief Returns this vehicles impatience + virtual SUMOReal getImpatience() const = 0; + + /// @name state io + //@{ + + /// Saves the states of a vehicle + virtual void saveState(OutputDevice& out) = 0; + + /** @brief Loads the state of this vehicle from the given description + */ + virtual void loadState(const SUMOSAXAttributes& attrs, const SUMOTime offset) = 0; + //@} +}; + + +#endif + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/SUMOVehicleParameter.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/SUMOVehicleParameter.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/SUMOVehicleParameter.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/SUMOVehicleParameter.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,504 @@ +/****************************************************************************/ +/// @file SUMOVehicleParameter.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date Tue, 31.03.2009 +/// @version $Id: SUMOVehicleParameter.cpp 18096 2015-03-17 09:50:59Z behrisch $ +/// +// Structure representing possible vehicle parameter +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include "SUMOVehicleParameter.h" +#include +#include +#include +#include +#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// member method definitions +// =========================================================================== +SUMOVehicleParameter::SUMOVehicleParameter() + : vtypeid(DEFAULT_VTYPE_ID), color(RGBColor::DEFAULT_COLOR), + depart(-1), departProcedure(DEPART_GIVEN), + departLane(0), departLaneProcedure(DEPART_LANE_DEFAULT), + departPos(0), departPosProcedure(DEPART_POS_DEFAULT), + departSpeed(-1), departSpeedProcedure(DEPART_SPEED_DEFAULT), + arrivalLane(0), arrivalLaneProcedure(ARRIVAL_LANE_DEFAULT), + arrivalPos(0), arrivalPosProcedure(ARRIVAL_POS_DEFAULT), + arrivalSpeed(-1), arrivalSpeedProcedure(ARRIVAL_SPEED_DEFAULT), + repetitionNumber(-1), repetitionsDone(-1), repetitionOffset(-1), repetitionProbability(-1), repetitionEnd(-1), + line(), fromTaz(), toTaz(), personCapacity(0), personNumber(0), containerNumber(0), setParameter(0) { +} + + +bool +SUMOVehicleParameter::defaultOptionOverrides(const OptionsCont& oc, const std::string& optionName) const { + return oc.isSet(optionName) && oc.getBool("defaults-override"); +} + + +void +SUMOVehicleParameter::write(OutputDevice& dev, const OptionsCont& oc) const { + dev.openTag(SUMO_TAG_VEHICLE).writeAttr(SUMO_ATTR_ID, id); + if (wasSet(VEHPARS_VTYPE_SET)) { + dev.writeAttr(SUMO_ATTR_TYPE, vtypeid); + } + if (departProcedure == DEPART_TRIGGERED) { + dev.writeAttr(SUMO_ATTR_DEPART, "triggered"); + } else if (departProcedure == DEPART_CONTAINER_TRIGGERED) { + dev.writeAttr(SUMO_ATTR_DEPART, "containerTriggered"); + } else { + dev.writeAttr(SUMO_ATTR_DEPART, time2string(depart)); + } + + // optional parameter + // departlane + if (wasSet(VEHPARS_DEPARTLANE_SET) && !defaultOptionOverrides(oc, "departlane")) { + std::string val; + switch (departLaneProcedure) { + case DEPART_LANE_GIVEN: + val = toString(departLane); + break; + case DEPART_LANE_RANDOM: + val = "random"; + break; + case DEPART_LANE_FREE: + val = "free"; + break; + case DEPART_LANE_ALLOWED_FREE: + val = "allowed"; + break; + case DEPART_LANE_BEST_FREE: + val = "best"; + break; + case DEPART_LANE_FIRST_ALLOWED: + val = "first"; + break; + case DEPART_LANE_DEFAULT: + default: + break; + } + dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTLANE, val); + } else if (oc.isSet("departlane")) { + dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTLANE, oc.getString("departlane")); + } + // departpos + if (wasSet(VEHPARS_DEPARTPOS_SET) && !defaultOptionOverrides(oc, "departpos")) { + std::string val; + switch (departPosProcedure) { + case DEPART_POS_GIVEN: + val = toString(departPos); + break; + case DEPART_POS_RANDOM: + val = "random"; + break; + case DEPART_POS_RANDOM_FREE: + val = "random_free"; + break; + case DEPART_POS_FREE: + val = "free"; + break; + case DEPART_POS_PWAG_SIMPLE: + val = "pwagSimple"; + break; + case DEPART_POS_PWAG_GENERIC: + val = "pwagGeneric"; + break; + case DEPART_POS_MAX_SPEED_GAP: + val = "maxSpeedGap"; + break; + case DEPART_POS_BASE: + val = "base"; + break; + case DEPART_POS_DEFAULT: + default: + break; + } + dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTPOS, val); + } else if (oc.isSet("departpos")) { + dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTPOS, oc.getString("departpos")); + } + // departspeed + if (wasSet(VEHPARS_DEPARTSPEED_SET) && !defaultOptionOverrides(oc, "departspeed")) { + std::string val; + switch (departSpeedProcedure) { + case DEPART_SPEED_GIVEN: + val = toString(departSpeed); + break; + case DEPART_SPEED_RANDOM: + val = "random"; + break; + case DEPART_SPEED_MAX: + val = "max"; + break; + case DEPART_SPEED_DEFAULT: + default: + break; + } + dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTSPEED, val); + } else if (oc.isSet("departspeed")) { + dev.writeNonEmptyAttr(SUMO_ATTR_DEPARTSPEED, oc.getString("departspeed")); + } + + // arrivallane + if (wasSet(VEHPARS_ARRIVALLANE_SET) && !defaultOptionOverrides(oc, "arrivallane")) { + std::string val; + switch (arrivalLaneProcedure) { + case ARRIVAL_LANE_GIVEN: + val = toString(arrivalLane); + break; + case ARRIVAL_LANE_CURRENT: + val = "current"; + break; + case ARRIVAL_LANE_DEFAULT: + default: + break; + } + dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALLANE, val); + } else if (oc.isSet("arrivallane")) { + dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALLANE, oc.getString("arrivallane")); + } + // arrivalpos + if (wasSet(VEHPARS_ARRIVALPOS_SET) && !defaultOptionOverrides(oc, "arrivalpos")) { + std::string val; + switch (arrivalPosProcedure) { + case ARRIVAL_POS_GIVEN: + val = toString(arrivalPos); + break; + case ARRIVAL_POS_RANDOM: + val = "random"; + break; + case ARRIVAL_POS_MAX: + val = "max"; + break; + case ARRIVAL_POS_DEFAULT: + default: + break; + } + dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALPOS, val); + } else if (oc.isSet("arrivalpos")) { + dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALPOS, oc.getString("arrivalpos")); + } + // arrivalspeed + if (wasSet(VEHPARS_ARRIVALSPEED_SET) && !defaultOptionOverrides(oc, "arrivalspeed")) { + std::string val; + switch (arrivalSpeedProcedure) { + case ARRIVAL_SPEED_GIVEN: + val = toString(arrivalSpeed); + break; + case ARRIVAL_SPEED_CURRENT: + val = "current"; + break; + case ARRIVAL_SPEED_DEFAULT: + default: + break; + } + dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALSPEED, val); + } else if (oc.isSet("arrivalspeed")) { + dev.writeNonEmptyAttr(SUMO_ATTR_ARRIVALSPEED, oc.getString("arrivalspeed")); + } + + // color + if (wasSet(VEHPARS_COLOR_SET)) { + dev.writeAttr(SUMO_ATTR_COLOR, color); + } + if (wasSet(VEHPARS_LINE_SET)) { + dev.writeAttr(SUMO_ATTR_LINE, line); + } + if (wasSet(VEHPARS_FROM_TAZ_SET)) { + dev.writeAttr(SUMO_ATTR_FROM_TAZ, fromTaz); + } + if (wasSet(VEHPARS_TO_TAZ_SET)) { + dev.writeAttr(SUMO_ATTR_TO_TAZ, toTaz); + } + if (wasSet(VEHPARS_PERSON_CAPACITY_SET)) { + dev.writeAttr(SUMO_ATTR_PERSON_CAPACITY, personCapacity); + } + if (wasSet(VEHPARS_PERSON_NUMBER_SET)) { + dev.writeAttr(SUMO_ATTR_PERSON_NUMBER, personNumber); + } + if (wasSet(VEHPARS_CONTAINER_NUMBER_SET)) { + dev.writeAttr(SUMO_ATTR_CONTAINER_NUMBER, containerNumber); + } +} + + +void +SUMOVehicleParameter::writeStops(OutputDevice& dev) const { + for (std::vector::const_iterator stop = stops.begin(); stop != stops.end(); ++stop) { + dev.openTag(SUMO_TAG_STOP); + if (stop->busstop != "") { + dev.writeAttr(SUMO_ATTR_BUS_STOP, stop->busstop); + } + if (stop->containerstop != "") { + dev.writeAttr(SUMO_ATTR_CONTAINER_STOP, stop->containerstop); + } + if (stop->busstop == "" && stop->containerstop == "") { + dev.writeAttr(SUMO_ATTR_LANE, stop->lane); + if ((stop->setParameter & STOP_START_SET) != 0) { + dev.writeAttr(SUMO_ATTR_STARTPOS, stop->startPos); + } + if ((stop->setParameter & STOP_END_SET) != 0) { + dev.writeAttr(SUMO_ATTR_ENDPOS, stop->endPos); + } + } + if (stop->duration >= 0) { + dev.writeAttr(SUMO_ATTR_DURATION, STEPS2TIME(stop->duration)); + } + if (stop->until >= 0) { + dev.writeAttr(SUMO_ATTR_UNTIL, STEPS2TIME(stop->until)); + } + if ((stop->setParameter & STOP_TRIGGER_SET) != 0) { + dev.writeAttr(SUMO_ATTR_TRIGGERED, stop->triggered); + } + if ((stop->setParameter & STOP_CONTAINER_TRIGGER_SET) != 0) { + dev.writeAttr(SUMO_ATTR_CONTAINER_TRIGGERED, stop->containerTriggered); + } + if ((stop->setParameter & STOP_PARKING_SET) != 0) { + dev.writeAttr(SUMO_ATTR_PARKING, stop->parking); + } + // look, we are writing the set of expected persons in its current state... + // if this method is used somewhere in the simulation output, + // one should consider keeping the original values additionally, + // as the ones we write may hev changed. + if ((stop->setParameter & STOP_EXPECTED_SET) != 0) { + dev.writeAttr(SUMO_ATTR_EXPECTED, stop->awaitedPersons); + } + if ((stop->setParameter & STOP_EXPECTED_CONTAINERS_SET) != 0) { + dev.writeAttr(SUMO_ATTR_EXPECTED_CONTAINERS, stop->awaitedContainers); + } + dev.closeTag(); + } +} + + +bool +SUMOVehicleParameter::parseDepart(const std::string& val, const std::string& element, const std::string& id, + SUMOTime& depart, DepartDefinition& dd, std::string& error) { + if (val == "triggered") { + dd = DEPART_TRIGGERED; + } else if (val == "containerTriggered") { + dd = DEPART_CONTAINER_TRIGGERED; + } else if (val == "now") { + dd = DEPART_NOW; + } else { + try { + depart = string2time(val); + dd = DEPART_GIVEN; + if (depart < 0) { + error = "Negative departure time in the definition of '" + id + "'."; + return false; + } + } catch (...) { + error = "Invalid departure time for " + element + " '" + id + "';\n must be one of (\"triggered\", \"containerTriggered\", \"now\", or a float >= 0)"; + return false; + } + } + return true; +} + + +bool +SUMOVehicleParameter::parseDepartLane(const std::string& val, const std::string& element, const std::string& id, + int& lane, DepartLaneDefinition& dld, std::string& error) { + bool ok = true; + if (val == "random") { + dld = DEPART_LANE_RANDOM; + } else if (val == "free") { + dld = DEPART_LANE_FREE; + } else if (val == "allowed") { + dld = DEPART_LANE_ALLOWED_FREE; + } else if (val == "best") { + dld = DEPART_LANE_BEST_FREE; + } else if (val == "first") { + dld = DEPART_LANE_FIRST_ALLOWED; + } else { + try { + lane = TplConvert::_2int(val.c_str()); + dld = DEPART_LANE_GIVEN; + if (lane < 0) { + ok = false; + } + } catch (...) { + ok = false; + } + } + if (!ok) { + error = "Invalid departLane definition for " + element + " '" + id + "';\n must be one of (\"random\", \"free\", \"allowed\", \"best\", \"first\", or an int>=0)"; + } + return ok; +} + + +bool +SUMOVehicleParameter::parseDepartPos(const std::string& val, const std::string& element, const std::string& id, + SUMOReal& pos, DepartPosDefinition& dpd, std::string& error) { + bool ok = true; + if (val == "random") { + dpd = DEPART_POS_RANDOM; + } else if (val == "random_free") { + dpd = DEPART_POS_RANDOM_FREE; + } else if (val == "free") { + dpd = DEPART_POS_FREE; + } else if (val == "base") { + dpd = DEPART_POS_BASE; + } else if (val == "pwagSimple") { + dpd = DEPART_POS_PWAG_SIMPLE; + } else if (val == "pwagGeneric") { + dpd = DEPART_POS_PWAG_GENERIC; + } else if (val == "maxSpeedGap") { + dpd = DEPART_POS_MAX_SPEED_GAP; + } else { + try { + pos = TplConvert::_2SUMOReal(val.c_str()); + dpd = DEPART_POS_GIVEN; + } catch (...) { + ok = false; + } + } + if (!ok) { + error = "Invalid departPos definition for " + element + " '" + id + "';\n must be one of (\"random\", \"random_free\", \"free\", \"base\", \"pwagSimple\", \"pwagGeneric\", \"maxSpeedGap\", or a float)"; + } + return ok; +} + + +bool +SUMOVehicleParameter::parseDepartSpeed(const std::string& val, const std::string& element, const std::string& id, + SUMOReal& speed, DepartSpeedDefinition& dsd, std::string& error) { + bool ok = true; + if (val == "random") { + dsd = DEPART_SPEED_RANDOM; + } else if (val == "max") { + dsd = DEPART_SPEED_MAX; + } else { + try { + speed = TplConvert::_2SUMOReal(val.c_str()); + dsd = DEPART_SPEED_GIVEN; + if (speed < 0) { + ok = false; + } + } catch (...) { + ok = false; + } + } + if (!ok) { + error = "Invalid departSpeed definition for " + element + " '" + id + "';\n must be one of (\"random\", \"max\", or a float>=0)"; + } + return ok; +} + + +bool +SUMOVehicleParameter::parseArrivalLane(const std::string& val, const std::string& element, const std::string& id, + int& lane, ArrivalLaneDefinition& ald, std::string& error) { + bool ok = true; + if (val == "current") { + ald = ARRIVAL_LANE_CURRENT; + } else { + try { + lane = TplConvert::_2int(val.c_str()); + ald = ARRIVAL_LANE_GIVEN; + if (lane < 0) { + ok = false; + } + } catch (...) { + ok = false; + } + } + if (!ok) { + error = "Invalid arrivalLane definition for " + element + " '" + id + "';\n must be one of (\"current\", or an int>=0)"; + } + return ok; +} + + +bool +SUMOVehicleParameter::parseArrivalPos(const std::string& val, const std::string& element, const std::string& id, + SUMOReal& pos, ArrivalPosDefinition& apd, std::string& error) { + bool ok = true; + if (val == "random") { + apd = ARRIVAL_POS_RANDOM; + } else if (val == "max") { + apd = ARRIVAL_POS_MAX; + } else { + try { + pos = TplConvert::_2SUMOReal(val.c_str()); + apd = ARRIVAL_POS_GIVEN; + } catch (...) { + ok = false; + } + } + if (!ok) { + error = "Invalid arrivalPos definition for " + element + " '" + id + "';\n must be one of (\"random\", \"max\", or a float)"; + } + return ok; +} + + +bool +SUMOVehicleParameter::parseArrivalSpeed(const std::string& val, const std::string& element, const std::string& id, + SUMOReal& speed, ArrivalSpeedDefinition& asd, std::string& error) { + bool ok = true; + if (val == "current") { + asd = ARRIVAL_SPEED_CURRENT; + } else { + try { + speed = TplConvert::_2SUMOReal(val.c_str()); + if (speed < 0) { + ok = false; + } + asd = ARRIVAL_SPEED_GIVEN; + } catch (...) { + ok = false; + } + } + if (!ok) { + error = "Invalid arrivalSpeed definition for " + element + " '" + id + "';\n must be one of (\"current\", or a float>=0)"; + } + return ok; +} + + +SUMOReal +SUMOVehicleParameter::interpretEdgePos(SUMOReal pos, SUMOReal maximumValue, SumoXMLAttr attr, const std::string& id) { + if (pos < 0) { + pos = maximumValue + pos; + } + if (pos > maximumValue) { + WRITE_WARNING("Invalid " + toString(attr) + " " + toString(pos) + " given for " + id + ". Inserting at edge end instead."); + pos = maximumValue; + } + return pos; +} + + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/SUMOVehicleParameter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/SUMOVehicleParameter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/SUMOVehicleParameter.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/SUMOVehicleParameter.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,521 @@ +/****************************************************************************/ +/// @file SUMOVehicleParameter.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Axel Wegener +/// @author Michael Behrisch +/// @date 2006-01-24 +/// @version $Id: SUMOVehicleParameter.h 18095 2015-03-17 09:39:00Z behrisch $ +/// +// Structure representing possible vehicle parameter +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef SUMOVehicleParameter_h +#define SUMOVehicleParameter_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include + + +// =========================================================================== +// class declarations +// =========================================================================== +class OutputDevice; +class OptionsCont; + + +// =========================================================================== +// value definitions +// =========================================================================== +const int VEHPARS_COLOR_SET = 1; +const int VEHPARS_VTYPE_SET = 2; +const int VEHPARS_DEPARTLANE_SET = 2 << 1; +const int VEHPARS_DEPARTPOS_SET = 2 << 2; +const int VEHPARS_DEPARTSPEED_SET = 2 << 3; +const int VEHPARS_PERIODNUM_SET = 2 << 4; +const int VEHPARS_PERIODFREQ_SET = 2 << 5; +const int VEHPARS_ROUTE_SET = 2 << 6; +const int VEHPARS_ARRIVALLANE_SET = 2 << 7; +const int VEHPARS_ARRIVALPOS_SET = 2 << 8; +const int VEHPARS_ARRIVALSPEED_SET = 2 << 9; +const int VEHPARS_LINE_SET = 2 << 10; +const int VEHPARS_FROM_TAZ_SET = 2 << 11; +const int VEHPARS_TO_TAZ_SET = 2 << 12; +const int VEHPARS_FORCE_REROUTE = 2 << 13; +const int VEHPARS_PERSON_CAPACITY_SET = 2 << 14; +const int VEHPARS_PERSON_NUMBER_SET = 2 << 15; +const int VEHPARS_CONTAINER_NUMBER_SET = 2 << 15; + +const int STOP_INDEX_END = -1; +const int STOP_INDEX_FIT = -2; + +const int STOP_END_SET = 1; +const int STOP_START_SET = 2; +const int STOP_TRIGGER_SET = 2 << 1; +const int STOP_PARKING_SET = 2 << 2; +const int STOP_EXPECTED_SET = 2 << 3; +const int STOP_CONTAINER_TRIGGER_SET = 2 << 4; +const int STOP_EXPECTED_CONTAINERS_SET = 2 << 5; + + +// =========================================================================== +// enum definitions +// =========================================================================== +/** + * @enum DepartDefinition + * @brief Possible ways to depart + */ +enum DepartDefinition { + /// @brief The time is given + DEPART_GIVEN, + /// @brief The departure is person triggered + DEPART_TRIGGERED, + /// @brief The departure is container triggered + DEPART_CONTAINER_TRIGGERED, + /// @brief The vehicle is discarded if emission fails (not fully implemented yet) + DEPART_NOW, + /// @brief Tag for the last element in the enum for safe int casting + DEPART_DEF_MAX +}; + + +/** + * @enum DepartLaneDefinition + * @brief Possible ways to choose a lane on depart + */ +enum DepartLaneDefinition { + /// @brief No information given; use default + DEPART_LANE_DEFAULT, + /// @brief The lane is given + DEPART_LANE_GIVEN, + /// @brief The lane is chosen randomly + DEPART_LANE_RANDOM, + /// @brief The least occupied lane is used + DEPART_LANE_FREE, + /// @brief The least occupied lane from lanes which allow the continuation + DEPART_LANE_ALLOWED_FREE, + /// @brief The least occupied lane from best lanes + DEPART_LANE_BEST_FREE, + /// @brief The rightmost lane the vehicle may use + DEPART_LANE_FIRST_ALLOWED, + /// @brief Tag for the last element in the enum for safe int casting + DEPART_LANE_DEF_MAX +}; + + +/** + * @enum DepartPosDefinition + * @brief Possible ways to choose the departure position + */ +enum DepartPosDefinition { + /// @brief No information given; use default + DEPART_POS_DEFAULT, + /// @brief The position is given + DEPART_POS_GIVEN, + /// @brief The position is chosen randomly + DEPART_POS_RANDOM, + /// @brief A free position is chosen + DEPART_POS_FREE, + /// @brief Back-at-zero position + DEPART_POS_BASE, + /// @brief Simple max-flow insertion by P.Wagner + DEPART_POS_PWAG_SIMPLE, + /// @brief Generic max-flow insertion by P.Wagner + DEPART_POS_PWAG_GENERIC, + /// @brief A gap is chosen where the maximum speed may be achieved + DEPART_POS_MAX_SPEED_GAP, + /// @brief If a fixed number of random choices fails, a free position is chosen + DEPART_POS_RANDOM_FREE, + /// @brief Tag for the last element in the enum for safe int casting + DEPART_POS_DEF_MAX +}; + + +/** + * @enum DepartSpeedDefinition + * @brief Possible ways to choose the departure speed + */ +enum DepartSpeedDefinition { + /// @brief No information given; use default + DEPART_SPEED_DEFAULT, + /// @brief The speed is given + DEPART_SPEED_GIVEN, + /// @brief The speed is chosen randomly + DEPART_SPEED_RANDOM, + /// @brief The maximum speed is used + DEPART_SPEED_MAX, + /// @brief Tag for the last element in the enum for safe int casting + DEPART_SPEED_DEF_MAX +}; + + +/** + * @enum ArrivalLaneDefinition + * @brief Possible ways to choose the arrival lane + */ +enum ArrivalLaneDefinition { + /// @brief No information given; use default + ARRIVAL_LANE_DEFAULT, + /// @brief The arrival lane is given + ARRIVAL_LANE_GIVEN, + /// @brief The current lane shall be used + ARRIVAL_LANE_CURRENT, + /// @brief Tag for the last element in the enum for safe int casting + ARRIVAL_LANE_DEF_MAX +}; + + +/** + * @enum ArrivalPosDefinition + * @brief Possible ways to choose the arrival position + */ +enum ArrivalPosDefinition { + /// @brief No information given; use default + ARRIVAL_POS_DEFAULT, + /// @brief The arrival position is given + ARRIVAL_POS_GIVEN, + /// @brief The arrival position is chosen randomly + ARRIVAL_POS_RANDOM, + /// @brief The maximum arrival position is used + ARRIVAL_POS_MAX, + /// @brief Tag for the last element in the enum for safe int casting + ARRIVAL_POS_DEF_MAX +}; + + +/** + * @enum ArrivalSpeedDefinition + * @brief Possible ways to choose the arrival speed + */ +enum ArrivalSpeedDefinition { + /// @brief No information given; use default + ARRIVAL_SPEED_DEFAULT, + /// @brief The speed is given + ARRIVAL_SPEED_GIVEN, + /// @brief The current speed is used + ARRIVAL_SPEED_CURRENT, + /// @brief Tag for the last element in the enum for safe int casting + ARRIVAL_SPEED_DEF_MAX +}; + + +// =========================================================================== +// struct definitions +// =========================================================================== +/** + * @class SUMOVehicleParameter + * @brief Structure representing possible vehicle parameter + * + * The fields yielding with "Procedure" describe whether the according value + * shall be used or another procedure is used to choose the value. + * @see DepartLaneDefinition + * @see DepartPosDefinition + * @see DepartSpeedDefinition + */ +class SUMOVehicleParameter : public Parameterised { +public: + /** @brief Constructor + * + * Initialises the structure with default values + */ + SUMOVehicleParameter(); + + + /** @brief Returns whether the given parameter was set + * @param[in] what The parameter which one asks for + * @return Whether the given parameter was set + */ + bool wasSet(int what) const { + return (setParameter & what) != 0; + } + + + /** @brief Writes the parameters as a beginning element + * + * @param[in, out] dev The device to write into + * @param[in] oc The options to get defaults from + * @exception IOError not yet implemented + */ + void write(OutputDevice& dev, const OptionsCont& oc) const; + + + /** @brief Writes the enclosed stops + * + * @param[in, out] dev The device to write into + * @exception IOError not yet implemented + */ + void writeStops(OutputDevice& dev) const; + + /** @brief Returns whether the defaults shall be used + * @param[in] oc The options to get the options from + * @param[in] optionName The name of the option to determine whether its value shall be used + * @return Whether the option is set and --defaults-override was set + */ + bool defaultOptionOverrides(const OptionsCont& oc, const std::string& optionName) const; + + + + /// @name Depart/arrival-attributes verification + /// @{ + + /** @brief Validates a given depart value + * @param[in] val The depart value to parse + * @param[in] element The name of the type of the parsed element, for building the error message + * @param[in] id The id of the parsed element, for building the error message + * @param[out] depart The parsed depart time, if given + * @param[out] dd The parsed departProcedure definition + * @param[out] error Error message, if an error occures + * @return Whether the given value is a valid depart definition + */ + static bool parseDepart(const std::string& val, const std::string& element, const std::string& id, + SUMOTime& depart, DepartDefinition& dd, std::string& error); + + + /** @brief Validates a given departLane value + * @param[in] val The departLane value to parse + * @param[in] element The name of the type of the parsed element, for building the error message + * @param[in] id The id of the parsed element, for building the error message + * @param[out] lane The parsed lane, if given + * @param[out] dld The parsed departLane definition + * @param[out] error Error message, if an error occures + * @return Whether the given value is a valid departLane definition + */ + static bool parseDepartLane(const std::string& val, const std::string& element, const std::string& id, + int& lane, DepartLaneDefinition& dld, std::string& error); + + + /** @brief Validates a given departPos value + * @param[in] val The departPos value to parse + * @param[in] element The name of the type of the parsed element, for building the error message + * @param[in] id The id of the parsed element, for building the error message + * @param[out] pos The parsed position, if given + * @param[out] dpd The parsed departPos definition + * @param[out] error Error message, if an error occures + * @return Whether the given value is a valid departPos definition + */ + static bool parseDepartPos(const std::string& val, const std::string& element, const std::string& id, + SUMOReal& pos, DepartPosDefinition& dpd, std::string& error); + + + /** @brief Validates a given departSpeed value + * @param[in] val The departSpeed value to parse + * @param[in] element The name of the type of the parsed element, for building the error message + * @param[in] id The id of the parsed element, for building the error message + * @param[out] speed The parsed speed, if given + * @param[out] dsd The parsed departSpeed definition + * @param[out] error Error message, if an error occures + * @return Whether the given value is a valid departSpeed definition + */ + static bool parseDepartSpeed(const std::string& val, const std::string& element, const std::string& id, + SUMOReal& speed, DepartSpeedDefinition& dsd, std::string& error); + + + /** @brief Validates a given arrivalLane value + * @param[in] val The arrivalLane value to parse + * @param[in] element The name of the type of the parsed element, for building the error message + * @param[in] id The id of the parsed element, for building the error message + * @param[out] lane The parsed lane, if given + * @param[out] ald The parsed arrivalLane definition + * @param[out] error Error message, if an error occures + * @return Whether the given value is a valid arrivalLane definition + */ + static bool parseArrivalLane(const std::string& val, const std::string& element, const std::string& id, + int& lane, ArrivalLaneDefinition& ald, std::string& error); + + + /** @brief Validates a given arrivalPos value + * @param[in] val The arrivalPos value to parse + * @param[in] element The name of the type of the parsed element, for building the error message + * @param[in] id The id of the parsed element, for building the error message + * @param[out] pos The parsed position, if given + * @param[out] apd The parsed arrivalPos definition + * @param[out] error Error message, if an error occures + * @return Whether the given value is a valid arrivalPos definition + */ + static bool parseArrivalPos(const std::string& val, const std::string& element, const std::string& id, + SUMOReal& pos, ArrivalPosDefinition& apd, std::string& error); + + + /** @brief Validates a given arrivalSpeed value + * @param[in] val The arrivalSpeed value to parse + * @param[in] element The name of the type of the parsed element, for building the error message + * @param[in] id The id of the parsed element, for building the error message + * @param[out] speed The parsed speed, if given + * @param[out] asd The parsed arrivalSpeed definition + * @param[out] error Error message, if an error occures + * @return Whether the given value is a valid arrivalSpeed definition + */ + static bool parseArrivalSpeed(const std::string& val, const std::string& element, const std::string& id, + SUMOReal& speed, ArrivalSpeedDefinition& asd, std::string& error); + /// @} + + + /** @brief Interprets negative edge positions and fits them onto a given edge + * @param[in] pos The position to be interpreted + * @param[in] maximumValue The maximum allowed value (edge length) + * @param[in] attr The attribute from which the value originated + * @param[in] id The id of the object to which this attribute belongs + * @return Whether the interpreted position + */ + static SUMOReal interpretEdgePos(SUMOReal pos, SUMOReal maximumValue, SumoXMLAttr attr, const std::string& id); + + /// @brief The vehicle's id + std::string id; + + /// @brief The vehicle's route id + std::string routeid; + /// @brief The vehicle's type id + std::string vtypeid; + /// @brief The vehicle's color + mutable RGBColor color; + + + /// @name Departure definition + /// @{ + + /// @brief The vehicle's departure time + SUMOTime depart; + /// @brief Information how the vehicle shall choose the depart time + DepartDefinition departProcedure; + /// @brief (optional) The lane the vehicle shall depart from (index in edge) + int departLane; + /// @brief Information how the vehicle shall choose the lane to depart from + DepartLaneDefinition departLaneProcedure; + /// @brief (optional) The position the vehicle shall depart from + SUMOReal departPos; + /// @brief Information how the vehicle shall choose the departure position + DepartPosDefinition departPosProcedure; + /// @brief (optional) The initial speed of the vehicle + SUMOReal departSpeed; + /// @brief Information how the vehicle's initial speed shall be chosen + DepartSpeedDefinition departSpeedProcedure; + /// @} + + + /// @name Arrival definition + /// @{ + + /// @brief (optional) The lane the vehicle shall arrive on (not used yet) + int arrivalLane; + /// @brief Information how the vehicle shall choose the lane to arrive on + ArrivalLaneDefinition arrivalLaneProcedure; + /// @brief (optional) The position the vehicle shall arrive on + SUMOReal arrivalPos; + /// @brief Information how the vehicle shall choose the arrival position + ArrivalPosDefinition arrivalPosProcedure; + /// @brief (optional) The final speed of the vehicle (not used yet) + SUMOReal arrivalSpeed; + /// @brief Information how the vehicle's end speed shall be chosen + ArrivalSpeedDefinition arrivalSpeedProcedure; + /// @} + + + /// @name Repetition definition + /// @{ + + /// @brief The number of times the vehicle shall be repeatedly inserted + int repetitionNumber; + /// @brief The number of times the vehicle was already inserted + int repetitionsDone; + /// @brief The time offset between vehicle reinsertions +#ifdef HAVE_SUBSECOND_TIMESTEPS + SUMOTime repetitionOffset; +#else + SUMOReal repetitionOffset; +#endif + /// @brief The probability for emitting a vehicle per second + SUMOReal repetitionProbability; + /// @brief The time at which the flow ends (only needed when using repetitionProbability) + SUMOTime repetitionEnd; + /// @} + + + /// @brief The vehicle's line (mainly for public transport) + std::string line; + + /// @brief The vehicle's origin zone (district) + std::string fromTaz; + + /// @brief The vehicle's destination zone (district) + std::string toTaz; + + /** @struct Stop + * @brief Definition of vehicle stop (position and duration) + */ + struct Stop { + /// @brief The lane to stop at + std::string lane; + /// @brief (Optional) bus stop if one is assigned to the stop + std::string busstop; + /// @brief (Optional) container stop if one is assigned to the stop + std::string containerstop; + /// @brief The stopping position start + SUMOReal startPos; + /// @brief The stopping position end + SUMOReal endPos; + /// @brief The stopping duration + SUMOTime duration; + /// @brief The time at which the vehicle may continue its journey + SUMOTime until; + /// @brief whether an arriving person lets the vehicle continue + bool triggered; + /// @brief whether an arriving container lets the vehicle continue + bool containerTriggered; + /// @brief whether the vehicle is removed from the net while stopping + bool parking; + /// @brief IDs of persons the vehicle has to wait for until departing + std::set awaitedPersons; + /// @brief IDs of containers the vehicle has to wait for until departing + std::set awaitedContainers; + /// @brief at which position in the stops list + int index; + /// @brief Information for the output which parameter were set + int setParameter; + }; + + /// @brief List of the stops the vehicle will make + std::vector stops; + + /// @brief The vehicle's capacity (persons) + unsigned int personCapacity; + + /// @brief The number of persons in the vehicle + unsigned int personNumber; + + /// @brief The number of containers in the vehicle + unsigned int containerNumber; + + /// @brief Information for the router which parameter were set + mutable int setParameter; + + +}; + +#endif + +/****************************************************************************/ + + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/SUMOVTypeParameter.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/SUMOVTypeParameter.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/SUMOVTypeParameter.cpp 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/SUMOVTypeParameter.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,388 @@ +/****************************************************************************/ +/// @file SUMOVTypeParameter.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date 10.09.2009 +/// @version $Id: SUMOVTypeParameter.cpp 18136 2015-03-24 15:10:45Z behrisch $ +/// +// Structure representing possible vehicle parameter +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CHECK_MEMORY_LEAKS +#include +#endif // CHECK_MEMORY_LEAKS + + +// =========================================================================== +// member method definitions +// =========================================================================== +SUMOVTypeParameter::SUMOVTypeParameter(const std::string& vtid, const SUMOVehicleClass vclass) + : id(vtid), length(5./*4.3*/), minGap(2.5), maxSpeed(200. / 3.6), + defaultProbability(DEFAULT_VEH_PROB), + speedFactor(1.0), speedDev(0.0), + emissionClass(PollutantsInterface::getClassByName("unknown", vclass)), color(RGBColor::DEFAULT_COLOR), + vehicleClass(vclass), impatience(0.0), personCapacity(4), containerCapacity(0), boardingDuration(500), + loadingDuration(90000), width(1.8), height(1.5), shape(SVS_UNKNOWN), + cfModel(SUMO_TAG_CF_KRAUSS), lcModel(LCM_LC2013), + setParameter(0), saved(false), onlyReferenced(false) { + switch (vclass) { + case SVC_PEDESTRIAN: + length = 0.215; + minGap = 0.25; + maxSpeed = DEFAULT_PEDESTRIAN_SPEED; + width = 0.478; + height = 1.719; + shape = SVS_PEDESTRIAN; + break; + case SVC_BICYCLE: + length = 1.6; + minGap = 0.5; + maxSpeed = 20. / 3.6; + width = 0.65; + height = 1.7; + shape = SVS_BICYCLE; + personCapacity = 1; + break; + case SVC_MOPED: + length = 2.1; + maxSpeed = 60. / 3.6; + width = 0.8; + height = 1.7; + shape = SVS_MOPED; + personCapacity = 1; + break; + case SVC_MOTORCYCLE: + length = 2.2; + width = 0.9; + height = 1.5; + shape = SVS_MOTORCYCLE; + personCapacity = 1; + break; + case SVC_TRUCK: + length = 7.1; + maxSpeed = 130. / 3.6; + width = 2.4; + height = 2.4; + shape = SVS_TRUCK; + personCapacity = 2; + containerCapacity = 1; + break; + case SVC_TRAILER: + length = 16.5; + maxSpeed = 130. / 3.6; + width = 2.55; + height = 4.; + shape = SVS_TRUCK_SEMITRAILER; + personCapacity = 2; + containerCapacity = 2; + break; + case SVC_BUS: + length = 12.; + maxSpeed = 100. / 3.6; + width = 2.5; + height = 3.4; + shape = SVS_BUS; + personCapacity = 85; + break; + case SVC_COACH: + length = 14.; + maxSpeed = 100. / 3.6; + width = 2.6; + height = 4.; + shape = SVS_BUS_COACH; + personCapacity = 70; + break; + case SVC_TRAM: + length = 22.; + maxSpeed = 80. / 3.6; + width = 2.4; + height = 3.2; + shape = SVS_RAIL_CAR; + personCapacity = 120; + break; + case SVC_RAIL_URBAN: + length = 36.5 * 3; + maxSpeed = 100. / 3.6; + width = 3.0; + height = 3.6; + shape = SVS_RAIL_CAR; + personCapacity = 300; + break; + case SVC_RAIL: + length = 67.5 * 2; + maxSpeed = 160. / 3.6; + width = 2.84; + height = 3.75; + shape = SVS_RAIL; + personCapacity = 434; + break; + case SVC_RAIL_ELECTRIC: + length = 25. * 8; + maxSpeed = 330. / 3.6; + width = 2.95; + height = 3.89; + shape = SVS_RAIL; + personCapacity = 425; + break; + case SVC_DELIVERY: + length = 6.5; + width = 2.16; + height = 2.86; + shape = SVS_DELIVERY; + personCapacity = 2; + break; + case SVC_EMERGENCY: + length = 6.5; + width = 2.16; + height = 2.86; + shape = SVS_DELIVERY; + personCapacity = 2; + break; + case SVC_PASSENGER: + shape = SVS_PASSENGER; + break; + case SVC_E_VEHICLE: + shape = SVS_E_VEHICLE; + break; + case SVC_SHIP: + length = 17; + width = 4; + maxSpeed = 8 / 1.94; // 8 knots + height = 4; + shape = SVS_SHIP; + break; + default: + break; + } +} + + +void +SUMOVTypeParameter::write(OutputDevice& dev) const { + if (onlyReferenced) { + return; + } + dev.openTag(SUMO_TAG_VTYPE); + dev.writeAttr(SUMO_ATTR_ID, id); + if (wasSet(VTYPEPARS_LENGTH_SET)) { + dev.writeAttr(SUMO_ATTR_LENGTH, length); + } + if (wasSet(VTYPEPARS_MINGAP_SET)) { + dev.writeAttr(SUMO_ATTR_MINGAP, minGap); + } + if (wasSet(VTYPEPARS_MAXSPEED_SET)) { + dev.writeAttr(SUMO_ATTR_MAXSPEED, maxSpeed); + } + if (wasSet(VTYPEPARS_PROBABILITY_SET)) { + dev.writeAttr(SUMO_ATTR_PROB, defaultProbability); + } + if (wasSet(VTYPEPARS_SPEEDFACTOR_SET)) { + dev.writeAttr(SUMO_ATTR_SPEEDFACTOR, speedFactor); + } + if (wasSet(VTYPEPARS_SPEEDDEVIATION_SET)) { + dev.writeAttr(SUMO_ATTR_SPEEDDEV, speedDev); + } + if (wasSet(VTYPEPARS_VEHICLECLASS_SET)) { + dev.writeAttr(SUMO_ATTR_VCLASS, toString(vehicleClass)); + } + if (wasSet(VTYPEPARS_EMISSIONCLASS_SET)) { + dev.writeAttr(SUMO_ATTR_EMISSIONCLASS, PollutantsInterface::getName(emissionClass)); + } + if (wasSet(VTYPEPARS_IMPATIENCE_SET)) { + if (impatience == -std::numeric_limits::max()) { + dev.writeAttr(SUMO_ATTR_IMPATIENCE, "off"); + } else { + dev.writeAttr(SUMO_ATTR_IMPATIENCE, impatience); + } + } + if (wasSet(VTYPEPARS_SHAPE_SET)) { + dev.writeAttr(SUMO_ATTR_GUISHAPE, getVehicleShapeName(shape)); + } + if (wasSet(VTYPEPARS_WIDTH_SET)) { + dev.writeAttr(SUMO_ATTR_WIDTH, width); + } + if (wasSet(VTYPEPARS_HEIGHT_SET)) { + dev.writeAttr(SUMO_ATTR_HEIGHT, height); + } + if (wasSet(VTYPEPARS_COLOR_SET)) { + dev.writeAttr(SUMO_ATTR_COLOR, color); + } + if (wasSet(VTYPEPARS_OSGFILE_SET)) { + dev.writeAttr(SUMO_ATTR_OSGFILE, osgFile); + } + if (wasSet(VTYPEPARS_IMGFILE_SET)) { + dev.writeAttr(SUMO_ATTR_IMGFILE, imgFile); + } + if (wasSet(VTYPEPARS_LANE_CHANGE_MODEL_SET)) { + dev.writeAttr(SUMO_ATTR_LANE_CHANGE_MODEL, lcModel); + } + if (wasSet(VTYPEPARS_PERSON_CAPACITY)) { + dev.writeAttr(SUMO_ATTR_PERSON_CAPACITY, personCapacity); + } + if (wasSet(VTYPEPARS_CONTAINER_CAPACITY)) { + dev.writeAttr(SUMO_ATTR_CONTAINER_CAPACITY, containerCapacity); + } + if (wasSet(VTYPEPARS_BOARDING_DURATION)) { + dev.writeAttr(SUMO_ATTR_BOARDING_DURATION, boardingDuration); + } + if (wasSet(VTYPEPARS_LOADING_DURATION)) { + dev.writeAttr(SUMO_ATTR_LOADING_DURATION, loadingDuration); + } + + if (cfParameter.size() != 0) { + dev.openTag(cfModel); + std::vector attrs; + for (CFParams::const_iterator i = cfParameter.begin(); i != cfParameter.end(); ++i) { + attrs.push_back(i->first); + } + std::sort(attrs.begin(), attrs.end()); + for (std::vector::const_iterator i = attrs.begin(); i != attrs.end(); ++i) { + dev.writeAttr(*i, cfParameter.find(*i)->second); + } + dev.closeTag(); + } + for (std::map::const_iterator j = getMap().begin(); j != getMap().end(); ++j) { + dev.openTag(SUMO_TAG_PARAM); + dev.writeAttr(SUMO_ATTR_KEY, (*j).first); + dev.writeAttr(SUMO_ATTR_VALUE, (*j).second); + dev.closeTag(); + } + dev.closeTag(); +} + + +SUMOReal +SUMOVTypeParameter::get(const SumoXMLAttr attr, const SUMOReal defaultValue) const { + if (cfParameter.count(attr)) { + return cfParameter.find(attr)->second; + } else { + return defaultValue; + } +} + + +SUMOReal +SUMOVTypeParameter::getDefaultAccel(const SUMOVehicleClass vc) { + switch (vc) { + case SVC_PEDESTRIAN: + return 1.5; + case SVC_BICYCLE: + return 1.2; + case SVC_MOTORCYCLE: + return 6.; + case SVC_MOPED: + return 1.1; + case SVC_TRUCK: + return 1.3; + case SVC_TRAILER: + return 1.1; + case SVC_BUS: + return 1.2; + case SVC_COACH: + return 2.; + case SVC_TRAM: + return 1.; + case SVC_RAIL_URBAN: + return 1.; + case SVC_RAIL: + return 0.25; + case SVC_RAIL_ELECTRIC: + return 0.5; + case SVC_SHIP: + return 0.1; + default: + return 2.6;//2.9; + } +} + + +SUMOReal +SUMOVTypeParameter::getDefaultDecel(const SUMOVehicleClass vc) { + switch (vc) { + case SVC_PEDESTRIAN: + return 2.; + case SVC_BICYCLE: + return 3.; + case SVC_MOPED: + return 7.; + case SVC_MOTORCYCLE: + return 10.; + case SVC_TRUCK: + return 4.; + case SVC_TRAILER: + return 4.; + case SVC_BUS: + return 4.; + case SVC_COACH: + return 4.; + case SVC_TRAM: + return 3.; + case SVC_RAIL_URBAN: + return 3.; + case SVC_RAIL: + return 1.3; + case SVC_RAIL_ELECTRIC: + return 1.3; + case SVC_SHIP: + return 0.15; + default: + return 4.5;//7.5; + } +} + + +SUMOReal +SUMOVTypeParameter::getDefaultImperfection(const SUMOVehicleClass vc) { + switch (vc) { + case SVC_TRAM: + case SVC_RAIL_URBAN: + case SVC_RAIL: + case SVC_RAIL_ELECTRIC: + case SVC_SHIP: + return 0.; + default: + return 0.5; + } +} + + +const SUMOVTypeParameter& +SUMOVTypeParameter::getDefault() { + static SUMOVTypeParameter defaultParams(""); + return defaultParams; +} + + +/****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/SUMOVTypeParameter.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/SUMOVTypeParameter.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/vehicle/SUMOVTypeParameter.h 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/vehicle/SUMOVTypeParameter.h 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,222 @@ +/****************************************************************************/ +/// @file SUMOVTypeParameter.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann +/// @author Michael Behrisch +/// @date 10.09.2009 +/// @version $Id: SUMOVTypeParameter.h 18096 2015-03-17 09:50:59Z behrisch $ +/// +// Structure representing possible vehicle parameter +/****************************************************************************/ +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors +/****************************************************************************/ +// +// This file is part of SUMO. +// SUMO is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +/****************************************************************************/ +#ifndef SUMOVTypeParameter_h +#define SUMOVTypeParameter_h + + +// =========================================================================== +// included modules +// =========================================================================== +#ifdef _MSC_VER +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include + +// =========================================================================== +// class declarations +// =========================================================================== +class OutputDevice; +class OptionsCont; + + +// =========================================================================== +// value definitions +// =========================================================================== +const int VTYPEPARS_LENGTH_SET = 1; +const int VTYPEPARS_MINGAP_SET = 2; +const int VTYPEPARS_MAXSPEED_SET = 2 << 2; +const int VTYPEPARS_PROBABILITY_SET = 2 << 3; +const int VTYPEPARS_SPEEDFACTOR_SET = 2 << 4; +const int VTYPEPARS_SPEEDDEVIATION_SET = 2 << 5; +const int VTYPEPARS_EMISSIONCLASS_SET = 2 << 6; +const int VTYPEPARS_COLOR_SET = 2 << 7; +const int VTYPEPARS_VEHICLECLASS_SET = 2 << 8; +const int VTYPEPARS_WIDTH_SET = 2 << 9; +const int VTYPEPARS_HEIGHT_SET = 2 << 10; +const int VTYPEPARS_SHAPE_SET = 2 << 11; +const int VTYPEPARS_OSGFILE_SET = 2 << 12; +const int VTYPEPARS_IMGFILE_SET = 2 << 13; +const int VTYPEPARS_IMPATIENCE_SET = 2 << 14; +const int VTYPEPARS_LANE_CHANGE_MODEL_SET = 2 << 15; +const int VTYPEPARS_PERSON_CAPACITY = 2 << 16; +const int VTYPEPARS_BOARDING_DURATION = 2 << 17; +const int VTYPEPARS_CONTAINER_CAPACITY = 2 << 18; +const int VTYPEPARS_LOADING_DURATION = 2 << 19; + + +// =========================================================================== +// struct definitions +// =========================================================================== +/** + * @class SUMOVTypeParameter + * @brief Structure representing possible vehicle parameter + */ +class SUMOVTypeParameter : public Parameterised { +public: + /** @brief Constructor + * + * Initialises the structure with default values + */ + SUMOVTypeParameter(const std::string& vtid, const SUMOVehicleClass vc = SVC_IGNORING); + + + /** @brief Returns whether the given parameter was set + * @param[in] what The parameter which one asks for + * @return Whether the given parameter was set + */ + bool wasSet(int what) const { + return (setParameter & what) != 0; + } + + + /** @brief Writes the vtype + * + * @param[in, out] dev The device to write into + * @exception IOError not yet implemented + */ + void write(OutputDevice& dev) const; + + /** @brief Validates stored car-following parameter + */ + void validateCFParameter() const; + + + /** @brief Returns the named value from the map, or the default if it is not contained there + * @param[in] attr The corresponding xml attribute + * @param[in] defaultValue The value to return if the given map does not contain the named variable + * @return The named value from the map or the default if it does not exist there + */ + SUMOReal get(const SumoXMLAttr attr, const SUMOReal defaultValue) const; + + + /// @brief The vehicle type's id + std::string id; + + /// @brief The physical vehicle length + SUMOReal length; + /// @brief This class' free space in front of the vehicle itself + SUMOReal minGap; + /// @brief The vehicle type's maximum speed [m/s] + SUMOReal maxSpeed; + /// @brief The probability when being added to a distribution without an explicit probability + SUMOReal defaultProbability; + /// @brief The factor by which the maximum speed may deviate from the allowed max speed on the street + SUMOReal speedFactor; + /// @brief The standard deviation for speed variations + SUMOReal speedDev; + /// @brief The emission class of this vehicle + SUMOEmissionClass emissionClass; + /// @brief The color + RGBColor color; + /// @brief The vehicle's class + SUMOVehicleClass vehicleClass; + /// @brief The vehicle's impatience (willingness to obstruct others) + SUMOReal impatience; + /// @brief The person capacity of the vehicle + unsigned int personCapacity; + /// @brief The container capacity of the vehicle + unsigned int containerCapacity; + /// @brief The time a person needs to board the vehicle + SUMOTime boardingDuration; + /// @brief The time a container needs to get loaded on the vehicle + SUMOTime loadingDuration; + + + + /// @name Values for drawing this class' vehicles + /// @{ + + /// @brief This class' width + SUMOReal width; + + /// @brief This class' height + SUMOReal height; + + /// @brief This class' shape + SUMOVehicleShape shape; + + /// @brief 3D model file for this class + std::string osgFile; + + /// @brief Image file for this class + std::string imgFile; + /// @} + + + /// @brief The enum-representation of the car-following model to use + SumoXMLTag cfModel; + + /// @brief Car-following parameter + typedef std::map CFParams; + CFParams cfParameter; + + /// @brief The lane-change model to use + LaneChangeModel lcModel; + + /// @brief Information for the router which parameter were set + int setParameter; + + + /// @brief Information whether this type was already saved (needed by routers) + mutable bool saved; + + /// @brief Information whether this is a type-stub, being only referenced but not defined (needed by routers) + mutable bool onlyReferenced; + + /** @brief Returns the default acceleration for the given vehicle class + * This needs to be a function because the actual value is stored in the car following model + * @param[in] vc the vehicle class + * @return the acceleration in m/s^2 + */ + static SUMOReal getDefaultAccel(const SUMOVehicleClass vc = SVC_IGNORING); + + /** @brief Returns the default deceleration for the given vehicle class + * This needs to be a function because the actual value is stored in the car following model + * @param[in] vc the vehicle class + * @return the deceleration in m/s^2 + */ + static SUMOReal getDefaultDecel(const SUMOVehicleClass vc = SVC_IGNORING); + + /** @brief Returns the default driver's imperfection (sigma or epsilon in Krauss' model) for the given vehicle class + * This needs to be a function because the actual value is stored in the car following model + * @param[in] vc the vehicle class + * @return the imperfection as a value between 0 and 1 + */ + static SUMOReal getDefaultImperfection(const SUMOVehicleClass vc = SVC_IGNORING); + + /// @brief return the default parameters, this is a function due to the http://www.parashift.com/c++-faq/static-init-order.html + static const SUMOVTypeParameter& getDefault(); + +}; + +#endif + +/****************************************************************************/ + diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/GenericSAXHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/GenericSAXHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/GenericSAXHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/GenericSAXHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Sept 2002 -/// @version $Id: GenericSAXHandler.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GenericSAXHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A handler which converts occuring elements and attributes into enums /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/GenericSAXHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/GenericSAXHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/GenericSAXHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/GenericSAXHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: GenericSAXHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: GenericSAXHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A handler which converts occuring elements and attributes into enums /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/Makefile.in sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/Makefile.in --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/Makefile.in 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/Makefile.in 2015-04-17 00:20:29.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,7 +80,8 @@ host_triplet = @host@ target_triplet = @target@ subdir = src/utils/xml -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,6 +92,10 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libxml_a_AR = $(AR) $(ARFLAGS) libxml_a_LIBADD = am_libxml_a_OBJECTS = GenericSAXHandler.$(OBJEXT) \ @@ -59,30 +108,86 @@ SUMOXMLDefinitions.$(OBJEXT) SAXWeightsHandler.$(OBJEXT) \ XMLSubSys.$(OBJEXT) libxml_a_OBJECTS = $(am_libxml_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libxml_a_SOURCES) DIST_SOURCES = $(libxml_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -91,6 +196,7 @@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -117,9 +223,13 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FOX_CONFIG = @FOX_CONFIG@ FOX_LDFLAGS = @FOX_LDFLAGS@ +GDAL_CONFIG = @GDAL_CONFIG@ GDAL_LDFLAGS = @GDAL_LDFLAGS@ GREP = @GREP@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -130,10 +240,6 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LIB_FOX = @LIB_FOX@ -LIB_GDAL = @LIB_GDAL@ -LIB_GTEST = @LIB_GTEST@ -LIB_PROJ = @LIB_PROJ@ LIB_XERCES = @LIB_XERCES@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -279,10 +385,11 @@ clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libxml.a: $(libxml_a_OBJECTS) $(libxml_a_DEPENDENCIES) - -rm -f libxml.a - $(libxml_a_AR) libxml.a $(libxml_a_OBJECTS) $(libxml_a_LIBADD) - $(RANLIB) libxml.a + +libxml.a: $(libxml_a_OBJECTS) $(libxml_a_DEPENDENCIES) $(EXTRA_libxml_a_DEPENDENCIES) + $(AM_V_at)-rm -f libxml.a + $(AM_V_AR)$(libxml_a_AR) libxml.a $(libxml_a_OBJECTS) $(libxml_a_LIBADD) + $(AM_V_at)$(RANLIB) libxml.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -305,25 +412,25 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XMLSubSys.Po@am__quote@ .cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -331,26 +438,15 @@ clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -362,15 +458,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -379,6 +471,21 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -427,10 +534,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -515,18 +627,19 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SAXWeightsHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SAXWeightsHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SAXWeightsHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SAXWeightsHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Fri, 30 Mar 2007 -/// @version $Id: SAXWeightsHandler.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SAXWeightsHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // An XML-handler for network weights /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SAXWeightsHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SAXWeightsHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SAXWeightsHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SAXWeightsHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Fri, 30 Mar 2007 -/// @version $Id: SAXWeightsHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SAXWeightsHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // An XML-handler for network weights /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMORouteHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMORouteHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMORouteHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMORouteHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Sascha Krieg /// @author Michael Behrisch /// @date Mon, 9 Jul 2001 -/// @version $Id: SUMORouteHandler.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMORouteHandler.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Parser for routes during their loading /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -58,7 +58,8 @@ myActiveRouteColor(0), myCurrentVType(0), myBeginDefault(string2time(OptionsCont::getOptions().getString("begin"))), - myEndDefault(string2time(OptionsCont::getOptions().getString("end"))) { + myEndDefault(string2time(OptionsCont::getOptions().getString("end"))), + myFirstDepart(-1), myInsertStopEdgesAt(-1) { } @@ -88,6 +89,9 @@ SUMORouteHandler::registerLastDepart() { if (myVehicleParameter->departProcedure == DEPART_GIVEN) { myLastDepart = myVehicleParameter->depart; + if (myFirstDepart == -1) { + myFirstDepart = myLastDepart; + } } // else: we don't know when this vehicle will depart. keep the previous known depart time } @@ -103,6 +107,10 @@ break; case SUMO_TAG_PERSON: delete myVehicleParameter; + myVehicleParameter = SUMOVehicleParserHelper::parseVehicleAttributes(attrs, false, false, true); + break; + case SUMO_TAG_CONTAINER: + delete myVehicleParameter; myVehicleParameter = SUMOVehicleParserHelper::parseVehicleAttributes(attrs); break; case SUMO_TAG_FLOW: @@ -160,6 +168,11 @@ delete myVehicleParameter; myVehicleParameter = 0; break; + case SUMO_TAG_CONTAINER: + closeContainer(); + delete myVehicleParameter; + myVehicleParameter = 0; + break; case SUMO_TAG_VEHICLE: if (myVehicleParameter->repetitionNumber > 0) { myVehicleParameter->repetitionNumber++; // for backwards compatibility @@ -186,9 +199,6 @@ myBeginDefault = string2time(OptionsCont::getOptions().getString("begin")); myEndDefault = string2time(OptionsCont::getOptions().getString("end")); break; - case SUMO_TAG_TRIP: - delete myVehicleParameter; - myVehicleParameter = 0; default: break; } @@ -246,5 +256,92 @@ } +bool +SUMORouteHandler::parseStop(SUMOVehicleParameter::Stop& stop, const SUMOSAXAttributes& attrs, std::string errorSuffix, MsgHandler* const errorOutput) { + stop.setParameter = 0; + if (attrs.hasAttribute(SUMO_ATTR_ENDPOS)) { + stop.setParameter |= STOP_END_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_STARTPOS)) { + stop.setParameter |= STOP_START_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_TRIGGERED)) { + stop.setParameter |= STOP_TRIGGER_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_CONTAINER_TRIGGERED)) { + stop.setParameter |= STOP_CONTAINER_TRIGGER_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_PARKING)) { + stop.setParameter |= STOP_PARKING_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_EXPECTED)) { + stop.setParameter |= STOP_EXPECTED_SET; + } + if (attrs.hasAttribute(SUMO_ATTR_EXPECTED_CONTAINERS)) { + stop.setParameter |= STOP_EXPECTED_CONTAINERS_SET; + } + bool ok = true; + stop.busstop = attrs.getOpt(SUMO_ATTR_BUS_STOP, 0, ok, ""); + stop.containerstop = attrs.getOpt(SUMO_ATTR_CONTAINER_STOP, 0, ok, ""); + if (stop.busstop != "") { + errorSuffix = " at '" + stop.busstop + "'" + errorSuffix; + } else if (stop.containerstop != "") { + errorSuffix = " at '" + stop.containerstop + "'" + errorSuffix; + } else { + errorSuffix = " on lane '" + stop.lane + "'" + errorSuffix; + } + // get the standing duration + if (!attrs.hasAttribute(SUMO_ATTR_DURATION) && !attrs.hasAttribute(SUMO_ATTR_UNTIL)) { + if (attrs.hasAttribute(SUMO_ATTR_CONTAINER_TRIGGERED)) { + stop.containerTriggered = attrs.getOpt(SUMO_ATTR_CONTAINER_TRIGGERED, 0, ok, true); + stop.triggered = attrs.getOpt(SUMO_ATTR_TRIGGERED, 0, ok, false); + } else { + stop.triggered = attrs.getOpt(SUMO_ATTR_TRIGGERED, 0, ok, true); + stop.containerTriggered = attrs.getOpt(SUMO_ATTR_CONTAINER_TRIGGERED, 0, ok, false); + } + stop.duration = -1; + stop.until = -1; + } else { + stop.duration = attrs.getOptSUMOTimeReporting(SUMO_ATTR_DURATION, 0, ok, -1); + stop.until = attrs.getOptSUMOTimeReporting(SUMO_ATTR_UNTIL, 0, ok, -1); + if (!ok || (stop.duration < 0 && stop.until < 0)) { + errorOutput->inform("Invalid duration or end time is given for a stop" + errorSuffix); + return false; + } + stop.triggered = attrs.getOpt(SUMO_ATTR_TRIGGERED, 0, ok, false); + stop.containerTriggered = attrs.getOpt(SUMO_ATTR_CONTAINER_TRIGGERED, 0, ok, false); + } + stop.parking = attrs.getOpt(SUMO_ATTR_PARKING, 0, ok, stop.triggered || stop.containerTriggered); + if (!ok) { + errorOutput->inform("Invalid bool for 'triggered', 'containerTriggered' or 'parking' for stop" + errorSuffix); + return false; + } + + // expected persons + std::string expectedStr = attrs.getOpt(SUMO_ATTR_EXPECTED, 0, ok, ""); + std::set personIDs; + SUMOSAXAttributes::parseStringSet(expectedStr, personIDs); + stop.awaitedPersons = personIDs; + + // expected containers + std::string expectedContainersStr = attrs.getOpt(SUMO_ATTR_EXPECTED_CONTAINERS, 0, ok, ""); + std::set containerIDs; + SUMOSAXAttributes::parseStringSet(expectedContainersStr, containerIDs); + stop.awaitedContainers = containerIDs; + + const std::string idx = attrs.getOpt(SUMO_ATTR_INDEX, 0, ok, "end"); + if (idx == "end") { + stop.index = STOP_INDEX_END; + } else if (idx == "fit") { + stop.index = STOP_INDEX_FIT; + } else { + stop.index = attrs.get(SUMO_ATTR_INDEX, 0, ok); + if (!ok || stop.index < 0) { + errorOutput->inform("Invalid 'index' for stop" + errorSuffix); + return false; + } + } + return true; +} /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMORouteHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMORouteHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMORouteHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMORouteHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 9 Jul 2001 -/// @version $Id: SUMORouteHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMORouteHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Parser for routes during their loading /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -34,13 +34,14 @@ #include #include -#include +#include #include // =========================================================================== // class declarations // =========================================================================== +class MsgHandler; class SUMOVTypeParameter; @@ -66,8 +67,13 @@ SUMOTime getLastDepart() const; /// check start and end position of a stop - bool checkStopPos(SUMOReal& startPos, SUMOReal& endPos, const SUMOReal laneLength, - const SUMOReal minLength, const bool friendlyPos); + static bool checkStopPos(SUMOReal& startPos, SUMOReal& endPos, const SUMOReal laneLength, + const SUMOReal minLength, const bool friendlyPos); + + /// @brief returns the first departure time that was ever read + SUMOTime getFirstDepart() const { + return myFirstDepart; + } protected: /// @name inherited from GenericSAXHandler @@ -122,6 +128,9 @@ /// Ends the processing of a person virtual void closePerson() = 0; + /// Ends the processing of a container + virtual void closeContainer() = 0; + /// Ends the processing of a flow virtual void closeFlow() = 0; @@ -137,8 +146,11 @@ /// @brief assign arbitrary vehicle parameters void addParam(const SUMOSAXAttributes& attrs); + /// @brief parses attributes common to all stops + bool parseStop(SUMOVehicleParameter::Stop& stop, const SUMOSAXAttributes& attrs, std::string errorSuffix, MsgHandler* const errorOutput); + protected: - /// @brief Parameter of the current vehicle, trip, person, or flow + /// @brief Parameter of the current vehicle, trip, person, container or flow SUMOVehicleParameter* myVehicleParameter; /// @brief The insertion time of the vehicle read last @@ -150,12 +162,15 @@ /// @brief The id of the route the current route references to std::string myActiveRouteRefID; - /// @brief The id of the current route + /// @brief The probability of the current route SUMOReal myActiveRouteProbability; /// @brief The currently parsed route's color const RGBColor* myActiveRouteColor; + /// @brief The currently parsed route costs + SUMOReal myCurrentCosts; + /// @brief List of the stops on the parsed route std::vector myActiveRouteStops; @@ -171,6 +186,12 @@ /// @brief The default value for flow ends SUMOTime myEndDefault; + /// @brief the first read departure time + SUMOTime myFirstDepart; + + /// @brief where stop edges can be inserted into the current route (-1 means no insertion) + int myInsertStopEdgesAt; + private: /// @brief Invalidated copy constructor SUMORouteHandler(const SUMORouteHandler& s); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMORouteLoaderControl.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMORouteLoaderControl.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMORouteLoaderControl.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMORouteLoaderControl.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -2,13 +2,14 @@ /// @file SUMORouteLoaderControl.cpp /// @author Daniel Krajzewicz /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Wed, 06 Nov 2002 -/// @version $Id: SUMORouteLoaderControl.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMORouteLoaderControl.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Class responsible for loading of routes from some files /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -44,6 +45,7 @@ // =========================================================================== SUMORouteLoaderControl::SUMORouteLoaderControl(SUMOTime inAdvanceStepNo): myFirstLoadTime(SUMOTime_MAX), + myCurrentLoadTime(-SUMOTime_MAX), myInAdvanceStepNo(inAdvanceStepNo), myRouteLoaders(), myLoadAll(inAdvanceStepNo <= 0), @@ -72,12 +74,18 @@ if (myAllLoaded) { return; } - SUMOTime loadMaxTime = myLoadAll ? SUMOTime_MAX : step + myInAdvanceStepNo; - + if (myCurrentLoadTime > step) { + return; + } + const SUMOTime loadMaxTime = myLoadAll ? SUMOTime_MAX : MAX2(myCurrentLoadTime + myInAdvanceStepNo, step); + myCurrentLoadTime = SUMOTime_MAX; // load all routes for the specified time period bool furtherAvailable = false; for (std::vector::iterator i = myRouteLoaders.begin(); i != myRouteLoaders.end(); ++i) { - myFirstLoadTime = MIN2(myFirstLoadTime, (*i)->loadUntil(loadMaxTime)); + myCurrentLoadTime = MIN2(myCurrentLoadTime, (*i)->loadUntil(loadMaxTime)); + if ((*i)->getFirstDepart() != -1) { + myFirstLoadTime = MIN2(myFirstLoadTime, (*i)->getFirstDepart()); + } furtherAvailable |= (*i)->moreAvailable(); } myAllLoaded = !furtherAvailable; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMORouteLoaderControl.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMORouteLoaderControl.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMORouteLoaderControl.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMORouteLoaderControl.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,13 +3,14 @@ /// @author Daniel Krajzewicz /// @author Sascha Krieg /// @author Michael Behrisch +/// @author Jakob Erdmann /// @date Wed, 06 Nov 2002 -/// @version $Id: SUMORouteLoaderControl.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMORouteLoaderControl.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Class responsible for loading of routes from some files /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -64,7 +65,7 @@ /// add another loader void add(SUMORouteLoader* loader); - /// loads the next routes + /// loads the next routes up to and including the given time step void loadNext(SUMOTime step); /// returns the timestamp of the first loaded vehicle or flow @@ -72,10 +73,18 @@ return myFirstLoadTime; } + /// returns whether loading is completed + bool haveAllLoaded() const { + return myAllLoaded; + } + private: /// the first time step for which vehicles were loaded SUMOTime myFirstLoadTime; + /// the time step up to which vehicles were loaded + SUMOTime myCurrentLoadTime; + /// the number of routes to read in forward SUMOTime myInAdvanceStepNo; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMORouteLoader.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMORouteLoader.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMORouteLoader.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMORouteLoader.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 6 Nov 2002 -/// @version $Id: SUMORouteLoader.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMORouteLoader.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // A class that performs the loading of routes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -58,29 +58,22 @@ SUMOTime SUMORouteLoader::loadUntil(SUMOTime time) { - SUMOTime firstDepart = SUMOTime_MAX; // read only when further data is available, no error occured // and vehicles may be found in the between the departure time of // the last read vehicle and the time to read until - if (!myMoreAvailable || time <= myHandler->getLastDepart()) { - return firstDepart; + if (!myMoreAvailable) { + return SUMOTime_MAX; } - // read vehicles until specified time or the period to read vehicles // until is reached - while (myParser->parseNext()) { - if (firstDepart == SUMOTime_MAX && myHandler->getLastDepart() >= 0) { - firstDepart = myHandler->getLastDepart(); - } - // return when the last read vehicle is beyond the period - if (time <= myHandler->getLastDepart()) { - return firstDepart; + while (myHandler->getLastDepart() <= time) { + if (!myParser->parseNext()) { + // no data available anymore + myMoreAvailable = false; + return SUMOTime_MAX; } } - - // no data available anymore - myMoreAvailable = false; - return firstDepart; + return myHandler->getLastDepart(); } @@ -90,4 +83,10 @@ } +SUMOTime +SUMORouteLoader::getFirstDepart() const { + return myHandler->getFirstDepart(); +} + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMORouteLoader.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMORouteLoader.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMORouteLoader.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMORouteLoader.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Wed, 6 Nov 2002 -/// @version $Id: SUMORouteLoader.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMORouteLoader.h 18095 2015-03-17 09:39:00Z behrisch $ /// // A class that performs the loading of routes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -62,6 +62,9 @@ /// returns the information whether new data is available bool moreAvailable() const; + /// returns the first departure time that was ever read + SUMOTime getFirstDepart() const; + private: /// the used SAXReader SUMOSAXReader* myParser; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributes.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributes.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributes.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributes.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Fri, 30 Mar 2007 -/// @version $Id: SUMOSAXAttributes.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOSAXAttributes.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Encapsulated SAX-Attributes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -71,7 +71,7 @@ return -1; } try { - return (SUMOTime)(getFloat(attr) * 1000.); + return TIME2STEPS(getFloat(attr)); } catch (NumberFormatException&) { if (report) { emitFormatError(getName(attr), "a time value", objectid); @@ -122,12 +122,10 @@ SUMOSAXAttributes::emitUngivenError(const std::string& attrname, const char* objectid) const { std::ostringstream oss; oss << "Attribute '" << attrname << "' is missing in definition of "; - if (objectid == 0) { - oss << "a "; - } - oss << myObjectType; - if (objectid != 0) { - oss << " '" << objectid << "'"; + if (objectid == 0 || objectid[0] == 0) { + oss << "a " << myObjectType; + } else { + oss << myObjectType << " '" << objectid << "'"; } oss << "."; WRITE_ERROR(oss.str()); @@ -138,12 +136,10 @@ SUMOSAXAttributes::emitEmptyError(const std::string& attrname, const char* objectid) const { std::ostringstream oss; oss << "Attribute '" << attrname << "' in definition of "; - if (objectid == 0) { - oss << "a "; - } - oss << myObjectType; - if (objectid != 0) { - oss << " '" << objectid << "'"; + if (objectid == 0 || objectid[0] == 0) { + oss << "a " << myObjectType; + } else { + oss << myObjectType << " '" << objectid << "'"; } oss << " is empty."; WRITE_ERROR(oss.str()); @@ -154,12 +150,10 @@ SUMOSAXAttributes::emitFormatError(const std::string& attrname, const std::string& type, const char* objectid) const { std::ostringstream oss; oss << "Attribute '" << attrname << "' in definition of "; - if (objectid == 0) { - oss << "a "; - } - oss << myObjectType; - if (objectid != 0) { - oss << " '" << objectid << "'"; + if (objectid == 0 || objectid[0] == 0) { + oss << "a " << myObjectType; + } else { + oss << myObjectType << " '" << objectid << "'"; } oss << " is not " << type << "."; WRITE_ERROR(oss.str()); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributes.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributes.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributes.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributes.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Fri, 30 Mar 2007 -/// @version $Id: SUMOSAXAttributes.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOSAXAttributes.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Encapsulated SAX-Attributes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Binary.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Binary.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Binary.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Binary.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: SUMOSAXAttributesImpl_Binary.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOSAXAttributesImpl_Binary.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Encapsulated Xerces-SAX-attributes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Binary.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Binary.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Binary.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Binary.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Fri, 30 Mar 2007 -/// @version $Id: SUMOSAXAttributesImpl_Binary.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOSAXAttributesImpl_Binary.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Encapsulated Xerces-SAX-attributes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: SUMOSAXAttributesImpl_Xerces.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOSAXAttributesImpl_Xerces.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Encapsulated Xerces-SAX-attributes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -105,8 +106,12 @@ // TranscodeToStr and debug_new interact badly in this case; return ""; } else { - XERCES_CPP_NAMESPACE::TranscodeToStr utf8(utf16, "UTF-8"); - return TplConvert::_2str(utf8.str(), (unsigned)utf8.length()); + try { + XERCES_CPP_NAMESPACE::TranscodeToStr utf8(utf16, "UTF-8"); + return TplConvert::_2str(utf8.str(), (unsigned)utf8.length()); + } catch (XERCES_CPP_NAMESPACE::TranscodingException e) { + return "?"; + } } #endif } @@ -126,8 +131,12 @@ // TranscodeToStr and debug_new interact badly in this case; return ""; } else { - XERCES_CPP_NAMESPACE::TranscodeToStr utf8(utf16, "UTF-8"); - return TplConvert::_2strSec(utf8.str(), (unsigned)utf8.length(), str); + try { + XERCES_CPP_NAMESPACE::TranscodeToStr utf8(utf16, "UTF-8"); + return TplConvert::_2strSec(utf8.str(), (unsigned)utf8.length(), str); + } catch (XERCES_CPP_NAMESPACE::TranscodingException e) { + return "?"; + } } #endif } diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXAttributesImpl_Xerces.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Fri, 30 Mar 2007 -/// @version $Id: SUMOSAXAttributesImpl_Xerces.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOSAXAttributesImpl_Xerces.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Encapsulated Xerces-SAX-attributes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXHandler.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXHandler.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXHandler.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXHandler.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: SUMOSAXHandler.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOSAXHandler.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // SAX-handler base for SUMO-files /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXHandler.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXHandler.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXHandler.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXHandler.h 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Sept 2002 -/// @version $Id: SUMOSAXHandler.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOSAXHandler.h 18095 2015-03-17 09:39:00Z behrisch $ /// // SAX-handler base for SUMO-files /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXReader.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXReader.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXReader.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXReader.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file SUMOSAXReader.cpp +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @author Michael Behrisch /// @date Nov 2012 -/// @version $Id: SUMOSAXReader.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOSAXReader.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // SAX-reader encapsulation containing binary reader /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -31,8 +33,12 @@ #include #include #include +#include #include + +#include #include +#include #include #include #include "SUMOSAXAttributesImpl_Binary.h" @@ -47,8 +53,8 @@ // =========================================================================== // method definitions // =========================================================================== -SUMOSAXReader::SUMOSAXReader(GenericSAXHandler& handler, const bool enableValidation) - : myHandler(&handler), myEnableValidation(enableValidation), +SUMOSAXReader::SUMOSAXReader(GenericSAXHandler& handler, const XERCES_CPP_NAMESPACE::SAX2XMLReader::ValSchemes validationScheme) + : myHandler(&handler), myValidationScheme(validationScheme), myXMLReader(0), myBinaryInput(0) {} @@ -69,6 +75,24 @@ void +SUMOSAXReader::setValidation(const XERCES_CPP_NAMESPACE::SAX2XMLReader::ValSchemes validationScheme) { + if (myXMLReader != 0 && validationScheme != myValidationScheme) { + if (validationScheme == XERCES_CPP_NAMESPACE::SAX2XMLReader::Val_Never) { + myXMLReader->setEntityResolver(0); + myXMLReader->setProperty(XERCES_CPP_NAMESPACE::XMLUni::fgXercesScannerName, (void*)XERCES_CPP_NAMESPACE::XMLUni::fgWFXMLScanner); + } else { + myXMLReader->setEntityResolver(&mySchemaResolver); + myXMLReader->setProperty(XERCES_CPP_NAMESPACE::XMLUni::fgXercesScannerName, (void*)XERCES_CPP_NAMESPACE::XMLUni::fgIGXMLScanner); + myXMLReader->setFeature(XERCES_CPP_NAMESPACE::XMLUni::fgXercesSchema, true); + myXMLReader->setFeature(XERCES_CPP_NAMESPACE::XMLUni::fgSAX2CoreValidation, true); + myXMLReader->setFeature(XERCES_CPP_NAMESPACE::XMLUni::fgXercesDynamic, validationScheme == XERCES_CPP_NAMESPACE::SAX2XMLReader::Val_Auto); + } + } + myValidationScheme = validationScheme; +} + + +void SUMOSAXReader::parse(std::string systemID) { if (systemID.length() >= 4 && systemID.substr(systemID.length() - 4) == ".sbx") { if (parseFirst(systemID)) { @@ -96,7 +120,7 @@ bool SUMOSAXReader::parseFirst(std::string systemID) { if (systemID.substr(systemID.length() - 4) == ".sbx") { - myBinaryInput = new BinaryInputDevice(systemID, true, myEnableValidation); + myBinaryInput = new BinaryInputDevice(systemID, true, myValidationScheme == XERCES_CPP_NAMESPACE::SAX2XMLReader::Val_Always); char sbxVer; *myBinaryInput >> sbxVer; if (sbxVer != 1) { @@ -174,17 +198,47 @@ if (reader == 0) { throw ProcessError("The XML-parser could not be build."); } - if (!myEnableValidation) { + // see here https://svn.apache.org/repos/asf/xerces/c/trunk/samples/src/SAX2Count/SAX2Count.cpp for the way to set features + if (myValidationScheme == XERCES_CPP_NAMESPACE::SAX2XMLReader::Val_Never) { reader->setProperty(XERCES_CPP_NAMESPACE::XMLUni::fgXercesScannerName, (void*)XERCES_CPP_NAMESPACE::XMLUni::fgWFXMLScanner); + } else { + reader->setEntityResolver(&mySchemaResolver); + reader->setFeature(XERCES_CPP_NAMESPACE::XMLUni::fgXercesSchema, true); + reader->setFeature(XERCES_CPP_NAMESPACE::XMLUni::fgSAX2CoreValidation, true); + reader->setFeature(XERCES_CPP_NAMESPACE::XMLUni::fgXercesDynamic, myValidationScheme == XERCES_CPP_NAMESPACE::SAX2XMLReader::Val_Auto); } -// see here https://svn.apache.org/repos/asf/xerces/c/trunk/samples/src/SAX2Count/SAX2Count.cpp for the way to set features - reader->setFeature(XERCES_CPP_NAMESPACE::XMLUni::fgXercesSchema, myEnableValidation); - reader->setFeature(XERCES_CPP_NAMESPACE::XMLUni::fgSAX2CoreValidation, myEnableValidation); - reader->setFeature(XERCES_CPP_NAMESPACE::XMLUni::fgXercesDynamic, myEnableValidation); reader->setContentHandler(myHandler); reader->setErrorHandler(myHandler); return reader; } +XERCES_CPP_NAMESPACE::InputSource* +SUMOSAXReader::LocalSchemaResolver::resolveEntity(const XMLCh* const /* publicId */, const XMLCh* const systemId) { + const std::string url = TplConvert::_2str(systemId); + const std::string::size_type pos = url.rfind("/"); + if (pos != std::string::npos) { + const std::string dir = url.substr(0, pos); + if (dir == "http://sumo.sf.net/xsd" || dir == "http://sumo-sim.org/xsd" || dir == "http://sumo-sim.org/xsd/amitran" || + dir == "http://sumo.dlr.de/xsd" || dir == "http://sumo.dlr.de/xsd/amitran") { + const char* sumoPath = std::getenv("SUMO_HOME"); + if (sumoPath == 0) { + WRITE_WARNING("Environment variable SUMO_HOME is not set, schema resolution will use slow website lookups."); + return 0; + } + const std::string file = sumoPath + std::string("/data/xsd") + url.substr(url.find("/xsd/") + 4); + if (FileHelpers::isReadable(file)) { + XMLCh* t = XERCES_CPP_NAMESPACE::XMLString::transcode(file.c_str()); + XERCES_CPP_NAMESPACE::InputSource* const result = new XERCES_CPP_NAMESPACE::LocalFileInputSource(t); + XERCES_CPP_NAMESPACE::XMLString::release(&t); + return result; + } else { + WRITE_WARNING("Cannot find local schema '" + file + "', will try website lookup."); + } + } + } + return 0; +} + + /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXReader.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXReader.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOSAXReader.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOSAXReader.h 2015-04-17 00:20:29.000000000 +0000 @@ -1,13 +1,15 @@ /****************************************************************************/ /// @file SUMOSAXReader.h +/// @author Daniel Krajzewicz +/// @author Jakob Erdmann /// @author Michael Behrisch /// @date Nov 2012 -/// @version $Id: SUMOSAXReader.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOSAXReader.h 18095 2015-03-17 09:39:00Z behrisch $ /// // SAX-reader encapsulation containing binary reader /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -31,6 +33,8 @@ #endif #include +#include +#include // =========================================================================== @@ -58,7 +62,7 @@ * * @param[in] file The name of the processed file */ - SUMOSAXReader(GenericSAXHandler& handler, const bool enableValidation = false); + SUMOSAXReader(GenericSAXHandler& handler, const XERCES_CPP_NAMESPACE::SAX2XMLReader::ValSchemes validationScheme); /// Destructor ~SUMOSAXReader(); @@ -70,6 +74,8 @@ */ void setHandler(GenericSAXHandler& handler); + void setValidation(const XERCES_CPP_NAMESPACE::SAX2XMLReader::ValSchemes validationScheme); + void parse(std::string systemID); void parseString(std::string content); @@ -79,6 +85,12 @@ bool parseNext(); private: + class LocalSchemaResolver : public XERCES_CPP_NAMESPACE::EntityResolver { + public: + XERCES_CPP_NAMESPACE::InputSource* resolveEntity(const XMLCh* const publicId, const XMLCh* const systemId); + }; + +private: /** * @brief Builds a reader * @@ -96,7 +108,7 @@ GenericSAXHandler* myHandler; /// @brief Information whether built reader/parser shall validate XML-documents against schemata - const bool myEnableValidation; + XERCES_CPP_NAMESPACE::SAX2XMLReader::ValSchemes myValidationScheme; XERCES_CPP_NAMESPACE::XMLPScanToken myToken; @@ -104,6 +116,8 @@ BinaryInputDevice* myBinaryInput; + LocalSchemaResolver mySchemaResolver; + private: /// @brief invalidated copy constructor SUMOSAXReader(const SUMOSAXReader& s); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOVehicleParserHelper.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOVehicleParserHelper.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOVehicleParserHelper.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOVehicleParserHelper.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -6,12 +6,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Mon, 07.04.2008 -/// @version $Id: SUMOVehicleParserHelper.cpp 14503 2013-08-27 11:59:03Z dkrajzew $ +/// @version $Id: SUMOVehicleParserHelper.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Helper methods for parsing vehicle attributes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -35,8 +35,10 @@ #include #include #include -#include +#include #include +#include +#include #include "SUMOVehicleParserHelper.h" #ifdef CHECK_MEMORY_LEAKS @@ -50,7 +52,6 @@ SUMOVehicleParserHelper::CFAttrMap SUMOVehicleParserHelper::allowedCFModelAttrs; - // =========================================================================== // method definitions // =========================================================================== @@ -63,10 +64,21 @@ "' and '" + attrs.getName(SUMO_ATTR_VEHSPERHOUR) + "' has to be given in the definition of flow '" + id + "'."); } - if (attrs.hasAttribute(SUMO_ATTR_PERIOD) || attrs.hasAttribute(SUMO_ATTR_VEHSPERHOUR)) { + if (attrs.hasAttribute(SUMO_ATTR_PERIOD) && attrs.hasAttribute(SUMO_ATTR_PROB)) { + throw ProcessError("At most one of '" + attrs.getName(SUMO_ATTR_PERIOD) + + "' and '" + attrs.getName(SUMO_ATTR_PROB) + + "' has to be given in the definition of flow '" + id + "'."); + } + if (attrs.hasAttribute(SUMO_ATTR_PROB) && attrs.hasAttribute(SUMO_ATTR_VEHSPERHOUR)) { + throw ProcessError("At most one of '" + attrs.getName(SUMO_ATTR_PROB) + + "' and '" + attrs.getName(SUMO_ATTR_VEHSPERHOUR) + + "' has to be given in the definition of flow '" + id + "'."); + } + if (attrs.hasAttribute(SUMO_ATTR_PERIOD) || attrs.hasAttribute(SUMO_ATTR_VEHSPERHOUR) || attrs.hasAttribute(SUMO_ATTR_PROB)) { if (attrs.hasAttribute(SUMO_ATTR_END) && attrs.hasAttribute(SUMO_ATTR_NUMBER)) { throw ProcessError("If '" + attrs.getName(SUMO_ATTR_PERIOD) + - "' or '" + attrs.getName(SUMO_ATTR_VEHSPERHOUR) + + "', '" + attrs.getName(SUMO_ATTR_VEHSPERHOUR) + + "' or '" + attrs.getName(SUMO_ATTR_PROB) + "' are given at most one of '" + attrs.getName(SUMO_ATTR_END) + "' and '" + attrs.getName(SUMO_ATTR_NUMBER) + "' are allowed in flow '" + id + "'."); @@ -75,6 +87,7 @@ if (!attrs.hasAttribute(SUMO_ATTR_NUMBER)) { throw ProcessError("At least one of '" + attrs.getName(SUMO_ATTR_PERIOD) + "', '" + attrs.getName(SUMO_ATTR_VEHSPERHOUR) + + "', '" + attrs.getName(SUMO_ATTR_PROB) + "', and '" + attrs.getName(SUMO_ATTR_NUMBER) + "' is needed in flow '" + id + "'."); } @@ -108,6 +121,13 @@ ret->repetitionOffset = TIME2STEPS(3600. / vph); } } + if (attrs.hasAttribute(SUMO_ATTR_PROB)) { + ret->repetitionProbability = attrs.get(SUMO_ATTR_PROB, id.c_str(), ok); + if (ok && (ret->repetitionProbability <= 0 || ret->repetitionProbability > 1)) { + delete ret; + throw ProcessError("Invalid repetition probability in the definition of flow '" + id + "'."); + } + } ret->depart = beginDefault; if (attrs.hasAttribute(SUMO_ATTR_BEGIN)) { @@ -131,8 +151,8 @@ if (attrs.hasAttribute(SUMO_ATTR_NUMBER)) { ret->repetitionNumber = attrs.get(SUMO_ATTR_NUMBER, id.c_str(), ok); ret->setParameter |= VEHPARS_PERIODFREQ_SET; - if(ret->repetitionNumber==0) { - WRITE_WARNING("Flow '" + id + "' has 0 vehicles; will skip it..."); + if (ret->repetitionNumber == 0) { + WRITE_WARNING("Flow '" + id + "' has 0 vehicles; will skip it."); } else { if (ok && ret->repetitionNumber < 0) { delete ret; @@ -143,14 +163,20 @@ } } } else { - if (ok && ret->repetitionOffset <= 0) { - delete ret; - throw ProcessError("Invalid repetition rate in the definition of flow '" + id + "'."); - } - if (end == SUMOTime_MAX) { + // interpret repetitionNumber + if (ok && ret->repetitionProbability > 0) { ret->repetitionNumber = INT_MAX; + ret->repetitionEnd = end; } else { - ret->repetitionNumber = static_cast(static_cast(end - ret->depart) / ret->repetitionOffset + 0.5); + if (ok && ret->repetitionOffset <= 0) { + delete ret; + throw ProcessError("Invalid repetition rate in the definition of flow '" + id + "'."); + } + if (end == SUMOTime_MAX) { + ret->repetitionNumber = INT_MAX; + } else { + ret->repetitionNumber = MAX2(1, (int)(((SUMOReal)(end - ret->depart)) / ret->repetitionOffset + 0.5)); + } } } if (!ok) { @@ -163,7 +189,7 @@ SUMOVehicleParameter* SUMOVehicleParserHelper::parseVehicleAttributes(const SUMOSAXAttributes& attrs, - bool optionalID, bool skipDepart) { + const bool optionalID, const bool skipDepart, const bool isPerson) { bool ok = true; std::string id, errorMsg; if (optionalID) { @@ -171,50 +197,22 @@ } else { id = attrs.get(SUMO_ATTR_ID, 0, ok); } - if (attrs.hasAttribute(SUMO_ATTR_PERIOD) ^ attrs.hasAttribute(SUMO_ATTR_REPNUMBER)) { - throw ProcessError("The attributes '" + attrs.getName(SUMO_ATTR_PERIOD) + - "' and '" + attrs.getName(SUMO_ATTR_REPNUMBER) + - "' have to be given both in the definition of '" + id + "'."); - } SUMOVehicleParameter* ret = new SUMOVehicleParameter(); ret->id = id; + if (isPerson) { + ret->vtypeid = DEFAULT_PEDTYPE_ID; + } try { parseCommonAttributes(attrs, ret, "vehicle"); - } catch (ProcessError&) { - delete ret; - throw; - } - if (!skipDepart) { - const std::string helper = attrs.get(SUMO_ATTR_DEPART, 0, ok); - if (helper == "triggered") { - ret->departProcedure = DEPART_TRIGGERED; - } else { - ret->departProcedure = DEPART_GIVEN; - ret->depart = attrs.getSUMOTimeReporting(SUMO_ATTR_DEPART, id.c_str(), ok); - if (ok && ret->depart < 0) { - errorMsg = "Negative departure time in the definition of '" + id + "'."; - ok = false; + if (!skipDepart) { + const std::string helper = attrs.get(SUMO_ATTR_DEPART, ret->id.c_str(), ok); + if (!ok || !SUMOVehicleParameter::parseDepart(helper, "vehicle", ret->id, ret->depart, ret->departProcedure, errorMsg)) { + throw ProcessError(errorMsg); } } - } - // parse repetition information - if (attrs.hasAttribute(SUMO_ATTR_PERIOD)) { - WRITE_WARNING("period and repno are deprecated in vehicle '" + id + "', use flows instead."); - ret->setParameter |= VEHPARS_PERIODFREQ_SET; -#ifdef HAVE_SUBSECOND_TIMESTEPS - ret->repetitionOffset = attrs.getSUMOTimeReporting(SUMO_ATTR_PERIOD, id.c_str(), ok); -#else - ret->repetitionOffset = attrs.get(SUMO_ATTR_PERIOD, id.c_str(), ok); -#endif - } - if (attrs.hasAttribute(SUMO_ATTR_REPNUMBER)) { - ret->setParameter |= VEHPARS_PERIODNUM_SET; - ret->repetitionNumber = attrs.get(SUMO_ATTR_REPNUMBER, id.c_str(), ok); - } - - if (!ok) { + } catch (ProcessError&) { delete ret; - throw ProcessError(errorMsg); + throw; } return ret; } @@ -228,23 +226,26 @@ // parse route information if (attrs.hasAttribute(SUMO_ATTR_ROUTE)) { ret->setParameter |= VEHPARS_ROUTE_SET; // !!! needed? - ret->routeid = attrs.get(SUMO_ATTR_ROUTE, 0, ok); + ret->routeid = attrs.get(SUMO_ATTR_ROUTE, ret->id.c_str(), ok); } // parse type information if (attrs.hasAttribute(SUMO_ATTR_TYPE)) { ret->setParameter |= VEHPARS_VTYPE_SET; // !!! needed? - ret->vtypeid = attrs.get(SUMO_ATTR_TYPE, 0, ok); + ret->vtypeid = attrs.get(SUMO_ATTR_TYPE, ret->id.c_str(), ok); } // parse line information if (attrs.hasAttribute(SUMO_ATTR_LINE)) { ret->setParameter |= VEHPARS_LINE_SET; // !!! needed? - ret->line = attrs.get(SUMO_ATTR_LINE, 0, ok); + ret->line = attrs.get(SUMO_ATTR_LINE, ret->id.c_str(), ok); } // parse zone information - if (attrs.hasAttribute(SUMO_ATTR_FROM_TAZ) && attrs.hasAttribute(SUMO_ATTR_TO_TAZ)) { - ret->setParameter |= VEHPARS_TAZ_SET; - ret->fromTaz = attrs.get(SUMO_ATTR_FROM_TAZ, 0, ok); - ret->toTaz = attrs.get(SUMO_ATTR_TO_TAZ, 0, ok); + if (attrs.hasAttribute(SUMO_ATTR_FROM_TAZ)) { + ret->setParameter |= VEHPARS_FROM_TAZ_SET; + ret->fromTaz = attrs.get(SUMO_ATTR_FROM_TAZ, ret->id.c_str(), ok); + } + if (attrs.hasAttribute(SUMO_ATTR_TO_TAZ)) { + ret->setParameter |= VEHPARS_TO_TAZ_SET; + ret->toTaz = attrs.get(SUMO_ATTR_TO_TAZ, ret->id.c_str(), ok); } // parse reroute information if (attrs.getOpt(SUMO_ATTR_REROUTE, 0, ok, false)) { @@ -255,7 +256,7 @@ // parse depart lane information if (attrs.hasAttribute(SUMO_ATTR_DEPARTLANE)) { ret->setParameter |= VEHPARS_DEPARTLANE_SET; - const std::string helper = attrs.get(SUMO_ATTR_DEPARTLANE, 0, ok); + const std::string helper = attrs.get(SUMO_ATTR_DEPARTLANE, ret->id.c_str(), ok); if (!SUMOVehicleParameter::parseDepartLane(helper, element, ret->id, ret->departLane, ret->departLaneProcedure, error)) { throw ProcessError(error); } @@ -263,7 +264,7 @@ // parse depart position information if (attrs.hasAttribute(SUMO_ATTR_DEPARTPOS)) { ret->setParameter |= VEHPARS_DEPARTPOS_SET; - const std::string helper = attrs.get(SUMO_ATTR_DEPARTPOS, 0, ok); + const std::string helper = attrs.get(SUMO_ATTR_DEPARTPOS, ret->id.c_str(), ok); if (!SUMOVehicleParameter::parseDepartPos(helper, element, ret->id, ret->departPos, ret->departPosProcedure, error)) { throw ProcessError(error); } @@ -271,7 +272,7 @@ // parse depart speed information if (attrs.hasAttribute(SUMO_ATTR_DEPARTSPEED)) { ret->setParameter |= VEHPARS_DEPARTSPEED_SET; - std::string helper = attrs.get(SUMO_ATTR_DEPARTSPEED, 0, ok); + std::string helper = attrs.get(SUMO_ATTR_DEPARTSPEED, ret->id.c_str(), ok); if (!SUMOVehicleParameter::parseDepartSpeed(helper, element, ret->id, ret->departSpeed, ret->departSpeedProcedure, error)) { throw ProcessError(error); } @@ -280,7 +281,7 @@ // parse arrival lane information if (attrs.hasAttribute(SUMO_ATTR_ARRIVALLANE)) { ret->setParameter |= VEHPARS_ARRIVALLANE_SET; - std::string helper = attrs.get(SUMO_ATTR_ARRIVALLANE, 0, ok); + std::string helper = attrs.get(SUMO_ATTR_ARRIVALLANE, ret->id.c_str(), ok); if (!SUMOVehicleParameter::parseArrivalLane(helper, element, ret->id, ret->arrivalLane, ret->arrivalLaneProcedure, error)) { throw ProcessError(error); } @@ -288,7 +289,7 @@ // parse arrival position information if (attrs.hasAttribute(SUMO_ATTR_ARRIVALPOS)) { ret->setParameter |= VEHPARS_ARRIVALPOS_SET; - std::string helper = attrs.get(SUMO_ATTR_ARRIVALPOS, 0, ok); + std::string helper = attrs.get(SUMO_ATTR_ARRIVALPOS, ret->id.c_str(), ok); if (!SUMOVehicleParameter::parseArrivalPos(helper, element, ret->id, ret->arrivalPos, ret->arrivalPosProcedure, error)) { throw ProcessError(error); } @@ -296,7 +297,7 @@ // parse arrival speed information if (attrs.hasAttribute(SUMO_ATTR_ARRIVALSPEED)) { ret->setParameter |= VEHPARS_ARRIVALSPEED_SET; - std::string helper = attrs.get(SUMO_ATTR_ARRIVALSPEED, 0, ok); + std::string helper = attrs.get(SUMO_ATTR_ARRIVALSPEED, ret->id.c_str(), ok); if (!SUMOVehicleParameter::parseArrivalSpeed(helper, element, ret->id, ret->arrivalSpeed, ret->arrivalSpeedProcedure, error)) { throw ProcessError(error); } @@ -312,21 +313,28 @@ // parse person number if (attrs.hasAttribute(SUMO_ATTR_PERSON_NUMBER)) { ret->setParameter |= VEHPARS_PERSON_NUMBER_SET; - ret->personNumber = attrs.get(SUMO_ATTR_PERSON_NUMBER, 0, ok); + ret->personNumber = attrs.get(SUMO_ATTR_PERSON_NUMBER, ret->id.c_str(), ok); } - // parse person capacity - if (attrs.hasAttribute(SUMO_ATTR_PERSON_CAPACITY)) { - ret->setParameter |= VEHPARS_PERSON_CAPACITY_SET; - ret->personCapacity = attrs.get(SUMO_ATTR_PERSON_CAPACITY, 0, ok); + // parse container number + if (attrs.hasAttribute(SUMO_ATTR_CONTAINER_NUMBER)) { + ret->setParameter |= VEHPARS_CONTAINER_NUMBER_SET; + ret->containerNumber = attrs.get(SUMO_ATTR_CONTAINER_NUMBER, ret->id.c_str(), ok); } } SUMOVTypeParameter* SUMOVehicleParserHelper::beginVTypeParsing(const SUMOSAXAttributes& attrs, const std::string& file) { - SUMOVTypeParameter* vtype = new SUMOVTypeParameter(); bool ok = true; - vtype->id = attrs.get(SUMO_ATTR_ID, 0, ok); + std::string id = attrs.get(SUMO_ATTR_ID, 0, ok); + SUMOVehicleClass vClass = SVC_IGNORING; + if (attrs.hasAttribute(SUMO_ATTR_VCLASS)) { + vClass = parseVehicleClass(attrs, id); + } + SUMOVTypeParameter* vtype = new SUMOVTypeParameter(id, vClass); + if (attrs.hasAttribute(SUMO_ATTR_VCLASS)) { + vtype->setParameter |= VTYPEPARS_VEHICLECLASS_SET; + } if (attrs.hasAttribute(SUMO_ATTR_LENGTH)) { vtype->length = attrs.get(SUMO_ATTR_LENGTH, vtype->id.c_str(), ok); vtype->setParameter |= VTYPEPARS_LENGTH_SET; @@ -359,10 +367,6 @@ } vtype->setParameter |= VTYPEPARS_IMPATIENCE_SET; } - if (attrs.hasAttribute(SUMO_ATTR_VCLASS)) { - vtype->vehicleClass = parseVehicleClass(attrs, vtype->id); - vtype->setParameter |= VTYPEPARS_VEHICLECLASS_SET; - } if (attrs.hasAttribute(SUMO_ATTR_WIDTH)) { vtype->width = attrs.get(SUMO_ATTR_WIDTH, vtype->id.c_str(), ok); vtype->setParameter |= VTYPEPARS_WIDTH_SET; @@ -396,6 +400,32 @@ vtype->defaultProbability = attrs.get(SUMO_ATTR_PROB, vtype->id.c_str(), ok); vtype->setParameter |= VTYPEPARS_PROBABILITY_SET; } + if (attrs.hasAttribute(SUMO_ATTR_LANE_CHANGE_MODEL)) { + const std::string lcmS = attrs.get(SUMO_ATTR_LANE_CHANGE_MODEL, vtype->id.c_str(), ok); + if (SUMOXMLDefinitions::LaneChangeModels.hasString(lcmS)) { + vtype->lcModel = SUMOXMLDefinitions::LaneChangeModels.get(lcmS); + vtype->setParameter |= VTYPEPARS_LANE_CHANGE_MODEL_SET; + } else { + WRITE_ERROR("Unknown lane change model '" + lcmS + "' when parsing vtype '" + vtype->id + "'"); + throw ProcessError(); + } + } + if (attrs.hasAttribute(SUMO_ATTR_PERSON_CAPACITY)) { + vtype->personCapacity = attrs.get(SUMO_ATTR_PERSON_CAPACITY, vtype->id.c_str(), ok); + vtype->setParameter |= VTYPEPARS_PERSON_CAPACITY; + } + if (attrs.hasAttribute(SUMO_ATTR_CONTAINER_CAPACITY)) { + vtype->containerCapacity = attrs.get(SUMO_ATTR_CONTAINER_CAPACITY, vtype->id.c_str(), ok); + vtype->setParameter |= VTYPEPARS_CONTAINER_CAPACITY; + } + if (attrs.hasAttribute(SUMO_ATTR_BOARDING_DURATION)) { + vtype->boardingDuration = attrs.getSUMOTimeReporting(SUMO_ATTR_BOARDING_DURATION, vtype->id.c_str(), ok); + vtype->setParameter |= VTYPEPARS_BOARDING_DURATION; + } + if (attrs.hasAttribute(SUMO_ATTR_LOADING_DURATION)) { + vtype->loadingDuration = attrs.getSUMOTimeReporting(SUMO_ATTR_LOADING_DURATION, vtype->id.c_str(), ok); + vtype->setParameter |= VTYPEPARS_LOADING_DURATION; + } try { parseVTypeEmbedded(*vtype, SUMO_TAG_CF_KRAUSS, attrs, true); } catch (ProcessError&) { @@ -460,6 +490,7 @@ allowedCFModelAttrs[SUMO_TAG_CF_KRAUSS] = krausParams; allowedCFModelAttrs[SUMO_TAG_CF_KRAUSS_ORIG1] = krausParams; allowedCFModelAttrs[SUMO_TAG_CF_KRAUSS_PLUS_SLOPE] = krausParams; + allowedCFModelAttrs[SUMO_TAG_CF_KRAUSS_ACCEL_BOUND] = krausParams; std::set smartSKParams; smartSKParams.insert(SUMO_ATTR_ACCEL); @@ -533,14 +564,19 @@ SUMOVehicleClass SUMOVehicleParserHelper::parseVehicleClass(const SUMOSAXAttributes& attrs, const std::string& id) { - SUMOVehicleClass vclass = SVC_UNKNOWN; + SUMOVehicleClass vclass = SVC_IGNORING; try { bool ok = true; std::string vclassS = attrs.getOpt(SUMO_ATTR_VCLASS, id.c_str(), ok, ""); if (vclassS == "") { return vclass; } - return getVehicleClassID(vclassS); + const SUMOVehicleClass result = getVehicleClassID(vclassS); + const std::string& realName = SumoVehicleClassStrings.getString(result); + if (realName != vclassS) { + WRITE_WARNING("The vehicle class '" + vclassS + "' for " + attrs.getObjectType() + " '" + id + "' is deprecated, use '" + realName + "' instead."); + } + return result; } catch (...) { WRITE_ERROR("The class for " + attrs.getObjectType() + " '" + id + "' is not known."); } @@ -553,10 +589,10 @@ try { bool ok = true; std::string eClassS = attrs.getOpt(SUMO_ATTR_EMISSIONCLASS, id.c_str(), ok, ""); - return getVehicleEmissionTypeID(eClassS); + return PollutantsInterface::getClassByName(eClassS); } catch (...) { WRITE_ERROR("The emission class for " + attrs.getObjectType() + " '" + id + "' is not known."); - return SVE_UNKNOWN; + return 0; } } @@ -566,34 +602,17 @@ bool ok = true; std::string vclassS = attrs.getOpt(SUMO_ATTR_GUISHAPE, id.c_str(), ok, ""); if (SumoVehicleShapeStrings.hasString(vclassS)) { - return SumoVehicleShapeStrings.get(vclassS); + const SUMOVehicleShape result = SumoVehicleShapeStrings.get(vclassS); + const std::string& realName = SumoVehicleShapeStrings.getString(result); + if (realName != vclassS) { + WRITE_WARNING("The shape '" + vclassS + "' for " + attrs.getObjectType() + " '" + id + "' is deprecated, use '" + realName + "' instead."); + } + return result; } else { WRITE_ERROR("The shape '" + vclassS + "' for " + attrs.getObjectType() + " '" + id + "' is not known."); return SVS_UNKNOWN; } } - -void -SUMOVehicleParserHelper::parseStop(SUMOVehicleParameter::Stop& stop, const SUMOSAXAttributes& attrs) { - stop.setParameter = 0; - if (attrs.hasAttribute(SUMO_ATTR_ENDPOS)) { - stop.setParameter |= STOP_END_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_STARTPOS)) { - stop.setParameter |= STOP_START_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_TRIGGERED)) { - stop.setParameter |= STOP_TRIGGER_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_PARKING)) { - stop.setParameter |= STOP_PARKING_SET; - } - if (attrs.hasAttribute(SUMO_ATTR_EXPECTED)) { - stop.setParameter |= STOP_EXPECTED_SET; - } - // don't like this (dkrajzew) -} - /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOVehicleParserHelper.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOVehicleParserHelper.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOVehicleParserHelper.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOVehicleParserHelper.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,12 +5,12 @@ /// @author Michael Behrisch /// @author Laura Bieker /// @date Mon, 07.04.2008 -/// @version $Id: SUMOVehicleParserHelper.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOVehicleParserHelper.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Helper methods for parsing vehicle attributes /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -75,12 +75,13 @@ * @param[in] attr The SAX-attributes to get vehicle parameter from * @param[in] optionalID Whether the id shall be skipped * @param[in] skipDepart Whether parsing the departure time shall be skipped + * @param[in] isPerson Whether a person is parsed * @return The parsed attribute structure if no error occured, 0 otherwise * @exception ProcessError If an attribute's value is invalid * @note: the caller is responsible for deleting the returned pointer */ static SUMOVehicleParameter* parseVehicleAttributes(const SUMOSAXAttributes& attrs, - bool optionalID = false, bool skipDepart = false); + const bool optionalID = false, const bool skipDepart = false, const bool isPerson = false); /** @brief Starts to parse a vehicle type @@ -122,7 +123,7 @@ * When given, the vehicle class is parsed using getVehicleClassID. * Exceptions occuring within this process are catched and reported. * - * If no vehicle class is available in the attributes, the default class (SVC_UNKNOWN) + * If no vehicle class is available in the attributes, the default class (SVC_IGNORING) * is returned. * * @param[in] attrs The attributes to read the class from @@ -167,9 +168,6 @@ */ static SUMOVehicleShape parseGuiShape(const SUMOSAXAttributes& attrs, const std::string& id); - - static void parseStop(SUMOVehicleParameter::Stop& stop, const SUMOSAXAttributes& attrs); - private: /** @brief Parses attributes common to vehicles and flows * diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOXMLDefinitions.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOXMLDefinitions.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOXMLDefinitions.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOXMLDefinitions.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -7,12 +7,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date Sept 2002 -/// @version $Id: SUMOXMLDefinitions.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOXMLDefinitions.cpp 18096 2015-03-17 09:50:59Z behrisch $ /// // Definitions of elements and attributes known by SUMO /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -33,6 +33,7 @@ #include #endif +#include #include "SUMOXMLDefinitions.h" #include @@ -69,6 +70,7 @@ { "calibrator", SUMO_TAG_CALIBRATOR }, { "rerouter", SUMO_TAG_REROUTER }, { "busStop", SUMO_TAG_BUS_STOP }, + { "containerStop", SUMO_TAG_CONTAINER_STOP }, { "vTypeProbe", SUMO_TAG_VTYPEPROBE }, { "routeProbe", SUMO_TAG_ROUTEPROBE }, { "routes", SUMO_TAG_ROUTES }, @@ -90,13 +92,13 @@ { "fromEdge", SUMO_TAG_FROMEDGE }, { "toEdge", SUMO_TAG_TOEDGE }, { "sink", SUMO_TAG_SINK }, - { "param", SUMO_TAG_PARAM }, - { "WAUT", SUMO_TAG_WAUT }, + { "param", SUMO_TAG_PARAM }, + { "WAUT", SUMO_TAG_WAUT }, { "wautSwitch", SUMO_TAG_WAUT_SWITCH }, { "wautJunction", SUMO_TAG_WAUT_JUNCTION }, - { "segment", SUMO_TAG_SEGMENT }, - { "delete", SUMO_TAG_DELETE }, - { "stop", SUMO_TAG_STOP }, + { "segment", SUMO_TAG_SEGMENT }, + { "delete", SUMO_TAG_DELETE }, + { "stop", SUMO_TAG_STOP }, { "destProbReroute", SUMO_TAG_DEST_PROB_REROUTE }, { "closingReroute", SUMO_TAG_CLOSING_REROUTE }, { "routeProbReroute", SUMO_TAG_ROUTE_PROB_REROUTE }, @@ -113,6 +115,8 @@ { "roundabout", SUMO_TAG_ROUNDABOUT }, { "join", SUMO_TAG_JOIN }, { "joinExclude", SUMO_TAG_JOINEXCLUDE }, + { "crossing", SUMO_TAG_CROSSING }, + { "customShape", SUMO_TAG_CUSTOMSHAPE }, { "way", SUMO_TAG_WAY }, { "nd", SUMO_TAG_ND }, @@ -122,31 +126,36 @@ { "viewsettings", SUMO_TAG_VIEWSETTINGS }, { "decal", SUMO_TAG_VIEWSETTINGS_DECAL }, + { "light", SUMO_TAG_VIEWSETTINGS_LIGHT }, { "scheme", SUMO_TAG_VIEWSETTINGS_SCHEME }, { "opengl", SUMO_TAG_VIEWSETTINGS_OPENGL }, { "background", SUMO_TAG_VIEWSETTINGS_BACKGROUND }, { "edges", SUMO_TAG_VIEWSETTINGS_EDGES }, { "vehicles", SUMO_TAG_VIEWSETTINGS_VEHICLES }, { "persons", SUMO_TAG_VIEWSETTINGS_PERSONS }, + { "containers", SUMO_TAG_VIEWSETTINGS_CONTAINERS }, { "junctions", SUMO_TAG_VIEWSETTINGS_JUNCTIONS }, { "additionals", SUMO_TAG_VIEWSETTINGS_ADDITIONALS }, { "pois", SUMO_TAG_VIEWSETTINGS_POIS }, { "polys", SUMO_TAG_VIEWSETTINGS_POLYS }, { "legend", SUMO_TAG_VIEWSETTINGS_LEGEND }, + { "event", SUMO_TAG_VIEWSETTINGS_EVENT }, + { "jamTime", SUMO_TAG_VIEWSETTINGS_EVENT_JAM_TIME }, { "include", SUMO_TAG_INCLUDE }, - { "xi:include", SUMO_TAG_INCLUDE }, { "delay", SUMO_TAG_DELAY }, { "viewport", SUMO_TAG_VIEWPORT }, { "snapshot", SUMO_TAG_SNAPSHOT }, { "breakpoints-file", SUMO_TAG_BREAKPOINTS_FILE }, { "location", SUMO_TAG_LOCATION }, { "colorScheme", SUMO_TAG_COLORSCHEME }, + { "scalingScheme", SUMO_TAG_SCALINGSCHEME }, { "entry", SUMO_TAG_ENTRY }, { "carFollowing-IDM", SUMO_TAG_CF_IDM }, { "carFollowing-IDMM", SUMO_TAG_CF_IDMM }, { "carFollowing-Krauss", SUMO_TAG_CF_KRAUSS }, { "carFollowing-KraussPS", SUMO_TAG_CF_KRAUSS_PLUS_SLOPE }, + { "carFollowing-KraussAB", SUMO_TAG_CF_KRAUSS_ACCEL_BOUND }, { "carFollowing-KraussOrig1", SUMO_TAG_CF_KRAUSS_ORIG1 }, { "carFollowing-SmartSK", SUMO_TAG_CF_SMART_SK }, { "carFollowing-Daniel1", SUMO_TAG_CF_DANIEL1 }, @@ -158,6 +167,17 @@ { "ride", SUMO_TAG_RIDE }, { "walk", SUMO_TAG_WALK }, + { "container", SUMO_TAG_CONTAINER }, + { "transport", SUMO_TAG_TRANSPORT }, + { "tranship", SUMO_TAG_TRANSHIP }, + + { "trajectories", SUMO_TAG_TRAJECTORIES }, + { "timestep", SUMO_TAG_TIMESTEP }, + { "timeSlice", SUMO_TAG_TIMESLICE }, + { "actorConfig", SUMO_TAG_ACTORCONFIG }, + { "motionState", SUMO_TAG_MOTIONSTATE }, + { "odPair", SUMO_TAG_OD_PAIR }, + // ActivityGen statistics file { "general", AGEN_TAG_GENERAL }, { "street", AGEN_TAG_STREET }, @@ -192,6 +212,7 @@ { "speed", SUMO_ATTR_SPEED }, { "oneway", SUMO_ATTR_ONEWAY }, { "width", SUMO_ATTR_WIDTH }, + { "sidewalkWidth", SUMO_ATTR_SIDEWALKWIDTH }, { "remove", SUMO_ATTR_REMOVE }, { "length", SUMO_ATTR_LENGTH }, @@ -214,6 +235,7 @@ { "intLanes", SUMO_ATTR_INTLANES }, { "weight", SUMO_ATTR_WEIGHT }, + { "node", SUMO_ATTR_NODE }, { "edge", SUMO_ATTR_EDGE }, { "edges", SUMO_ATTR_EDGES }, @@ -234,6 +256,8 @@ { "speedDev", SUMO_ATTR_SPEEDDEV }, { "laneChangeModel", SUMO_ATTR_LANE_CHANGE_MODEL }, { "minGap", SUMO_ATTR_MINGAP }, + { "boardingDuration", SUMO_ATTR_BOARDING_DURATION }, + { "loadingDuration", SUMO_ATTR_LOADING_DURATION }, { "sigma", SUMO_ATTR_SIGMA }, { "tau", SUMO_ATTR_TAU }, @@ -259,7 +283,9 @@ { "toTaz", SUMO_ATTR_TO_TAZ }, { "reroute", SUMO_ATTR_REROUTE }, { "personCapacity", SUMO_ATTR_PERSON_CAPACITY }, + { "containerCapacity", SUMO_ATTR_CONTAINER_CAPACITY }, { "personNumber", SUMO_ATTR_PERSON_NUMBER }, + { "containerNumber", SUMO_ATTR_CONTAINER_NUMBER }, { "function", SUMO_ATTR_FUNCTION }, { "pos", SUMO_ATTR_POSITION }, @@ -270,6 +296,8 @@ { "number", SUMO_ATTR_NUMBER }, { "duration", SUMO_ATTR_DURATION }, { "until", SUMO_ATTR_UNTIL }, + { "routeProbe", SUMO_ATTR_ROUTEPROBE }, + { "crossingEdges", SUMO_ATTR_CROSSING_EDGES }, { "time", SUMO_ATTR_TIME }, { "begin", SUMO_ATTR_BEGIN }, @@ -279,6 +307,8 @@ { "linkIndex", SUMO_ATTR_TLLINKINDEX }, { "shape", SUMO_ATTR_SHAPE }, { "spreadType", SUMO_ATTR_SPREADTYPE }, + { "radius", SUMO_ATTR_RADIUS }, + { "customShape", SUMO_ATTR_CUSTOMSHAPE }, { "color", SUMO_ATTR_COLOR }, { "dir", SUMO_ATTR_DIR }, { "state", SUMO_ATTR_STATE }, @@ -303,18 +333,19 @@ { "speedThreshold", SUMO_ATTR_HALTING_SPEED_THRESHOLD }, { "jamThreshold", SUMO_ATTR_JAM_DIST_THRESHOLD }, - { "wautID", SUMO_ATTR_WAUT_ID }, + { "wautID", SUMO_ATTR_WAUT_ID }, { "junctionID", SUMO_ATTR_JUNCTION_ID }, - { "procedure", SUMO_ATTR_PROCEDURE }, - { "synchron", SUMO_ATTR_SYNCHRON }, - { "refTime", SUMO_ATTR_REF_TIME }, - { "startProg", SUMO_ATTR_START_PROG }, + { "procedure", SUMO_ATTR_PROCEDURE }, + { "synchron", SUMO_ATTR_SYNCHRON }, + { "refTime", SUMO_ATTR_REF_TIME }, + { "startProg", SUMO_ATTR_START_PROG }, { "off", SUMO_ATTR_OFF }, { "friendlyPos", SUMO_ATTR_FRIENDLY_POS }, { "splitByType", SUMO_ATTR_SPLIT_VTYPE }, { "uncontrolled", SUMO_ATTR_UNCONTROLLED }, { "pass", SUMO_ATTR_PASS }, { "busStop", SUMO_ATTR_BUS_STOP }, + { "containerStop", SUMO_ATTR_CONTAINER_STOP }, { "line", SUMO_ATTR_LINE }, { "lines", SUMO_ATTR_LINES }, { "value", SUMO_ATTR_VALUE }, @@ -336,8 +367,10 @@ { "startPos", SUMO_ATTR_STARTPOS }, { "endPos", SUMO_ATTR_ENDPOS }, { "triggered", SUMO_ATTR_TRIGGERED }, + { "containerTriggered", SUMO_ATTR_CONTAINER_TRIGGERED }, { "parking", SUMO_ATTR_PARKING }, { "expected", SUMO_ATTR_EXPECTED }, + { "expectedContainers", SUMO_ATTR_EXPECTED_CONTAINERS }, { "index", SUMO_ATTR_INDEX }, { "entering", SUMO_ATTR_ENTERING }, @@ -349,6 +382,7 @@ { "lon", SUMO_ATTR_LON }, { "lat", SUMO_ATTR_LAT }, + { "geo", SUMO_ATTR_GEO }, { "k", SUMO_ATTR_K }, { "v", SUMO_ATTR_V }, { "ref", SUMO_ATTR_REF }, @@ -378,6 +412,22 @@ { "slope", SUMO_ATTR_SLOPE }, { "version", SUMO_ATTR_VERSION }, + { "actorConfig", SUMO_ATTR_ACTORCONFIG }, + { "vehicle", SUMO_ATTR_VEHICLE }, + { "startTime", SUMO_ATTR_STARTTIME }, + { "vehicleClass", SUMO_ATTR_VEHICLECLASS }, + { "fuel", SUMO_ATTR_FUEL }, + { "acceleration", SUMO_ATTR_ACCELERATION }, + { "amount", SUMO_ATTR_AMOUNT }, + { "origin", SUMO_ATTR_ORIGIN }, + { "destination", SUMO_ATTR_DESTINATION }, + +#ifndef WIN32 + { "commandPosix", SUMO_ATTR_COMMAND }, +#else + { "commandWindows", SUMO_ATTR_COMMAND }, +#endif + // ActivityGen statistics file { "inhabitants", AGEN_ATTR_INHABITANTS }, { "households", AGEN_ATTR_HOUSEHOLDS }, @@ -419,6 +469,7 @@ StringBijection::Entry SUMOXMLDefinitions::sumoNodeTypeValues[] = { {"traffic_light", NODETYPE_TRAFFIC_LIGHT}, {"traffic_light_unregulated", NODETYPE_TRAFFIC_LIGHT_NOJUNCTION}, + {"rail_signal", NODETYPE_RAIL_SIGNAL}, {"priority", NODETYPE_PRIORITY}, {"priority_stop", NODETYPE_PRIORITY_STOP}, {"right_before_left", NODETYPE_RIGHT_BEFORE_LEFT}, @@ -438,6 +489,8 @@ {"connector", EDGEFUNC_CONNECTOR}, {"sink", EDGEFUNC_SINK}, {"source", EDGEFUNC_SOURCE}, + {"crossing", EDGEFUNC_CROSSING}, + {"walkingarea", EDGEFUNC_WALKINGAREA}, {"internal", EDGEFUNC_INTERNAL} }; @@ -453,6 +506,7 @@ { "G", LINKSTATE_TL_GREEN_MAJOR }, { "g", LINKSTATE_TL_GREEN_MINOR }, { "r", LINKSTATE_TL_RED }, + { "u", LINKSTATE_TL_REDYELLOW }, { "Y", LINKSTATE_TL_YELLOW_MAJOR }, { "y", LINKSTATE_TL_YELLOW_MINOR }, { "o", LINKSTATE_TL_OFF_BLINKING }, @@ -479,8 +533,15 @@ StringBijection::Entry SUMOXMLDefinitions::trafficLightTypesVales[] = { { "static", TLTYPE_STATIC }, + { "rail", TLTYPE_RAIL }, { "actuated", TLTYPE_ACTUATED }, - { "agentbased", TLTYPE_AGENT } +}; + + +StringBijection::Entry SUMOXMLDefinitions::laneChangeModelValues[] = { + { "DK2008", LCM_DK2008 }, + { "LC2013", LCM_LC2013 }, + { "JE2013", LCM_JE2013 }, }; StringBijection SUMOXMLDefinitions::Tags( @@ -505,7 +566,22 @@ SUMOXMLDefinitions::linkDirectionValues, LINKDIR_NODIR); StringBijection SUMOXMLDefinitions::TrafficLightTypes( - SUMOXMLDefinitions::trafficLightTypesVales, TLTYPE_AGENT); + SUMOXMLDefinitions::trafficLightTypesVales, TLTYPE_ACTUATED); + +StringBijection SUMOXMLDefinitions::LaneChangeModels( + SUMOXMLDefinitions::laneChangeModelValues, LCM_JE2013); + + +std::string +SUMOXMLDefinitions::getJunctionIDFromInternalEdge(const std::string internalEdge) { + assert(internalEdge[0] == ':'); + return internalEdge.substr(1, internalEdge.rfind('_') - 1); +} + +std::string +SUMOXMLDefinitions::getEdgeIDFromLane(const std::string laneID) { + return laneID.substr(0, laneID.rfind('_') - 1); +} /****************************************************************************/ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOXMLDefinitions.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOXMLDefinitions.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/SUMOXMLDefinitions.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/SUMOXMLDefinitions.h 2015-04-17 00:20:29.000000000 +0000 @@ -7,12 +7,12 @@ /// @author Michael Behrisch /// @author Walter Bamberger /// @date Sept 2002 -/// @version $Id: SUMOXMLDefinitions.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: SUMOXMLDefinitions.h 18096 2015-03-17 09:50:59Z behrisch $ /// // Definitions of elements and attributes known by SUMO /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -90,6 +90,8 @@ SUMO_TAG_REROUTER, /// @brief A bus stop SUMO_TAG_BUS_STOP, + /// @brief A container stop + SUMO_TAG_CONTAINER_STOP, /** a vtypeprobe detector */ SUMO_TAG_VTYPEPROBE, /** a routeprobe detector */ @@ -155,6 +157,8 @@ SUMO_TAG_ROUNDABOUT, SUMO_TAG_JOIN, SUMO_TAG_JOINEXCLUDE, + SUMO_TAG_CROSSING, + SUMO_TAG_CUSTOMSHAPE, SUMO_TAG_WAY, SUMO_TAG_ND, @@ -164,17 +168,21 @@ SUMO_TAG_VIEWSETTINGS, SUMO_TAG_VIEWSETTINGS_DECAL, + SUMO_TAG_VIEWSETTINGS_LIGHT, SUMO_TAG_VIEWSETTINGS_SCHEME, SUMO_TAG_VIEWSETTINGS_OPENGL, SUMO_TAG_VIEWSETTINGS_BACKGROUND, SUMO_TAG_VIEWSETTINGS_EDGES, SUMO_TAG_VIEWSETTINGS_VEHICLES, SUMO_TAG_VIEWSETTINGS_PERSONS, + SUMO_TAG_VIEWSETTINGS_CONTAINERS, SUMO_TAG_VIEWSETTINGS_JUNCTIONS, SUMO_TAG_VIEWSETTINGS_ADDITIONALS, SUMO_TAG_VIEWSETTINGS_POIS, SUMO_TAG_VIEWSETTINGS_POLYS, SUMO_TAG_VIEWSETTINGS_LEGEND, + SUMO_TAG_VIEWSETTINGS_EVENT, + SUMO_TAG_VIEWSETTINGS_EVENT_JAM_TIME, SUMO_TAG_INCLUDE, SUMO_TAG_DELAY, SUMO_TAG_VIEWPORT, @@ -182,10 +190,12 @@ SUMO_TAG_BREAKPOINTS_FILE, SUMO_TAG_LOCATION, SUMO_TAG_COLORSCHEME, + SUMO_TAG_SCALINGSCHEME, SUMO_TAG_ENTRY, SUMO_TAG_CF_KRAUSS, SUMO_TAG_CF_KRAUSS_PLUS_SLOPE, + SUMO_TAG_CF_KRAUSS_ACCEL_BOUND, SUMO_TAG_CF_KRAUSS_ORIG1, SUMO_TAG_CF_SMART_SK, SUMO_TAG_CF_DANIEL1, @@ -199,6 +209,16 @@ SUMO_TAG_RIDE, SUMO_TAG_WALK, + SUMO_TAG_CONTAINER, + SUMO_TAG_TRANSPORT, + SUMO_TAG_TRANSHIP, + SUMO_TAG_TRAJECTORIES, + SUMO_TAG_TIMESTEP, + SUMO_TAG_TIMESLICE, + SUMO_TAG_ACTORCONFIG, + SUMO_TAG_MOTIONSTATE, + SUMO_TAG_OD_PAIR, + /** * ActivityGen Tags **/ @@ -257,6 +277,7 @@ SUMO_ATTR_SPEED, SUMO_ATTR_ONEWAY, SUMO_ATTR_WIDTH, + SUMO_ATTR_SIDEWALKWIDTH, SUMO_ATTR_REMOVE, SUMO_ATTR_LENGTH, SUMO_ATTR_X, @@ -277,6 +298,7 @@ SUMO_ATTR_INTLANES, /// the weight of a district's source or sink SUMO_ATTR_WEIGHT, + SUMO_ATTR_NODE, SUMO_ATTR_EDGE, /// the edges of a route SUMO_ATTR_EDGES, @@ -298,6 +320,8 @@ SUMO_ATTR_SPEEDDEV, SUMO_ATTR_LANE_CHANGE_MODEL, SUMO_ATTR_MINGAP, + SUMO_ATTR_BOARDING_DURATION, + SUMO_ATTR_LOADING_DURATION, /* Car following model attributes */ SUMO_ATTR_SIGMA, // used by: Krauss SUMO_ATTR_TAU, // Krauss @@ -323,7 +347,9 @@ SUMO_ATTR_TO_TAZ, SUMO_ATTR_REROUTE, SUMO_ATTR_PERSON_CAPACITY, + SUMO_ATTR_CONTAINER_CAPACITY, SUMO_ATTR_PERSON_NUMBER, + SUMO_ATTR_CONTAINER_NUMBER, /* source definitions */ SUMO_ATTR_FUNCTION, SUMO_ATTR_POSITION, @@ -334,6 +360,9 @@ SUMO_ATTR_NUMBER, SUMO_ATTR_DURATION, SUMO_ATTR_UNTIL, + SUMO_ATTR_ROUTEPROBE, + /* the edges crossed by a pedestrian crossing */ + SUMO_ATTR_CROSSING_EDGES, /** trigger: the time of the step */ SUMO_ATTR_TIME, /** weights: time range begin */ @@ -350,6 +379,10 @@ SUMO_ATTR_SHAPE, /// The information about how to spread the lanes from the given position SUMO_ATTR_SPREADTYPE, + /// The turning radius at an intersection in m + SUMO_ATTR_RADIUS, + /// whether a given shape is user-defined + SUMO_ATTR_CUSTOMSHAPE, /// A color information SUMO_ATTR_COLOR, /// The abstract direction of a link @@ -398,6 +431,7 @@ SUMO_ATTR_UNCONTROLLED, SUMO_ATTR_PASS, SUMO_ATTR_BUS_STOP, + SUMO_ATTR_CONTAINER_STOP, SUMO_ATTR_LINE, SUMO_ATTR_LINES, SUMO_ATTR_VALUE, @@ -419,8 +453,10 @@ SUMO_ATTR_STARTPOS, SUMO_ATTR_ENDPOS, SUMO_ATTR_TRIGGERED, + SUMO_ATTR_CONTAINER_TRIGGERED, SUMO_ATTR_PARKING, SUMO_ATTR_EXPECTED, + SUMO_ATTR_EXPECTED_CONTAINERS, SUMO_ATTR_INDEX, SUMO_ATTR_ENTERING, @@ -432,6 +468,7 @@ SUMO_ATTR_LON, SUMO_ATTR_LAT, + SUMO_ATTR_GEO, SUMO_ATTR_K, SUMO_ATTR_V, SUMO_ATTR_REF, @@ -459,6 +496,17 @@ SUMO_ATTR_ACTTYPE, SUMO_ATTR_SLOPE, SUMO_ATTR_VERSION, + SUMO_ATTR_COMMAND, + + SUMO_ATTR_ACTORCONFIG, + SUMO_ATTR_VEHICLE, + SUMO_ATTR_STARTTIME, + SUMO_ATTR_VEHICLECLASS, + SUMO_ATTR_FUEL, + SUMO_ATTR_ACCELERATION, + SUMO_ATTR_AMOUNT, + SUMO_ATTR_ORIGIN, + SUMO_ATTR_DESTINATION, /** @@ -538,7 +586,8 @@ enum SumoXMLNodeType { NODETYPE_UNKNOWN, // terminator NODETYPE_TRAFFIC_LIGHT, - NODETYPE_TRAFFIC_LIGHT_NOJUNCTION, // junction controlled only by traffic light but without other prohibitions + NODETYPE_TRAFFIC_LIGHT_NOJUNCTION, // junction controlled only by traffic light but without other prohibitions, + NODETYPE_RAIL_SIGNAL, NODETYPE_PRIORITY, NODETYPE_PRIORITY_STOP, // like priority but all minor links have stop signs NODETYPE_RIGHT_BEFORE_LEFT, @@ -561,6 +610,8 @@ EDGEFUNC_CONNECTOR, EDGEFUNC_SINK, EDGEFUNC_SOURCE, + EDGEFUNC_CROSSING, + EDGEFUNC_WALKINGAREA, EDGEFUNC_INTERNAL }; @@ -598,6 +649,8 @@ LINKSTATE_TL_GREEN_MINOR = 'g', /// @brief The link has red light (must brake) LINKSTATE_TL_RED = 'r', + /// @brief The link has red light (must brake) but indicates upcoming green + LINKSTATE_TL_REDYELLOW = 'u', /// @brief The link has yellow light, may pass LINKSTATE_TL_YELLOW_MAJOR = 'Y', /// @brief The link has yellow light, has to brake anyway @@ -650,8 +703,18 @@ */ enum TrafficLightType { TLTYPE_STATIC, - TLTYPE_ACTUATED, - TLTYPE_AGENT + TLTYPE_RAIL, + TLTYPE_ACTUATED +}; + + +/** + * @enum LaneChangeModel + */ +enum LaneChangeModel { + LCM_DK2008, + LCM_LC2013, + LCM_JE2013 }; @@ -690,6 +753,19 @@ static StringBijection LinkDirections; static StringBijection TrafficLightTypes; + + static StringBijection LaneChangeModels; + //@} + + /// @name Helper functions for ID-string manipulations + //@{ + + /// @brief return the junction id when given an edge of type internal, crossing or WalkingArea + static std::string getJunctionIDFromInternalEdge(const std::string internalEdge); + + /// @brief return edge id when given the lane ID + static std::string getEdgeIDFromLane(const std::string laneID); + //@} private: @@ -706,6 +782,8 @@ static StringBijection::Entry trafficLightTypesVales[]; + static StringBijection::Entry laneChangeModelValues[]; + }; #endif diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/XMLSubSys.cpp sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/XMLSubSys.cpp --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/XMLSubSys.cpp 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/XMLSubSys.cpp 2015-04-17 00:20:29.000000000 +0000 @@ -4,12 +4,12 @@ /// @author Jakob Erdmann /// @author Michael Behrisch /// @date Mon, 1 Jul 2002 -/// @version $Id: XMLSubSys.cpp 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: XMLSubSys.cpp 18095 2015-03-17 09:39:00Z behrisch $ /// // Utility methods for initialising, closing and using the XML-subsystem /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -47,7 +47,8 @@ // =========================================================================== std::vector XMLSubSys::myReaders; unsigned int XMLSubSys::myNextFreeReader; -bool XMLSubSys::myEnableValidation; +XERCES_CPP_NAMESPACE::SAX2XMLReader::ValSchemes XMLSubSys::myValidationScheme = XERCES_CPP_NAMESPACE::SAX2XMLReader::Val_Auto; +XERCES_CPP_NAMESPACE::SAX2XMLReader::ValSchemes XMLSubSys::myNetValidationScheme = XERCES_CPP_NAMESPACE::SAX2XMLReader::Val_Auto; // =========================================================================== @@ -65,8 +66,25 @@ void -XMLSubSys::setValidation(bool enableValidation) { - myEnableValidation = enableValidation; +XMLSubSys::setValidation(const std::string& validationScheme, const std::string& netValidationScheme) { + if (validationScheme == "never") { + myValidationScheme = XERCES_CPP_NAMESPACE::SAX2XMLReader::Val_Never; + } else if (validationScheme == "auto") { + myValidationScheme = XERCES_CPP_NAMESPACE::SAX2XMLReader::Val_Auto; + } else if (validationScheme == "always") { + myValidationScheme = XERCES_CPP_NAMESPACE::SAX2XMLReader::Val_Always; + } else { + throw ProcessError("Unknown xml validation scheme + '" + validationScheme + "'."); + } + if (netValidationScheme == "never") { + myNetValidationScheme = XERCES_CPP_NAMESPACE::SAX2XMLReader::Val_Never; + } else if (netValidationScheme == "auto") { + myNetValidationScheme = XERCES_CPP_NAMESPACE::SAX2XMLReader::Val_Auto; + } else if (netValidationScheme == "always") { + myNetValidationScheme = XERCES_CPP_NAMESPACE::SAX2XMLReader::Val_Always; + } else { + throw ProcessError("Unknown network validation scheme + '" + netValidationScheme + "'."); + } } @@ -82,7 +100,7 @@ SUMOSAXReader* XMLSubSys::getSAXReader(SUMOSAXHandler& handler) { - return new SUMOSAXReader(handler, myEnableValidation); + return new SUMOSAXReader(handler, myValidationScheme); } @@ -94,11 +112,13 @@ bool XMLSubSys::runParser(GenericSAXHandler& handler, - const std::string& file) { + const std::string& file, const bool isNet) { try { + XERCES_CPP_NAMESPACE::SAX2XMLReader::ValSchemes validationScheme = isNet ? myNetValidationScheme : myValidationScheme; if (myNextFreeReader == myReaders.size()) { - myReaders.push_back(new SUMOSAXReader(handler, myEnableValidation)); + myReaders.push_back(new SUMOSAXReader(handler, validationScheme)); } else { + myReaders[myNextFreeReader]->setValidation(validationScheme); myReaders[myNextFreeReader]->setHandler(handler); } myNextFreeReader++; @@ -108,12 +128,16 @@ handler.setFileName(prevFile); myNextFreeReader--; } catch (ProcessError& e) { - if (std::string(e.what()) != std::string("Process Error") && std::string(e.what()) != std::string("")) { - WRITE_ERROR(e.what()); - } + WRITE_ERROR(std::string(e.what()) != std::string("") ? std::string(e.what()) : std::string("Process Error")); + return false; + } catch (const std::runtime_error& re) { + WRITE_ERROR("Runtime error: " + std::string(re.what()) + " while parsing '" + file + "'"); + return false; + } catch (const std::exception& ex) { + WRITE_ERROR("Error occurred: " + std::string(ex.what()) + " while parsing '" + file + "'"); return false; } catch (...) { - WRITE_ERROR("An error occured."); + WRITE_ERROR("Unspecified error occured wile parsing '" + file + "'"); return false; } return !MsgHandler::getErrorInstance()->wasInformed(); diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/XMLSubSys.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/XMLSubSys.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/utils/xml/XMLSubSys.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/utils/xml/XMLSubSys.h 2015-04-17 00:20:29.000000000 +0000 @@ -3,12 +3,12 @@ /// @author Daniel Krajzewicz /// @author Michael Behrisch /// @date Mon, 1 Jul 2002 -/// @version $Id: XMLSubSys.h 14425 2013-08-16 20:11:47Z behrisch $ +/// @version $Id: XMLSubSys.h 18095 2015-03-17 09:39:00Z behrisch $ /// // Utility methods for initialising, closing and using the XML-subsystem /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -32,6 +32,7 @@ #endif #include +#include // =========================================================================== @@ -87,9 +88,10 @@ * * The setting is only valid for parsers created after the call. Existing parsers are not adapted. * - * @param[in] enableValidation Whether validation of XML-documents against schemata shall be enabled + * @param[in] validationScheme Whether validation of XML-documents against schemata shall be enabled + * @param[in] netValidationScheme Whether validation of SUMO networks against schemata shall be enabled */ - static void setValidation(bool enableValidation); + static void setValidation(const std::string& validationScheme, const std::string& netValidationScheme); /** @@ -138,11 +140,12 @@ * of the MsgHandler. * * @param[in] handler The handler to assign to the built reader - * @param[in] file The file to run the parser at + * @param[in] file The file to run the parser at + * @param[in] isNet whether a network gets loaded * @return true if the parsing was done without errors, false otherwise (error was printed) */ static bool runParser(GenericSAXHandler& handler, - const std::string& file); + const std::string& file, const bool isNet = false); private: @@ -153,7 +156,10 @@ static unsigned int myNextFreeReader; /// @brief Information whether built reader/parser shall validate XML-documents against schemata - static bool myEnableValidation; + static XERCES_CPP_NAMESPACE::SAX2XMLReader::ValSchemes myValidationScheme; + + /// @brief Information whether built reader/parser shall validate SUMO networks against schemata + static XERCES_CPP_NAMESPACE::SAX2XMLReader::ValSchemes myNetValidationScheme; }; diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/windows_config.h sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/windows_config.h --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/src/windows_config.h 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/src/windows_config.h 2015-04-17 00:20:29.000000000 +0000 @@ -5,13 +5,14 @@ /// @author Axel Wegener /// @author Michael Behrisch /// @author Felix Brack +/// @author Jakob Erdmann /// @date Mon, 17 Dec 2001 -/// @version $Id: windows_config.h 14496 2013-08-26 19:45:36Z behrisch $ +/// @version $Id: windows_config.h 18177 2015-03-30 21:32:20Z behrisch $ /// // The general windows configuration file /****************************************************************************/ -// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors +// SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +// Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors /****************************************************************************/ // // This file is part of SUMO. @@ -45,6 +46,9 @@ /* Define for dynamic Fox linkage */ #define FOXDLL 1 +/* Define if FOX toolkit is present. */ +#define HAVE_FOX 1 + /* defines the precision of floats */ #define SUMOReal double @@ -52,10 +56,10 @@ #define SUMOLong long long /* defines the epsilon to use on position comparison */ -#define POSITION_EPS 0.1 +#define POSITION_EPS (SUMOReal)0.1 /* defines the epsilon to use on general floating point comparison */ -#define NUMERICAL_EPS 0.001 +#define NUMERICAL_EPS (SUMOReal)0.001 /* defines the number of digits after the comma in output */ #define OUTPUT_ACCURACY 2 @@ -68,7 +72,7 @@ /* Version number of package */ #ifndef HAVE_VERSION_H -#define VERSION_STRING "0.18.0" +#define VERSION_STRING "0.23.0" #endif /* Define if junction internal lanes should be used. */ diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/10to11.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/10to11.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/10to11.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/10to11.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -#!/usr/bin/env python -""" -@file 10to11.py -@author Michael Behrisch -@date 2009-06-09 -@version $Id: 10to11.py 14425 2013-08-16 20:11:47Z behrisch $ - -Transfers configuration files from character data to attribute style. - -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2009-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved -""" -import os, sys, re - -from xml.sax import make_parser, handler -from optparse import OptionParser - -class ConfigReader(handler.ContentHandler): - - def __init__(self): - self._parent = None - self._parentWritten = "" - self._element = None - self._string = '' - - def startElement(self, name, attrs): - self._parent = self._element - self._element = name - self._string = '' - - def characters(self, content): - self._string += content - - def endElement(self, name): - if self._parent == name: - print ' ' % name - self._parentWritten = "" - elif self._element == name: - if not self._parentWritten: - print ' <%s>' % self._parent - self._parentWritten = self._parent - print ' <%s value="%s"/>' % (self._element, self._string) - self._element = self._parent - - def startDocument(self): - print '' - - def endDocument(self): - if self._parentWritten: - print ' ' % self._parentWritten - print '' - -optParser = OptionParser(usage="usage: %prog +") -(options, args) = optParser.parse_args() -if len(args) == 0: - optParser.print_help() - sys.exit() -for f in args: - parser = make_parser() - parser.setContentHandler(ConfigReader()) - parser.parse(f) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/Assignment.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/Assignment.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/Assignment.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/Assignment.py 2015-04-17 00:20:29.000000000 +0000 @@ -1,10 +1,11 @@ #!/usr/bin/env python """ @file Assignment.py -@author Yun-Pang Wang +@author Jakob Erdmann +@author Yun-Pang Floetteroed @author Michael Behrisch @date 2008-03-28 -@version $Id: Assignment.py 14425 2013-08-16 20:11:47Z behrisch $ +@version $Id: Assignment.py 18096 2015-03-17 09:50:59Z behrisch $ This script is for executing the traffic assignment. Three assignment models are available: @@ -14,12 +15,23 @@ The c-logit model are set as default. -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2008-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os, random, string, sys, datetime, math, operator +import os +import random +import string +import sys +import datetime +import math +import operator from xml.sax import saxutils, make_parser, handler from optparse import OptionParser from elements import Predecessor, Vertex, Edge, Path, Vehicle @@ -36,7 +48,7 @@ def initLinkChoiceMap(net, startVertices, endVertices, matrixPshort, linkChoiceMap, odPairsMap): odpairCounts = 0 for start, startVertex in enumerate(startVertices): - odPairsMap[startVertex.label]= {} + odPairsMap[startVertex.label] = {} for end, endVertex in enumerate(endVertices): if startVertex.label != endVertex.label and matrixPshort[start][end] > 0.: odpairCounts += 1 @@ -49,16 +61,19 @@ return linkChoiceMap + def main(): # for measuring the required time for reading input files inputreaderstart = datetime.datetime.now() foutlog = file('%s_log.txt' % options.type, 'w') - foutlog.write('The stochastic user equilibrium traffic assignment will be executed with the %s model.\n' % options.type) - foutlog.write('All vehicular releasing times are determined randomly(uniform).\n') - + foutlog.write( + 'The stochastic user equilibrium traffic assignment will be executed with the %s model.\n' % options.type) + foutlog.write( + 'All vehicular releasing times are determined randomly(uniform).\n') + matrices = options.mtxpsfile.split(",") parser = make_parser() - + if options.verbose: print "Reading net" print 'net file:', options.netfile @@ -77,11 +92,11 @@ if options.curvefile: updateCurveTable(options.curvefile) - + if options.hours == 24.: assignHours = 16. else: - assignHours = options.hours + assignHours = options.hours for edge in net.getEdges(): if edge._lanes: @@ -95,16 +110,16 @@ if options.verbose: print "after link reduction:", net.getfullEdgeCounts(), "edges read" - # calculate link travel time for all district connectors + # calculate link travel time for all district connectors getConnectionTravelTime(net._startVertices, net._endVertices) - + foutlog.write('- Initial calculation of link parameters : done.\n') - # the required time for reading the network + # the required time for reading the network timeForInput(inputreaderstart) - + if options.debug: outputNetwork(net) - + # initialize the map for recording the number of the assigned vehicles AssignedVeh = {} # initialize the map for recording the number of the assigned trips @@ -113,26 +128,26 @@ linkChoiceMap = {} odPairsMap = {} for start, startVertex in enumerate(net._startVertices): - AssignedVeh[startVertex]={} - AssignedTrip[startVertex]={} + AssignedVeh[startVertex] = {} + AssignedTrip[startVertex] = {} smallDemand.append([]) for end, endVertex in enumerate(net._endVertices): AssignedVeh[startVertex][endVertex] = 0 AssignedTrip[startVertex][endVertex] = 0. smallDemand[-1].append(0.) - + # initialization vehID = 0 matrixSum = 0.0 lohse = (options.type == "lohse") incremental = (options.type == "incremental") checkKPaths = False - + if not incremental and options.kPaths > 1: checkKPaths = True if not incremental: net.initialPathSet() - + starttime = datetime.datetime.now() # initialize the file for recording the routes if options.odestimation: @@ -140,38 +155,46 @@ else: foutroute = open('routes.rou.xml', 'w') print >> foutroute, """ - + """ % starttime - - for counter, matrix in enumerate(matrices): #for counter in range (0, len(matrices)): - # delete all vehicle information related to the last matrix for saving the disk space + + # for counter in range (0, len(matrices)): + for counter, matrix in enumerate(matrices): + # delete all vehicle information related to the last matrix for saving + # the disk space vehicles = [] iterInterval = 0 - matrixPshort, startVertices, endVertices, CurrentMatrixSum, begintime, assignPeriod, Pshort_EffCells, matrixSum, smallDemandRatio = getMatrix(net, options.verbose, matrix, matrixSum, options.demandscale) + matrixPshort, startVertices, endVertices, CurrentMatrixSum, begintime, assignPeriod, Pshort_EffCells, matrixSum, smallDemandRatio = getMatrix( + net, options.verbose, matrix, matrixSum, options.demandscale) options.hours = float(assignPeriod) - smallDemandPortion = math.ceil(float(options.maxiteration)/2. * smallDemandRatio) + smallDemandPortion = math.ceil( + float(options.maxiteration) / 2. * smallDemandRatio) if float(smallDemandPortion) != 0.: - iterInterval = math.ceil(float(options.maxiteration) / float(smallDemandPortion)) - + iterInterval = math.ceil( + float(options.maxiteration) / float(smallDemandPortion)) + departtime = begintime * 3600 - + if options.verbose: print 'the analyzed matrices:', counter print 'Begintime:', begintime, "O'Clock" print 'departtime', departtime print 'Matrix und OD Zone already read for Interval', counter print 'CurrentMatrixSum:', CurrentMatrixSum - + foutlog.write('Reading matrix and O-D zones: done.\n') - foutlog.write('Matrix und OD Zone already read for Interval:%s\n' %counter) - foutlog.write('CurrentMatrixSum:%s\n' %CurrentMatrixSum) - foutlog.write('number of current startVertices:%s\n' %len(startVertices)) - foutlog.write('number of current endVertices:%s\n' %len(endVertices)) - + foutlog.write( + 'Matrix und OD Zone already read for Interval:%s\n' % counter) + foutlog.write('CurrentMatrixSum:%s\n' % CurrentMatrixSum) + foutlog.write('number of current startVertices:%s\n' % + len(startVertices)) + foutlog.write('number of current endVertices:%s\n' % len(endVertices)) + if options.odestimation: linkChoiceMap.clear() odPairsMap.clear() - linkChoiceMap = initLinkChoiceMap(net, startVertices, endVertices, matrixPshort, linkChoiceMap, odPairsMap) + linkChoiceMap = initLinkChoiceMap( + net, startVertices, endVertices, matrixPshort, linkChoiceMap, odPairsMap) for edge in net.getEdges(): edge.flow = 0. @@ -182,24 +205,28 @@ edge.TT = 0. edge.delta = 0. edge.helpacttimeEx = 0. - - # the number of origins, the umber of destinations and the number of the OD pairs + + # the number of origins, the umber of destinations and the number of + # the OD pairs origins = len(startVertices) dests = len(endVertices) ODpairs = origins * dests - - # output the origin and destination zones and the number of effective OD pairs + + # output the origin and destination zones and the number of effective + # OD pairs if options.debug: - outputODZone(startVertices, endVertices, Pshort_EffCells, counter) # matrixCounter) - + # matrixCounter) + outputODZone(startVertices, endVertices, Pshort_EffCells, counter) + if incremental: print 'begin the incremental assignment!' iter = 0 options.lamda = 0. while iter < options.maxiteration: - foutlog.write('- Current iteration(not executed yet):%s\n' %iter) + foutlog.write( + '- Current iteration(not executed yet):%s\n' % iter) iter += 1 - if iterInterval != 0 and operator.mod(iter,iterInterval) == 0: + if iterInterval != 0 and operator.mod(iter, iterInterval) == 0: assignSmallDemand = True else: assignSmallDemand = False @@ -207,22 +234,24 @@ targets = set() for end, endVertex in enumerate(endVertices): if assignSmallDemand and matrixPshort[start][end] > 0. and matrixPshort[start][end] < 1.: - smallDemand[start][end] = matrixPshort[start][end]/float(smallDemandPortion) - + smallDemand[start][end] = matrixPshort[ + start][end] / float(smallDemandPortion) + if matrixPshort[start][end] > 1. or (assignSmallDemand and smallDemand[start][end] > 0.): targets.add(endVertex) if len(targets) > 0: if options.dijkstra == 'boost': - D,P = dijkstraBoost(net._boostGraph, startVertex.boost) + D, P = dijkstraBoost( + net._boostGraph, startVertex.boost) elif options.dijkstra == 'plain': - D,P = dijkstraPlain(startVertex, targets) + D, P = dijkstraPlain(startVertex, targets) elif options.dijkstra == 'extend': - D,P = dijkstra(startVertex, targets) + D, P = dijkstra(startVertex, targets) vehID, smallDemand, linkChoiceMap = doIncAssign( - net, vehicles, options.verbose, options.maxiteration, options.odestimation, - endVertices, start, startVertex, matrixPshort, smallDemand, - D, P, AssignedVeh, AssignedTrip, vehID, assignSmallDemand, linkChoiceMap, odPairsMap) + net, vehicles, options.verbose, options.maxiteration, options.odestimation, + endVertices, start, startVertex, matrixPshort, smallDemand, + D, P, AssignedVeh, AssignedTrip, vehID, assignSmallDemand, linkChoiceMap, odPairsMap) if options.dijkstra != 'extend': linkMap = net._fullEdges @@ -241,67 +270,82 @@ first = True # begin the traffic Assignment while newRoutes > 0: - foutlog.write('- SUE iteration:%s\n' %iter_outside) - # Generate the effective routes als intital path solutions, when considering k shortest paths (k is defined by the user.) + foutlog.write('- SUE iteration:%s\n' % iter_outside) + # Generate the effective routes als intital path solutions, + # when considering k shortest paths (k is defined by the user.) if checkKPaths: - checkPathStart = datetime.datetime.now() - newRoutes = net.calcKPaths(options.verbose, options.kPaths, newRoutes, startVertices, endVertices, matrixPshort, options.gamma) + checkPathStart = datetime.datetime.now() + newRoutes = net.calcKPaths( + options.verbose, options.kPaths, newRoutes, startVertices, endVertices, matrixPshort, options.gamma) checkPathEnd = datetime.datetime.now() - checkPathStart - foutlog.write('- Time for finding the k-shortest paths: %s\n' %checkPathEnd) - foutlog.write('- Finding the k-shortest paths for each OD pair: done.\n') + foutlog.write( + '- Time for finding the k-shortest paths: %s\n' % checkPathEnd) + foutlog.write( + '- Finding the k-shortest paths for each OD pair: done.\n') if options.verbose: print 'iter_outside:', iter_outside - print 'number of k shortest paths:', options.kPaths + print 'number of k shortest paths:', options.kPaths print 'number of new routes:', newRoutes - + elif not checkKPaths and iter_outside == 1 and counter == 0: print 'search for the new path' - newRoutes = net.findNewPath(startVertices, endVertices, newRoutes, matrixPshort, options.gamma, lohse, options.dijkstra) - + newRoutes = net.findNewPath( + startVertices, endVertices, newRoutes, matrixPshort, options.gamma, lohse, options.dijkstra) + checkKPaths = False - + if options.verbose: print 'iter_outside:', iter_outside print 'number of new routes:', newRoutes - + stable = False iter_inside = 1 while not stable: if options.verbose: print 'iter_inside:', iter_inside - stable = doSUEAssign(net, options, startVertices, endVertices, matrixPshort, iter_inside, lohse, first) - # The matrixPlong and the matrixTruck should be added when considering the long-distance trips and the truck trips. + stable = doSUEAssign( + net, options, startVertices, endVertices, matrixPshort, iter_inside, lohse, first) + # The matrixPlong and the matrixTruck should be added when + # considering the long-distance trips and the truck trips. if lohse: - stable = doLohseStopCheck(net, options, stable, iter_inside, options.maxiteration, foutlog) + stable = doLohseStopCheck( + net, options, stable, iter_inside, options.maxiteration, foutlog) iter_inside += 1 - + if options.verbose: print 'stable:', stable - - newRoutes = net.findNewPath(startVertices, endVertices, newRoutes, matrixPshort, options.gamma, lohse, options.dijkstra) - first = False + newRoutes = net.findNewPath( + startVertices, endVertices, newRoutes, matrixPshort, options.gamma, lohse, options.dijkstra) + + first = False iter_outside += 1 - - if newRoutes < 3 and iter_outside > int((options.maxiteration)/2): + + if newRoutes < 3 and iter_outside > int((options.maxiteration) / 2): newRoutes = 0 - + if iter_outside > options.maxiteration: print 'The max. number of iterations is reached!' - foutlog.write('The max. number of iterations is reached!\n') - foutlog.write('The number of new routes and the parameter stable will be set to zero and True respectively.\n') - print 'newRoutes:', newRoutes + foutlog.write( + 'The max. number of iterations is reached!\n') + foutlog.write( + 'The number of new routes and the parameter stable will be set to zero and True respectively.\n') + print 'newRoutes:', newRoutes stable = True newRoutes = 0 - - # update the path choice probability and the path flows as well as generate vehicle data - vehID = doSUEVehAssign(net, vehicles, options, counter, matrixPshort, startVertices, endVertices, AssignedVeh, AssignedTrip, vehID, lohse) - # output the generated vehicular releasing times and routes, based on the current matrix - print 'done with the assignment' # debug + # update the path choice probability and the path flows as well as + # generate vehicle data + vehID = doSUEVehAssign(net, vehicles, options, counter, matrixPshort, + startVertices, endVertices, AssignedVeh, AssignedTrip, vehID, lohse) + + # output the generated vehicular releasing times and routes, based on + # the current matrix + print 'done with the assignment' # debug if options.odestimation: - linkChoicesOutput(net, startVertices, endVertices, matrixPshort, linkChoiceMap, odPairsMap, options.outputdir, starttime) + linkChoicesOutput(net, startVertices, endVertices, matrixPshort, + linkChoiceMap, odPairsMap, options.outputdir, starttime) else: sortedVehOutput(vehicles, departtime, options, foutroute) @@ -311,8 +355,9 @@ # output the global performance indices assigntime = outputStatistics(net, starttime, len(matrices)) - - foutlog.write('- Assignment is completed and all required information is generated. ') + + foutlog.write( + '- Assignment is completed and all required information is generated. ') foutlog.close() if options.verbose: @@ -321,18 +366,18 @@ print 'Total number of the assigned trips:', matrixSum optParser = OptionParser() -optParser.add_option("-m", "--matrix-file", dest="mtxpsfile", +optParser.add_option("-m", "--matrix-file", dest="mtxpsfile", help="read OD matrix for passenger vehicles from FILE (mandatory)", metavar="FILE") -optParser.add_option("-G", "--globalmatrix-file", dest="glbmtxfile", +optParser.add_option("-G", "--globalmatrix-file", dest="glbmtxfile", help="read daily OD matrix for passenger vehicles from FILE (mandatory)", metavar="FILE") -optParser.add_option("-n", "--net-file", dest="netfile", +optParser.add_option("-n", "--net-file", dest="netfile", help="read SUMO network from FILE (mandatory)", metavar="FILE") optParser.add_option("-d", "--district-file", dest="confile", - help="read OD Zones from FILE (mandatory)", metavar="FILE") + help="read OD Zones from FILE (mandatory)", metavar="FILE") optParser.add_option("-s", "--extrasignal-file", dest="sigfile", help="read extra/updated signal timing plans from FILE", metavar="FILE") optParser.add_option("-u", "--crCurve-file", dest="curvefile", - help="read parameters used in cost functions from FILE", metavar="FILE") + help="read parameters used in cost functions from FILE", metavar="FILE") optParser.add_option("-k", "--k-shortest-paths", dest="kPaths", type="int", default=8, help="number of the paths should be found at the first iteration") optParser.add_option("-i", "--max-sue-iteration", dest="maxiteration", type="int", @@ -370,14 +415,15 @@ default="clogit", help="type of assignment [default: %default]") optParser.add_option("-H", "--hours", dest="hours", type="float", default=1., help="the analysing period(hours)") -optParser.add_option("-r", "--profile", action="store_true", dest="profile", +optParser.add_option("-r", "--profile", action="store_true", dest="profile", default=False, help="writing profiling info") optParser.add_option("-+", "--dijkstra", dest="dijkstra", type="choice", choices=('extend', 'plain', 'boost'), default="plain", help="use penalty, plain(original) or boost in dijkstra implementation [default: %default]") optParser.add_option("-x", "--odestimation", action="store_true", dest="odestimation", default=False, help="generate trips for OD estimation") -optParser.add_option("-f", "--scale-factor", dest="demandscale", type="float", default=1., help="scale demand by ") +optParser.add_option("-f", "--scale-factor", dest="demandscale", + type="float", default=1., help="scale demand by ") optParser.add_option("-O", "--output-dir", dest="outputdir", default=os.getcwd(), help="define the output directory name and path") (options, args) = optParser.parse_args() @@ -387,7 +433,8 @@ sys.exit() if options.profile: - import hotshot, hotshot.stats + import hotshot + import hotshot.stats hotshotFile = "hotshot_%s_stats" % options.type prof = hotshot.Profile(hotshotFile) prof.runcall(main) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/assign.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/assign.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/assign.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/assign.py 2015-04-17 00:20:29.000000000 +0000 @@ -1,24 +1,31 @@ """ @file assign.py -@author Yun-Pang Wang +@author Yun-Pang Floetteroed @author Daniel Krajzewicz @author Michael Behrisch @date 2007-11-25 -@version $Id: assign.py 14425 2013-08-16 20:11:47Z behrisch $ +@version $Id: assign.py 18096 2015-03-17 09:50:59Z behrisch $ This script is for executing traffic assignment according to the required assignment model. The incremental assignment model, the C-Logit assignment model and the Lohse assignment model are included in this script. -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2008-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import math, operator +import math +import operator import elements from elements import Vertex, Edge, Path, Vehicle from network import Net + def doIncAssign(net, vehicles, verbose, iteration, odestimation, endVertices, start, startVertex, matrixPshort, smallDemand, D, P, AssignedVeh, AssignedTrip, vehID, assignSmallDemand, linkChoiceMap, odPairsMap): for end, endVertex in enumerate(endVertices): @@ -27,12 +34,13 @@ getlinkChoices = True if startVertex._id != endVertex._id and getlinkChoices: - # if matrixPling and the matrixTruck exist, matrixPlong[start][end] > 0.0 or matrixTruck[start][end] > 0.0): should be added. + # if matrixPling and the matrixTruck exist, matrixPlong[start][end] + # > 0.0 or matrixTruck[start][end] > 0.0): should be added. helpPath = [] vertex = endVertex demand = 0. if matrixPshort[start][end] > 1. or odestimation: - demand = matrixPshort[start][end]/float(iteration) + demand = matrixPshort[start][end] / float(iteration) if assignSmallDemand and not odestimation: demand += smallDemand[start][end] @@ -47,74 +55,87 @@ vertex = P[vertex].source helpPath.reverse() - # the amount of the pathflow, which will be released at this iteration + # the amount of the pathflow, which will be released at this + # iteration if assignSmallDemand: smallDemand[start][end] = 0. if not odestimation: AssignedTrip[startVertex][endVertex] += demand - vehID = assignVeh(verbose, vehicles, startVertex, endVertex, helpPath, AssignedVeh, AssignedTrip, vehID) + vehID = assignVeh( + verbose, vehicles, startVertex, endVertex, helpPath, AssignedVeh, AssignedTrip, vehID) return vehID, smallDemand, linkChoiceMap # execute the SUE model with the given path set -def doSUEAssign(net, options, startVertices, endVertices, matrixPshort, iter, lohse, first): + + +def doSUEAssign(net, options, startVertices, endVertices, matrixPshort, iter, lohse, first): if lohse: if options.verbose: foutassign = file('lohse_pathSet.txt', 'a') - foutassign.write('\niter:%s\n' %iter) + foutassign.write('\niter:%s\n' % iter) # matrixPlong and matrixTruck should be added if available. if options.verbose: print 'pathNum in doSUEAssign:', elements.pathNum - # calculate the overlapping factors between any two paths of a given OD pair - for start, startVertex in enumerate(startVertices): + # calculate the overlapping factors between any two paths of a given OD + # pair + for start, startVertex in enumerate(startVertices): for end, endVertex in enumerate(endVertices): cumulatedflow = 0. - pathcount = 0 + pathcount = 0 if matrixPshort[start][end] > 0. and startVertex._id != endVertex._id: ODPaths = net._paths[startVertex][endVertex] - + for path in ODPaths: path.getPathTimeUpdate() calCommonalityAndChoiceProb(ODPaths, options.alpha, lohse) - - # calculate the path choice probabilities and the path flows for the given OD Pair + + # calculate the path choice probabilities and the path flows + # for the given OD Pair for path in ODPaths: pathcount += 1 if pathcount < len(ODPaths): - path.helpflow = matrixPshort[start][end] * path.choiceprob + path.helpflow = matrixPshort[ + start][end] * path.choiceprob cumulatedflow += path.helpflow if lohse and options.verbose: foutassign.write(' path:%s\n' % path.label) - foutassign.write(' path.choiceprob:%s\n' % path.choiceprob) - foutassign.write(' path.helpflow:%s\n' % path.helpflow) - foutassign.write(' cumulatedflow:%s\n' % cumulatedflow) + foutassign.write( + ' path.choiceprob:%s\n' % path.choiceprob) + foutassign.write( + ' path.helpflow:%s\n' % path.helpflow) + foutassign.write( + ' cumulatedflow:%s\n' % cumulatedflow) else: - path.helpflow = matrixPshort[start][end] - cumulatedflow + path.helpflow = matrixPshort[ + start][end] - cumulatedflow if lohse and options.verbose: - foutassign.write(' last_path.helpflow:%s\n' % path.helpflow) + foutassign.write( + ' last_path.helpflow:%s\n' % path.helpflow) if first and iter == 1: for edge in path.edges: edge.flow += path.helpflow else: for edge in path.edges: edge.helpflow += path.helpflow - + # Reset the convergence index for the C-Logit model notstable = 0 stable = False - # link travel times and link flows will be updated according to the latest traffic assingment + # link travel times and link flows will be updated according to the latest + # traffic assingment for edge in net._edges: if (first and iter > 1) or (not first): exflow = edge.flow - edge.flow = edge.flow + (1./iter)*(edge.helpflow - edge.flow) - + edge.flow = edge.flow + (1. / iter) * (edge.helpflow - edge.flow) + if not lohse: if edge.flow > 0.: - if abs(edge.flow-exflow)/edge.flow > options.sueTolerance: + if abs(edge.flow - exflow) / edge.flow > options.sueTolerance: notstable += 1 elif edge.flow == 0.: - if exflow != 0. and (abs(edge.flow-exflow)/exflow > options.sueTolerance): + if exflow != 0. and (abs(edge.flow - exflow) / exflow > options.sueTolerance): notstable += 1 elif edge.flow < 0.: notstable += 1 @@ -131,32 +152,36 @@ notstable += 1 if lohse and options.verbose: foutassign.close() - + if not lohse and iter > 5: if notstable == 0: - stable = True - elif notstable < math.ceil(net.geteffEdgeCounts()*0.005) or notstable < 3: stable = True - + elif notstable < math.ceil(net.geteffEdgeCounts() * 0.005) or notstable < 3: + stable = True + if iter > options.maxiteration: stable = True print 'Number of max. iterations is reached!' print 'stable:', stable - + return stable # calculate the commonality factors in the C-Logit model + + def calCommonalityAndChoiceProb(ODPaths, alpha, lohse): if len(ODPaths) > 1: for path in ODPaths: if not lohse: - path.utility = path.actpathtime + alpha * math.log(path.sumOverlap) + path.utility = path.actpathtime + \ + alpha * math.log(path.sumOverlap) else: - path.utility = path.pathhelpacttime + alpha * math.log(path.sumOverlap) - + path.utility = path.pathhelpacttime + \ + alpha * math.log(path.sumOverlap) + if lohse: minpath = min(ODPaths, key=operator.attrgetter('pathhelpacttime')) - beta = 12./(1.+ math.exp(0.7 - 0.015 * minpath.pathhelpacttime)) + beta = 12. / (1. + math.exp(0.7 - 0.015 * minpath.pathhelpacttime)) else: theta = getThetaForCLogit(ODPaths) @@ -165,17 +190,24 @@ for pathtwo in ODPaths: if pathone != pathtwo: if not lohse: - sum_exputility += math.exp(theta*(pathone.utility - pathtwo.utility)) + sum_exputility += math.exp(theta * + (pathone.utility - pathtwo.utility)) else: - pathtwoPart = beta*(pathtwo.utility/minpath.utility -1.) - pathonePart = beta*(pathone.utility/minpath.utility -1.) - sum_exputility += math.exp(-(pathtwoPart*pathtwoPart)+ pathonePart*pathonePart) - pathone.choiceprob = 1./(1. + sum_exputility) + pathtwoPart = beta * \ + (pathtwo.utility / minpath.utility - 1.) + pathonePart = beta * \ + (pathone.utility / minpath.utility - 1.) + sum_exputility += math.exp(-(pathtwoPart * + pathtwoPart) + pathonePart * pathonePart) + pathone.choiceprob = 1. / (1. + sum_exputility) else: for path in ODPaths: path.choiceprob = 1. - -# calculate the path choice probabilities and the path flows and generate the vehicular data for each OD Pair + +# calculate the path choice probabilities and the path flows and generate +# the vehicular data for each OD Pair + + def doSUEVehAssign(net, vehicles, options, counter, matrixPshort, startVertices, endVertices, AssignedVeh, AssignedTrip, vehID, lohse): if options.verbose: if counter == 0: @@ -185,119 +217,132 @@ foutpath = file('paths.txt', 'a') fouterror = file('errors.txt', 'a') if lohse: - foutpath.write('begin the doSUEVehAssign based on the lohse assignment model!') + foutpath.write( + 'begin the doSUEVehAssign based on the lohse assignment model!') else: - foutpath.write('begin the doSUEVehAssign based on the c-logit model!') - foutpath.write('the analyzed matrix=%s' %counter) - + foutpath.write( + 'begin the doSUEVehAssign based on the c-logit model!') + foutpath.write('the analyzed matrix=%s' % counter) + TotalPath = 0 for start, startVertex in enumerate(startVertices): if options.verbose: - foutpath.write('\norigin=%s, ' %startVertex) + foutpath.write('\norigin=%s, ' % startVertex) for end, endVertex in enumerate(endVertices): pathcount = 0 cumulatedflow = 0. if matrixPshort[start][end] > 0. and startVertex._id != endVertex._id: if options.verbose: - foutpath.write('destination=%s' %endVertex) + foutpath.write('destination=%s' % endVertex) ODPaths = net._paths[startVertex][endVertex] - + for path in ODPaths: TotalPath += 1 path.getPathTimeUpdate() - if lohse: + if lohse: path.pathhelpacttime = path.actpathtime - + calCommonalityAndChoiceProb(ODPaths, options.alpha, lohse) - + for path in ODPaths: pathcount += 1 if pathcount < len(ODPaths): - path.pathflow = matrixPshort[start][end] * path.choiceprob + path.pathflow = matrixPshort[ + start][end] * path.choiceprob cumulatedflow += path.pathflow else: - path.pathflow = matrixPshort[start][end] - cumulatedflow + path.pathflow = matrixPshort[ + start][end] - cumulatedflow if options.verbose and path.pathflow < 0.: - fouterror.write('*********************** the path flow on the path:%s < 0.!!' %path.label) + fouterror.write( + '*********************** the path flow on the path:%s < 0.!!' % path.label) if options.verbose: - foutpath.write('\npathID= %s, path flow=%4.4f, actpathtime=%4.4f, choiceprob=%4.4f, edges=' - %(path.label, path.pathflow, path.actpathtime, path.choiceprob)) + foutpath.write('\npathID= %s, path flow=%4.4f, actpathtime=%4.4f, choiceprob=%4.4f, edges=' + % (path.label, path.pathflow, path.actpathtime, path.choiceprob)) for item in path.edges: - foutpath.write('%s, ' %(item._id)) - + foutpath.write('%s, ' % (item._id)) + AssignedTrip[startVertex][endVertex] += path.pathflow edges = [] for link in path.edges: edges.append(link) - vehID = assignVeh(options.verbose, vehicles, startVertex, endVertex, edges, AssignedVeh, AssignedTrip, vehID) + vehID = assignVeh( + options.verbose, vehicles, startVertex, endVertex, edges, AssignedVeh, AssignedTrip, vehID) if options.verbose: foutpath.write('\n') if options.verbose: - print 'total Number of the used paths for the current matrix:', TotalPath - foutpath.write('\ntotal Number of the used paths for the current matrix:%s' %TotalPath) + print 'total Number of the used paths for the current matrix:', TotalPath + foutpath.write( + '\ntotal Number of the used paths for the current matrix:%s' % TotalPath) foutpath.close() fouterror.close() return vehID - + def assignVeh(verbose, vehicles, startVertex, endVertex, edges, AssignedVeh, AssignedTrip, vehID): while AssignedVeh[startVertex][endVertex] < int(round(AssignedTrip[startVertex][endVertex])): vehID += 1 newVehicle = Vehicle(str(vehID)) newVehicle.route = edges vehicles.append(newVehicle) - + AssignedVeh[startVertex][endVertex] += 1 if verbose: print 'vehID:', vehID print 'AssignedTrip[start][end]', AssignedTrip[startVertex][endVertex] print 'AssignedVeh[start][end]', AssignedVeh[startVertex][endVertex] - + return vehID + def getThetaForCLogit(ODPaths): sum = 0. diff = 0. minpath = min(ODPaths, key=operator.attrgetter('actpathtime')) - + for path in ODPaths: sum += path.actpathtime - + meanpathtime = sum / float(len(ODPaths)) - + for path in ODPaths: diff += (path.actpathtime - meanpathtime)**2. - sdpathtime = (diff/float(len(ODPaths)))**0.5 + sdpathtime = (diff / float(len(ODPaths)))**0.5 if sdpathtime > 0.04: - theta = math.pi / (pow(6.,0.5) * sdpathtime * minpath.actpathtime) + theta = math.pi / (pow(6., 0.5) * sdpathtime * minpath.actpathtime) else: theta = 1. return theta - + + def doLohseStopCheck(net, options, stable, iter, maxIter, foutlog): stable = False - if iter > 1 : # Check if the convergence reaches. - counts = 0 + # Check if the convergence reaches. + if iter > 1: + counts = 0 for edge in net._edges.itervalues(): stop = edge.stopCheck(options) - if stop: + if stop: counts += 1 if counts == net.geteffEdgeCounts(): stable = True - foutlog.write('The defined convergence is reached. The number of the required iterations:%s\n' %iter) - elif counts < int(net.geteffEdgeCounts()*0.05) and float(iter) > options.maxiteration*0.85: + foutlog.write( + 'The defined convergence is reached. The number of the required iterations:%s\n' % iter) + elif counts < int(net.geteffEdgeCounts() * 0.05) and float(iter) > options.maxiteration * 0.85: stable = True - foutlog.write('The number of the links with convergence is 95% of the total links. The number of executed iterations:%s\n' %iter) + foutlog.write( + 'The number of the links with convergence is 95% of the total links. The number of executed iterations:%s\n' % iter) if iter >= maxIter: print 'The max. number of iterations is reached!' - foutlog.write('The max. number(%s) of iterations is reached!\n' %iter) - foutlog.write('The number of new routes will be set to 0, since the max. number of iterations is reached.') + foutlog.write('The max. number(%s) of iterations is reached!\n' % iter) + foutlog.write( + 'The number of new routes will be set to 0, since the max. number of iterations is reached.') stable = True print 'stop?:', stable print 'iter_inside:', iter - return stable \ No newline at end of file + return stable diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/cadytsIterate.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/cadytsIterate.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/cadytsIterate.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/cadytsIterate.py 2015-04-17 00:20:29.000000000 +0000 @@ -2,24 +2,36 @@ # -*- coding: utf-8 -*- """ @file cadytsIterate.py -@author Yun-Pang Wang +@author Jakob Erdmann +@author Yun-Pang Floetteroed @author Daniel Krajzewicz @author Michael Behrisch @date 2010-09-15 -@version $Id: cadytsIterate.py 14425 2013-08-16 20:11:47Z behrisch $ +@version $Id: cadytsIterate.py 18096 2015-03-17 09:50:59Z behrisch $ Run cadyts to calibrate the simulation with given routes and traffic measurements. Respective traffic zones information has to exist in the given route files. -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2008-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os, sys, subprocess, types +import os +import sys +import subprocess +import types from datetime import datetime from optparse import OptionParser from duaIterate import call, writeSUMOConf, addGenericOptions +sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) +import sumolib + def initOptions(): optParser = OptionParser() @@ -30,27 +42,29 @@ optParser.add_option("-d", "--detector-values", dest="detvals", help="adapt to the flow on the given edges", metavar="FILE") optParser.add_option("-c", "--classpath", dest="classpath", - default=os.path.join(os.path.dirname(sys.argv[0]), "..", "contributed", "calibration", "cadytsSumoController.jar"), + default=os.path.join(os.path.dirname( + sys.argv[0]), "..", "contributed", "calibration", "cadytsSumoController.jar"), help="classpath for the calibrator [default: %default]") optParser.add_option("-l", "--last-calibration-step", dest="calibStep", type="int", default=100, help="last step of the calibration [default: %default]") - optParser.add_option("-S", "--demandscale", dest="demandscale", type="float", default=2., help="scaled demand [default: %default]") + optParser.add_option("-S", "--demandscale", dest="demandscale", + type="float", default=2., help="scaled demand [default: %default]") optParser.add_option("-F", "--freezeit", dest="freezeit", type="int", default=85, help="define the number of iterations for stablizing the results in the DTA-calibration") optParser.add_option("-V", "--varscale", dest="varscale", type="float", default=1., help="define variance of the measured traffic flows for the DTA-calibration") optParser.add_option("-P", "--PREPITS", type="int", dest="PREPITS", - default = 5, help="number of preparatory iterations") - optParser.add_option("-W", "--evaluation-prefix", dest="evalprefix",type='string', + default=5, help="number of preparatory iterations") + optParser.add_option("-W", "--evaluation-prefix", dest="evalprefix", type='string', help="prefix of flow evaluation files; only for the calibration with use of detector data") optParser.add_option("-Y", "--bruteforce", action="store_true", dest="bruteforce", - default = False, help="fit the traffic counts as accurate as possible") + default=False, help="fit the traffic counts as accurate as possible") optParser.add_option("-Z", "--mincountstddev", type="float", dest="mincountstddev", - default = 25., help="minimal traffic count standard deviation") + default=25., help="minimal traffic count standard deviation") optParser.add_option("-O", "--overridett", action="store_true", dest="overridett", - default= False, help="override depart times according to updated link travel times") - optParser.add_option("-E", "--disable-summary", "--disable-emissions", action="store_true", dest="noSummary", - default=False, help="No summaries are written by the simulation") + default=False, help="override depart times according to updated link travel times") + optParser.add_option("-E", "--disable-summary", "--disable-emissions", action="store_true", dest="noSummary", + default=False, help="No summaries are written by the simulation") optParser.add_option("-T", "--disable-tripinfos", action="store_true", dest="noTripinfo", default=False, help="No tripinfos are written by the simulation") optParser.add_option("-M", "--matrix-prefix", dest="fmaprefix", type='string', @@ -63,19 +77,21 @@ default=True, help="if exiting vehicles are assumed to cross the upstream sensor of their exit link") return optParser + def main(): optParser = initOptions() (options, args) = optParser.parse_args() if not options.net or not options.routes or not options.detvals: - optParser.error("--net-file, --routes and --detector-values have to be given!") + optParser.error( + "--net-file, --routes and --detector-values have to be given!") if options.mesosim: - sumoBinary = os.environ.get("SUMO_BINARY", os.path.join(options.path, "meso")) - print 'mesosim in action!' + sumoBinary = sumolib.checkBinary("meso", options.path) else: - sumoBinary = os.environ.get("SUMO_BINARY", os.path.join(options.path, "sumo")) - calibrator = ["java", "-cp", options.classpath, "cadyts.interfaces.sumo.SumoController"] + sumoBinary = sumolib.checkBinary("sumo", options.path) + calibrator = ["java", "-cp", options.classpath, + "cadyts.interfaces.sumo.SumoController"] log = open("cadySumo-log.txt", "w+") # calibration init @@ -87,15 +103,15 @@ # begin the calibration if options.fmaprefix: call(calibrator + ["INIT", "-varscale", options.varscale, "-freezeit", options.freezeit, - "-measfile", options.detvals, "-binsize", options.aggregation, "-PREPITS", options.PREPITS, - "-bruteforce", options.bruteforce, "-demandscale", options.demandscale, - "-mincountstddev", options.mincountstddev, "-overridett", options.overridett,"-clonepostfix", options.clonepostfix, - "-fmaprefix", options.fmaprefix, "-cntfirstlink", options.cntfirstlink, "-cntlastlink",options.cntlastlink], log) + "-measfile", options.detvals, "-binsize", options.aggregation, "-PREPITS", options.PREPITS, + "-bruteforce", options.bruteforce, "-demandscale", options.demandscale, + "-mincountstddev", options.mincountstddev, "-overridett", options.overridett, "-clonepostfix", options.clonepostfix, + "-fmaprefix", options.fmaprefix, "-cntfirstlink", options.cntfirstlink, "-cntlastlink", options.cntlastlink], log) else: call(calibrator + ["INIT", "-varscale", options.varscale, "-freezeit", options.freezeit, - "-measfile", options.detvals, "-binsize", options.aggregation, "-PREPITS", options.PREPITS, - "-bruteforce", options.bruteforce, "-mincountstddev", options.mincountstddev,"-overridett", options.overridett, - "-clonepostfix", options.clonepostfix,"-cntfirstlink", options.cntfirstlink, "-cntlastlink",options.cntlastlink], log) + "-measfile", options.detvals, "-binsize", options.aggregation, "-PREPITS", options.PREPITS, + "-bruteforce", options.bruteforce, "-mincountstddev", options.mincountstddev, "-overridett", options.overridett, + "-clonepostfix", options.clonepostfix, "-cntfirstlink", options.cntfirstlink, "-cntlastlink", options.cntlastlink], log) for step in range(options.calibStep): print 'calibration step:', step @@ -109,29 +125,33 @@ else: output = "%s_%03i.cal.xml" % (routname[:routname.find('.')], step) - call(calibrator + ["CHOICE", "-choicesetfile", options.routes, "-choicefile", "%s" % output], log) + call(calibrator + ["CHOICE", "-choicesetfile", + options.routes, "-choicefile", "%s" % output], log) files.append(output) - + # simulation print ">> Running simulation" btime = datetime.now() print ">>> Begin time: %s" % btime writeSUMOConf(sumoBinary, step, options, [], ",".join(files)) - retCode = call([sumoBinary, "-c", "iteration_%03i.sumocfg" % step], log) + retCode = call( + [sumoBinary, "-c", "iteration_%03i.sumocfg" % step], log) etime = datetime.now() print ">>> End time: %s" % etime - print ">>> Duration: %s" % (etime-btime) + print ">>> Duration: %s" % (etime - btime) print "<<" - + # calibration update if evalprefix: - call(calibrator + ["UPDATE", "-netfile", "dump_%03i_%s.xml" % (step, options.aggregation), "-flowfile", "%s_%03i.txt" % (evalprefix, step)], log) + call(calibrator + ["UPDATE", "-netfile", "dump_%03i_%s.xml" % ( + step, options.aggregation), "-flowfile", "%s_%03i.txt" % (evalprefix, step)], log) else: - call(calibrator + ["UPDATE", "-netfile", "dump_%03i_%s.xml" % (step, options.aggregation)], log) + call(calibrator + ["UPDATE", "-netfile", + "dump_%03i_%s.xml" % (step, options.aggregation)], log) print "< Step %s ended (duration: %s)" % (step, datetime.now() - btime) print "------------------\n" log.flush() - + print "calibration ended (duration: %s)" % (datetime.now() - starttime) log.close() diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/costFunctionChecker.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/costFunctionChecker.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/costFunctionChecker.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/costFunctionChecker.py 2015-04-17 00:20:29.000000000 +0000 @@ -5,43 +5,57 @@ @author Daniel Krajzewicz @author Jakob Erdmann @date 2009-08-31 -@version $Id: costFunctionChecker.py 14425 2013-08-16 20:11:47Z behrisch $ +@version $Id: costFunctionChecker.py 18096 2015-03-17 09:50:59Z behrisch $ Run duarouter repeatedly and simulate weight changes via a cost function. -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2009-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2009-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os, sys, subprocess, types +import os +import sys +import subprocess +import types from datetime import datetime from optparse import OptionParser from xml.sax import make_parser, handler +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +import sumolib + def call(command, log): if not isinstance(args, types.StringTypes): - command = [str(c) for c in command] + command = [str(c) for c in command] print >> log, "-" * 79 print >> log, command log.flush() retCode = subprocess.call(command, stdout=log, stderr=log) if retCode != 0: - print >> sys.stderr, "Execution of %s failed. Look into %s for details." % (command, log.name) - sys.exit(retCode) + print >> sys.stderr, "Execution of %s failed. Look into %s for details." % ( + command, log.name) + sys.exit(retCode) + def writeRouteConf(step, options, file, output): fd = open("iteration_" + str(step) + ".duarcfg", "w") print >> fd, """ """ % options.net - if step==0: + if step == 0: if options.flows: print >> fd, ' ' % file else: print >> fd, ' ' % file else: print >> fd, ' ' % file - print >> fd, ' ' % (step-1, options.aggregation) + print >> fd, ' ' % ( + step - 1, options.aggregation) print >> fd, """ @@ -65,6 +79,7 @@ """ % (options.verbose, options.noWarnings) fd.close() + class RouteReader(handler.ContentHandler): def __init__(self): @@ -87,6 +102,7 @@ def getMaxDepart(self): return self._maxDepart + class NetReader(handler.ContentHandler): def __init__(self): @@ -100,18 +116,22 @@ def getEdges(self): return self._edges + def identity(edge, weight): return weight + def generateWeights(step, options, edges, weights, costFunction): fd = open("dump_%s_%s.xml" % (step, options.aggregation), "w") print >> fd, '\n' - for time in range(0, int(reader.getMaxDepart()+1), options.aggregation): - print >> fd, ' ' % (time, time + options.aggregation, options.aggregation) + for time in range(0, int(reader.getMaxDepart() + 1), options.aggregation): + print >> fd, ' ' % ( + time, time + options.aggregation, options.aggregation) for edge in edges: cost = costFunction(edge, weights.getWeight(edge)) if cost != None: - print >> fd, ' ' % (edge, cost) + print >> fd, ' ' % ( + edge, cost) print >> fd, ' ' print >> fd, '' fd.close() @@ -150,8 +170,7 @@ type="int", default=0, help="First DUA step [default: %default]") optParser.add_option("-l", "--last-step", dest="lastStep", type="int", default=50, help="Last DUA step [default: %default]") -optParser.add_option("-p", "--path", dest="path", - default=os.environ.get("SUMO_BINDIR", ""), help="Path to binaries [default: %default]") +optParser.add_option("-p", "--path", dest="path", help="Path to binaries") optParser.add_option("-y", "--absrand", dest="absrand", action="store_true", default=False, help="use current time to generate random number") @@ -159,10 +178,11 @@ default="identity", help="(python) function to use as cost function") (options, args) = optParser.parse_args() if not options.net or not (options.trips or options.flows): - optParser.error("At least --net-file and --trips or --flows have to be given!") + optParser.error( + "At least --net-file and --trips or --flows have to be given!") -duaBinary = os.environ.get("DUAROUTER_BINARY", os.path.join(options.path, "duarouter")) +duaBinary = sumolib.checkBinary("duarouter", options.path) log = open("dua-log.txt", "w+") parser = make_parser() @@ -174,7 +194,7 @@ if "." in options.costfunc: idx = options.costfunc.rfind(".") module = options.costfunc[:idx] - func = options.costfunc[idx+1:] + func = options.costfunc[idx + 1:] exec("from %s import %s as costFunction" % (module, func)) else: exec("costFunction = %s" % options.costfunc) @@ -193,8 +213,9 @@ for tripFile in tripFiles: file = tripFile tripFile = os.path.basename(tripFile) - if step>0: - file = tripFile[:tripFile.find(".")] + "_%s.rou.alt.xml" % (step-1) + if step > 0: + file = tripFile[ + :tripFile.find(".")] + "_%s.rou.alt.xml" % (step - 1) output = tripFile[:tripFile.find(".")] + "_%s.rou.xml" % step print ">> Running router with " + file btime = datetime.now() @@ -203,7 +224,7 @@ retCode = call([duaBinary, "-c", "iteration_%s.duarcfg" % step], log) etime = datetime.now() print ">>> End time: %s" % etime - print ">>> Duration: %s" % (etime-btime) + print ">>> Duration: %s" % (etime - btime) print "<<" files.append(output) # generating weights file diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/costMemory.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/costMemory.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/costMemory.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/costMemory.py 2015-04-17 00:20:29.000000000 +0000 @@ -2,17 +2,24 @@ """ @file costMemory.py @author Jakob Erdmann +@author Michael Behrisch @date 2012-03-14 -@version $Id: costMemory.py 14425 2013-08-16 20:11:47Z behrisch $ +@version $Id: costMemory.py 18096 2015-03-17 09:50:59Z behrisch $ Perform smoothing of edge costs across successive iterations of duaIterate -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2008-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ from __future__ import print_function -import os,sys +import os +import sys from collections import defaultdict from xml.sax import saxutils, make_parser, handler @@ -21,6 +28,7 @@ class EdgeMemory: + def __init__(self, cost): self.cost = cost self.seen = True @@ -28,11 +36,13 @@ def update(self, cost, memory_weight, new_weight, pessimism): p = (cost / self.cost) ** pessimism if self.cost > 0 else 1 memory_factor = memory_weight / (memory_weight + new_weight * p) - self.cost = self.cost * memory_factor + cost * (1 - memory_factor) + self.cost = self.cost * memory_factor + cost * (1 - memory_factor) self.seen = True + class CostMemory(handler.ContentHandler): # memorize the weighted average of edge costs + def __init__(self, cost_attribute, pessimism=0, network_file=None): # the cost attribute to parse (i.e. 'traveltime') self.cost_attribute = cost_attribute.decode('utf8') @@ -41,53 +51,59 @@ # the main data store: for every interval and edge id we store costs and # whether data was seen in the last call of load_costs() # start -> (edge_id -> EdgeMemory) - self.intervals = defaultdict(dict) - # the intervall length (only known for certain if multiple intervals have been seen) - self.interval_length = 214748 # SUMOTIME_MAXSTRING + self.intervals = defaultdict(dict) + # the intervall length (only known for certain if multiple intervals + # have been seen) + self.interval_length = 214748 # SUMOTIME_MAXSTRING # the intervall currently being parsed self.current_interval = None # the combined weigth of all previously loaded costs self.memory_weight = 0.0 - # update is done according to: memory * memory_factor + new * (1 - memory_factor) + # update is done according to: memory * memory_factor + new * (1 - + # memory_factor) self.memory_factor = None - # differences between the previously loaded costs and the memorized costs + # differences between the previously loaded costs and the memorized + # costs self.errors = None # some statistics self.num_loaded = 0 self.num_decayed = 0 # travel times without obstructing traffic - self.traveltime_free = defaultdict(lambda:0) # XXX could use the minimum known traveltime + # XXX could use the minimum known traveltime + self.traveltime_free = defaultdict(lambda: 0) if network_file is not None: - # build a map of default weights for decaying edges assuming the attribute is traveltime - self.traveltime_free = dict([(e.getID(), e.getLength() / e.getSpeed()) - for e in readNet(network_file).getEdges()]) + # build a map of default weights for decaying edges assuming the + # attribute is traveltime + self.traveltime_free = dict([(e.getID(), e.getLength() / e.getSpeed()) + for e in readNet(network_file).getEdges()]) self.pessimism = pessimism - def startElement(self, name, attrs): if name == 'interval': self.current_interval = self.intervals[float(attrs['begin'])] if name == 'edge': id = attrs['id'] - if attrs.has_key(self.cost_attribute): # may be missing for some + if attrs.has_key(self.cost_attribute): # may be missing for some self.num_loaded += 1 cost = float(attrs[self.cost_attribute]) if id in self.current_interval: edgeMemory = self.current_interval[id] self.errors.append(edgeMemory.cost - cost) - edgeMemory.update(cost, self.memory_weight, self.new_weight, self.pessimism) - #if id == "4.3to4.4": + edgeMemory.update( + cost, self.memory_weight, self.new_weight, self.pessimism) + # if id == "4.3to4.4": # with open('debuglog', 'a') as f: # print(self.memory_factor, edgeMemory.cost, file=f) else: self.errors.append(0) self.current_interval[id] = EdgeMemory(cost) - def load_costs(self, dumpfile, iteration, weight): - # load costs from dumpfile and update memory according to weight and iteration + # load costs from dumpfile and update memory according to weight and + # iteration if weight <= 0: - sys.stderr.write("Skipped loading of costs because the weight was %s but should have been > 0\n" % weight) + sys.stderr.write( + "Skipped loading of costs because the weight was %s but should have been > 0\n" % weight) return assert(weight > 0) if self.iteration == None and iteration != 0: @@ -110,25 +126,28 @@ for edges in self.intervals.itervalues(): for id, edgeMemory in edges.iteritems(): if not edgeMemory.seen: - edgeMemory.update(self.traveltime_free[id], self.memory_weight, self.new_weight, self.pessimism) + edgeMemory.update( + self.traveltime_free[id], self.memory_weight, self.new_weight, self.pessimism) self.num_decayed += 1 - #if id == "4.3to4.4": + # if id == "4.3to4.4": # with open('debuglog', 'a') as f: # print(self.memory_factor, 'decay', edgeMemory.cost, file=f) # figure out the interval length if len(self.intervals.keys()) > 1: sorted_begin_times = sorted(self.intervals.keys()) - self.interval_length = sorted_begin_times[1] - sorted_begin_times[0] + self.interval_length = sorted_begin_times[ + 1] - sorted_begin_times[0] self.memory_weight += self.new_weight - def write_costs(self, weight_file): with open(weight_file, 'w') as f: f.write('\n') for start, edge_costs in self.intervals.iteritems(): - f.write(' \n' % (start, start + self.interval_length)) + f.write(' \n' % + (start, start + self.interval_length)) for id, edgeMemory in edge_costs.iteritems(): - f.write(' \n' % (id, self.cost_attribute, edgeMemory.cost)) + f.write(' \n' % + (id, self.cost_attribute, edgeMemory.cost)) f.write(' \n') f.write('\n') @@ -141,21 +160,20 @@ return 0 def avg_abs_error(self): - return self.avg_error(map(abs,self.errors)) + return self.avg_error(map(abs, self.errors)) def mean_error(self, values=None): if not values: values = self.errors values.sort() if values: - return values[len(values)/2] + return values[len(values) / 2] def mean_abs_error(self): - return self.mean_error(map(abs,self.errors)) + return self.mean_error(map(abs, self.errors)) def loaded(self): return self.num_loaded def decayed(self): return self.num_decayed - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/dijkstra.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/dijkstra.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/dijkstra.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/dijkstra.py 2015-04-17 00:20:29.000000000 +0000 @@ -1,11 +1,11 @@ """ @file dijkstra.py -@author Yun-Pang Wang +@author Yun-Pang Floetteroed @author Daniel Krajzewicz @author Michael Behrisch @author Jakob Erdmann @date 2007-10-25 -@version $Id: dijkstra.py 14425 2013-08-16 20:11:47Z behrisch $ +@version $Id: dijkstra.py 18096 2015-03-17 09:50:59Z behrisch $ This script is based on the script from David Eppstein, UC Irvine. This script is to find the shortest path from the given origin 'start' to the other nodes in the investigated network. @@ -13,12 +13,18 @@ the link information about the shortest paths and the corresponding travel times will be stored in the lists P and D respectively. -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2008-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2007-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os,sys +import os +import sys from Queue import PriorityQueue from collections import defaultdict from xml.sax import make_parser, handler @@ -27,6 +33,7 @@ class priorityDictionary(dict): + def __init__(self): '''Initialize priorityDictionary by creating binary heap of pairs (value,key). Note that changing or removing a dict entry will @@ -44,9 +51,9 @@ lastItem = heap.pop() insertionPoint = 0 while 1: - smallChild = 2*insertionPoint+1 - if smallChild+1 < len(heap) and \ - heap[smallChild][0] > heap[smallChild+1][0]: + smallChild = 2 * insertionPoint + 1 + if smallChild + 1 < len(heap) and \ + heap[smallChild][0] > heap[smallChild + 1][0]: smallChild += 1 if smallChild >= len(heap) or lastItem <= heap[smallChild]: heap[insertionPoint] = lastItem @@ -64,25 +71,25 @@ del self[x] return iterfn() - def __setitem__(self,key,val): + def __setitem__(self, key, val): '''Change value stored in dictionary and add corresponding pair to heap. Rebuilds the heap if the number of deleted items grows too large, to avoid memory leakage.''' - dict.__setitem__(self,key,val) + dict.__setitem__(self, key, val) heap = self.__heap if len(heap) > 2 * len(self): - self.__heap = [(v,k) for k,v in self.iteritems()] + self.__heap = [(v, k) for k, v in self.iteritems()] self.__heap.sort() # builtin sort likely faster than O(n) heapify else: - newPair = (val,key) + newPair = (val, key) insertionPoint = len(heap) heap.append(None) - while insertionPoint > 0 and val < heap[(insertionPoint-1)//2][0]: - heap[insertionPoint] = heap[(insertionPoint-1)//2] - insertionPoint = (insertionPoint-1)//2 + while insertionPoint > 0 and val < heap[(insertionPoint - 1) // 2][0]: + heap[insertionPoint] = heap[(insertionPoint - 1) // 2] + insertionPoint = (insertionPoint - 1) // 2 heap[insertionPoint] = newPair - def setdefault(self,key,val): + def setdefault(self, key, val): '''Reimplement setdefault to call our customized __setitem__.''' if key not in self: self[key] = val @@ -147,10 +154,12 @@ def dijkstraBoost(boostGraph, start): from boost.graph import dijkstra_shortest_paths dijkstra_shortest_paths(boostGraph, start, - distance_map = boostGraph.vertex_properties['distance'], - predecessor_map = boostGraph.vertex_properties['predecessor'], - weight_map = boostGraph.edge_properties['weight']) - + distance_map=boostGraph.vertex_properties[ + 'distance'], + predecessor_map=boostGraph.vertex_properties[ + 'predecessor'], + weight_map=boostGraph.edge_properties['weight']) + # dictionary of final distances D = {} # dictionary of predecessors @@ -165,10 +174,12 @@ class DijkstraRouter(handler.ContentHandler): + """standalone class for routing on a sumolib network. The edges from the network recieve new attribute 'cost' based on a loaded meanData output """ + def __init__(self, netfile, weightfile=None): self.net = readNet(netfile) self.cost_attribute = 'traveltime' @@ -190,12 +201,14 @@ if name == 'interval': self.intervals += 1 if self.intervals > 1: - print("ignoring weights from interval [%s,%s]" % (attrs['begin'], attrs['end'])) + print("ignoring weights from interval [%s,%s]" % ( + attrs['begin'], attrs['end'])) if name == 'edge': if self.intervals > 1: return - if attrs.has_key(self.cost_attribute): # may be missing for some - self.net.getEdge(attrs['id']).cost = float(attrs[self.cost_attribute]) + if attrs.has_key(self.cost_attribute): # may be missing for some + self.net.getEdge(attrs['id']).cost = float( + attrs[self.cost_attribute]) def _route(self, start, dest, costFactors): if self.weightfile is None: @@ -211,7 +224,7 @@ D[edge] = Q[edge] #print("final const to %s: %s" % (edge.getID(), D[edge])) if edge == dest: - #print [(e.getID(), c) for e,c in Q.items()] + # print [(e.getID(), c) for e,c in Q.items()] return (D, P) cost = Q[edge] + edge.cost * costFactors[edge.getID()] for succ in edge.getOutgoing(): @@ -234,12 +247,12 @@ result.append(id) return result - def least_cost(self, start, dest, costFactors=defaultdict(lambda:1.0)): + def least_cost(self, start, dest, costFactors=defaultdict(lambda: 1.0)): """return the cost of the shortest path from start to destination edge""" start, dest = self._getEdge(start, dest) D, P = self._route(start, dest, costFactors) if dest in D: return D[dest] else: - raise("No path between %s and %s found" % (start.getID(), dest.getID())) - + raise("No path between %s and %s found" % + (start.getID(), dest.getID())) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/duaIterate_analysis.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/duaIterate_analysis.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/duaIterate_analysis.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/duaIterate_analysis.py 2015-04-17 00:20:29.000000000 +0000 @@ -3,79 +3,92 @@ """ @file duaIterate_analysis.py @author Jakob Erdmann +@author Michael Behrisch @date 2012-09-06 -@version $Id: duaIterate_analysis.py 14425 2013-08-16 20:11:47Z behrisch $ +@version $Id: duaIterate_analysis.py 18096 2015-03-17 09:50:59Z behrisch $ Extract statistics from the outputs of a duaIterate run for plotting. -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2008-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2012-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os,sys +import os +import sys import re +import glob from optparse import OptionParser from collections import defaultdict sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from sumolib.miscutils import Statistics, uMax +from sumolib.output import parse_fast + def parse_args(): USAGE = "Usage: " + sys.argv[0] + " [options]" optParser = OptionParser() - optParser.add_option("--stdout", - help="also parse the given FILE containing stdout of duaIterate") + optParser.add_option("--stdout", + help="also parse the given FILE containing stdout of duaIterate") optParser.add_option("-o", "--output", default="plot", - help="output prefix for plotting with gnuplot") + help="output prefix for plotting with gnuplot") optParser.add_option("-l", "--label-size", default=40, dest="label_size", - help="limit length of the plot label to this size") + help="limit length of the plot label to this size") optParser.add_option("--limit", type=int, default=uMax, - help="only parse the first INT number of iterations") + help="only parse the first INT number of iterations") optParser.add_option("--teleports", default="teleplot", - help="output prefix for plotting teleport-prone edges") + help="output prefix for plotting teleport-prone edges") + optParser.add_option( + "--mpl", help="output prefix for matplotlib plots or SHOW for plotting to the display") options, args = optParser.parse_args() if len(args) != 1: sys.exit(USAGE) options.dualog = args[0] return options + def parse_dualog(dualog, limit): print "Parsing %s" % dualog teleStats = Statistics('Teleports') - header = ['#Emitted', 'Running', 'Waiting', 'Teleports', 'Loaded'] - step_values = [] # list of lists - step_counts = [] # list of edge teleport counters - reEmitted = re.compile("Emitted: (\d*)") + header = ['#Inserted', 'Running', 'Waiting', 'Teleports', 'Loaded'] + step_values = [] # list of lists + step_counts = [] # list of edge teleport counters + reInserted = re.compile("Inserted: (\d*)") reLoaded = re.compile("Loaded: (\d*)") reRunning = re.compile("Running: (\d*)") reWaiting = re.compile("Waiting: (\d*)") - reFrom = re.compile("from '([^']*)'") # mesosim + reFrom = re.compile("from '([^']*)'") # mesosim teleports = 0 - emitted = None + inserted = None loaded = None running = None waiting = None haveMicrosim = None - counts = defaultdict(lambda:0) + counts = defaultdict(lambda: 0) for line in open(dualog): try: if "Warning: Teleporting vehicle" in line: if haveMicrosim is None: if "lane='" in line: haveMicrosim = True - reFrom = re.compile("lane='([^']*)'") + reFrom = re.compile("lane='([^']*)'") else: haveMicrosim = False teleports += 1 edge = reFrom.search(line).group(1) - if ':' in edge: # mesosim output + if ':' in edge: # mesosim output edge = edge.split(':')[0] counts[edge] += 1 - elif "Emitted:" in line: - emitted = reEmitted.search(line).group(1) - if "Loaded:" in line: # optional output + elif "Inserted:" in line: + inserted = reInserted.search(line).group(1) + if "Loaded:" in line: # optional output loaded = reLoaded.search(line).group(1) else: - loaded = emitted + loaded = inserted elif "Running:" in line: running = reRunning.search(line).group(1) elif "Waiting:" in line: @@ -84,10 +97,11 @@ break waiting = reWaiting.search(line).group(1) teleStats.add(teleports, iteration) - step_values.append([emitted, running, waiting, teleports, loaded]) + step_values.append( + [inserted, running, waiting, teleports, loaded]) teleports = 0 step_counts.append(counts) - counts = defaultdict(lambda:0) + counts = defaultdict(lambda: 0) except: sys.exit("error when parsing line '%s'" % line) @@ -95,11 +109,13 @@ print teleStats return [header] + step_values, step_counts + def parse_stdout(step_values, stdout): print "Parsing %s" % stdout step_values[0] += ['routingMinutes', 'simMinutes', 'absAvgError'] reDuration = re.compile("Duration: (.*)$") reError = re.compile("Absolute Error avg:(\d*)") + def get_minutes(line): hours, minutes, seconds = reDuration.search(line).group(1).split(':') return int(hours) * 60 + int(minutes) + float(seconds) / 60 @@ -123,63 +139,87 @@ print " parsed %s steps" % (step - 1) -def write_data(outfile, step_values): - with open(outfile, 'w') as f: - for values in step_values: - f.write(' '.join(map(str,values)) + '\n') - -def write_plotfile(outfile, datafile, xlabel): - with open(outfile, 'w') as f: - f.write(""" -set xlabel '%s' -plot \\ -'%s' using 0:1 title 'emitted' with lines, \\ -'%s' using 0:4 title 'teleports' with lines, \\ -'%s' using 0:3 title 'waiting' with lines, \\ -'%s' using 0:5 title 'loaded' with lines, \\ -'%s' using 0:2 title 'running' with lines -""" % ((xlabel,) + (datafile,) * 5)) - - -def create_teleplot(plotfile, step_counts, xlabel): +def gnuplot_teleport_edges(plotfile, step_counts, xlabel): datafile = plotfile + '.data' # an edge is interesting if a large proportion of teleports happen on it - interestingness = defaultdict(lambda:0) + interestingness = defaultdict(lambda: 0) all_edges = set() for counts in step_counts: teleports = float(sum(counts.itervalues())) if teleports == 0: continue for edge, count in counts.iteritems(): - interestingness[edge] += count/teleports - interesting = sorted([(c,e) for e,c in interestingness.iteritems()])[-7:] + interestingness[edge] += count / teleports + interesting = sorted([(c, e) for e, c in interestingness.iteritems()])[-7:] print "most interesting edges:", interesting - interesting = [e for c,e in interesting] + if len(interesting) > 0: + interesting = [e for c, e in interesting] + with open(datafile, 'w') as f: + print >>f, '#' + ' '.join(interesting) + for counts in step_counts: + values = [counts[e] for e in interesting] + f.write(' '.join(map(str, values)) + '\n') + # write plotfile + with open(plotfile, 'w') as f: + f.write("set xlabel '%s'\nplot \\\n" % xlabel) + lines = ["'%s' using 0:%s title '%s' with lines" % (datafile, ii + 1, edge) + for ii, edge in enumerate(interesting)] + f.write(', \\\n'.join(lines)) + + +def parse_trip_durations(): + result = [] + for file in sorted(glob.glob("tripinfo_*.xml")): + result.append([float(t.duration) + for t in parse_fast(file, 'tripinfo', ['duration'])]) + return result + + +def matplot(output): + if output is not None: + import matplotlib + if output != 'SHOW': + matplotlib.use('Agg') + import matplotlib.pyplot as plt + plt.boxplot(parse_trip_durations()) + if output == 'SHOW': + plt.show() + else: + plt.savefig(output) + plt.close() + + +def gnuplot_vehicle_summary(plotfile, xlabel, step_values): + datafile = plotfile + '.data' with open(datafile, 'w') as f: - print >>f, '#' + ' '.join(interesting) - for counts in step_counts: - values = [counts[e] for e in interesting] - f.write(' '.join(map(str,values)) + '\n') - # write plotfile + for values in step_values: + f.write(' '.join(map(str, values)) + '\n') + with open(plotfile, 'w') as f: - f.write("set xlabel '%s'\nplot \\\n") - lines = ["'%s' using 0:%s title '%s' with lines" % (datafile, ii+1, edge) - for ii, edge in enumerate(interesting)] - f.write(', \\\n'.join(lines)) + f.write(""" +set xlabel '%s' +plot \\ +'%s' using 0:1 title 'inserted' with lines, \\ +'%s' using 0:4 title 'teleports' with lines, \\ +'%s' using 0:3 title 'waiting' with lines, \\ +'%s' using 0:5 title 'loaded' with lines, \\ +'%s' using 0:2 title 'running' with lines +""" % ((xlabel,) + (datafile,) * 5)) def main(): options = parse_args() - plotfile = options.output - datafile = plotfile + '.data' step_values, step_counts = parse_dualog(options.dualog, options.limit) if options.stdout is not None: parse_stdout(step_values, options.stdout) - write_data(datafile, step_values) - duaPath = os.path.dirname(os.path.abspath(options.dualog))[-options.label_size:] + duaPath = os.path.dirname( + os.path.abspath(options.dualog))[-options.label_size:] xlabel = 'Iterations in ' + duaPath - write_plotfile(plotfile, datafile, xlabel) - create_teleplot(options.teleports, step_counts, xlabel) + + gnuplot_vehicle_summary(options.output, xlabel, step_values) + gnuplot_teleport_edges(options.teleports, step_counts, xlabel) + matplot(options.mpl) + ################## if __name__ == "__main__": diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/duaIterate.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/duaIterate.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/duaIterate.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/duaIterate.py 2015-04-17 00:20:29.000000000 +0000 @@ -5,24 +5,35 @@ @author Daniel Krajzewicz @author Michael Behrisch @author Jakob Erdmann -@author Yun-Pang Wang +@author Yun-Pang Floetteroed @date 2008-02-13 -@version $Id: duaIterate.py 14425 2013-08-16 20:11:47Z behrisch $ +@version $Id: duaIterate.py 18096 2015-03-17 09:50:59Z behrisch $ Run duarouter and sumo alternating to perform a dynamic user assignment. Based on the Perl script dua_iterate.pl. -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2008-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ from __future__ import print_function -import os, sys, subprocess, types, shutil +import os +import sys +import subprocess +import types +import shutil +import glob from datetime import datetime from optparse import OptionParser from costMemory import CostMemory sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) +import sumolib from sumolib.options import get_long_option_names @@ -44,35 +55,41 @@ type="int", default=900, help="Set main weights aggregation period [default: %default]") optParser.add_option("-m", "--mesosim", action="store_true", default=False, help="Whether mesosim shall be used") - optParser.add_option("-p", "--path", - default=os.environ.get("SUMO_BINDIR", ""), help="Path to binaries [default: %default]") + optParser.add_option("-p", "--path", help="Path to binaries") optParser.add_option("-y", "--absrand", action="store_true", - default= False, help="use current time to generate random number") + default=False, help="use current time to generate random number") optParser.add_option("-I", "--nointernal-link", action="store_true", dest="internallink", - default = False, help="not to simulate internal link: true or false") + default=False, help="not to simulate internal link: true or false") optParser.add_option("-L", "--lanechange-allowed", dest="lanechangeallowed", action="store_true", - default = False, help="lane change allowed to swap") + default=False, help="lane change allowed to swap") optParser.add_option("-j", "--meso-junctioncontrol", dest="mesojunctioncontrol", action="store_true", - default = False, help="Enable mesoscopic traffic light and priority junciton handling") + default=False, help="Enable mesoscopic traffic light and priority junciton handling") optParser.add_option("-q", "--meso-multiqueue", dest="mesomultiqueue", action="store_true", - default = False, help="Enable multiple queues at edge ends") - optParser.add_option("--meso-recheck", dest="mesorecheck", type="int", default=0, + default=False, help="Enable multiple queues at edge ends") + optParser.add_option("--meso-recheck", dest="mesorecheck", type="int", default=0, help="Delay before checking whether a jam is gone. (higher values can lead to a big speed increase)") optParser.add_option("-Q", "--eco-measure", dest="ecomeasure", type="choice", - choices=('CO', 'CO2', 'PMx', 'HC', 'NOx', 'fuel', 'noise'), + choices=( + 'CO', 'CO2', 'PMx', 'HC', 'NOx', 'fuel', 'noise'), help="define the applied eco measure, e.g. fuel, CO2, noise") - optParser.add_option("-s", "--sloppy-insert", action="store_true", - default=False, help="sloppy insertion tests (may speed up the sim considerably)") - optParser.add_option("--time-to-teleport", dest="timetoteleport", type="int", default=300, - help="Delay before blocked vehicles are teleported where -1 means no teleporting") - optParser.add_option("--time-to-teleport.highways", dest="timetoteleport_highways", type="int", default=0, + optParser.add_option("--eager-insert", action="store_true", + default=False, help="eager insertion tests (may slow down the sim considerably)") + optParser.add_option("--time-to-teleport", dest="timetoteleport", type="float", default=300, + help="Delay before blocked vehicles are teleported (negative value disables teleporting)") + optParser.add_option("--time-to-teleport.highways", dest="timetoteleport_highways", type="float", default=0, help="Delay before blocked vehicles are teleported on wrong highway lanes") optParser.add_option("--cost-modifier", dest="costmodifier", type="choice", - choices=('grohnde', 'isar', 'None'), + choices=('grohnde', 'isar', 'None'), default='None', help="Whether to modify link travel costs of the given routes") + optParser.add_option("-7", "--zip", action="store_true", + default=False, help="zip old iterations using 7zip") + def initOptions(): - optParser = OptionParser() + optParser = OptionParser(usage="""usage: %prog [options] [sumo--options] +Any options of the form sumo--long-option-name will be passed to sumo. +These must be given after all the other options of %prog +example: sumo--step-length 0.5 will add the option --step-length 0.5 to sumo.""") addGenericOptions(optParser) optParser.add_option("-C", "--continue-on-unbuild", action="store_true", dest="continueOnUnbuild", @@ -107,16 +124,23 @@ type="int", default=0, help="First DUA step [default: %default]") optParser.add_option("-l", "--last-step", dest="lastStep", type="int", default=50, help="Last DUA step [default: %default]") - optParser.add_option("-D", "--districts", help="use districts as sources and targets", metavar="FILE") + optParser.add_option("--convergence-iterations", dest="convIt", + type="int", default=10, help="Number of iterations to use for convergence calculation [default: %default]") + optParser.add_option("--max-convergence-deviation", dest="convDev", + type="float", help="Maximum relative standard deviation in travel times [default: %default]") + optParser.add_option( + "-D", "--districts", help="use districts as sources and targets", metavar="FILE") optParser.add_option("-x", "--vehroute-file", dest="routefile", type="choice", - choices=('None', 'routesonly', 'detailed'), - default = 'None', help="choose the format of the route file") + choices=('None', 'routesonly', 'detailed'), + default='None', help="choose the format of the route file") optParser.add_option("-z", "--output-lastRoute", action="store_true", dest="lastroute", - default = False, help="output the last routes") + default=False, help="output the last routes") optParser.add_option("-K", "--keep-allroutes", action="store_true", dest="allroutes", - default = False, help="save routes with near zero probability") - optParser.add_option("--routing-algorithm", default="dijkstra", help="select the routing algorithm") - optParser.add_option("--max-alternatives", default=5, help="prune the number of alternatives to INT") + default=False, help="save routes with near zero probability") + optParser.add_option( + "--routing-algorithm", default="dijkstra", help="select the routing algorithm") + optParser.add_option( + "--max-alternatives", default=5, help="prune the number of alternatives to INT") optParser.add_option("--skip-first-routing", action="store_true", dest="skipFirstRouting", default=False, help="run simulation with demands before first routing") optParser.add_option("--logit", action="store_true", dest="logit", @@ -124,7 +148,7 @@ optParser.add_option("-g", "--logitbeta", type="float", dest="logitbeta", default=0.15, help="use the c-logit model for route choice; logit model when beta = 0") optParser.add_option("-i", "--logitgamma", type="float", dest="logitgamma", - default= 1., help="use the c-logit model for route choice") + default=1., help="use the c-logit model for route choice") optParser.add_option("-G", "--logittheta", type="float", dest="logittheta", help="parameter to adapt the cost unit") optParser.add_option("-J", "--addweights", dest="addweights", @@ -134,16 +158,18 @@ optParser.add_option("-M", "--external-gawron", action="store_true", dest="externalgawron", default=False, help="use the external gawron calculation") optParser.add_option("-N", "--calculate-oldprob", action="store_true", dest="caloldprob", - default=False, help="calculate the old route probabilities with the free-flow travel times when using the external gawron calculation") + default=False, help="calculate the old route probabilities with the free-flow travel times when using the external gawron calculation") optParser.add_option("--weight-memory", action="store_true", default=False, dest="weightmemory", - help="smoothe edge weights across iterations") - optParser.add_option("--pessimism", default=1, type="float", help="give traffic jams a higher weight") + help="smooth edge weights across iterations") + optParser.add_option( + "--pessimism", default=1, type="float", help="give traffic jams a higher weight") optParser.add_option("--clean-alt", action="store_true", dest="clean_alt", default=False, help="Whether old rou.alt.xml files shall be removed") optParser.add_option("--binary", action="store_true", default=False, help="Use binary format for intermediate and resulting route files") return optParser + def call(command, log): command = [str(c) for c in command] print("-" * 79, file=log) @@ -151,8 +177,10 @@ log.flush() retCode = subprocess.call(command, stdout=log, stderr=log) if retCode != 0: - print("Execution of %s failed. Look into %s for details." % (command, log.name), file=sys.stderr) - sys.exit(retCode) + print("Execution of %s failed. Look into %s for details." % + (command, log.name), file=sys.stderr) + sys.exit(retCode) + def writeRouteConf(step, options, file, output, routesInfo, initial_type): filename = os.path.basename(file) @@ -167,13 +195,15 @@ """ % options.net, file=fd) if options.districts: print(' ' % options.districts, file=fd) - if step==0: + if step == 0: print(' <%s-files value="%s"/>' % (initial_type, file), file=fd) else: print(' ' % file, file=fd) - print(' ' % get_weightfilename(options, step-1, "dump"), file=fd) + print(' ' % + get_weightfilename(options, step - 1, "dump"), file=fd) if options.ecomeasure: - print(' ' % options.ecomeasure, file=fd) + print(' ' % + options.ecomeasure, file=fd) print(""" @@ -191,22 +221,25 @@ """ % ( - options.continueOnUnbuild, - bool(options.districts), - options.gBeta, - options.gA, - options.allroutes, - options.routing_algorithm, - ("" if 'CH' not in options.routing_algorithm else '\n\n' % options.aggregation), - options.max_alternatives, - options.logit, - options.logitbeta, - options.logitgamma), file=fd) + options.continueOnUnbuild, + bool(options.districts), + options.gBeta, + options.gA, + options.allroutes, + options.routing_algorithm, + ("" if 'CH' not in options.routing_algorithm else '\n\n' % + options.aggregation), + options.max_alternatives, + options.logit, + options.logitbeta, + options.logitgamma), file=fd) if options.logittheta: - print(' ' % options.logittheta, file=fd) + print(' ' % + options.logittheta, file=fd) print(' ', file=fd) - - print(' ' % options.absrand, file=fd) + + print(' ' % + options.absrand, file=fd) print(' \n') self._foutrout.close() - + + class dumpsReader(handler.ContentHandler): - def __init__(self, edgesList,edgesMap): + + def __init__(self, edgesList, edgesMap): self._edgesList = edgesList self._edgeObj = None self._edgesMap = edgesMap @@ -349,12 +387,13 @@ if attrs.has_key('CO2_abs'): self._edgeObj.CO2_abs = float(attrs['CO2_abs']) if attrs.has_key('CO_abs'): - self._edgeObj.CO_abs = float(attrs['CO_abs']) - + self._edgeObj.CO_abs = float(attrs['CO_abs']) + def endElement(self, name): if name == 'edge': self._edgeObj = None + def resetEdges(edgesMap): for eid in edgesMap: e = edgesMap[eid] @@ -372,7 +411,9 @@ e.NOx_perVeh = 0. e.fuel_perVeh = 0. -def getRouteChoices(edgesMap, dumpfile, routeAltfile, netfile, addWeightsfile, alpha, beta, step, ecoMeasure=None): # check with Micha + +# check with Micha +def getRouteChoices(edgesMap, dumpfile, routeAltfile, netfile, addWeightsfile, alpha, beta, step, ecoMeasure=None): random.seed(42) # check with micha edgesList = [] vehList = [] @@ -392,20 +433,22 @@ if len(edgesMap) == 0: print 'parse network file' parse(netfile, netReader(edgesList, edgesMap)) - parse(addWeightsfile, addweightsReader(edgesList,edgesMap)) + parse(addWeightsfile, addweightsReader(edgesList, edgesMap)) else: resetEdges(edgesMap) - + fout = open(outputAltfile, 'w') foutrout = open(outputRoufile, 'w') fout.write('\n') fout.write('\n') + fout.write('route choices are generated with use of %s' % + os.path.join(os.getcwd(), 'routeChoices.py')) + fout.write('-->\n') fout.write('\n') foutrout.write('\n') foutrout.write('\n') foutrout.write('') @@ -414,21 +457,27 @@ parse(dumpfile, dumpsReader(edgesList, edgesMap)) print 'parse routeAltfile' print routeAltfile - parse(routeAltfile, routeReader(vehList, vehMap)) # parse routeAltfile from SUMO + # parse routeAltfile from SUMO + parse(routeAltfile, routeReader(vehList, vehMap)) print 'parse routeAltfile from externalGawron' - ex_outputAltFile = prefix[:prefix.rfind('_')] + '_%03i' %(step-1) + '.rou.galt.xml' + ex_outputAltFile = prefix[ + :prefix.rfind('_')] + '_%03i' % (step - 1) + '.rou.galt.xml' print 'ex_outputAltFile:', ex_outputAltFile - parse(ex_outputAltFile, vehrouteReader(vehList,vehMap,edgesMap,fout,foutrout,ecoMeasure,alpha,beta)) + parse(ex_outputAltFile, vehrouteReader( + vehList, vehMap, edgesMap, fout, foutrout, ecoMeasure, alpha, beta)) return outputRoufile, edgesMap + def gawron(r1, r2, alpha): a = alpha - delta = (r2.act_cost - r1.act_cost)/(r1.act_cost + r2.act_cost) - g = math.exp(a*delta/(1-delta*delta)) + delta = (r2.act_cost - r1.act_cost) / (r1.act_cost + r2.act_cost) + g = math.exp(a * delta / (1 - delta * delta)) ex_prob = r1.probability - r1.probability = (r1.probability*(r1.probability + r2.probability)*g)/(r1.probability*g + r2.probability) # check together with Eva + r1.probability = (r1.probability * (r1.probability + r2.probability) + * g) / (r1.probability * g + r2.probability) # check together with Eva r2.probability = ex_prob + r2.probability - r1.probability + def calFirstRouteProbs(dumpfile, sumoAltFile, addweights, ecoMeasure=None): basename = sumoAltFile.split('_')[0] outputAltFile = basename + "_001.rou.galt.xml" @@ -438,23 +487,25 @@ vehList = [] vehMap = {} parse(netfile, netReader(edgesList, edgesMap)) - parse(addweights, addweightsReader(edgesList,edgesMap)) + parse(addweights, addweightsReader(edgesList, edgesMap)) parse(dumpfile, dumpsReader(edgesList, edgesMap)) parse(sumoAltFile, routeReader(vehList, vehMap)) - + fout = open(outputAltFile, 'w') foutrout = open(outputRouFile, 'w') fout.write('\n') fout.write('\n') + fout.write('route choices are generated with use of %s' % + os.path.join(os.getcwd(), 'routeChoices.py')) + fout.write('-->\n') fout.write('\n') foutrout.write('\n') foutrout.write('\n') foutrout.write('') - + for v in vehMap: vehObj = vehMap[v] for r in vehObj.routesList: @@ -476,8 +527,8 @@ for r in vehObj.routesList: costSum += r.ex_cost for r in vehObj.routesList: - r.ex_probability = r.ex_cost/costSum - + r.ex_probability = r.ex_cost / costSum + randProb = random.random() selected = 0 if len(vehObj.routesList) > 1: @@ -487,20 +538,22 @@ if cumulatedProbs >= randProb: selected = i break - + # generate the *.rou.xml - foutrout.write(' \n' - % (vehObj.label, vehObj.depart, vehObj.departlane, vehObj.departpos, vehObj.departspeed)) - self._foutrout.write(' \n'% vehObj.routesList[selected].edges) + foutrout.write(' \n' + % (vehObj.label, vehObj.depart, vehObj.departlane, vehObj.departpos, vehObj.departspeed)) + self._foutrout.write( + ' \n' % vehObj.routesList[selected].edges) self._foutrout.write(' \n') - - #generate the *.rou.alt.xml - self._fout.write(' \n' - % (vehObj.label, vehObj.depart, vehObj.departlane, vehObj.departpos, vehObj.departspeed)) + + # generate the *.rou.alt.xml + self._fout.write(' \n' + % (vehObj.label, vehObj.depart, vehObj.departlane, vehObj.departpos, vehObj.departspeed)) self._fout.write(' \n' % selected) - + for route in self._vehObj.routesList: - self._fout.write(' \n' % (route.act_cost, route.ex_probability, route.edges)) + self._fout.write(' \n' % + (route.act_cost, route.ex_probability, route.edges)) self._fout.write(' \n') self._fout.write(' \n') self._fout.write('\n') diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/run.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/run.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/run.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/run.py 2015-04-17 00:20:29.000000000 +0000 @@ -3,38 +3,50 @@ @file run.py @author Michael Behrisch @author Daniel Krajzewicz -@author Yun-Pang Wang +@author Yun-Pang Floetteroed @date 2008-03-10 -@version $Id: run.py 14425 2013-08-16 20:11:47Z behrisch $ +@version $Id: run.py 18096 2015-03-17 09:50:59Z behrisch $ Runs the assignment tests. -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2008-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import glob, os, shutil, subprocess, time, optparse +import glob +import os +import shutil +import subprocess +import time +import optparse + def detectCPUs(): """Detects the number of effective CPUs in the system""" - #for Linux, Unix and MacOS + # for Linux, Unix and MacOS if hasattr(os, "sysconf"): - if os.sysconf_names.has_key("SC_NPROCESSORS_ONLN"): + if os.sysconf_names.has_key("SC_NPROCESSORS_ONLN"): #Linux and Unix ncpus = os.sysconf("SC_NPROCESSORS_ONLN") if isinstance(ncpus, int) and ncpus > 0: return ncpus - else: - #MacOS X + else: + # MacOS X return int(os.popen2("sysctl -n hw.ncpu")[1].read()) - #for Windows + # for Windows if os.environ.has_key("NUMBER_OF_PROCESSORS"): - ncpus = int(os.environ["NUMBER_OF_PROCESSORS"]); + ncpus = int(os.environ["NUMBER_OF_PROCESSORS"]) if ncpus > 0: return ncpus - #return the default value + # return the default value return 1 - + + def makeAndChangeDir(dirName): runID = 1 fullName = "%s%03i" % (dirName, runID) @@ -45,9 +57,10 @@ os.chdir(fullName) return fullName + def execute(command): if options.verbose: - print command + print command os.system(command) optParser = optparse.OptionParser() @@ -65,7 +78,8 @@ os.chdir("input") netFile = "../input/" + glob.glob("*.net.xml")[0] -mtxNamesList = ",".join(["../input/" + item for item in sorted(glob.glob("*.fma"))]) +mtxNamesList = ",".join( + ["../input/" + item for item in sorted(glob.glob("*.fma"))]) addFiles = ",".join(["../input/" + item for item in glob.glob("*.add.xml")]) pyAdds = "" @@ -89,12 +103,15 @@ if options.stats == 0: if not options.duaonly: succDir = makeAndChangeDir("../" + mesoAppendix + "successive") - execute("Assignment.py -e incremental -i 10 -d ../input/districts.xml -m %s -n %s" % (mtxNamesList, netFile)) + execute("Assignment.py -e incremental -i 10 -d ../input/districts.xml -m %s -n %s" % + (mtxNamesList, netFile)) if not options.od2trips: shutil.copy("%s/routes.rou.xml" % succDir, routes) - execute("route2trips.py %s > ../input/successive.trips.xml" % routes) + execute( + "route2trips.py %s > ../input/successive.trips.xml" % routes) duaDir = makeAndChangeDir("../" + mesoAppendix + "dua") - duaCall = "dua-iterate.py -e 90000 -C -n %s -t ../input/%s.trips.xml %s" % (netFile, trips, pyAdds) + duaCall = "dua-iterate.py -e 90000 -C -n %s -t ../input/%s.trips.xml %s" % ( + netFile, trips, pyAdds) if options.mesosim: duaCall = duaCall + " --mesosim" duaProcess = subprocess.Popen(duaCall, shell=True) @@ -105,7 +122,8 @@ time.sleep(1) shutil.copy("%s/trips_0.rou.xml" % duaDir, routes) shotDir = makeAndChangeDir("../" + mesoAppendix + "oneshot") - shotCall = "one-shot.py -e 90000 -n %s -t %s %s" % (netFile, routes, pyAdds) + shotCall = "one-shot.py -e 90000 -n %s -t %s %s" % ( + netFile, routes, pyAdds) if options.mesosim: shotCall = shotCall + " --mesosim" if ncpus > 2: @@ -113,9 +131,11 @@ else: execute(shotCall) clogDir = makeAndChangeDir("../" + mesoAppendix + "clogit") - execute("Assignment.py -i 60 -d ../input/districts.xml -m %s -n %s %s" % (mtxNamesList, netFile, signalAdds)) + execute("Assignment.py -i 60 -d ../input/districts.xml -m %s -n %s %s" % + (mtxNamesList, netFile, signalAdds)) lohseDir = makeAndChangeDir("../" + mesoAppendix + "lohse") - execute("Assignment.py -e lohse -i 60 -d ../input/districts.xml -m %s -n %s %s" % (mtxNamesList, netFile, signalAdds)) + execute("Assignment.py -e lohse -i 60 -d ../input/districts.xml -m %s -n %s %s" % + (mtxNamesList, netFile, signalAdds)) if oneshotProcess: oneshotProcess.wait() duaProcess.wait() @@ -125,7 +145,7 @@ clogDir = "../" + mesoAppendix + "clogit%03i" % options.stats lohseDir = "../" + mesoAppendix + "lohse%03i" % options.stats shotDir = "../" + mesoAppendix + "oneshot%03i" % options.stats - + makeAndChangeDir("../" + mesoAppendix + "statistics") tripinfos = "" routes = [] @@ -133,23 +153,29 @@ tripinfofile = "tripinfo_dua_%s.xml" % step shutil.copy("%s/tripinfo_%s.xml" % (duaDir, step), tripinfofile) tripinfos += tripinfofile + "," - execute("networkStatistics.py -t tripinfo_dua_%s.xml -o networkStatistics_%s_%s.txt" % (step, os.path.basename(duaDir), step)) + execute("networkStatistics.py -t tripinfo_dua_%s.xml -o networkStatistics_%s_%s.txt" % + (step, os.path.basename(duaDir), step)) routes.append("%s/%s_%s.rou.xml" % (duaDir, trips, step)) if not options.duaonly: for step in [-1, 15]: - tripinfofile = "tripinfo_oneshot_%s.xml" % step + tripinfofile = "tripinfo_oneshot_%s.xml" % step shutil.copy("%s/tripinfo_%s.xml" % (shotDir, step), tripinfofile) tripinfos += tripinfofile + "," routes.append("%s/vehroutes_%s.xml" % (shotDir, step)) - execute("sumo -W --no-step-log -n %s -e 90000 -r %s/routes.rou.xml --dump-basename dump_successive --dump-intervals 900 --emissions emissions_successive.xml --tripinfo-output tripinfo_successive.xml %s -l sumo_successive.log" % (netFile, succDir, sumoAdds)) - execute("sumo -W --no-step-log -n %s -e 90000 -r %s/routes.rou.xml --dump-basename dump_clogit --dump-intervals 900 --emissions emissions_clogit.xml --tripinfo-output tripinfo_clogit.xml %s -l sumo_clogit.log" % (netFile, clogDir, sumoAdds)) - execute("sumo -W --no-step-log -n %s -e 90000 -r %s/routes.rou.xml --dump-basename dump_lohse --dump-intervals 900 --emissions emissions_lohse.xml --tripinfo-output tripinfo_lohse.xml %s -l sumo_lohse.log" % (netFile, lohseDir, sumoAdds)) - tripinfos += tripinfofile + ",tripinfo_successive.xml,tripinfo_clogit.xml,tripinfo_lohse.xml" - execute("networkStatistics.py -t %s -o networkStatisticsWithSgT.txt" % tripinfos) - for dir in succDir, clogDir, lohseDir: + execute("sumo -W --no-step-log -n %s -e 90000 -r %s/routes.rou.xml --dump-basename dump_successive --dump-intervals 900 --emissions emissions_successive.xml --tripinfo-output tripinfo_successive.xml %s -l sumo_successive.log" % + (netFile, succDir, sumoAdds)) + execute("sumo -W --no-step-log -n %s -e 90000 -r %s/routes.rou.xml --dump-basename dump_clogit --dump-intervals 900 --emissions emissions_clogit.xml --tripinfo-output tripinfo_clogit.xml %s -l sumo_clogit.log" % + (netFile, clogDir, sumoAdds)) + execute("sumo -W --no-step-log -n %s -e 90000 -r %s/routes.rou.xml --dump-basename dump_lohse --dump-intervals 900 --emissions emissions_lohse.xml --tripinfo-output tripinfo_lohse.xml %s -l sumo_lohse.log" % + (netFile, lohseDir, sumoAdds)) + tripinfos += tripinfofile + \ + ",tripinfo_successive.xml,tripinfo_clogit.xml,tripinfo_lohse.xml" + execute( + "networkStatistics.py -t %s -o networkStatisticsWithSgT.txt" % tripinfos) + for dir in succDir, clogDir, lohseDir: routes.append(dir + "/routes.rou.xml") #outfilename = "routecompare.txt" -#for idx, route1 in enumerate(routes): +# for idx, route1 in enumerate(routes): # for route2 in routes[idx+1:]: # outfile = open(outfilename, "a") # print >> outfile, route1, route2 diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/statisticsElements.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/statisticsElements.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/statisticsElements.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/statisticsElements.py 2015-04-17 00:20:29.000000000 +0000 @@ -1,32 +1,39 @@ """ @file statisticsElements.py -@author Yun-Pang Wang +@author Yun-Pang Floetteroed @author Daniel Krajzewicz @author Michael Behrisch @date 2008-07-10 -@version $Id: statisticsElements.py 14425 2013-08-16 20:11:47Z behrisch $ +@version $Id: statisticsElements.py 18096 2015-03-17 09:50:59Z behrisch $ This script is to define classes, functions, parse-reader and output files/format for - calculating network performances - conducting significance tests (either t-Test or Kruskal-Wallis-Test) and - writing results into files. -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2008-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ import string from xml.sax import saxutils, make_parser, handler -# This class is for storing vehicle information, such as departure time, route and travel time. +# This class is for storing vehicle information, such as departure time, +# route and travel time. class Vehicle: + def __init__(self, label): self.label = label self.method = None self.depart = 0. - self.arrival = 0. + self.arrival = 0. self.speed = 0. self.route = [] self.traveltime = 0. @@ -39,7 +46,10 @@ return "%s_%s_%s_%s_%s_%s<%s>" % (self.label, self.depart, self.arrival, self.speed, self.traveltime, self.travellength, self.route) # This class is used in the significance test. + + class Assign: + def __init__(self, method, totalVeh, totalTravelTime, totalTravelLength, totalDepartDelay, totalWaitTime, avgTravelTime, avgTravelLength, avgTravelSpeed, avgDepartDelay, avgWaitTime, SDTravelTime, SDLength, SDSpeed, SDWaitTime): self.label = method self.totalVeh = totalVeh @@ -53,17 +63,20 @@ self.avgDepartDelay = avgDepartDelay self.avgWaitTime = avgWaitTime self.SDTravelTime = SDTravelTime - self.SDLength = SDLength + self.SDLength = SDLength self.SDSpeed = SDSpeed self.SDWaitTime = SDWaitTime self.sumrank = 0. - + def __repr__(self): return "%s_<%s|%s|%s|%s|%s|%s|%s|%s|%s>" % (self.label, self.totalVeh, self.avgTravelTime, self.avgTravelLength, self.avgTravelSpeed, - self.avgWaitTime, self.SDTravelTime, self.SDLength, self.SDSpeed, self.SDWaitTime) + self.avgWaitTime, self.SDTravelTime, self.SDLength, self.SDSpeed, self.SDWaitTime) # This cloass is used for the t test in the significance test. + + class T_Value: + def __init__(self, avgtraveltime, avgtravelspeed, avgtravellength, avgwaittime, lowvalue, highvalue): self.avgtraveltime = avgtraveltime self.avgtravelspeed = avgtravelspeed @@ -71,12 +84,15 @@ self.avgwaittime = avgwaittime self.lowtvalue = lowvalue self.hightvalue = highvalue - + def __repr__(self): return "%<%s|%s|%s|%s>" % (self.avgtraveltime, self.avgtravelspeed, self.avgtravellength, self.avgwaittime) # This class is used for the Kruskal-Wallis test in the significance test. + + class H_Value: + def __init__(self, label, lowvalue, highvalue): self.label = label self.traveltime = 0. @@ -84,74 +100,101 @@ self.travellength = 0. self.waittime = 0. # 95% confidence interval - self.lowchivalue = lowvalue + self.lowchivalue = lowvalue # 99% confidence interval self.highchivalue = highvalue - + def __repr__(self): return "%<%s|%s|%s|%s|%s|%s>" % (self.traveltime, self.travelspeed, self.travellength, self.waittime, self.lowchivalue, self.highchivalue) - + # The class is for parsing the XML input file (vehicle information). This class is used in the networkStatistics.py for -# calculating the gloabal network performances, e.g. avg. travel time and avg. travel speed. +# calculating the gloabal network performances, e.g. avg. travel time and +# avg. travel speed. + + class VehInformationReader(handler.ContentHandler): + def __init__(self, vehList): self._vehList = vehList self._Vehicle = None self._routeString = '' - + def startElement(self, name, attrs): if name == 'tripinfo': self._Vehicle = Vehicle(attrs['id']) self._Vehicle.traveltime = float(attrs['duration']) self._Vehicle.travellength = float(attrs['routeLength']) self._Vehicle.departdelay = float(attrs['departDelay']) - self._Vehicle.waittime = float(attrs['departDelay']) + float(attrs['waitSteps']) + self._Vehicle.waittime = float( + attrs['departDelay']) + float(attrs['waitSteps']) self._vehList.append(self._Vehicle) - + # output the network statistics based on the sumo-simulation results + + def getStatisticsOutput(assignments, outputfile): foutveh = file(outputfile, 'w') - foutveh.write('average vehicular travel time(s) = the sum of all vehicular travel times / the number of vehicles\n') - foutveh.write('average vehicular travel length(m) = the sum of all vehicular travel lengths / the number of vehicles\n') - foutveh.write('average vehicular travel speed(m/s) = the sum of all vehicular travel speeds / the number of vehicles\n') + foutveh.write( + 'average vehicular travel time(s) = the sum of all vehicular travel times / the number of vehicles\n') + foutveh.write( + 'average vehicular travel length(m) = the sum of all vehicular travel lengths / the number of vehicles\n') + foutveh.write( + 'average vehicular travel speed(m/s) = the sum of all vehicular travel speeds / the number of vehicles\n') for method in assignments.itervalues(): - foutveh.write('\nAssignment Method:%s\n' %method.label) - foutveh.write('- total number of vehicles:%s\n' %method.totalVeh) - foutveh.write('- total departure delay(s):%s, ' %method.totalDepartDelay) - foutveh.write('- average departure delay(s):%s\n' %method.avgDepartDelay) - foutveh.write('- total waiting time(s):%s, ' %method.totalWaitTime) - foutveh.write('- average vehicular waiting time(s):%s\n' %method.avgWaitTime) - foutveh.write('- total travel time(s):%s, ' % method.totalTravelTime) - foutveh.write('- average vehicular travel time(s):%s\n' %method.avgTravelTime) - foutveh.write('- total travel length(m):%s, ' %method.totalTravelLength) - foutveh.write('- average vehicular travel length(m):%s\n' %method.avgTravelLength) - foutveh.write('- average vehicular travel speed(m/s):%s\n' %method.avgTravelSpeed) + foutveh.write('\nAssignment Method:%s\n' % method.label) + foutveh.write('- total number of vehicles:%s\n' % method.totalVeh) + foutveh.write('- total departure delay(s):%s, ' % + method.totalDepartDelay) + foutveh.write('- average departure delay(s):%s\n' % + method.avgDepartDelay) + foutveh.write('- total waiting time(s):%s, ' % method.totalWaitTime) + foutveh.write('- average vehicular waiting time(s):%s\n' % + method.avgWaitTime) + foutveh.write('- total travel time(s):%s, ' % method.totalTravelTime) + foutveh.write('- average vehicular travel time(s):%s\n' % + method.avgTravelTime) + foutveh.write('- total travel length(m):%s, ' % + method.totalTravelLength) + foutveh.write('- average vehicular travel length(m):%s\n' % + method.avgTravelLength) + foutveh.write('- average vehicular travel speed(m/s):%s\n' % + method.avgTravelSpeed) foutveh.close() - -# output the results of the significance tests according to the sumo-simulation results + +# output the results of the significance tests according to the +# sumo-simulation results + + def getSignificanceTestOutput(assignments, tTest, tValueAvg, hValues, outputfile): foutSGtest = file(outputfile, 'w') if tTest: - foutSGtest.write('The significances of the performance averages among the used assignment models are examined with the t test.\n') + foutSGtest.write( + 'The significances of the performance averages among the used assignment models are examined with the t test.\n') assignlist = list(assignments.itervalues()) for num, A in enumerate(assignlist): - for B in assignlist[num+1: ]: - foutSGtest.write('\nmethod:%s' %A.label) - foutSGtest.write('\nmethod:%s' %B.label) - foutSGtest.write('\n t-value for the avg. travel time:%s' %tValueAvg[A][B].avgtraveltime) - foutSGtest.write('\n t-value for the avg. travel length:%s'%tValueAvg[A][B].avgtravellength) - foutSGtest.write('\n t-value for the avg.travel speed:%s' %tValueAvg[A][B].avgtravelspeed) - foutSGtest.write('\n t-value for the avg. wait time:%s\n' %tValueAvg[A][B].avgwaittime) - foutSGtest.write('\n95 t-value:%s' %tValueAvg[A][B].lowtvalue) - foutSGtest.write('\n99 t-value:%s\n' %tValueAvg[A][B].hightvalue) - - foutSGtest.write('The significance test among the different assignment methods is also done with the Kruskal-Wallis test.\n') + for B in assignlist[num + 1:]: + foutSGtest.write('\nmethod:%s' % A.label) + foutSGtest.write('\nmethod:%s' % B.label) + foutSGtest.write( + '\n t-value for the avg. travel time:%s' % tValueAvg[A][B].avgtraveltime) + foutSGtest.write( + '\n t-value for the avg. travel length:%s' % tValueAvg[A][B].avgtravellength) + foutSGtest.write( + '\n t-value for the avg.travel speed:%s' % tValueAvg[A][B].avgtravelspeed) + foutSGtest.write( + '\n t-value for the avg. wait time:%s\n' % tValueAvg[A][B].avgwaittime) + foutSGtest.write('\n95 t-value:%s' % tValueAvg[A][B].lowtvalue) + foutSGtest.write('\n99 t-value:%s\n' % + tValueAvg[A][B].hightvalue) + + foutSGtest.write( + 'The significance test among the different assignment methods is also done with the Kruskal-Wallis test.\n') for h in hValues: - foutSGtest.write('\n\nmethods:%s' %h.label) - foutSGtest.write('\nH_traveltime:%s' %h.traveltime) - foutSGtest.write('\nH_travelspeed:%s' %h.travelspeed) - foutSGtest.write('\nH_travellength:%s' %h.travellength) - foutSGtest.write('\nH_waittime:%s\n' %h.waittime) - foutSGtest.write('\n95 chi-square value:%s' %h.lowchivalue) - foutSGtest.write('\n99 chi-square value:%s\n' %h.highchivalue) + foutSGtest.write('\n\nmethods:%s' % h.label) + foutSGtest.write('\nH_traveltime:%s' % h.traveltime) + foutSGtest.write('\nH_travelspeed:%s' % h.travelspeed) + foutSGtest.write('\nH_travellength:%s' % h.travellength) + foutSGtest.write('\nH_waittime:%s\n' % h.waittime) + foutSGtest.write('\n95 chi-square value:%s' % h.lowchivalue) + foutSGtest.write('\n99 chi-square value:%s\n' % h.highchivalue) foutSGtest.close() diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/tables.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/tables.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/assign/tables.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/assign/tables.py 2015-04-17 00:20:29.000000000 +0000 @@ -1,6 +1,6 @@ """ @file tables.py -@author Yun-Pang Wang +@author Yun-Pang Floetteroed @author Daniel Krajzewicz @author Michael Behrisch @date 2008-03-18 @@ -12,9 +12,14 @@ - define link cost functions - conduct significance tests -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2008-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ crCurveTable = {"CR2": (1., 2., 2.), "CR3": (1., 2., 1.), @@ -28,7 +33,7 @@ "CR12": (1., 4., 1.), "CR13": (1., 2., 1.3)} -#crCurveTable = {"CR1": (1., 2., 1.), +# crCurveTable = {"CR1": (1., 2., 1.), # "CR2": (1., 2., 1.), # "CR3": (1., 2., 1.), # "CR4": (1., 2., 1.), @@ -37,6 +42,7 @@ # "CR10": (1., 2., 1.), # "CR11": (0.25, 2., 1.)} + def updateCurveTable(filename): f = open(filename) for line in f: @@ -45,155 +51,193 @@ for entry in elements[1:]: crCurveTable[elements[0]].append(float(entry)) -laneTypeTable = {1:[[5, 200.0, "CR7"],[7, 412.5, "CR7"],[9, 600.0, "CR6"],[11, 800.0, "CR5"],[13, 1125.0, "CR5"],[16, 1583.33, "CR4"],[18, 1100.0, "CR3"],[22, 1200.0, "CR3"],[26, 1300.0, "CR3"],[30, 1400.0, "CR3"],[999., 1400.0, "CR3"]], - 2:[[11, 800.0, "CR5"],[13, 875.0, "CR5"],[16, 1500.0, "CR4"],[30, 1800.0, "CR13"],[999., 1800.0, "CR13"]], - 3:[[11, 1333.33, "CR5"],[16, 1500.0, "CR3"],[30, 2000.0, "CR13"],[999., 2000.0, "CR13"]], - 4:[[30, 2000.0, "CR13"],[999., 2000.0, "CR13"]]} - -#laneTypeTable = {1:[[7., 200., "CR6"], [9., 800., "CR3"], [12., 800., "CR4"], [13., 800., "CR2"], [18., 1200., "CR2"], [19., 1300., "CR4"], [22., 1200., "CR2"], [25., 1300., "CR2"], [30., 1350., "CR1"], [33., 1400., "CR1"], [999., 1500., "CR1"]], +laneTypeTable = {1: [[5, 200.0, "CR7"], [7, 412.5, "CR7"], [9, 600.0, "CR6"], [11, 800.0, "CR5"], [13, 1125.0, "CR5"], [16, 1583.33, "CR4"], [18, 1100.0, "CR3"], [22, 1200.0, "CR3"], [26, 1300.0, "CR3"], [30, 1400.0, "CR3"], [999., 1400.0, "CR3"]], + 2: [[11, 800.0, "CR5"], [13, 875.0, "CR5"], [16, 1500.0, "CR4"], [30, 1800.0, "CR13"], [999., 1800.0, "CR13"]], + 3: [[11, 1333.33, "CR5"], [16, 1500.0, "CR3"], [30, 2000.0, "CR13"], [999., 2000.0, "CR13"]], + 4: [[30, 2000.0, "CR13"], [999., 2000.0, "CR13"]]} + +# laneTypeTable = {1:[[7., 200., "CR6"], [9., 800., "CR3"], [12., 800., "CR4"], [13., 800., "CR2"], [18., 1200., "CR2"], [19., 1300., "CR4"], [22., 1200., "CR2"], [25., 1300., "CR2"], [30., 1350., "CR1"], [33., 1400., "CR1"], [999., 1500., "CR1"]], # 2:[[7., 200., "CR6"], [9., 800., "CR3"], [13., 1000., "CR3"], [15., 1050., "CR2"], [16., 1100., "CR2"], [25., 1300., "CR2"], [27., 1400., "CR1"], [29., 1400., "CR3"], [30., 1500., "CR2"], [34., 1400., "CR2"], [999., 1500., "CR1"]], # 3:[[7., 200., "CR6"], [9., 800., "CR3"], [13., 1000, "CR3"], [16., 1100., "CR2"], [19., 1300., "CR2"], [25., 1400., "CR2"], [27., 1400., "CR1"], [30., 1500., "CR2"], [33., 1400., "CR1"], [999., 1500., "CR1"]], -# 4:[[7., 200., "CR6"], [9., 800., "CR3"], [13., 1000., "CR3"], [17, 1100., "CR2"], [19., 1300., "CR1"], [25., 1400., "CR2"], [27., 1400., "CR2"], [29., 1400., "CR3"], [30., 1500., "CR2"], [33., 1400., "CR1"], [999., 1500., "CR1"]]} - +# 4:[[7., 200., "CR6"], [9., 800., "CR3"], [13., 1000., "CR3"], [17, +# 1100., "CR2"], [19., 1300., "CR1"], [25., 1400., "CR2"], [27., 1400., +# "CR2"], [29., 1400., "CR3"], [30., 1500., "CR2"], [33., 1400., "CR1"], +# [999., 1500., "CR1"]]} + chiSquareTable = \ -[[ 0, 0.10, 0.05, 0.025, 0.01, 0.001], -[ 1, 2.706, 3.841, 5.024, 6.635, 10.828], -[ 2, 4.605, 5.991, 7.378, 9.210, 13.816], -[ 3, 6.251, 7.815, 9.348, 11.345, 16.266], -[ 4, 7.779, 9.488, 11.143, 13.277, 18.467], -[ 5, 9.236, 11.070, 12.833, 15.086, 20.515], -[ 6, 10.645, 12.592, 14.449, 16.812, 22.458], -[ 7, 12.017, 14.067, 16.013, 18.475, 24.322], -[ 8, 13.362, 15.507, 17.535, 20.090, 26.125], -[ 9, 14.684, 16.919, 19.023, 21.666, 27.877], -[ 10, 15.987, 18.307, 20.483, 23.209, 29.588], -[ 11, 17.275, 19.675, 21.920, 24.725, 31.264], -[ 12, 18.549, 21.026, 23.337, 26.217, 32.910], -[ 13, 19.812, 22.362, 24.736, 27.688, 34.528], -[ 14, 21.064, 23.685, 26.119, 29.141, 36.123], -[ 15, 22.307, 24.996, 27.488, 30.578, 37.697], -[ 16, 23.542, 26.296, 28.845, 32.000, 39.252], -[ 17, 24.769, 27.587, 30.191, 33.409, 40.790], -[ 18, 25.989, 28.869, 31.526, 34.805, 42.312], -[ 19, 27.204, 30.144, 32.852, 36.191, 43.820], -[ 20, 28.412, 31.410, 34.170, 37.566, 45.315], -[ 21, 29.615, 32.671, 35.479, 38.932, 46.797], -[ 22, 30.813, 33.924, 36.781, 40.289, 48.268], -[ 23, 32.007, 35.172, 38.076, 41.638, 49.728], -[ 24, 33.196, 36.415, 39.364, 42.980, 51.179], -[ 25, 34.382, 37.652, 40.646, 44.314, 52.620], -[ 26, 35.563, 38.885, 41.923, 45.642, 54.052], -[ 27, 36.741, 40.113, 43.195, 46.963, 55.476], -[ 28, 37.916, 41.337, 44.461, 48.278, 56.892], -[ 29, 39.087, 42.557, 45.722, 49.588, 58.301], -[ 30, 40.256, 43.773, 46.979, 50.892, 59.703], -[ 31, 41.422, 44.985, 48.232, 52.191, 61.098], -[ 32, 42.585, 46.194, 49.480, 53.486, 62.487], -[ 33, 43.745, 47.400, 50.725, 54.776, 63.870], -[ 34, 44.903, 48.602, 51.966, 56.061, 65.247], -[ 35, 46.059, 49.802, 53.203, 57.342, 66.619], -[ 36, 47.212, 50.998, 54.437, 58.619, 67.985], -[ 37, 48.363, 52.192, 55.668, 59.893, 69.347], -[ 38, 49.513, 53.384, 56.896, 61.162, 70.703], -[ 39, 50.660, 54.572, 58.120, 62.428, 72.055], -[ 40, 51.805, 55.758, 59.342, 63.691, 73.402], -[ 41, 52.949, 56.942, 60.561, 64.950, 74.745], -[ 42, 54.090, 58.124, 61.777, 66.206, 76.084], -[ 43, 55.230, 59.304, 62.990, 67.459, 77.419], -[ 44, 56.369, 60.481, 64.201, 68.710, 78.750], -[ 45, 57.505, 61.656, 65.410, 69.957, 80.077], -[ 46, 58.641, 62.830, 66.617, 71.201, 81.400], -[ 47, 59.774, 64.001, 67.821, 72.443, 82.720], -[ 48, 60.907, 65.171, 69.023, 73.683, 84.037], -[ 49, 62.038, 66.339, 70.222, 74.919, 85.351], -[ 50, 63.167, 67.505, 71.420, 76.154, 86.661], -[ 51, 64.295, 68.669, 72.616, 77.386, 87.968], -[ 52, 65.422, 69.832, 73.810, 78.616, 89.272], -[ 53, 66.548, 70.993, 75.002, 79.843, 90.573], -[ 54, 67.673, 72.153, 76.192, 81.069, 91.872], -[ 55, 68.796, 73.311, 77.380, 82.292, 93.168], -[ 56, 69.919, 74.468, 78.567, 83.513, 94.461], -[ 57, 71.040, 75.624, 79.752, 84.733, 95.751], -[ 58, 72.160, 76.778, 80.936, 85.950, 97.039], -[ 59, 73.279, 77.931, 82.117, 87.166, 98.324], -[ 60, 74.397, 79.082, 83.298, 88.379, 99.607], -[ 61, 75.514, 80.232, 84.476, 89.591, 100.888], -[ 62, 76.630, 81.381, 85.654, 90.802, 102.166], -[ 63, 77.745, 82.529, 86.830, 92.010, 103.442], -[ 64, 78.860, 83.675, 88.004, 93.217, 104.716], -[ 65, 79.973, 84.821, 89.177, 94.422, 105.988], -[ 66, 81.085, 85.965, 90.349, 95.626, 107.258], -[ 67, 82.197, 87.108, 91.519, 96.828, 108.526], -[ 68, 83.308, 88.250, 92.689, 98.028, 109.791], -[ 69, 84.418, 89.391, 93.856, 99.228, 111.055], -[ 70, 85.527, 90.531, 95.023, 100.425, 112.317], -[ 71, 86.635, 91.670, 96.189, 101.621, 113.577], -[ 72, 87.743, 92.808, 97.353, 102.816, 114.835], -[ 73, 88.850, 93.945, 98.516, 104.010, 116.092], -[ 74, 89.956, 95.081, 99.678, 105.202, 117.346], -[ 75, 91.061, 96.217, 100.839, 106.393, 118.599], -[ 76, 92.166, 97.351, 101.999, 107.583, 119.850], -[ 77, 93.270, 98.484, 103.158, 108.771, 121.100], -[ 78, 94.374, 99.617, 104.316, 109.958, 122.348], -[ 79, 95.476, 100.749, 105.473, 111.144, 123.594], -[ 80, 96.578, 101.879, 106.629, 112.329, 124.839], -[ 81, 97.680, 103.010, 107.783, 113.512, 126.083], -[ 82, 98.780, 104.139, 108.937, 114.695, 127.324], -[ 83, 99.880, 105.267, 110.090, 115.876, 128.565], -[ 84, 100.980, 106.395, 111.242, 117.057, 129.804], -[ 85, 102.079, 107.522, 112.393, 118.236, 131.041], -[ 86, 103.177, 108.648, 113.544, 119.414, 132.277], -[ 87, 104.275, 109.773, 114.693, 120.591, 133.512], -[ 88, 105.372, 110.898, 115.841, 121.767, 134.746], -[ 89, 106.469, 112.022, 116.989, 122.942, 135.978], -[ 90, 107.565, 113.145, 118.136, 124.116, 137.208], -[ 91, 108.661, 114.268, 119.282, 125.289, 138.438], -[ 92, 109.756, 115.390, 120.427, 126.462, 139.666], -[ 93, 110.850, 116.511, 121.571, 127.633, 140.893], -[ 94, 111.944, 117.632, 122.715, 128.803, 142.119], -[ 95, 113.038, 118.752, 123.858, 129.973, 143.344], -[ 96, 114.131, 119.871, 125.000, 131.141, 144.567], -[ 97, 115.223, 120.990, 126.141, 132.309, 145.789], -[ 98, 116.315, 122.108, 127.282, 133.476, 147.010], -[ 99, 117.407, 123.225, 128.422, 134.642, 148.230], -[100, 118.498, 124.342, 129.561, 135.807, 149.449]] + [[0, 0.10, 0.05, 0.025, 0.01, 0.001], + [1, 2.706, 3.841, 5.024, 6.635, 10.828], + [2, 4.605, 5.991, 7.378, 9.210, 13.816], + [3, 6.251, 7.815, 9.348, 11.345, 16.266], + [4, 7.779, 9.488, 11.143, 13.277, 18.467], + [5, 9.236, 11.070, 12.833, 15.086, 20.515], + [6, 10.645, 12.592, 14.449, 16.812, 22.458], + [7, 12.017, 14.067, 16.013, 18.475, 24.322], + [8, 13.362, 15.507, 17.535, 20.090, 26.125], + [9, 14.684, 16.919, 19.023, 21.666, 27.877], + [10, 15.987, 18.307, 20.483, 23.209, 29.588], + [11, 17.275, 19.675, 21.920, 24.725, 31.264], + [12, 18.549, 21.026, 23.337, 26.217, 32.910], + [13, 19.812, 22.362, 24.736, 27.688, 34.528], + [14, 21.064, 23.685, 26.119, 29.141, 36.123], + [15, 22.307, 24.996, 27.488, 30.578, 37.697], + [16, 23.542, 26.296, 28.845, 32.000, 39.252], + [17, 24.769, 27.587, 30.191, 33.409, 40.790], + [18, 25.989, 28.869, 31.526, 34.805, 42.312], + [19, 27.204, 30.144, 32.852, 36.191, 43.820], + [20, 28.412, 31.410, 34.170, 37.566, 45.315], + [21, 29.615, 32.671, 35.479, 38.932, 46.797], + [22, 30.813, 33.924, 36.781, 40.289, 48.268], + [23, 32.007, 35.172, 38.076, 41.638, 49.728], + [24, 33.196, 36.415, 39.364, 42.980, 51.179], + [25, 34.382, 37.652, 40.646, 44.314, 52.620], + [26, 35.563, 38.885, 41.923, 45.642, 54.052], + [27, 36.741, 40.113, 43.195, 46.963, 55.476], + [28, 37.916, 41.337, 44.461, 48.278, 56.892], + [29, 39.087, 42.557, 45.722, 49.588, 58.301], + [30, 40.256, 43.773, 46.979, 50.892, 59.703], + [31, 41.422, 44.985, 48.232, 52.191, 61.098], + [32, 42.585, 46.194, 49.480, 53.486, 62.487], + [33, 43.745, 47.400, 50.725, 54.776, 63.870], + [34, 44.903, 48.602, 51.966, 56.061, 65.247], + [35, 46.059, 49.802, 53.203, 57.342, 66.619], + [36, 47.212, 50.998, 54.437, 58.619, 67.985], + [37, 48.363, 52.192, 55.668, 59.893, 69.347], + [38, 49.513, 53.384, 56.896, 61.162, 70.703], + [39, 50.660, 54.572, 58.120, 62.428, 72.055], + [40, 51.805, 55.758, 59.342, 63.691, 73.402], + [41, 52.949, 56.942, 60.561, 64.950, 74.745], + [42, 54.090, 58.124, 61.777, 66.206, 76.084], + [43, 55.230, 59.304, 62.990, 67.459, 77.419], + [44, 56.369, 60.481, 64.201, 68.710, 78.750], + [45, 57.505, 61.656, 65.410, 69.957, 80.077], + [46, 58.641, 62.830, 66.617, 71.201, 81.400], + [47, 59.774, 64.001, 67.821, 72.443, 82.720], + [48, 60.907, 65.171, 69.023, 73.683, 84.037], + [49, 62.038, 66.339, 70.222, 74.919, 85.351], + [50, 63.167, 67.505, 71.420, 76.154, 86.661], + [51, 64.295, 68.669, 72.616, 77.386, 87.968], + [52, 65.422, 69.832, 73.810, 78.616, 89.272], + [53, 66.548, 70.993, 75.002, 79.843, 90.573], + [54, 67.673, 72.153, 76.192, 81.069, 91.872], + [55, 68.796, 73.311, 77.380, 82.292, 93.168], + [56, 69.919, 74.468, 78.567, 83.513, 94.461], + [57, 71.040, 75.624, 79.752, 84.733, 95.751], + [58, 72.160, 76.778, 80.936, 85.950, 97.039], + [59, 73.279, 77.931, 82.117, 87.166, 98.324], + [60, 74.397, 79.082, 83.298, 88.379, 99.607], + [61, 75.514, 80.232, 84.476, 89.591, 100.888], + [62, 76.630, 81.381, 85.654, 90.802, 102.166], + [63, 77.745, 82.529, 86.830, 92.010, 103.442], + [64, 78.860, 83.675, 88.004, 93.217, 104.716], + [65, 79.973, 84.821, 89.177, 94.422, 105.988], + [66, 81.085, 85.965, 90.349, 95.626, 107.258], + [67, 82.197, 87.108, 91.519, 96.828, 108.526], + [68, 83.308, 88.250, 92.689, 98.028, 109.791], + [69, 84.418, 89.391, 93.856, 99.228, 111.055], + [70, 85.527, 90.531, 95.023, 100.425, 112.317], + [71, 86.635, 91.670, 96.189, 101.621, 113.577], + [72, 87.743, 92.808, 97.353, 102.816, 114.835], + [73, 88.850, 93.945, 98.516, 104.010, 116.092], + [74, 89.956, 95.081, 99.678, 105.202, 117.346], + [75, 91.061, 96.217, 100.839, 106.393, 118.599], + [76, 92.166, 97.351, 101.999, 107.583, 119.850], + [77, 93.270, 98.484, 103.158, 108.771, 121.100], + [78, 94.374, 99.617, 104.316, 109.958, 122.348], + [79, 95.476, 100.749, 105.473, 111.144, 123.594], + [80, 96.578, 101.879, 106.629, 112.329, 124.839], + [81, 97.680, 103.010, 107.783, 113.512, 126.083], + [82, 98.780, 104.139, 108.937, 114.695, 127.324], + [83, 99.880, 105.267, 110.090, 115.876, 128.565], + [84, 100.980, 106.395, 111.242, 117.057, 129.804], + [85, 102.079, 107.522, 112.393, 118.236, 131.041], + [86, 103.177, 108.648, 113.544, 119.414, 132.277], + [87, 104.275, 109.773, 114.693, 120.591, 133.512], + [88, 105.372, 110.898, 115.841, 121.767, 134.746], + [89, 106.469, 112.022, 116.989, 122.942, 135.978], + [90, 107.565, 113.145, 118.136, 124.116, 137.208], + [91, 108.661, 114.268, 119.282, 125.289, 138.438], + [92, 109.756, 115.390, 120.427, 126.462, 139.666], + [93, 110.850, 116.511, 121.571, 127.633, 140.893], + [94, 111.944, 117.632, 122.715, 128.803, 142.119], + [95, 113.038, 118.752, 123.858, 129.973, 143.344], + [96, 114.131, 119.871, 125.000, 131.141, 144.567], + [97, 115.223, 120.990, 126.141, 132.309, 145.789], + [98, 116.315, 122.108, 127.282, 133.476, 147.010], + [99, 117.407, 123.225, 128.422, 134.642, 148.230], + [100, 118.498, 124.342, 129.561, 135.807, 149.449]] tTable = \ -[[0, 0.25, 0.20, 0.15, 0.10, 0.05, 0.025, 0.02, 0.01, 0.005, 0.0025, 0.001, 0.0005], -[1, 1.000, 1.376, 1.963, 3.078, 6.314, 12.71, 15.89, 31.82, 63.66, 127.3, 318.3, 636.6], -[2, 0.816, 1.061, 1.386, 1.886, 2.920, 4.303, 4.849, 6.965, 9.925, 14.09, 22.33, 31.60], -[3, 0.765, 0.978, 1.250, 1.638, 2.353, 3.182, 3.482, 4.541, 5.841, 7.453, 10.21, 12.92], -[4, 0.741, 0.941, 1.190, 1.533, 2.132, 2.776, 2.999, 3.747, 4.604, 5.598, 7.173, 8.610], -[5, 0.727, 0.920, 1.156, 1.476, 2.015, 2.571, 2.757, 3.365, 4.032, 4.773, 5.893, 6.869], -[6, 0.718, 0.906, 1.134, 1.440, 1.943, 2.447, 2.612, 3.143, 3.707, 4.317, 5.208, 5.959], -[7, 0.711, 0.896, 1.119, 1.415, 1.895, 2.365, 2.517, 2.998, 3.499, 4.029, 4.785, 5.408], -[8, 0.706, 0.889, 1.108, 1.397, 1.860, 2.306, 2.449, 2.896, 3.355, 3.833, 4.501, 5.041], -[9, 0.703, 0.883, 1.100, 1.383, 1.833, 2.262, 2.398, 2.821, 3.250, 3.690, 4.297, 4.781], -[10, 0.700, 0.879, 1.093, 1.372, 1.812, 2.228, 2.359, 2.764, 3.169, 3.581, 4.144, 4.587], -[11, 0.697, 0.876, 1.088, 1.363, 1.796, 2.201, 2.328, 2.718, 3.106, 3.497, 4.025, 4.437], -[12, 0.695, 0.873, 1.083, 1.356, 1.782, 2.179, 2.303, 2.681, 3.055, 3.428, 3.930, 4.318], -[13, 0.694, 0.870, 1.079, 1.350, 1.771, 2.160, 2.282, 2.650, 3.012, 3.372, 3.852, 4.221], -[14, 0.692, 0.868, 1.076, 1.345, 1.761, 2.145, 2.264, 2.624, 2.977, 3.326, 3.787, 4.140], -[15, 0.691, 0.866, 1.074, 1.341, 1.753, 2.131, 2.249, 2.602, 2.947, 3.286, 3.733, 4.073], -[16, 0.690, 0.865, 1.071, 1.337, 1.746, 2.120, 2.235, 2.583, 2.921, 3.252, 3.686, 4.015], -[17, 0.689, 0.863, 1.069, 1.333, 1.740, 2.110, 2.224, 2.567, 2.898, 3.222, 3.646, 3.965], -[18, 0.688, 0.862, 1.067, 1.330, 1.734, 2.101, 2.214, 2.552, 2.878, 3.197, 3.611, 3.922], -[19, 0.688, 0.861, 1.066, 1.328, 1.729, 2.093, 2.205, 2.539, 2.861, 3.174, 3.579, 3.883], -[20, 0.687, 0.860, 1.064, 1.325, 1.725, 2.086, 2.197, 2.528, 2.845, 3.153, 3.552, 3.850], -[21, 0.663, 0.859, 1.063, 1.323, 1.721, 2.080, 2.189, 2.518, 2.831, 3.135, 3.527, 3.819], -[22, 0.686, 0.858, 1.061, 1.321, 1.717, 2.074, 2.183, 2.508, 2.819, 3.119, 3.505, 3.792], -[23, 0.685, 0.858, 1.060, 1.319, 1.714, 2.069, 2.177, 2.500, 2.807, 3.104, 3.485, 3.768], -[24, 0.685, 0.857, 1.059, 1.318, 1.711, 2.064, 2.172, 2.492, 2.797, 3.091, 3.467, 3.745], -[25, 0.684, 0.856, 1.058, 1.316, 1.708, 2.060, 2.167, 2.485, 2.787, 3.078, 3.450, 3.725], -[26, 0.684, 0.856, 1.058, 1.315, 1.706, 2.056, 2.162, 2.479, 2.779, 3.067, 3.435, 3.707], -[27, 0.684, 0.855, 1.057, 1.314, 1.703, 2.052, 2.15, 2.473, 2.771, 3.057, 3.421, 3.690], -[28, 0.683, 0.855, 1.056, 1.313, 1.701, 2.048, 2.154, 2.467, 2.763, 3.047, 3.408, 3.674], -[29, 0.683, 0.854, 1.055, 1.311, 1.699, 2.045, 2.150, 2.462, 2.756, 3.038, 3.396, 3.659], -[30, 0.683, 0.854, 1.055, 1.310, 1.697, 2.042, 2.147, 2.457, 2.750, 3.030, 3.385, 3.646], -[40, 0.681, 0.851, 1.050, 1.303, 1.684, 2.021, 2.123, 2.423, 2.704, 2.971, 3.307, 3.551], -[50, 0.679, 0.849, 1.047, 1.295, 1.676, 2.009, 2.109, 2.403, 2.678, 2.937, 3.261, 3.496], -[60, 0.679, 0.848, 1.045, 1.296, 1.671, 2.000, 2.099, 2.390, 2.660, 2.915, 3.232, 3.460], -[80, 0.678, 0.846, 1.043, 1.292, 1.664, 1.990, 2.088, 2.374, 2.639, 2.887, 3.195, 3.416], -[100, 0.677, 0.845, 1.042, 1.290, 1.660, 1.984, 2.081, 2.364, 2.626, 2.871, 3.174, 3.390], -[1000, 0.675, 0.842, 1.037, 1.282, 1.646, 1.962, 2.056, 2.330, 2.581, 2.813, 3.098, 3.300]] + [[0, 0.25, 0.20, 0.15, 0.10, 0.05, 0.025, 0.02, 0.01, 0.005, 0.0025, 0.001, 0.0005], + [1, 1.000, 1.376, 1.963, 3.078, 6.314, 12.71, + 15.89, 31.82, 63.66, 127.3, 318.3, 636.6], + [2, 0.816, 1.061, 1.386, 1.886, 2.920, 4.303, + 4.849, 6.965, 9.925, 14.09, 22.33, 31.60], + [3, 0.765, 0.978, 1.250, 1.638, 2.353, 3.182, + 3.482, 4.541, 5.841, 7.453, 10.21, 12.92], + [4, 0.741, 0.941, 1.190, 1.533, 2.132, 2.776, + 2.999, 3.747, 4.604, 5.598, 7.173, 8.610], + [5, 0.727, 0.920, 1.156, 1.476, 2.015, 2.571, + 2.757, 3.365, 4.032, 4.773, 5.893, 6.869], + [6, 0.718, 0.906, 1.134, 1.440, 1.943, 2.447, + 2.612, 3.143, 3.707, 4.317, 5.208, 5.959], + [7, 0.711, 0.896, 1.119, 1.415, 1.895, 2.365, + 2.517, 2.998, 3.499, 4.029, 4.785, 5.408], + [8, 0.706, 0.889, 1.108, 1.397, 1.860, 2.306, + 2.449, 2.896, 3.355, 3.833, 4.501, 5.041], + [9, 0.703, 0.883, 1.100, 1.383, 1.833, 2.262, + 2.398, 2.821, 3.250, 3.690, 4.297, 4.781], + [10, 0.700, 0.879, 1.093, 1.372, 1.812, 2.228, + 2.359, 2.764, 3.169, 3.581, 4.144, 4.587], + [11, 0.697, 0.876, 1.088, 1.363, 1.796, 2.201, + 2.328, 2.718, 3.106, 3.497, 4.025, 4.437], + [12, 0.695, 0.873, 1.083, 1.356, 1.782, 2.179, + 2.303, 2.681, 3.055, 3.428, 3.930, 4.318], + [13, 0.694, 0.870, 1.079, 1.350, 1.771, 2.160, + 2.282, 2.650, 3.012, 3.372, 3.852, 4.221], + [14, 0.692, 0.868, 1.076, 1.345, 1.761, 2.145, + 2.264, 2.624, 2.977, 3.326, 3.787, 4.140], + [15, 0.691, 0.866, 1.074, 1.341, 1.753, 2.131, + 2.249, 2.602, 2.947, 3.286, 3.733, 4.073], + [16, 0.690, 0.865, 1.071, 1.337, 1.746, 2.120, + 2.235, 2.583, 2.921, 3.252, 3.686, 4.015], + [17, 0.689, 0.863, 1.069, 1.333, 1.740, 2.110, + 2.224, 2.567, 2.898, 3.222, 3.646, 3.965], + [18, 0.688, 0.862, 1.067, 1.330, 1.734, 2.101, + 2.214, 2.552, 2.878, 3.197, 3.611, 3.922], + [19, 0.688, 0.861, 1.066, 1.328, 1.729, 2.093, + 2.205, 2.539, 2.861, 3.174, 3.579, 3.883], + [20, 0.687, 0.860, 1.064, 1.325, 1.725, 2.086, + 2.197, 2.528, 2.845, 3.153, 3.552, 3.850], + [21, 0.663, 0.859, 1.063, 1.323, 1.721, 2.080, + 2.189, 2.518, 2.831, 3.135, 3.527, 3.819], + [22, 0.686, 0.858, 1.061, 1.321, 1.717, 2.074, + 2.183, 2.508, 2.819, 3.119, 3.505, 3.792], + [23, 0.685, 0.858, 1.060, 1.319, 1.714, 2.069, + 2.177, 2.500, 2.807, 3.104, 3.485, 3.768], + [24, 0.685, 0.857, 1.059, 1.318, 1.711, 2.064, + 2.172, 2.492, 2.797, 3.091, 3.467, 3.745], + [25, 0.684, 0.856, 1.058, 1.316, 1.708, 2.060, + 2.167, 2.485, 2.787, 3.078, 3.450, 3.725], + [26, 0.684, 0.856, 1.058, 1.315, 1.706, 2.056, + 2.162, 2.479, 2.779, 3.067, 3.435, 3.707], + [27, 0.684, 0.855, 1.057, 1.314, 1.703, 2.052, + 2.15, 2.473, 2.771, 3.057, 3.421, 3.690], + [28, 0.683, 0.855, 1.056, 1.313, 1.701, 2.048, + 2.154, 2.467, 2.763, 3.047, 3.408, 3.674], + [29, 0.683, 0.854, 1.055, 1.311, 1.699, 2.045, + 2.150, 2.462, 2.756, 3.038, 3.396, 3.659], + [30, 0.683, 0.854, 1.055, 1.310, 1.697, 2.042, + 2.147, 2.457, 2.750, 3.030, 3.385, 3.646], + [40, 0.681, 0.851, 1.050, 1.303, 1.684, 2.021, + 2.123, 2.423, 2.704, 2.971, 3.307, 3.551], + [50, 0.679, 0.849, 1.047, 1.295, 1.676, 2.009, + 2.109, 2.403, 2.678, 2.937, 3.261, 3.496], + [60, 0.679, 0.848, 1.045, 1.296, 1.671, 2.000, + 2.099, 2.390, 2.660, 2.915, 3.232, 3.460], + [80, 0.678, 0.846, 1.043, 1.292, 1.664, 1.990, + 2.088, 2.374, 2.639, 2.887, 3.195, 3.416], + [100, 0.677, 0.845, 1.042, 1.290, 1.660, 1.984, + 2.081, 2.364, 2.626, 2.871, 3.174, 3.390], + [1000, 0.675, 0.842, 1.037, 1.282, 1.646, 1.962, 2.056, 2.330, 2.581, 2.813, 3.098, 3.300]] diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/bin/traceExporter.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/bin/traceExporter.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/bin/traceExporter.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/bin/traceExporter.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,226 +0,0 @@ -""" -@file traceExporter.py -@author Daniel Krajzewicz -@date 2013-01-15 -@version $Id: traceExporter.py 14425 2013-08-16 20:11:47Z behrisch $ - -A script for converting SUMO's fcd-output into files readable by PHEM - and communication simulators. - -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2013 DLR (http://www.dlr.de/) and contributors -All rights reserved -""" - -import os, subprocess, sys, random -sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'tools')) -sys.path.append(os.path.join(os.environ.get("SUMO_HOME", os.path.join(os.path.dirname(__file__), '..', '..')), 'tools')) - -import sumolib.net -import sumolib.output.convert.phem as phem -import sumolib.output.convert.omnet as omnet -import sumolib.output.convert.shawn as shawn -import sumolib.output.convert.ns2 as ns2 -import sumolib.output.convert.gpsdat as gpsdat -from random import gauss, random -from datetime import datetime, timedelta - -class FCDVehicleEntry: - def __init__(self, id, x, y, z, speed, typev, lane, slope): - self.id = id - self.x = x - self.y = y - self.z = z - self.speed = speed - self.type = typev - self.lane = lane - self.slope = slope - - -class FCDTimeEntry: - def __init__(self, t): - self.time = t - self.vehicle = [] - -def disturb_gps(x, y, deviation): - if deviation == 0: - return x, y - x += gauss(0, deviation) - y += gauss(0, deviation) - return x, y - -def _getOutputStream(name): - if not name: - return None - return open(name, "w") - -def _closeOutputStream(strm): - if strm: strm.close() - - -def procFCDStream(fcdstream, options): - pt = -1 # "prior" time step - lt = -1 # "last" time step - ft = -1 # "first" time step - lastExported = -1 - chosen = {} - for i,q in enumerate(fcdstream): - pt = lt - lt = float(q.time.encode("latin1")) - if ft<0: - # this is the first step contained in the simulation - ft = lt # save it for later purposes - if options.begin and options.begin>lt: - continue # do not export steps before a set begin - if options.end and options.end<=lt: - continue # do not export steps after a set end - if lastExported>=0 and (options.delta and options.delta+lastExported>lt): - continue # do not export between delta-t, if set - lastExported = lt - e = FCDTimeEntry(lt) - if q.vehicle: - for v in q.vehicle: - if v not in chosen: chosen[v] = random()=0: further["base-date"] = datetime.fromtimestamp(options.base) - else: further["base-date"] = datetime.now() - o = _getOutputStream(outputFile) - fcdStream = sumolib.output.parse(inputFile, "timestep") - ret = writer(procFCDStream(fcdStream, options), o, further) - _closeOutputStream(o) - return ret - - -def main(args=None): - """The main function; parses options and converts...""" - ## ---------- build and read options ---------- - from optparse import OptionParser - optParser = OptionParser() - optParser.add_option("-i", "--fcd-input", dest="fcd", metavar="FILE", - help="Defines the FCD-output file to use as input") - optParser.add_option("-n", "--net-input", dest="net", metavar="FILE", - help="Defines the network file to use as input") - optParser.add_option("-p", "--penetration", dest="penetration", - default=1., help="Defines the percentage (0-1) of vehicles to export") - optParser.add_option("-b", "--begin", dest="begin", - type="float", help="Defines the first step to export") - optParser.add_option("-e", "--end", dest="end", - type="float", help="Defines the first step not longer to export") - optParser.add_option("-d", "--delta-t", dest="delta", - type="float", help="Defines the export step length") - optParser.add_option("--gps-blur", dest="blur", default=0, - type="float", help="Defines the GPS blur") - optParser.add_option("-s", "--seed", dest="seed", default=0, - type="float", help="Defines the randomizer seed") - optParser.add_option("--base-date", dest="base", default=-1, type="int", help="Defines the base date") - # PHEM - optParser.add_option("--dri-output", dest="dri", metavar="FILE", - help="Defines the name of the PHEM .dri-file to generate") - optParser.add_option("--str-output", dest="str", metavar="FILE", - help="Defines the name of the PHEM .str-file to generate") - optParser.add_option("--fzp-output", dest="fzp", metavar="FILE", - help="Defines the name of the PHEM .fzp-file to generate") - optParser.add_option("--flt-output", dest="flt", metavar="FILE", - help="Defines the name of the PHEM .flt-file to generate") - # OMNET - optParser.add_option("--omnet-output", dest="omnet", metavar="FILE", - help="Defines the name of the OMNET file to generate") - # Shawn - optParser.add_option("--shawn-output", dest="shawn", metavar="FILE", - help="Defines the name of the Shawn file to generate") - # ns2 - optParser.add_option("--ns2activity-output", dest="ns2activity", metavar="FILE", - help="Defines the name of the ns2 file to generate") - optParser.add_option("--ns2config-output", dest="ns2config", metavar="FILE", - help="Defines the name of the ns2 file to generate") - optParser.add_option("--ns2mobility-output", dest="ns2mobility", metavar="FILE", - help="Defines the name of the ns2 file to generate") - # GPSDAT - optParser.add_option("--gpsdat-output", dest="gpsdat", metavar="FILE", - help="Defines the name of the gpsdat file to generate") - # parse - options, remaining_args = optParser.parse_args(args=args) - - if options.seed: - random.seed(options.seed) - ## ---------- process ---------- - net = None - ## ----- check needed values - if options.delta and options.delta<=0: - print "delta-t must be a positive value." - return 1 - # phem - if (options.dri or options.fzp or options.flt) and not options.fcd: - print "A fcd-output from SUMO must be given using the --fcd-input." - return 1 - if (options.str or options.fzp or options.flt) and not options.net: - print "A SUMO network must be given using the --net-input option." - return 1 - # omnet - if options.omnet and not options.fcd: - print "A fcd-output from SUMO must be given using the --fcd-input." - return 1 - ## ----- check needed values - - ## ----- OMNET - if options.omnet: runMethod(options.fcd, options.omnet, omnet.fcd2omnet, options) - ## ----- OMNET - - ## ----- Shawn - if options.shawn: runMethod(options.fcd, options.shawn, shawn.fcd2shawn, options) - ## ----- Shawn - - ## ----- GPSDAT - if options.gpsdat: runMethod(options.fcd, options.gpsdat, gpsdat.fcd2gpsdat, options) - ## ----- GPSDAT - - ## ----- ns2 - if options.ns2mobility or options.ns2config or options.ns2activity: - vIDm, vehInfo, begin, end, area = runMethod(options.fcd, options.ns2mobility, ns2.fcd2ns2mobility, options) - if options.ns2activity: - o = _getOutputStream(options.ns2activity) - ns2.writeNS2activity(o, vehInfo) - _closeOutputStream(o) - if options.ns2config: - o = _getOutputStream(options.ns2config) - ns2.writeNS2config(o, vehInfo, options.ns2activity, options.ns2mobility, begin, end, area) - _closeOutputStream(o) - ## ----- ns2 - - ## ----- PHEM - # .dri - if options.dri: runMethod(options.fcd, options.dri, phem.fcd2dri, options) - # .str (we need the net for other outputs, too) - if options.str or options.fzp or options.flt: - if not options.net: - print "A SUMO network must be given using the --net-input option." - return 1 - if not net: net = sumolib.net.readNet(options.net) - o = _getOutputStream(options.str) - sIDm = phem.net2str(net, o) - _closeOutputStream(o) - # .fzp - if options.flt or options.fzp: - vIDm, vtIDm = runMethod(options.fcd, options.fzp, phem.fcd2fzp, options, {"phemStreetMap":sIDm}) - # .flt - if options.flt: - o = _getOutputStream(options.flt) - phem.vehicleTypes2flt(o, vtIDm) - _closeOutputStream(o) - ## ----- PHEM - return 0 - - -if __name__ == "__main__": - sys.exit(main(sys.argv)) - diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/build/apply_astyle.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/build/apply_astyle.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/build/apply_astyle.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/build/apply_astyle.py 2015-04-17 00:20:29.000000000 +0000 @@ -4,23 +4,46 @@ @author Michael Behrisch @author Daniel Krajzewicz @date 2007 -@version $Id: apply_astyle.py 14425 2013-08-16 20:11:47Z behrisch $ +@version $Id: apply_astyle.py 18096 2015-03-17 09:50:59Z behrisch $ Applies astyle with the proper settings used in SUMO on all files in src. -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2008-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os, subprocess +import os +import subprocess +try: + import autopep8 + autopep = True +except: + autopep = False srcRoot = os.path.join(os.path.dirname(__file__), "../../src/") for root, dirs, files in os.walk(srcRoot): for name in files: if name.endswith(".h") or name.endswith(".cpp"): - subprocess.call("astyle --style=java --unpad-paren --pad-header --pad-oper --add-brackets --indent-switches --align-pointer=type -n".split() + [os.path.join(root, name)]) + subprocess.call( + "astyle --style=java --unpad-paren --pad-header --pad-oper --add-brackets --indent-switches --align-pointer=type -n".split() + [os.path.join(root, name)]) + for ignoreDir in ['.svn', 'foreign']: + if ignoreDir in dirs: + dirs.remove(ignoreDir) + +if autopep: + sumoRoot = os.path.join(os.path.dirname(__file__), "../../") + for root, dirs, files in os.walk(sumoRoot): + for name in files: + if name.endswith(".py"): + subprocess.call( + "autopep8 --in-place".split() + [os.path.join(root, name)]) for ignoreDir in ['.svn', 'foreign']: if ignoreDir in dirs: dirs.remove(ignoreDir) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/build/buildHTMLDocs.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/build/buildHTMLDocs.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/build/buildHTMLDocs.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/build/buildHTMLDocs.py 2015-04-17 00:20:29.000000000 +0000 @@ -2,8 +2,9 @@ """ @file buildHTMLDocs.py @author Daniel Krajzewicz +@author Michael Behrisch @date 2011-10-20 -@version $Id: buildHTMLDocs.py 14487 2013-08-23 10:21:08Z behrisch $ +@version $Id: buildHTMLDocs.py 18096 2015-03-17 09:50:59Z behrisch $ Converts wiki-documentation into HTML pages. @@ -17,133 +18,158 @@ Then, the image-links are extracted from the HTML page and stored temporarily, the links themselves are patched to point to local pages/images (if the page behind the link exists). -The page is saved into MIRROR_FOLDER/. +The page is saved into options.mirror/. After parsing all pages, the images are downloaded and stored into -MIRROR_FOLDER/images. +options.mirror/images. After downloading all data, the title page is extracted and the content included in this page is extracted. This content is embedded into "index.html" between the / markers. All pages downloaded earlier are loaded, and embedded into the index.html between the / markers. Then, -the page is saved into HTML_FOLDER/. All images are copied -from MIRROR_FOLDER/images to HTML_FOLDER/images. +the page is saved into options.output/. All images are copied +from options.mirror/images to options.output/images. -Copyright (C) 2011-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import urllib, os, sys, shutil +import urllib +import os +import sys +import shutil +import datetime +from optparse import OptionParser + from mirrorWiki import readParsePage, readParseEditPage + def patchLinks(page, name): images = set() - level = len(name.split("/"))-1 + level = len(name.split("/")) - 1 level = "../" * level b = page.find("=0: + while b >= 0: # images/files - if page[b+9:].startswith("/wiki/File:") or page[b+9:].startswith("/wiki/Image:"): + if page[b + 9:].startswith("/wiki/File:") or page[b + 9:].startswith("/wiki/Image:"): b2 = b - b = page.find(":", b)+1 - images.add(page[b2+9:page.find("\"",b)]) - page = page[:b2+9] + level + "images/" + page[b:] + b = page.find(":", b) + 1 + images.add(page[b2 + 9:page.find("\"", b)]) + page = page[:b2 + 9] + level + "images/" + page[b:] # pages (HTML) - elif page[b+9:].startswith("/wiki/"): - e = b+9+6 - e2 = page.find("\"", b+9) + elif page[b + 9:].startswith("/wiki/"): + e = b + 9 + 6 + e2 = page.find("\"", b + 9) link = page[e:e2] - if link.find("action=edit")<0: - if link.find("#")>0: + if link.find("action=edit") < 0: + if link.find("#") > 0: link = level + link.replace("#", ".html#") - elif link.find("#")<0 and not (link.endswith(".png") or link.endswith(".jpg") or link.endswith(".svg")): + elif link.find("#") < 0 and not (link.endswith(".png") or link.endswith(".jpg") or link.endswith(".svg")): link = level + link + ".html" - page = page[:b+9] + link + page[e2:] + page = page[:b + 9] + link + page[e2:] else: - page = page[:b+9] + "http://sourceforge.net/" + page[b+10:] - b = page.find("=0: + while b >= 0: b += 5 - e = page.find("\"", b+2) + e = page.find("\"", b + 2) add = page[b:e] l = add[add.rfind("/"):] - if add.find("thumb")>=0: - l = l[l.find("-")+1:] + if add.find("thumb") >= 0: + l = l[l.find("-") + 1:] images.add(add) page = page[:b] + level + "images/" + l + page[e:] - b = page.find("=0: + if l.find("[[") >= 0: # internal link - b = l.find("[")+2 + b = l.find("[") + 2 e = l.find("]", b) t = l[b:e] - if t.find("|")<0: + if t.find("|") < 0: link = t text = t else: link, text = t.split("|") link = link.replace(" ", "_") - if link.find("#")>=0: + if link.find("#") >= 0: link = link.replace("#", ".html#") else: link = link + ".html" # external link - elif l.find("[")>=0: - b = l.find("[")+1 + elif l.find("[") >= 0: + b = l.find("[") + 1 e = l.find("]", b) t = l[b:e] link = t[:t.find(" ")] - text = t[t.find(" ")+1:] + text = t[t.find(" ") + 1:] else: # text - text = l[l.find(" ")+1:] + text = l[l.find(" ") + 1:] link = "" return text, link -MIRROR_FOLDER = "mirror" -HTML_FOLDER = "docs" - -try: os.mkdir(MIRROR_FOLDER) -except: pass -try: os.mkdir(MIRROR_FOLDER + "/images") -except: pass +optParser = OptionParser() +optParser.add_option("-m", "--mirror", default="mirror", help="mirror folder") +optParser.add_option("-o", "--output", default="docs", help="output folder") +optParser.add_option("-i", "--index", default=os.path.join(os.path.dirname( + __file__), "..", "..", "docs", "wiki", "index.html"), help="index template file") +optParser.add_option("-r", "--version", help="add version info") +(options, args) = optParser.parse_args() + +try: + os.mkdir(options.mirror) +except: + pass +try: + os.mkdir(options.mirror + "/images") +except: + pass images = set() -if len(sys.argv)<2: +if len(args) == 0: p = readParsePage("Special:AllPages") p = p[p.find(""):] p = p[p.find("0: - try: - os.makedirs(os.path.join(MIRROR_FOLDER, name[:name.rfind("/")])) - except: pass - if True:#name.find(".")<0: + if name.find("/") > 0: + try: + os.makedirs(os.path.join(options.mirror, name[:name.rfind("/")])) + except: + pass + if True: # name.find(".")<0: c, pi, level = patchLinks(c, name) for i in pi: images.add(i) @@ -151,27 +177,27 @@ for i in pi: images.add(i) name = name + ".html" - fd = open(os.path.join(MIRROR_FOLDER, name), "w") + fd = open(os.path.join(options.mirror, name), "w") fd.write(c) fd.close() imageFiles = [] for i in images: print "Fetching image %s" % i - if i.find(":")>=0: - f = urllib.urlopen("http://sumo-sim.org%s" % i) + if i.find(":") >= 0: + f = urllib.urlopen("http://sumo.dlr.de%s" % i) c = f.read() b = c.find("
") - b = c.find("href=", b)+6 - e = c.find("\"", b+1) - f = urllib.urlopen("http://sumo-sim.org/%s" % c[b:e]) - i = i[i.find(":")+1:] + b = c.find("href=", b) + 6 + e = c.find("\"", b + 1) + f = urllib.urlopen("http://sumo.dlr.de/%s" % c[b:e]) + i = i[i.find(":") + 1:] else: - f = urllib.urlopen("http://sumo-sim.org/%s" % i) - i = i[i.rfind("/")+1:] - if i.find("px-")>=0: - i = i[:i.find('-')+1] - fd = open(os.path.join(MIRROR_FOLDER, "images", i), "wb") + f = urllib.urlopen("http://sumo.dlr.de/%s" % i) + i = i[i.rfind("/") + 1:] + if i.find("px-") >= 0: + i = i[:i.find('-') + 1] + fd = open(os.path.join(options.mirror, "images", i), "wb") fd.write(f.read()) fd.close() imageFiles.append(os.path.join("images", i)) @@ -180,74 +206,89 @@ nav = readParseEditPage("SUMO_User_Documentation") lines = nav[nav.find("="):].split("\n") level = 0 -c = "
    \n"; +c = "" hadHeader = False for l in lines: - if len(l)==0: + if len(l) == 0: continue - if l[0]=='=': + if l[0] == '=': text, link = parseWikiLink(" " + l.replace("=", "")) if hadHeader: - c = c + "
\n"; - spc = ' ' * (level+1) - c = c + spc + "
  • "; - if link!="": - c = c + ""; - c = c + text; - if link!="": - c = c + ""; - c = c + "
  • \n"; + if level > 0: + c += "\n" * level + spc = ' ' * (level + 1) + c = c + spc + "
  • " + if link != "": + c = c + "" + c = c + text + if link != "": + c = c + "" + c = c + "
  • \n" hadHeader = True level = 0 continue - if l[0].find('*')<0: + if l[0].find('*') < 0: continue text, link = parseWikiLink(l) nLevel = l.count('*') - if level>nLevel: - c = c + ("\n" * (level-nLevel)) - if level\n" * (nLevel-level)) - spc = ' ' * (nLevel+1) - #+ str(level) + "-" + str(nLevel) - c = c + spc + "
  • "; - if link !="": - c = c + '' + text + ''; + if level > nLevel: + c = c + ("
  • \n" * (level - nLevel)) + if level < nLevel: + c = c + \ + ('
    • \n' * + (nLevel - level)) + spc = ' ' * (nLevel + 1) + #+ str(level) + "-" + str(nLevel) + c = c + spc + "
    • " + if link != "": + c = c + '' + text + '' else: - c = c + text; - c = c + "
    • \n"; + c = c + text + c = c + "\n" level = nLevel +if level > 0: + c += "
  • \n" * level # get template and embed navigation -fd = open("index.html") +fd = open(options.index) tpl = fd.read() fd.close() b = tpl.find("") -b = tpl.find(">", b)+1 +b = tpl.find(">", b) + 1 e = tpl.find("") tpl = tpl[:b] + c + tpl[e:] - + # build HTML pages -try: os.mkdir(HTML_FOLDER) -except: pass -try: os.mkdir(HTML_FOLDER + "/images") -except: pass +try: + os.mkdir(options.output) +except: + pass +try: + os.mkdir(options.output + "/images") +except: + pass for p in pages: if not p.startswith("href"): continue b = p.find("/wiki/") e = p.find("\"", b) - name = p[b+6:e] + name = p[b + 6:e] if name.endswith(".css"): print "Skipping css-file %s" % name continue + fromStr = 'generated on %s from the wiki page for %s' % ( + datetime.datetime.now(), name, name) name = name + ".html" - t = os.path.join(HTML_FOLDER, name) - fd = open(os.path.join(MIRROR_FOLDER, name)) + t = os.path.join(options.output, name) + fd = open(os.path.join(options.mirror, name)) c = fd.read() + if options.version: + fromStr += " for SUMO %s" % options.version + c = c.replace( + '
    From Sumo
    ', '
    %s
    ' % fromStr) fd.close() # - if name.find('/')>=0: + if name.find('/') >= 0: level = name.count("/") else: level = name.count("\\") @@ -259,22 +300,27 @@ cc = cc.replace("logo.png", level + "logo.png") # links b = cc.find("") e = cc.find("", b) - e = cc.find("<", e+1) - 1 + e = cc.find("<", e + 1) - 1 cc = cc[:b] + c + cc[e:] - try: os.makedirs(os.path.split(t)[0]) - except: pass + try: + os.makedirs(os.path.split(t)[0]) + except: + pass fd = open(t, "w") fd.write(cc) fd.close() for i in imageFiles: - shutil.copy(os.path.join(MIRROR_FOLDER, i), os.path.join(HTML_FOLDER, i)) -shutil.copy(os.path.join(HTML_FOLDER, 'SUMO_User_Documentation.html'), os.path.join(HTML_FOLDER, 'index.html')) + shutil.copy( + os.path.join(options.mirror, i), os.path.join(options.output, i)) +if os.path.exists(os.path.join(options.output, 'SUMO_User_Documentation.html')): + shutil.copy(os.path.join(options.output, 'SUMO_User_Documentation.html'), + os.path.join(options.output, 'index.html')) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/build/checkAuthors.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/build/checkAuthors.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/build/checkAuthors.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/build/checkAuthors.py 2015-04-17 00:20:29.000000000 +0000 @@ -1,22 +1,34 @@ #!/usr/bin/env python """ -@file checkSvnProps.py +@file checkAuthors.py @author Michael Behrisch -@version $Id: checkAuthors.py 14425 2013-08-16 20:11:47Z behrisch $ +@author Daniel Krajzewicz +@date 2011-11-07 +@version $Id: checkAuthors.py 18096 2015-03-17 09:50:59Z behrisch $ Checks authors for all files. -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2010-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2011-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os, subprocess, sys, xml.sax +import os +import subprocess +import sys +import xml.sax from optparse import OptionParser _SOURCE_EXT = [".h", ".cpp", ".py", ".pl", ".java"] + class PropertyReader(xml.sax.handler.ContentHandler): + """Reads the svn properties of files as written by svn log --xml""" def __init__(self, outfile): @@ -48,7 +60,7 @@ e = ticket + 1 while e < len(msg) and msg[e].isdigit(): e += 1 - if msg[ticket+1:e] not in ignoreTickets: + if msg[ticket + 1:e] not in ignoreTickets: keep = True break ticket = msg.find("#", e) @@ -65,10 +77,14 @@ authorFiles[self._currAuthor] = set() authorFiles[self._currAuthor].add(self._out.name) if "thank" in msg: - print >> self._out, "THANKS", " ".join(msg.splitlines()) - print >> log, "thank %s %s" % (msg, self._out.name) + try: + print >> self._out, "THANKS", " ".join(msg.splitlines()) + print >> log, "thank %s %s" % (msg, self._out.name) + except UnicodeEncodeError: + pass authorFiles["thank"].add(self._out.name) + def checkAuthors(fullName, pattern): authors = set() found = False @@ -85,16 +101,18 @@ print >> log, "no author", fullName return authors + def setAuthors(fullName, removal, add, pattern): if options.fix: - out = open(fullName+".tmp", "w") + out = open(fullName + ".tmp", "w") authors = [] for line in open(fullName): if line.startswith(pattern): for item in line[len(pattern):].split(","): a = item.strip() if a in removal: - print >> log, "author %s not in svn log for %s" % (a, fullName) + print >> log, "author %s not in svn log for %s" % ( + a, fullName) authors.append(a) elif authors: if options.fix: @@ -117,17 +135,19 @@ "6399", "6069", "5922", "5048", "4669", "4389", "4257", "4166", "4165", "4084", "4076", "4015", "3966", "3486"]) ignoreTickets = set(["2", "22", "409"]) -sumoRoot = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +sumoRoot = os.path.dirname( + os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) optParser = OptionParser() optParser.add_option("-v", "--verbose", action="store_true", default=False, help="tell me what you are doing") optParser.add_option("-f", "--fix", action="store_true", - default=False, help="fix invalid svn properties") + default=False, help="fix invalid svn properties") optParser.add_option("-a", "--authors", action="store_true", - default=False, help="print author files") -optParser.add_option("-r", "--root", default=sumoRoot, help="root to start parsing at") + default=False, help="print author files") +optParser.add_option( + "-r", "--root", default=sumoRoot, help="root to start parsing at") (options, args) = optParser.parse_args() -authorFiles = {"thank":set()} +authorFiles = {"thank": set()} realNames = {} for line in open(os.path.join(sumoRoot, 'AUTHORS')): entries = line.split() @@ -161,17 +181,19 @@ print >> log, "cannot parse for authors", fullName continue authors = checkAuthors(fullName, pattern) - p = subprocess.Popen(["svn", "log", "--xml", fullName], stdout=subprocess.PIPE) + p = subprocess.Popen( + ["svn", "log", "--xml", fullName], stdout=subprocess.PIPE) output = p.communicate()[0] if p.returncode == 0: if options.authors: - out = open(fullName+".authors", "w") + out = open(fullName + ".authors", "w") else: out = open(os.devnull, "w") pr = PropertyReader(out) xml.sax.parseString(output, pr) out.close() - setAuthors(fullName, authors - pr._authors, pr._authors - authors, pattern) + setAuthors( + fullName, authors - pr._authors, pr._authors - authors, pattern) for ignoreDir in ['.svn', 'foreign', 'contributed', 'foxtools']: if ignoreDir in dirs: dirs.remove(ignoreDir) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/build/checkSvnProps.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/build/checkSvnProps.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/build/checkSvnProps.py 2014-03-16 09:53:39.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/build/checkSvnProps.py 2015-04-17 00:20:29.000000000 +0000 @@ -2,31 +2,42 @@ """ @file checkSvnProps.py @author Michael Behrisch -@date 2010 -@version $Id: checkSvnProps.py 14493 2013-08-24 21:24:04Z behrisch $ +@date 2010-08-29 +@version $Id: checkSvnProps.py 18096 2015-03-17 09:50:59Z behrisch $ Checks svn property settings for all files. -SUMO, Simulation of Urban MObility; see http://sumo-sim.org/ -Copyright (C) 2010-2013 DLR (http://www.dlr.de/) and contributors -All rights reserved +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2010-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. """ -import os, subprocess, sys, xml.sax +import os +import subprocess +import sys +import xml.sax from optparse import OptionParser _SOURCE_EXT = [".h", ".cpp", ".py", ".pl", ".java", ".am"] _TESTDATA_EXT = [".xml", ".prog", ".csv", - ".complex", ".dfrouter", ".duarouter", ".jtrrouter", + ".complex", ".dfrouter", ".duarouter", ".jtrrouter", ".marouter", ".astar", ".chrouter", ".internal", ".tcl", ".txt", ".netconvert", ".netgen", ".od2trips", ".polyconvert", ".sumo", ".meso", ".tools", ".traci", ".activitygen", ".scenario", ".sumocfg", ".netccfg", ".netgcfg"] -_VS_EXT = [".vsprops", ".sln", ".vcproj", ".bat", ".props", ".vcxproj", ".filters"] -_IGNORE = set(["binstate.sumo"]) +_VS_EXT = [".vsprops", ".sln", ".vcproj", + ".bat", ".props", ".vcxproj", ".filters"] +_IGNORE = set(["binstate.sumo", "binstate.sumo.meso", "image.tools"]) _KEYWORDS = "HeadURL Id LastChangedBy LastChangedDate LastChangedRevision" + class PropertyReader(xml.sax.handler.ContentHandler): + """Reads the svn properties of files as written by svn pl -v --xml""" def __init__(self, doFix): @@ -48,7 +59,6 @@ if self._property: self._value += content - def endElement(self, name): ext = os.path.splitext(self._file)[1] if name == 'property' and self._property == "svn:eol-style": @@ -60,32 +70,39 @@ if name == 'property' and self._property == "svn:executable" and ext not in [".py", ".pl", ".bat"]: print self._file, self._property, self._value if self._fix: - subprocess.call(["svn", "pd", "svn:executable", self._file]) + subprocess.call( + ["svn", "pd", "svn:executable", self._file]) if name == 'property' and self._property == "svn:mime-type": print self._file, self._property, self._value if self._fix: - subprocess.call(["svn", "pd", "svn:mime-type", self._file]) + subprocess.call( + ["svn", "pd", "svn:mime-type", self._file]) if ext in _SOURCE_EXT or ext in _TESTDATA_EXT: if name == 'property' and self._property == "svn:eol-style" and self._value != "LF"\ or name == "target" and not self._hadEOL: print self._file, "svn:eol-style", self._value if self._fix: if os.name == "posix": - subprocess.call(["sed", "-i", r's/\r$//', self._file]) - subprocess.call(["sed", "-i", r's/\r/\n/g', self._file]) - subprocess.call(["svn", "ps", "svn:eol-style", "LF", self._file]) + subprocess.call( + ["sed", "-i", r's/\r$//', self._file]) + subprocess.call( + ["sed", "-i", r's/\r/\n/g', self._file]) + subprocess.call( + ["svn", "ps", "svn:eol-style", "LF", self._file]) if ext in _SOURCE_EXT: if name == 'property' and self._property == "svn:keywords" and self._value != _KEYWORDS\ or name == "target" and not self._hadKeywords: print self._file, "svn:keywords", self._value if self._fix: - subprocess.call(["svn", "ps", "svn:keywords", _KEYWORDS, self._file]) + subprocess.call( + ["svn", "ps", "svn:keywords", _KEYWORDS, self._file]) if ext in _VS_EXT: if name == 'property' and self._property == "svn:eol-style" and self._value != "CRLF"\ or name == "target" and not self._hadEOL: print self._file, "svn:eol-style", self._value if self._fix: - subprocess.call(["svn", "ps", "svn:eol-style", "CRLF", self._file]) + subprocess.call( + ["svn", "ps", "svn:eol-style", "CRLF", self._file]) if name == 'property': self._value = "" self._property = None @@ -94,15 +111,18 @@ self._hadKeywords = False +sumoRoot = os.path.dirname( + os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +svnRoots = [sumoRoot] optParser = OptionParser() optParser.add_option("-v", "--verbose", action="store_true", default=False, help="tell me what you are doing") optParser.add_option("-f", "--fix", action="store_true", - default=False, help="fix invalid svn properties") + default=False, help="fix invalid svn properties") +optParser.add_option("-r", "--recheck", + default=sumoRoot, help="fully recheck all files in given dir") (options, args) = optParser.parse_args() seen = set() -sumoRoot = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -svnRoots = [sumoRoot] if len(args) > 0: svnRoots = [os.path.abspath(a) for a in args] else: @@ -112,13 +132,14 @@ svnRoots.append(os.path.join(upDir, l.split()[0])) for svnRoot in svnRoots: if options.verbose: - print "checking", svnRoot - output = subprocess.Popen(["svn", "pl", "-v", "-R", "--xml", svnRoot], stdout=subprocess.PIPE).communicate()[0] + print "checking", svnRoot + output = subprocess.Popen( + ["svn", "pl", "-v", "-R", "--xml", svnRoot], stdout=subprocess.PIPE).communicate()[0] xml.sax.parseString(output, PropertyReader(options.fix)) if options.verbose: - print "re-checking tree at", sumoRoot -for root, dirs, files in os.walk(sumoRoot): + print "re-checking tree at", options.recheck +for root, dirs, files in os.walk(options.recheck): for name in files: fullName = os.path.join(root, name) if fullName in seen or subprocess.call(["svn", "ls", fullName], stdout=open(os.devnull, 'w'), stderr=subprocess.STDOUT): @@ -129,15 +150,18 @@ print fullName, "svn:eol-style" if options.fix: if ext in _VS_EXT: - subprocess.call(["svn", "ps", "svn:eol-style", "CRLF", fullName]) + subprocess.call( + ["svn", "ps", "svn:eol-style", "CRLF", fullName]) else: if os.name == "posix": subprocess.call(["sed", "-i", 's/\r$//', fullName]) - subprocess.call(["svn", "ps", "svn:eol-style", "LF", fullName]) + subprocess.call( + ["svn", "ps", "svn:eol-style", "LF", fullName]) if ext in _SOURCE_EXT: print fullName, "svn:keywords" if options.fix: - subprocess.call(["svn", "ps", "svn:keywords", _KEYWORDS, fullName]) - for ignoreDir in ['.svn', 'foreign', 'contributed']: + subprocess.call( + ["svn", "ps", "svn:keywords", _KEYWORDS, fullName]) + for ignoreDir in ['.svn', 'foreign', 'contributed', 'texttesttmp']: if ignoreDir in dirs: dirs.remove(ignoreDir) diff -Nru sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/build/configTemplateToWiki.py sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/build/configTemplateToWiki.py --- sumo-0.20.0+dfsg+1+8~ubuntu12.04.1/tools/build/configTemplateToWiki.py 1970-01-01 00:00:00.000000000 +0000 +++ sumo-0.23.0+dfsg+5+10~ubuntu12.04.1/tools/build/configTemplateToWiki.py 2015-04-17 00:20:29.000000000 +0000 @@ -0,0 +1,102 @@ +#!/usr/bin/env python +""" +@file configTemplateToWiki.py +@author Michael Behrisch +@date 2012-01-26 +@version $Id: configTemplateToWiki.py 18096 2015-03-17 09:50:59Z behrisch $ + +Generate Wiki table from configuration template. + +SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ +Copyright (C) 2008-2015 DLR (http://www.dlr.de/) and contributors + +This file is part of SUMO. +SUMO is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. +""" +import os +import sys +from xml.sax import parse, handler + +from mirrorWiki import readParseEditPage + + +class ConfigReader(handler.ContentHandler): + + def __init__(self, mergeWikiTxt): + self._level = 0 + self._mergeWiki = mergeWikiTxt + self._intro = {} + self._end = len(mergeWikiTxt) + active = False + currSect = "" + for idx, line in enumerate(mergeWikiTxt): + line = line.strip('\n\r') + if line == "==Options==": + active = True + if active: + if line[:3] == "===": + start = idx + currSect = line + elif line[:2] == "{|": + self._intro[currSect] = (start, idx) + elif line[:4] == "----" or (len(line) > 2 and line[0] == "=" and line[1] != "="): + self._end = idx + break + if currSect == "": + print line + + def startElement(self, name, attrs): + if self._level == 1: + # subtopic + title = "===%s===" % name.replace("_", " ").title() + if title in self._intro: + begin, end = self._intro[title] + title = ("".join(self._mergeWiki[begin:end])) + else: + title += "\n" + print """%s{| class="wikitable" style="width:90%%" +|- +! style="background:#ddffdd; vertical-align:top; width:350px" | Option +! style="background:#ddffdd; vertical-align:top" | Description""" % title + if self._level == 2: + # entry + print '|-\n| style="vertical-align:top" |', + a = "" + for s in attrs.get('synonymes', '').split(): + if len(s) == 1: + a = s + if a != "": + print '{{Option|-%s {{DT_%s}}}}
    ' % (a, attrs['type']), + print '{{Option|--%s {{DT_%s}}}}' % (name, attrs['type']) + suffix = "" + if attrs['value']: + suffix = "; ''default: '''%s'''''" % attrs['value'] + print '| style="vertical-align:top" | %s%s' % (attrs['help'], suffix) + self._level += 1 + + def endElement(self, name): + self._level -= 1 + if self._level == 1: + # subtopic end + print "|-\n|}\n" + + def endDocument(self): + print ("".join(self._mergeWiki[self._end:])).strip() + +if __name__ == "__main__": + if len(sys.argv) == 2: + app = sys.argv[1].lower() + if app == "netgenerate": + app = "netgen" + cfg = os.path.join(os.path.dirname( + __file__), "..", "..", "tests", app, "meta", "write_template_full", "cfg." + app) + parse( + cfg, ConfigReader(readParseEditPage(sys.argv[1].upper()).splitlines(True))) + elif len(sys.argv) == 3: + parse(sys.argv[1], ConfigReader(open(sys.argv[2]).readlines())) + else: + print >> sys.stderr, "Usage: %s